query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Setup before running any test case
public static function setUpBeforeClass() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp ()\n {}", "protected function doSetup(): void\n {\n }", "protected function setUp() { }", "protected function setUp() { }", "public function setup() {}", "function setUp() {\n\t\t\n\t}", "function setUp() {\n\t\t\n\t}", "protected function setUp()\n {}", "public function setUp() {}", "public function setUp() {}", "public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }", "public function setUp() {}" ]
[ "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.84345204", "0.84345204", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.84340215", "0.82915086", "0.8290926", "0.8224121", "0.8224121", "0.82144415", "0.82021075", "0.82021075", "0.8123121", "0.8108245", "0.81079835", "0.8106947", "0.8106289" ]
0.0
-1
Setup before running each test case
public function setUp() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "function setUp() {\n\t\t\n\t}", "function setUp() {\n\t\t\n\t}", "protected function doSetup(): void\n {\n }", "protected function setUp ()\n {}", "public function setUp(): void\n {\n $this->setUpWithNoResult();\n }", "protected function setUp() { }", "protected function setUp() { }", "public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}" ]
[ "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.81356287", "0.81356287", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.8134937", "0.80421937", "0.80421937", "0.80289686", "0.8018776", "0.793929", "0.7926855", "0.7926855", "0.7909959", "0.7904265", "0.7904265", "0.7904265", "0.7904265" ]
0.0
-1
Clean up after running each test case
public function tearDown() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp();", "public function cleanUp();", "public function cleanUp();", "public function cleanup() {\n\t\t//TODO\n\t}", "public function cleanTestActivities()\n {\n\n $this->collectCurrentTestUsers();\n $this->cleanExerciseUploadPictures();\n $this->cleanDeviceUploadPictures();\n $this->resetDatabase();\n }", "protected function tearDown(): void {\n unset($this->integration);\n unset($this->ccm);\n unset($this->session);\n }", "public function teardown()\n {\n //\n }", "protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }", "public function tearDown()\n {\n unset($this->db);\n unset($this->statement);\n unset($this->mockData);\n }", "protected function tearDown() {\n\n $this->client = null;\n $this->deleteTestLocations();\n $this->locIDs = null;\n reuse_generateXML();\n }", "public function cleanup()\n {\n }", "protected function tearDown(): void {\n\t\t$this->http_client = null;\n\t\t$this->process_transactions = array();\n\n\t\tif ( ! empty( $this->transactions ) ) {\n\t\t\t$this->transactions = array();\n\n\t\t\tCrudTable\\delete_rows( 'transactions', $this->key_pairs, 100 );\n\n\t\t\t$this->key_pairs['tag'] = $this->tag;\n\t\t\tCrudTable\\delete_rows( 'transactions', $this->key_pairs, 100 );\n\n\t\t\tTestHelpers::removeJsonFile( $this->process_tag );\n\t\t\tTestHelpers::removeJsonFile( $this->tag );\n\t\t}\n\t}", "protected function cleanUp()\n\t{\n\t\t// clean\n\t\t$this->killExceededTasks();\n\t\t$this->cleanHistory();\n\t}", "public function teardown()\n {\n }", "function __destruct() {\n if ($this->testDir) {\n $this->eraseTempDir();\n }\n $this->unsetMockSession();\n }", "public function tearDown()\n {\n unset($this->_standardLib);\n unset($this->_daughter);\n }", "public function tearDown(): void\n {\n parent::tearDown();\n unset($this->purifier);\n unset($this->em);\n unset($this->objectiveManager);\n unset($this->learningMaterialManager);\n unset($this->courseLearningMaterialManager);\n unset($this->sessionLearningMaterialManager);\n unset($this->sessionDescriptionManager);\n unset($this->commandTester);\n }", "public function cleanup()\n\t{\n\t}", "public function tearDown() {\n $this->container = null;\n $this->model = null;\n $this->request = null;\n $this->response = null;\n $this->responseHeaders = null;\n $this->responseWriter = null;\n }", "protected function tearDown()\n {\n unset($this->output);\n }", "public function tearDown(): void\n {\n parent::tearDown();\n unset($this->filesystem);\n unset($this->diskSpace);\n unset($this->commandTester);\n }", "protected function tearDown() {\n $this->osapiCollection = null;\n $this->list = null;\n parent::tearDown();\n }", "public function tearDown()\n {\n // delete your instance\n OGR_DS_Destroy($this->hSrcDataSource);\n\n delete_directory($this->strPathToOutputData);\n\n unset($this->strPathToOutputData);\n unset($this->strTmpDumpFile);\n unset($this->strPathToData);\n unset($this->strPathToStandardData);\n unset($this->bUpdate);\n unset($this->hOGRSFDriver);\n unset($this->hLayer);\n unset($this->iSpatialFilter);\n unset($this->hSrcDataSource);\n }", "public function cleanup()\n\t{\n\t\t\n\t}", "protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }", "public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }", "public function tearDown() {\n $this->resource = null;\n $this->response = null;\n $this->database = null;\n $this->storage = null;\n $this->event = null;\n $this->manager = null;\n }", "public function tearDown()\n\t{\n\t\tunset($this->target);\n\t}", "protected function tearDown(): void\n {\n $this->provider = null;\n $this->response = null;\n }", "public function tearDown() : void {\n\t\tunset($this->ls); /* Kill circular references */\n\t\tunset($this->lsconn); /* Kill circular references */\n\t}", "public function cleanup(): void\n {\n }", "public function cleanup(): void\n {\n }", "protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test data\n\t\tunset($modSettings);\n\t}", "protected function tearDown() {\n gc_collect_cycles();\n }", "public function tearDown(): void {\n // Remove any temporary directories that were created.\n $filesystem = new Filesystem();\n foreach ($this->tmpDirs as $dir) {\n $filesystem->remove($dir);\n }\n // Clear out variables from the previous pass.\n $this->tmpDirs = [];\n $this->io = NULL;\n // Clear the composer cache dir, if it was set\n putenv('COMPOSER_CACHE_DIR=');\n }", "public function tearDown() {\n $this->transformation = null;\n }", "public function tearDown() {\n $this->transformation = null;\n }", "public function tearDown() {\n $this->transformation = null;\n }", "protected function tearDown()\n {\n $this->regular1 = null;\n $this->regular2 = null;\n $this->rental1 = null;\n $this->rental2 = null;\n }", "protected function tearDown()\n {\n $this->calculator = NULL;\n }", "protected function tearDown(): void {\n $this->parser = null;\n }", "public function teardown()\n {\n if ($this->csvFile) {\n unlink($this->csvFile);\n $this->csvFile = null;\n }\n\n if ($this->photoZip) {\n unlink($this->photoZip);\n $this->photoZip = null;\n }\n }", "public function tearDown()\n {\n unset(\n $this->plugins,\n $this->events,\n $this->connection,\n $this->config\n );\n }", "protected function tearDown()\n {\n session_destroy(); //req'd because Kml class sets a cookie\n $this->clearRequest();\n $this->clearTmpFiles();\n }", "public function Cleanup()\r\n\t{\r\n\t}", "protected function tearDown()\n {\n \tunset($this->object);\n }", "protected function tearDown()\n {\n \tunset($this->object);\n }", "protected function tearDown()\n {\n \tunset($this->object);\n }", "protected function tearDown()\n {\n \tunset($this->object);\n }", "public function tearDown() {\n\t\tFixtures::clear('db');\n\t\tGalleries::reset();\n\t\tImages::reset();\n\t}", "public function tearDown() {\r\n\t\tunset($this->ImgTblHelper, $this->Controller, $this->View);\r\n\t\tparent::tearDown();\r\n\t}", "protected function tearDown(): void\n {\n $this->autorizacao = null;\n $this->transacao = null;\n $this->object = null;\n }", "protected function tearDown() {\r\n\t\t$this->dbh = null;\r\n\t\t$this->storage = null;\r\n\t\tparent::tearDown ();\r\n\t}", "public function tearDown()\n {\n $this->objectManager->create(\\Magento\\Tax\\Test\\TestStep\\DeleteAllTaxRulesStep::class, [])->run();\n }", "protected function tearDown() {\n $this->stack = null;\n }" ]
[ "0.7987785", "0.7987785", "0.7987785", "0.7987785", "0.7987785", "0.7987785", "0.7987785", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7985815", "0.7985815", "0.7985815", "0.7985815", "0.7985815", "0.7985815", "0.7850843", "0.7850843", "0.7850843", "0.76951295", "0.7688187", "0.76663786", "0.76383704", "0.76116425", "0.76023465", "0.759858", "0.7592881", "0.7578189", "0.75721014", "0.7563723", "0.7532292", "0.7532245", "0.7510675", "0.7466052", "0.745502", "0.7447906", "0.7437516", "0.7432085", "0.7422239", "0.742056", "0.74127865", "0.7395499", "0.7393894", "0.73909515", "0.7390909", "0.7389362", "0.7387827", "0.7387827", "0.7384437", "0.7381771", "0.73808354", "0.73763293", "0.73763293", "0.73763293", "0.73758084", "0.7359128", "0.7354937", "0.7352378", "0.73359734", "0.7333032", "0.7329993", "0.7327933", "0.7327933", "0.7327933", "0.7327933", "0.73216355", "0.7312936", "0.7306989", "0.7304376", "0.7294614", "0.72820467" ]
0.0
-1
Clean up after running all test cases
public static function tearDownAfterClass() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp();", "public function cleanUp();", "public function cleanUp();", "public function cleanup() {\n\t\t//TODO\n\t}", "public function cleanTestActivities()\n {\n\n $this->collectCurrentTestUsers();\n $this->cleanExerciseUploadPictures();\n $this->cleanDeviceUploadPictures();\n $this->resetDatabase();\n }", "public function cleanup()\n {\n }", "protected function cleanUp()\n\t{\n\t\t// clean\n\t\t$this->killExceededTasks();\n\t\t$this->cleanHistory();\n\t}", "public function tearDown()\n {\n unset($this->db);\n unset($this->statement);\n unset($this->mockData);\n }", "public function tearDown()\n {\n unset($this->_standardLib);\n unset($this->_daughter);\n }", "public function teardown()\n {\n //\n }", "protected function tearDown(): void {\n unset($this->integration);\n unset($this->ccm);\n unset($this->session);\n }", "protected function tearDown() {\n\n $this->client = null;\n $this->deleteTestLocations();\n $this->locIDs = null;\n reuse_generateXML();\n }", "public function cleanup()\n\t{\n\t}", "protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }", "public function tearDown(): void\n {\n parent::tearDown();\n unset($this->purifier);\n unset($this->em);\n unset($this->objectiveManager);\n unset($this->learningMaterialManager);\n unset($this->courseLearningMaterialManager);\n unset($this->sessionLearningMaterialManager);\n unset($this->sessionDescriptionManager);\n unset($this->commandTester);\n }", "public function teardown()\n {\n }", "public function cleanup()\n\t{\n\t\t\n\t}", "function __destruct() {\n if ($this->testDir) {\n $this->eraseTempDir();\n }\n $this->unsetMockSession();\n }", "protected function tearDown(): void {\n\t\t$this->http_client = null;\n\t\t$this->process_transactions = array();\n\n\t\tif ( ! empty( $this->transactions ) ) {\n\t\t\t$this->transactions = array();\n\n\t\t\tCrudTable\\delete_rows( 'transactions', $this->key_pairs, 100 );\n\n\t\t\t$this->key_pairs['tag'] = $this->tag;\n\t\t\tCrudTable\\delete_rows( 'transactions', $this->key_pairs, 100 );\n\n\t\t\tTestHelpers::removeJsonFile( $this->process_tag );\n\t\t\tTestHelpers::removeJsonFile( $this->tag );\n\t\t}\n\t}", "protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }", "public function tearDown()\n {\n // delete your instance\n OGR_DS_Destroy($this->hSrcDataSource);\n\n delete_directory($this->strPathToOutputData);\n\n unset($this->strPathToOutputData);\n unset($this->strTmpDumpFile);\n unset($this->strPathToData);\n unset($this->strPathToStandardData);\n unset($this->bUpdate);\n unset($this->hOGRSFDriver);\n unset($this->hLayer);\n unset($this->iSpatialFilter);\n unset($this->hSrcDataSource);\n }", "protected function tearDown() {\n gc_collect_cycles();\n }", "public function tearDown() {\n $this->container = null;\n $this->model = null;\n $this->request = null;\n $this->response = null;\n $this->responseHeaders = null;\n $this->responseWriter = null;\n }", "public function tearDown(): void\n {\n parent::tearDown();\n unset($this->filesystem);\n unset($this->diskSpace);\n unset($this->commandTester);\n }", "public function tearDown(): void {\n // Remove any temporary directories that were created.\n $filesystem = new Filesystem();\n foreach ($this->tmpDirs as $dir) {\n $filesystem->remove($dir);\n }\n // Clear out variables from the previous pass.\n $this->tmpDirs = [];\n $this->io = NULL;\n // Clear the composer cache dir, if it was set\n putenv('COMPOSER_CACHE_DIR=');\n }", "public function cleanup(): void\n {\n }", "public function cleanup(): void\n {\n }", "public function Cleanup()\r\n\t{\r\n\t}", "public function tearDown() : void {\n\t\tunset($this->ls); /* Kill circular references */\n\t\tunset($this->lsconn); /* Kill circular references */\n\t}", "protected function tearDown()\n {\n unset($this->output);\n }", "public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }", "protected function tearDown() {\n $this->osapiCollection = null;\n $this->list = null;\n parent::tearDown();\n }", "protected function tearDown()\n {\n $this->calculator = NULL;\n }", "protected function tearDown(): void {\n $this->parser = null;\n }", "protected function tearDown()\n {\n $this->compilerPass = null;\n $this->container = null;\n parent::tearDown();\n }", "protected function tearDown()\n {\n $this->regular1 = null;\n $this->regular2 = null;\n $this->rental1 = null;\n $this->rental2 = null;\n }", "public function tearDown() {\n\t\tFixtures::clear('db');\n\t\tGalleries::reset();\n\t\tImages::reset();\n\t}", "protected function tearDown()\n {\n \\RPI\\Foundation\\Helpers\\FileUtils::delTree(__DIR__.\"/LESSPHPTest/ROOT\");\n }", "public function tearDown() {\n $this->resource = null;\n $this->response = null;\n $this->database = null;\n $this->storage = null;\n $this->event = null;\n $this->manager = null;\n }", "protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test data\n\t\tunset($modSettings);\n\t}", "public function tearDown() {\n if ($this->wedisabledgc) {\n gc_enable();\n }\n $this->wedisabledgc = false;\n }", "public function tearDown()\n {\n $fs = new SymfonyFileSystem();\n $fs->remove($this->fakeTestFileDir);\n\n unset($this->builder);\n unset($this->builder);\n unset($this->fs);\n m::close();\n }", "protected function tearDown(): void\n {\n $this->provider = null;\n $this->response = null;\n }", "function endTest() {\n unset($this->CalendarRecursion);\n unset($this->CalendarInstance);\n unset($this->Activity);\n ClassRegistry::flush();\n }", "public function tearDown()\n {\n unset(\n $this->plugins,\n $this->events,\n $this->connection,\n $this->config\n );\n }", "protected function tearDown()\n {\n session_destroy(); //req'd because Kml class sets a cookie\n $this->clearRequest();\n $this->clearTmpFiles();\n }", "public function tearDown() {\r\n\t\tunset($this->ImgTblHelper, $this->Controller, $this->View);\r\n\t\tparent::tearDown();\r\n\t}", "public function tearDown() {\n $this->transformation = null;\n }", "public function tearDown() {\n $this->transformation = null;\n }", "public function tearDown() {\n $this->transformation = null;\n }", "protected function tearDown() {\r\n\t\t$this->dbh = null;\r\n\t\t$this->storage = null;\r\n\t\tparent::tearDown ();\r\n\t}", "public function tearDown()\n\t{\n\t\tunset($this->target);\n\t}", "function tearDown() {\n\t\t$this->wfRecursiveRemoveDir( $this->tmpName );\n\t}", "protected function tearDown()\n {\n Phlash::clear();\n }", "public function tearDown()\n {\n unset($this->filterRepositoryMock);\n unset($this->notificationContextManagerMock);\n unset($this->notificationTranslatorMock);\n unset($this->filterManager);\n }" ]
[ "0.79781395", "0.79781395", "0.79781395", "0.79781395", "0.79781395", "0.79781395", "0.79781395", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976344", "0.7976344", "0.7976344", "0.7976344", "0.7976344", "0.7976344", "0.78772247", "0.78772247", "0.78772247", "0.77385294", "0.7622718", "0.7590846", "0.7581981", "0.75642306", "0.75500023", "0.7537886", "0.75273365", "0.7519937", "0.7509883", "0.7505579", "0.74835205", "0.74744475", "0.7472191", "0.7471073", "0.7448932", "0.74277306", "0.74264514", "0.7404205", "0.739177", "0.7386229", "0.7383461", "0.738092", "0.738092", "0.73677146", "0.73663706", "0.73597026", "0.734277", "0.7338558", "0.73383325", "0.7336859", "0.73303896", "0.7327291", "0.73259425", "0.7311458", "0.7303411", "0.7294846", "0.7285744", "0.7283386", "0.7278399", "0.7277675", "0.7275594", "0.72737646", "0.7273622", "0.7269152", "0.7269152", "0.7269152", "0.72667706", "0.72666764", "0.7249254", "0.7248658", "0.72467804" ]
0.0
-1
Creates values of all types
public function values() { return array_merge( array(null), $this->primitives(), $this->arrays(), $this->maps(), $this->objects() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function init()\n\t{\n\n\t\tself::$_metatype = self::create_type(MetaType::class);\n\n\t\tself::$_void = self::create_type(VoidType::class);\n\t\tself::$_none = self::create_type(NoneType::class);\n\t\tself::$_any = self::create_type(AnyType::class);\n\n\t\t// self::$_scalar = self::create_type(ScalarType::class);\n\t\tself::$_string = self::create_type(StringType::class);\n\t\tself::$_float = self::create_type(FloatType::class);\n\t\tself::$_int = self::create_type(IntType::class);\n\t\tself::$_uint = self::create_type(UIntType::class);\n\t\tself::$_bool = self::create_type(BoolType::class);\n\n\t\tself::$_iterable = self::create_type(IterableType::class);\n\t\tself::$_array = self::create_type(ArrayType::class);\n\t\tself::$_dict = self::create_type(DictType::class);\n\n\t\tself::$_xview = self::create_type(XViewType::class);\n\t\tself::$_regex = self::create_type(RegexType::class);\n\n\t\tself::$_callable = self::create_type(CallableType::class);\n\t\tself::$_namespace = self::create_type(NamespaceType::class);\n\t}", "public function create( $value, $type = 'standard' );", "public function creataTypeArray()\n\t{\n\t\t$this->db->creataTypeArray();\n\t}", "public function generate_data() {\n\t\t$this->data = $this->get_registered_post_types();\n\t}", "public function run()\n {\n foreach (self::TYPES_DATA as $aType) {\n $this->createType($aType);\n }\n }", "protected function initializeValues(): void\n {\n foreach ($this->params as $name => $infos) {\n if (!$this->is_sub_object && isset($infos['subobject']) && $infos['subobject']) {\n if (isset($infos['multivalues']) && $infos['multivalues']) {\n $this->values[$name] = [];\n } else {\n $tmp = get_class($this);\n $parts = explode('\\\\', $tmp);\n array_pop($parts);\n $class_name = implode('\\\\', $parts) . '\\\\' . $infos['type'];\n $class_name = str_replace('Entity', 'Datatype', $class_name);\n if (!class_exists($class_name)) {\n $class_name = str_replace(['\\\\EU\\\\', '\\\\AP\\\\', '\\\\EA\\\\'], '\\\\AM\\\\', $class_name);\n }\n $this->values[$name] = new $class_name();\n }\n } else {\n $this->values[$name] = null;\n }\n }\n }", "abstract public function getValueType();", "public function run()\n {\n PropertyType::create([\n 'name' => 'Allgemein',\n ]);\n\n PropertyType::create([\n 'name' => 'Vitalwerte',\n ]);\n\n PropertyType::create([\n 'name' => 'Medikamente',\n ]);\n }", "public function getValueType();", "public function buildType(array &$types=[], array &$wrapped=[], array &$visitor=[]): array;", "public function run()\n {\n Type::create([\n 'type' => 'TRUCK & BOX',\n \t'name' => 'TRANSFER'\n ]);\n\n Type::create([\n 'type' => 'TRUCK & BOX',\n \t'name' => 'FORANEO'\n ]);\n\n // Type::create([\n // 'type' => 'TRUCK',\n // \t'name' => 'VAGONETA'\n // ]);\n\n // Type::create([\n // 'type' => 'TRUCK',\n // \t'name' => 'REDILAS'\n // ]);\n\n // Type::create([\n // 'type' => 'TRUCK',\n // \t'name' => 'PICK UP'\n // ]);\n\n // Type::create([\n // 'type' => 'TRUCK',\n // \t'name' => 'VAN'\n // ]);\n\n // Type::create([\n // 'type' => 'TRUCK',\n // \t'name' => 'CORTO'\n // ]);\n\n // Type::create([\n // 'type' => 'TRUCK',\n // \t'name' => 'TRACTOR'\n // ]);\n\n // Type::create([\n // 'type' => 'BOX',\n // 'name' => 'CAJA SECA'\n // ]);\n }", "private function setValues()\n {\n foreach($this->data as $type => $values)\n if(!preg_match('/(library)/i', $type))\n foreach($values as $key => $value)\n $this->{strtolower($type)}[$key] = $value;\n }", "private function buildValues(iterable $values): Generator\n {\n foreach ($values as $key => $value) {\n yield $key => new Value($value);\n }\n }", "public abstract function makeValue($value);", "public static function create(array $values = []);", "public function run()\n {\n Type::create([\n 'name' => 'Prototype',\n 'speed' => 60,\n 'fuelUnits' => 10,\n 'milesPerUnit' => 10\n ]);\n Type::create([\n 'name' => 'Normal',\n 'speed' => 40,\n 'fuelUnits' => 20,\n 'milesPerUnit' => 5\n ]);\n Type::create([\n 'name' => 'TransContinental',\n 'speed' => 20,\n 'fuelUnits' => 50,\n 'milesPerUnit' => 30\n ]);\n }", "public function setup_types()\n {\n }", "public function run()\n {\n PDType::factory()->times(count(PDTypeFactory::$pdTypes))->create();\n }", "private function _createBannerTypes() {\n $types = [\n [\n 'width' => 200,\n 'height' => 200\n ],\n [\n 'width' => 240,\n 'height' => 400\n ],\n [\n 'width' => 250,\n 'height' => 250\n ],\n [\n 'width' => 250,\n 'height' => 360\n ],\n [\n 'width' => 300,\n 'height' => 250\n ],\n [\n 'width' => 336,\n 'height' => 280\n ],\n [\n 'width' => 120,\n 'height' => 600\n ],\n [\n 'width' => 160,\n 'height' => 600\n ],\n [\n 'width' => 300,\n 'height' => 1050\n ],\n [\n 'width' => 468,\n 'height' => 60\n ],\n [\n 'width' => 728,\n 'height' => 90\n ],\n [\n 'width' => 930,\n 'height' => 180\n ],\n [\n 'width' => 970,\n 'height' => 90\n ],\n [\n 'width' => 980,\n 'height' => 120\n ]\n ];\n\n foreach ($types as $type) {\n $typeModel = new BannerType;\n $typeModel->fill($type);\n $typeModel->save();\n }\n }", "public static function getStandardTypes()\n {\n }", "private static function prepare_values($values, $type_name)\n {\n }", "public function run()\n {\n Type::create(['type' => 'Daily']);\n Type::create(['type' => 'Casual']);\n Type::create(['type' => 'Party']);\n }", "public function run()\n {\n $list = ['Anúncio', 'Férias', 'Desligamento', 'Outros'];\n\n foreach ($list as $item) {\n Type::create(['name' => $item]);\n }\n }", "public function run()\n {\n Type::create([\n 'name' => 'Artéfacte',\n ]);\n Type::create([\n 'name' => 'Ephémère',\n ]);\n Type::create([\n 'name' => 'Rituel',\n ]);\n Type::create([\n 'name' => 'Enchantement',\n ]);\n Type::create([\n 'name' => 'Planeswalker',\n ]);\n Type::create([\n 'name' => 'Créature',\n ]);\n }", "private function get_field_value_types() : array {\n $fields_with_value_types = array_filter( $this->instances, function( $instance ) {\n return $instance instanceof Field && $this->does_field_have_value_type( $instance );\n } );\n\n return array_reduce( $fields_with_value_types, function( $value_types, $field ) {\n $value_types[ $field::TYPE ] = $field::TYPE . 'Value';\n\n return $value_types;\n }, [] );\n }", "public function setTypes(){\n $this->var = false;\n $this->symb = false;\n $this->label = false;\n $type = '';\n \n //Ulozi postupne do jednotlivych promennych jestli dany argument odpovida nejakemu danemu vzoru a pote v podminkach rozhodneme typ argumentu (ktery na konci funkce ulozime do typu) a take jestli je argument var, symb, label nebo type\n $var = preg_match(\"/^(TF|LF|GF)@((\\p{L}|-|[_$&%*!?])(\\p{L}|-|[_$&%*!?]|[0-9])*)$/u\", $this->arg);\n $int = preg_match(\"/^int@([\\+\\-])?([0-9])*$/u\", $this->arg);\n $bool = preg_match(\"/^bool@(true|false)$/u\", $this->arg);\n $string = preg_match(\"/^string@(\\p{L}|[^(\\w\\\\\\)]|\\d|[_]|\\\\\\\\([0-9][0-9][0-9]))*$/u\", $this->arg);\n $nil = preg_match(\"/^nil@nil$/u\", $this->arg);\n $label = preg_match(\"/^((\\p{L}|[_$&%*!?])(\\p{L}|-|[_$&%*!?]|[0-9])*)$/u\", $this->arg);\n if($var){\n $type = \"var\";\n $this->var = true;\n $this->symb = true;\n }\n if($int){\n $type = \"int\";\n $this->symb = true;\n }\n if($bool){\n $type = \"bool\";\n $this->symb = true;\n }\n if($string){\n $type = \"string\";\n $this->symb = true;\n }\n if($nil){\n $type = \"nil\";\n $this->symb = true;\n }\n if($label){\n if(preg_match(\"/^(int|bool|string)$/u\", $this->arg)){\n $this->type_type = true;\n }\n $type = \"label\";\n $this->label = true; \n }\n if(!($var||$int||$bool||$string||$nil||$label)){\n fwrite(STDERR, \"CHYBA \".ERROR_23.\" - spatny argument\\n\");\n exit(ERROR_23);\n }\n $this->setType($type);\n }", "function get_attrs($type, $values)\n{\n foreach ($values as $name)\n {\n $elements[] = array('name' => $name, 'type' => $type);\n }\n return $elements;\n}", "public function run()\n {\n $default = [\n ['type' => 'Super Admin'], \n ['type' => 'Admin'], \n ['type' =>'Director'], \n ['type' =>'Department Head'], \n ['type' =>'Group Leader'],\n ['type' =>'Developer']\n ];\n\n foreach ($default as $key => $value) {\n UserType::create($value);\n }\n }", "abstract protected function initDataTypes();", "public function typeProvider()\n {\n return array(\n array(true, false),\n array(12, false),\n array(24.50, false),\n array(new \\stdClass(), false),\n array('string', true),\n );\n }", "public function definition()\n {\n $types = PropertyType::all()->pluck('id')->toArray();\n return [\n 'county' => $this->faker->text,\n 'country' => $this->faker->text,\n 'town' => $this->faker->text,\n 'description' => $this->faker->text,\n 'displayable_address' => $this->faker->address,\n 'image' => $this->faker->text,\n 'thumbnail' => $this->faker->text,\n 'latitude' => $this->faker->latitude,\n 'longitude' => $this->faker->longitude,\n 'number_of_bedrooms' => $this->faker->numberBetween(1, 10),\n 'number_of_bathrooms' => $this->faker->numberBetween(1, 10),\n 'price' => $this->faker->numberBetween(1, 10000),\n 'property_type_id' => $this->faker->randomElement($types),\n 'type' => $this->faker->randomElement(['sale', 'rent']),\n ];\n }", "public function create()\n {\n $definition = $this->definition->toArray();\n\n if (! isset($definition[$this->type]) || empty($definition[$this->type])) {\n return;\n }\n\n foreach (range(1, $definition[$this->type]['scale'] ?? 1) as $index) {\n $this->relation()->create(\n $this->baseAttributes($index, $definition[$this->type]) +\n $this->attributes($definition)\n );\n }\n }", "protected abstract function operatorTypes();", "public static function valueTypes(): array\n {\n return [Reward::VALUE_TYPE_FIXED, Reward::VALUE_TYPE_PERCENT];\n }", "public function createPostTypes()\n {\n }", "public function run()\n {\n Type::create([\n 'name' => \"Type 1\"\n ]);\n Type::create([\n 'name' => \"Type 2\"\n ]);\n Type::create([\n 'name' => \"Type 3\"\n ]);\n Type::create([\n 'name' => \"Type 4\"\n ]);\n Type::create([\n 'name' => \"Type 5\"\n ]);\n Type::create([\n 'name' => \"Type 6\"\n ]);\n Type::create([\n 'name' => \"Type 7\"\n ]);\n Type::create([\n 'name' => \"Type 8\"\n ]);\n Type::create([\n 'name' => \"Type 9\"\n ]);\n Type::create([\n 'name' => \"Type 10\"\n ]);\n }", "public static function getAllBuiltInTypes()\n {\n }", "public function run()\n {\n for ($i = 0; $i < 5; $i++) {\n Type::create([\n 'name' => '测试类型' . $i,\n ]);\n }\n }", "protected function getTypes() {}", "public function keyValueTypeProvider()\n {\n return [\n // key | value\n [Str::random(), Str::random()],\n [Str::random(), null],\n [Str::random(), 1],\n [Str::random(), 1.1],\n [Str::random(), true],\n [Str::random(), false],\n [Str::random(), []],\n [Str::random(), range(1, 10)],\n ];\n }", "function create($value)\n {\n return new Value($value);\n }", "public function create_post_types() {\n }", "private function create() {\n\n\t\t// Fetch which post types are being set up\n\t\t$post_types_to_set_up = static::$post_types_to_set_up;\n\n\t\t// Bail early if we don't have any\n\t\tif ( empty( $post_types_to_set_up ) || ! is_array( $post_types_to_set_up ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Loop over each one and create it\n\t\tforeach ( $post_types_to_set_up as $slug => $cpt_args ) {\n\n\t\t\t$label_args\t= ( isset( $cpt_args['label_args'] ) ) ? $cpt_args['label_args'] : array();\n\t\t\t$wp_args \t= ( isset( $cpt_args['wp_args'] ) ) ? $cpt_args['wp_args'] : array();\n\t\t\t$icon \t\t= ( isset( $cpt_args['icon'] ) ) ? $cpt_args['icon'] : '';\n\n\t\t\t$post_type_object = new \\UBC\\Press\\CPTs\\CPT( $label_args, $wp_args, $icon );\n\t\t}\n\n\t}", "public function run()\n {\n $types = [\n 'Agua','Eléctrico','Tierra','Roca','Fuego','Sinistro','Bicho',\n 'Dragón','Fantasma','Veneno','Volador','Hielo','Normal','Hierva',\n 'Lucha','Psiquico'\n ];\n\n for ($i=0; $i < count($types); $i++) { \n Type::create([\n 'name' => $types[$i],\n ]);\n }\n }", "public static function createSelf()\n {\n $dataTypeFactory = new self();\n\n $dataTypeFactory->addFactoryTypeHandler('bit', new BitTypeFactory());\n // Integer type mappers.\n $dataTypeFactory->addFactoryTypeHandler('tinyint', new TinyIntTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('smallint', new SmallIntTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('mediumint', new MediumIntTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('int', new IntTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('bigint', new BigIntTypeFactory());\n // Numeric-point type mappers.\n $dataTypeFactory->addFactoryTypeHandler('double', new DoubleTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('float', new FloatTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('decimal', new DecimalTypeFactory());\n // Date and time mappers.\n $dataTypeFactory->addFactoryTypeHandler('date', new DateTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('time', new TimeTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('timestamp', new TimestampTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('datetime', new DateTimeTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('year', new YearTypeFactory());\n // Char type mappers.\n $dataTypeFactory->addFactoryTypeHandler('char', new CharTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('varchar', new VarCharTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('binary', new BinaryTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('varbinary', new VarBinaryTypeFactory());\n // Blob type mappers.\n $dataTypeFactory->addFactoryTypeHandler('tinyblob', new TinyBlobTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('blob', new BlobTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('mediumblob', new MediumBlobTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('longblob', new LongBlobTypeFactory());\n // Text type mappers.\n $dataTypeFactory->addFactoryTypeHandler('tinytext', new TinyTextTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('text', new TextTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('mediumtext', new MediumTextTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('longtext', new LongTextTypeFactory());\n // Option type mappers.\n $dataTypeFactory->addFactoryTypeHandler('enum', new EnumTypeFactory());\n $dataTypeFactory->addFactoryTypeHandler('set', new SetTypeFactory());\n // Other type mappers.\n $dataTypeFactory->addFactoryTypeHandler('json', new JsonTypeFactory());\n\n return $dataTypeFactory;\n }", "public function run()\n {\n $list = [\n [\n 'name' => 'Admissional',\n 'price' => 6.00,\n ],\n [\n 'name' => 'Periódico',\n 'price' => 5.00,\n ],\n [\n 'name' => 'Demissional',\n 'price' => 10.00,\n ],\n [\n 'name' => 'Nota Fiscal',\n 'price' => 0.00,\n ],\n [\n 'name' => 'Outros',\n 'price' => 1.00,\n ],\n ];\n\n foreach ($list as $item) {\n Type::create([\n 'name' => $item['name'],\n 'price' => $item['price'],\n ]);\n }\n }", "public function push(\\SetaPDF_Core_Type_AbstractType $value) {}", "public function values(): self\n {\n return Factory::create(array_values($this->items));\n }", "public function run()\n {\n DocumentType::create(['name' => 'DNI', 'digits' => '8', 'code' => '1']);\n DocumentType::create(['name' => 'Carnet Ext.', 'digits' => '12', 'code' => '4']);\n DocumentType::create(['name' => 'RUC', 'digits' => '11', 'code' => '5']);\n DocumentType::create(['name' => 'Pasaporte', 'digits' => '12', 'code' => '7']);\n DocumentType::create(['name' => 'Cedula diplomatica de identidad.', 'digits' => '15', 'code' => 'A']);\n DocumentType::create(['name' => 'No domiciliado.', 'digits' => '15', 'code' => '0']);\n DocumentType::create(['name' => 'Otros', 'digits' => '15', 'code' => '-']);\n }", "public function typesProvider()\n {\n return [\n '1 Type' => ['Type1'],\n '2 Type' => [['Type1', 'Type2']],\n ];\n }", "public function values($type = 'array')\n\t{\n\t\t$data = array(\n\t\t\t'foo' => 1,\n\t\t\t'bar' => true,\n\t\t\t'baz' => array(1, 2, 3),\n\t\t);\n\n\t\tswitch ($type) {\n\t\t\tcase 'request':\n\t\t\t\treturn new \\Illuminate\\Http\\Request(array('type' => $type));\n\t\t\tcase 'class':\n\t\t\t\treturn new Test($data);\n\t\t\tcase 'object':\n\t\t\t\treturn (object)$data;\n\t\t\tcase 'array':\n\t\t\t\treturn $data;\n\t\t\tcase 'string':\n\t\t\t\treturn 'hello';\n\t\t\tcase 'number':\n\t\t\t\treturn 123;\n\t\t\tcase 'boolean':\n\t\t\t\treturn (bool)rand(0, 1);\n\t\t}\n\t}", "public static function create($value);", "public static function create($value);", "public function values();", "public function values();", "public function values();", "public function values();", "public function values();", "public function get_desired_types();", "public function create(array $values) {\n return entity_property_values_create_entity($this->entityType, $values);\n }", "private function instantiate_post_types() {\n // Iterate across the post types in post_type_defs\n foreach ( $this->post_type_defs as $post_type => $post_type_def ) {\n $this->post_type_objs[ $post_type ] = new HRHS_Post_type( $post_type_def );\n }\n }", "public function definition(): array\n {\n return [\n 'type' => Arr::random(array_keys(EntryFactoryClass::$entries)),\n ];\n }", "public function make($value);", "public function getAllowedTypesOfValueKeeper(): array\n {\n return [ValuesOfWideSheets::class];\n }", "public static function types_init( $types ) {\n\t\tforeach ( $types as $type ) {\n\t\t\tself::$types[ $type ] = self::build_cpt_info( $type );\n\t\t}\n\t}", "public static function getTypeMap() {\n return [\n 'charge_id' => self::FIELD_INT,\n 'user_id' => self::FIELD_INT,\n 'amount' => self::FIELD_INT,\n 'description' => self::FIELD_STRING,\n 'charge_date' => self::FIELD_EPOCH,\n 'create_date' => self::FIELD_EPOCH,\n 'update_date' => self::FIELD_EPOCH,\n ];\n }", "function InitializeTestValues($pog_attribute_type)\n\t{\n\t\t$DATETIME = '1997-12-15 23:50:26';\n\t\t$DATE = '1997-12-15';\n\t\t$TIMESTAMP = '1997-12-15 23:50:26';\n\t\t$TIME = '23:50:26';\n\t\t$YEAR = '1997';\n\t\t$DECIMAL =\n\t\t$DOUBLE =\n\t\t$FLOAT =\n\t\t$BIGINT =\n\t\t$INT = '12345678';\n\t\t$SMALLINT = '1234';\n\t\t$MEDIUMINT = '12345';\n\t\t$TINYINT = '1';\n\t\t$CHAR = 'L';\n\t\t$VARCHAR =\n\t\t$TEXT =\n\t\t$TINYBLOB =\n\t\t$TINYTEXT =\n\t\t$BLOB =\n\t\t$MEDIUMBLOB =\n\t\t$MEDIUMTEXT =\n\t\t$LONGBLOB =\n\t\t$LONGTEXT = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry';\n\t\t$attribute_testValues = array();\n\t\tarray_shift($pog_attribute_type); //get rid of objectid\n\t\tforeach ($pog_attribute_type as $attribute => $property)\n\t\t{\n\t\t\tif (isset($property[2]))\n\t\t\t//length is specified, for e.g. if attribute = VARCHAR(255), $property[2]=255\n\t\t\t{\n\t\t\t\t$limit = explode(',', $property[2]);\n\t\t\t\t//field is limited\n\t\t\t\tif (intval($limit[0]) > 0)\n\t\t\t\t{\n\t\t\t\t\tif (isset($limit[1]) && intval($limit[1]) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//decimal, enum, set\n\t\t\t\t\t\t$attribute_testValues[$attribute] = substr(${$property[1]}, 0, ceil($limit[0]*0.6)).\".\".substr(${$property[1]}, 0, $limit[1]);\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$attribute_testValues[$attribute] = substr(${$property[1]}, 0, ceil($limit[0] * 0.6));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t//length not specified, but we still need to account for default mysql behavior\n\t\t\t//for eg, FLOAT(X), if X isn't specified, mysql defaults to (10,2).\n\t\t\t{\n\t\t\t\tif ($property[1] == \"FLOAT\" || $property[1] == \"DOUBLE\")\n\t\t\t\t{\n\t\t\t\t\t$attribute_testValues[$attribute] = \"1234.56\";\n\t\t\t\t}\n\t\t\t\telse if ($property[1] != \"HASMANY\" && $property[1] != \"BELONGSTO\")\n\t\t\t\t{\n\t\t\t\t\t$attribute_testValues[$attribute] = ${$property[1]};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $attribute_testValues;\n\t}", "private function fillArray($array) {\n\t\t$result = array();\n\t\tforeach ($array as $attr => $val) {\n\t\t\t$setMethod = 'set' . ucfirst($attr);\n\t\t\t$returnType = $this->getReturnTypeOfSetMethod($setMethod);\n\t\t\tif ($returnType) {\n\t\t\t\t$result[$attr] = new $returnType(); \n\t\t\t} else {\n\t\t\t\t$result[$attr] = 'abc';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public static function defaultValueTypes()\n {\n return [\n 'bigInteger' => 'int',\n 'bigPrimaryKey' => 'int',\n 'binary' => 'string',\n 'boolean' => 'int',\n 'date' => 'string',\n 'dateTime' => 'string',\n 'decimal' => 'int',\n 'double' => 'int',\n 'float' => 'int',\n 'integer' => 'int',\n 'money' => 'int',\n 'primaryKey' => 'int',\n 'smallInteger' => 'int',\n 'string' => 'string',\n 'text' => 'string',\n 'time' => 'string',\n 'timestamp' => 'string',\n ];\n }", "public function createNewObject(?\\SetaPDF_Core_Type_AbstractType $value = null) {}", "public function getCreate() {\n\t\tswitch ( $this->columnSchema[ self::COLUMN_DEFINITION_TYPE ] ) {\n\t\t\tcase self::COLUMN_TYPE_BIGINT:\n\t\t\tcase self::COLUMN_TYPE_INT:\n\t\t\tcase self::COLUMN_TYPE_MEDIUMINT:\n\t\t\tcase self::COLUMN_TYPE_SMALLINT:\n\t\t\tcase self::COLUMN_TYPE_TINYINT:\n\t\t\t\t$result = $this->createNumeric();\n\t\t\t\tbreak;\n\t\t\tcase self::COLUMN_TYPE_CHAR:\n\t\t\tcase self::COLUMN_TYPE_VARCHAR:\n\t\t\tcase self::COLUMN_TYPE_TEXT:\n\t\t\tcase self::COLUMN_TYPE_MEDIUMTEXT:\n\t\t\tcase self::COLUMN_TYPE_LONGTEXT:\n\t\t\t\t$result = $this->createString();\n\t\t\t\tbreak;\n\t\t\tcase self::COLUMN_TYPE_TIME:\n\t\t\tcase self::COLUMN_TYPE_DATETIME:\n\t\t\tcase self::COLUMN_TYPE_DATE:\n\t\t\t\t$result = $this->createDate();\n\t\t\t\tbreak;\n\t\t\tcase self::COLUMN_TYPE_BOOLEAN:\n\t\t\t\t$result = $this->createBoolean();\n\t\t\t\tbreak;\n\t\t\tcase self::COLUMN_TYPE_ENUM:\n\t\t\t\t$result = $this->createEnum();\n\t\t\t\tbreak;\n\t\t\tcase self::COLUMN_TYPE_SET:\n\t\t\t\t$result = $this->createSet();\n\t\t\t\tbreak;\n\t\t\tcase self::COLUMN_TYPE_FLOAT:\n\t\t\t\t$result = $this->createFloat();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//TODO\n\t\t\t\t$result = NULL;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function getStandardTypes() : array\n {\n }", "abstract public function create(array $values = []): Model;", "public function getDataWithTypeParameters() {}", "public function definition()\n {\n $accountTypeIds = AccountType::all()->pluck('id');\n\n return [\n 'code' => $this->faker->regexify('(\\d{2}\\.){2,3}\\d{2}'),\n 'name' => $this->faker->text(20),\n 'balance' => $this->faker->randomNumber($nbDigits = 5, $strict = false),\n 'account_type_id' => $this->faker->randomElement($accountTypeIds),\n ];\n }", "function getTypeConverter() ;", "function getValues()\n {\n return $this->type->getValues();\n }", "public function run()\n {\n ADType::factory()->times(count(ADTypeFactory::$adTypes))->create();\n }", "abstract public function values(): array;", "public function get_var_types()\n {\n // get all the types\n $query=$this->db->select('*')->from('var_type')->where(array('user_id'=>$this->user['user_id']))->order_by('var_type.var_type_id');\n $res=$query->get();\n $types=$res->result_array();\n\n // get the vvalues for each vtype\n for ($x=0;$x<count($types);$x++)\n {\n // get the vvalues\n $values=$this->get_var_values($types[$x]['var_type_id']);\n\n // add to the $types array\n for ($y=0;$y<count($values);$y++)\n {\n $types[$x]['vals']=$values;\n }\n }\n\n return $types;\n }", "function create()\n\t{\n\t\t$names = $this->_fields;\n\t\t$object = new StdClass;\n\t\tforeach ($names as $name)\n\t\t\t$object->$name = \"\";\n\t\treturn $object;\n\t}", "public function run()\n {\n CarType::create([\n 'name' => 'Легковой автомобиль'\n ]);\n CarType::create([\n 'name' => 'Грузовик'\n ]);\n CarType::create([\n 'name' => 'Фургон'\n ]);\n }", "function _getTypes()\n {\n $types = array(\n 0 => \"null\",\n 1 => \"bool\",\n 2 => \"int\",\n 3 => \"float\",\n 4 => \"varchar\",\n 5 => \"text\",\n 6 => \"blob\"\n );\n $tLeast = $this->table->count() < 2 ? 4 : 0;\n if ($this->GET('override')) {\n $types[1] = \"int\";\n $types[4] = \"text\";\n $types[6] = \"text\";\n }\n foreach ($this->table->fields as $field) {\n $t[$field] = strcasecmp($field, \"id\") ? $tLeast : 2;\n }\n while ($row = $this->table->each()) {\n foreach ($row as $field => $value) {\n if (preg_match('/[\\x00-\\x06\\x08\\x0B-\\x0C\\x0E-\\x13\\x16-\\x1F]/', $value))\n $t[$field] = 6;\n elseif (strlen($value) > 255 || strpos($value, \"\\n\"))\n $t[$field] = max($t[$field], 5);\n elseif (! empty($value) && ! is_numeric($value))\n $t[$field] = max($t[$field], 4);\n elseif (! preg_match('/^[+-]?\\d{0,10}$/s', $value))\n $t[$field] = max($t[$field], 3);\n elseif (! preg_match('/^[01]?$/s', $value))\n $t[$field] = max($t[$field], 2);\n elseif (strlen($value))\n $t[$field] = max($t[$field], 1);\n }\n }\n foreach ($this->table->fields as $field) {\n $this->types[$field] = $types[$t[$field]];\n }\n $this->table->reset();\n }", "private static function _initializeTypes()\n {\n\n $db = DataAccess::getInstance();\n $category = self::getActiveCategory();\n\n $fields = geoFields::getInstance(0, $category);\n\n $sql = \"SELECT * FROM \" . geoTables::browsing_filters_settings . \" WHERE `category` = ? AND `enabled` = 1\";\n $settings = $db->Execute($sql, array($category));\n\n while ($settings && $target = $settings->FetchRow()) {\n $name = $target['field'];\n $type = 0; //be sure to reset $type to 0 each time, to prevent bleeding\n if (strpos($name, 'optional_field_') === 0) {\n //this is an optional field\n\n if (!$fields->$name->is_enabled) {\n //field not enabled. do not set!\n continue;\n }\n $optional_type = $fields->$name->field_type;\n if ($optional_type === 'number' || $optional_type === 'cost') {\n $type = self::RANGE;\n } elseif ($optional_type === 'textarea' || $optional_type === 'text') {\n $type = self::SCALAR;\n } elseif ($optional_type === 'date') {\n $type = self::DATE_RANGE;\n } elseif ($optional_type === 'dropdown') {\n $type = self::PICKABLE;\n }\n } elseif (strpos($name, 'cs_') === 0) {\n //this is a cat-spec question\n $question_id = substr($name, 3);\n $cs_type = $db->GetOne(\"SELECT `choices` FROM \" . geoTables::questions_table . \" WHERE `question_id` = ?\", array($question_id));\n if (is_numeric($cs_type) || $cs_type === 'none') {\n $type = self::PICKABLE;\n } elseif ($cs_type === 'check') {\n $type = self::BOOL;\n } elseif ($cs_type === 'number') {\n $type = self::RANGE;\n } elseif ($cs_type === 'date') {\n $type = self::DATE_RANGE;\n } else {\n //not a valid question, or no longer active? do not set.\n continue;\n }\n } elseif (strpos($name, 'leveled_') === 0) {\n //leveled field\n $type = self::PICKABLE;\n }\n if ($type) {\n self::$_types[$name] = $type;\n } else {\n //These aren't the droids you're looking for. You can go about your business. Move along.\n //(Didn't find a dynamic type, which means this field is either statically-typed in the declaration of self::$_types or doesn't exist)\n }\n }\n\n self::$_typesInitialized = true;\n }", "public function run()\n {\n $values = [\n [\n 'key'=>'gs',\n 'educational_level'=>'Graduate Studies'\n ],\n [\n 'key'=>'col',\n 'educational_level'=>'College'\n ],\n [\n 'key'=>'voc',\n 'educational_level'=>'Vocational'\n ],\n [\n 'key'=>'sec',\n 'educational_level'=>'Secondary'\n ],\n [\n 'key'=>'ele',\n 'educational_level'=>'Elementary'\n ],\n ];\n\n foreach ($values as $value)\n {\n \\App\\MasterEducationalType::create($value);\n }\n }", "public function run()\n {\n Type::create(['description' => 'Acrilico','detail' =>'']);\n Type::create(['description' => 'Loza/Cerámica','detail' =>'']);\n Type::create(['description' => 'Madera','detail' =>'']);\n Type::create(['description' => 'Metal','detail' =>'']);\n Type::create(['description' => 'Plastico','detail' =>'']);\n Type::create(['description' => 'Ternopor','detail' =>'']);\n\n Type::create(['description' => 'Carton','detail' =>'']);\n Type::create(['description' => 'Papeleria','detail' =>'']);\n Type::create(['description' => 'Tela','detail' =>'']);\n Type::create(['description' => 'Vidrio','detail' =>'']);\n }", "private function init() {\r\n settype($this->id, \"int\");\r\n settype($this->name, \"string\");\r\n settype($this->max_players, \"int\");\r\n settype($this->is_over_yet, \"boolean\");\r\n settype($this->players, \"array\");\r\n }", "public function getAllowedTypesOfValueKeeper(): array\n {\n return [ValuesOfSheet::class];\n }", "function FieldTypesArray() {}", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }", "public function create($propertyValues = []);", "public function run()\n {\n Type::create(['name' => 'Sąskaita faktūra']);\n Type::create(['name' => 'PVM Sąskaita faktūra']);\n Type::create(['name' => 'Išankstinė sąskaita faktūra']);\n Type::create(['name' => 'Išankstinė PVM sąskaita faktūra']);\n }", "protected final function primitiveTypes(): array\n {\n return [\n Types::bool(),\n Types::float(),\n Types::int(),\n Types::null(),\n Types::object(),\n Types::string(),\n ];\n }", "public static function get_type_registry()\n {\n }", "public function definition()\n {\n\n $if = strval($this->faker->randomDigit).strval($this->faker->randomDigit).strval($this->faker->randomDigit);\n return [\n 'if' => $if,\n 'sala_id' => Sala::factory()->create(),\n 'user_id' => User::factory()->create()\n ];\n }", "public function attributeCustomTypes()\n {\n $flagEnabled = \\common\\components\\Consts::STATUS_ENABLED;\n return array(\n 'id' => array('data-options' => array('checkbox'=>'true'), 'key' => true),\n 'type' => array('width' => 100),\n 'office_id' => array('width' => 100),\n 'int_value' => array('width' => 100),\n 'float_value' => array('width' => 100),\n 'str_value' => array('width' => 100),\n 'flag' => array('width' => 100, 'formatter'=>\"function(value,row){ return '0x'+parseInt(value).toString(16); }\"),\n 'status' => array('width' => 80, 'sortable' => 'true',\n 'formatter' => \"function(value,row){ if (value == {$flagEnabled}) { return $.custom.lan.defaults.role.enabled; } else { return $.custom.lan.defaults.role.disabled; };}\"),\n 'edit_user_id' => array('width' => 100, 'sortable' => 'true', 'formatter' => \"function(value,row){ return row.edit_user_disp; }\"),\n 'created_at' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'updated_at' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'operation' => array('width' => 160, \n 'buttons' => array(\n ),\n ),\n );\n }", "protected function buildValue($values)\n {\n $valueData = [];\n foreach ($values as $value) {\n $valueData[] = [\n '@value' => $value['amount'],\n '@attributes' => [\n 'currency' => $value['currency'],\n 'value-date' => $value['value_date']\n ]\n ];\n }\n\n return $valueData;\n }", "public static function initialise() {\n \t// We can't modify it in place, else we'll break any logging done inside the SihnonFramework tree\n \t// or other subclass trees.\n \tstatic::$types = parent::$types;\n \t\n \t// Add the new data types for this subclass\n static::$types['job_id'] = 'int'; \n }" ]
[ "0.63909924", "0.62378323", "0.6139487", "0.60668427", "0.6022233", "0.5950357", "0.59428203", "0.5867246", "0.58045316", "0.57290876", "0.5704664", "0.56702024", "0.564391", "0.56185997", "0.56061625", "0.5605812", "0.55921674", "0.55721116", "0.5561686", "0.5539637", "0.550025", "0.54713416", "0.5450532", "0.5437509", "0.5436652", "0.54103243", "0.5399263", "0.53901714", "0.53899443", "0.53888386", "0.53784746", "0.53779817", "0.5375262", "0.5369253", "0.5337685", "0.53306556", "0.5330514", "0.5312354", "0.53122026", "0.52871734", "0.5286049", "0.5283916", "0.5280809", "0.52606636", "0.52576226", "0.5256875", "0.5250504", "0.5247289", "0.52322763", "0.52310115", "0.52246857", "0.5207952", "0.5207952", "0.5195181", "0.5195181", "0.5195181", "0.5195181", "0.5195181", "0.519407", "0.5191072", "0.5189776", "0.5185936", "0.5185276", "0.5180582", "0.5180219", "0.5166604", "0.5150505", "0.5145648", "0.51448625", "0.5135387", "0.5123567", "0.51230025", "0.5119434", "0.5104502", "0.50984704", "0.50935346", "0.5088313", "0.5086508", "0.508337", "0.50805295", "0.50770503", "0.50710124", "0.50705993", "0.5048342", "0.50363433", "0.5034398", "0.5032963", "0.5028763", "0.5022138", "0.5019953", "0.5019953", "0.5019953", "0.5013811", "0.5013462", "0.50061053", "0.50000334", "0.499491", "0.49905047", "0.49903533", "0.49849775" ]
0.5492031
21
table daftar seluruh teknisi pada halaman delete teknisi
public function showUser(Request $request){ $data = User::where('role', '!=', 'admin')->get(); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function index_delete() {\n $id = $this->delete('id');\n $id_pemesanan = $this->delete('id_pemesanan');\n $id_komplain_nonmarket = $this->delete('id_komplain_nonmarket');\n $id_komplain = $this->delete('id_komplain');\n $id_sp = $this->delete('id_sp');\n $id_pelanggan = $this->delete('id_pelanggan');\n $id_pemasukan = $this->delete('id_pemasukan');\n $id_SKP = $this->delete('id_SKP');\n $idTagihan = $this->delete('idTagihan');\n $idKategori = $this->delete('idKategori');\n $idSupplier = $this->delete('idSupplier');\n $idBarang = $this->delete('idBarang');\n $id_about = $this->delete('id_about');\n $id_article = $this->delete('id_article');\n $id_banner = $this->delete('id_banner');\n $id_pegawai = $this->delete('idpegawai');\n $id_absen = $this->delete('id_absen');\n $id_status = $this->delete('id_status');\n $id_karyawan = $this->delete('id_karyawan');\n $id_sdm = $this->delete('id_sdm');\n\n if ($id != '') {\n $this->db->where('id', $id);\n $delete = $this->db->delete('login');\n } elseif ($id_pemesanan != '') {\n $this->db->where('id_pemesanan', $id_pemesanan);\n $delete = $this->db->delete('pemesanan');\n } elseif ($id_komplain_nonmarket != '') {\n $this->db->where('id_komplain_nonmarket', $id_komplain_nonmarket);\n $delete = $this->db->delete('komplain_nonmarket');\n } elseif ($id_komplain != '') {\n $this->db->where('id_komplain', $id_komplain);\n $delete = $this->db->delete('komplain');\n } elseif ($id_sp != '') {\n $this->db->where('id_sp', $id_sp);\n $delete = $this->db->delete('status_pemasangan');\n } elseif ($id_pelanggan != '') {\n $this->db->where('id_pelanggan', $id_pelanggan);\n $delete = $this->db->delete('pelanggan');\n } elseif ($id_pemasukan != '') {\n $this->db->where('id_pemasukan', $id_pemasukan);\n $delete = $this->db->delete('finance');\n } elseif ($id_SKP != '') {\n $this->db->where('id_SKP', $id_SKP);\n $delete = $this->db->delete('skp');\n } elseif ($idTagihan != '') {\n $this->db->where('idTagihan', $idTagihan);\n $delete = $this->db->delete('tagihan');\n } elseif ($idKategori != '') {\n $this->db->where('idKategori', $idKategori);\n $delete = $this->db->delete('kategori');\n } elseif ($idSupplier != '') {\n $this->db->where('idSupplier', $idSupplier);\n $delete = $this->db->delete('supplier');\n } elseif ($idBarang != '') {\n $this->db->where('idBarang', $idBarang);\n $delete = $this->db->delete('inventory');\n } elseif ($id_about != '') {\n $this->db->where('id_about', $id_about);\n $delete = $this->db->delete('about');\n } elseif ($id_article != '') {\n $this->db->where('id_article', $id_article);\n $delete = $this->db->delete('article');\n } elseif ($id_banner != '') {\n $this->db->where('id_banner', $id_banner);\n $delete = $this->db->delete('banner');\n } elseif ($id_pegawai != '') {\n $this->db->where('idpegawai', $id_pegawai);\n $delete = $this->db->delete('pegawai');\n } elseif ($id_absen != '') {\n $this->db->where('id_absen', $id_absen);\n $delete = $this->db->delete('absensi');\n } elseif ($id_status != '') {\n $this->db->where('id_status', $id_status);\n $delete = $this->db->delete('status_karyawan');\n } elseif ($id_karyawan != '') {\n $this->db->where('id_karyawan', $id_karyawan);\n $delete = $this->db->delete('karyawan');\n } elseif ($id_sdm != '') {\n $this->db->where('id_sdm', $id_sdm);\n $delete = $this->db->delete('sdm');\n }\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function delete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'detailfasilitaskesehatan', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$query = $this->podb->deleteFrom('detailfasilitaskesehatan')->where('id', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query->execute();\n\t\t\t$this->poflash->success('Detailfasilitaskesehatan has been successfully deleted', 'admin.php?mod=detailfasilitaskesehatan');\n\t\t}\n\t}", "public function delete () {\n $this->db->delete('emprestimos', array('id_emprestimo' => $this->id_emprestimo));\n }", "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}", "public function delete () {\n $this->db->delete('turmas', array('idturma' => $this->idturma));\n }", "public function delete(){\n \t\ttry{\n \t\t\t$db = DB::get();\n \t\t\t$sql = \"UPDATE t_\" . self::$Table . \" \n \t\t\t\t\tSET \" . self::$Table . \"_supprime='1' \n \t\t\t\t\tWHERE \" . self::$Table . \"_id = '\".$this->Id.\"' \";\n \t\t\n \t\t\t$result = $db->query($sql);\n \t\t}\n \t\tcatch(Exception $e){\n \t\t\tvar_dump($e->getMessage());\n \t\t}\n }", "function deleteAction()\r\n\t{\r\n\t\t$data['message'] = \"\";\r\n\t\t$MaNguoiDung = $_GET['MaNguoiDung']; \r\n\r\n\t\t//echo $MaNguoiDung;\r\n\t\tif (isset($MaNguoiDung)) {\r\n\r\n\t\t\t$this->model->load(\"Nguoidung\");\r\n\t\t\t$nguoidung = new Nguoidung_Model();\r\n\t\t\t$nguoidung->delete($MaNguoiDung);\r\n\t\t\t$data['message'] = \"xóa người dùng thành công\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$data['message'] = \"không tồn tại mã người dùng\";\r\n\t\t}\r\n\r\n\t\t$this->indexAction($data);\r\n\t\t\r\n\t}", "function index_delete()\n {\n $no_resi = $this->delete('no_resi');\n $this->db->where('no_resi', $no_resi);\n $delete = $this->db->delete('tabel_user');\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "public function delete_fakul() {\r\n $where = ' KD_FAKUL=' . $this->get_kode_fakul();\r\n $this->db->delete($this->_table, $where);\r\n }", "public function deleteData(){\n //buatlah query\n $sqlQuery = \"DELETE FROM \" . $this->t_name . \" WHERE id = ?\";\n\n //persiapkan stmt\n $stmt = $this->conn->prepare($sqlQuery);\n\n //cukup converte id\n $this->id=htmlspecialchars(strip_tags($this->id));\n\n //bind\n $stmt->bindParam(1,$this->id);\n\n //eksekusi\n if($stmt->execute()){\n return true;\n }\n return false;\n }", "public function delete(){\r\n\t\t// goi den phuong thuc delete cua tableMask voi id cua man ghi hien hanh\r\n\t\t$mask = $this->mask();\r\n\t\treturn $mask->delete(array($mask->idField=>$this->id));\r\n\t\t// $query = \"DELETE FROM $this->tableName WHERE id='$this->id'\";\r\n\t\t// $conn = self::getConnect()->prepare($query);\r\n\t}", "public function actionDelete(){\n $session = new session();\n $no_eksekusi = $session->get('no_eksekusi');\n $id = $_POST['hapusIndex'];\n\n if(count($id)>1){\n for ($i = 0; $i < count($id); $i++) {\n PdmD1::deleteAll(['no_surat' => $id[$i]]);\n }\n }else{\n PdmD1::deleteAll(['no_eksekusi'=>$no_eksekusi]);\n }\n return $this->redirect(['index']);\n }", "public function delete(){\n $db = Database::getInstance() ;\n $db->query(\"DELETE FROM canciones WHERE idcancion=:idcan ;\",\n [\":idcan\"=>$this->idcancion]) ;\t\t\t\t \n }", "function index_delete() {\n $id = $this->delete('id'); // Memanggil data berdasarkan arraynya\n $this->db->where('id', $id);\n $delete = $this->db->delete('telepon'); \n if ($delete) {\n $this->response(array('status' => 'success'), 201);// Jika berhasil maka akan tampil\n } else {\n $this->response(array('status' => 'fail', 502));// Jika gagal maka akan tampil\n }\n }", "public function index_delete(){\n\t\t\n\t\t}", "public function index_delete(){\n $id=$this->delete('id'); //ambil value dari key id\n if ($id===null){ //jika id samadengan kosong\n $this->response([\n 'status' => false, //status= false\n 'message' => 'provide id' //message not found\n ], REST_Controller::HTTP_BAD_REQUEST);// status http menjadi 400 BAD REQUEST\n }else{ //selain itu\n\n $id=$this->delete('id'); //ambil value dari key id\n $w = array('id' => $id ); //where id=$id\n\n if($this->m_mahasiswa->delete('mahasiswa',$w) > 0){ //jika berhasil menjalankan m_mahasiswa delete dan diatas 0\n $this->response([\n 'status' => true, //status= true\n 'id'=> $id,\n 'message' => 'deleted' //message not found\n ], REST_Controller::HTTP_OK); //204 no content\n }else{ //selain itu\n\n $this->response([\n 'status' => false, //status= false\n 'message' => 'id not found' //message not found\n ], REST_Controller::HTTP_BAD_REQUEST); //400 bad request\n\n }\n\n }\n }", "public function delete($id_rekap_nilai);", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "function delete_tb_jarak_desa($id)\n {\n return $this->db->delete('tb_jarak_desa',array('id'=>$id));\n }", "function del_by_id($table,$kode){\n\t\t$this->db->where('username',$kode);/*ative record*/\n\t\t$this->db->delete($table);\n\t}", "function delete($id)\n\t\t{\n\t\t\t$this->db->where('id', $id);\n\t\t\t$this->db->delete('keuzerichting');\n\t\t}", "function hapusjabatan($id) {\n\t\t$this->db->where('ID_JBT', $id);\n\t\t$this->db->delete('IKD.IKD_D_JABATAN_STRUKTURAL'); \t\t\n }", "public function hapus_gbr_detail($tabel, $where)\n {\n \t$this->db->where($where);\n \t$this->db->delete($tabel);\n }", "function index_delete() {\n $id_diagnosa = $this->delete('id_diagnosa');\n $this->db->where('id_diagnosa', $id_diagnosa);\n $delete = $this->db->delete('diagnosa');\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "function index_delete() {\n $id = $this->delete('id');\n $this->db->where('id', $id);\n $delete = $this->db->delete('barang');\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function delete($id_soal_siswa);", "function DELETEDataKelas ($id_kelas){\r\n\r\n //Perintah Delete Data Siswa\r\n $this->MKelas->DELETE($id_kelas);\r\n }", "public function delete(){\r\n\t\tif(!$this->input->is_ajax_request()) show_404();\r\n\r\n\t\t//$this->auth->set_access('delete');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\tif($this->input->post('ang_id') === NULL) ajax_response();\r\n\r\n\t\t$all_deleted = array();\r\n\t\tforeach($this->input->post('ang_id') as $row){\r\n\t\t\t//$row = uintval($row);\r\n\t\t\t//permanent delete row, check MY_Model, you can set flag with ->update_single_column\r\n\t\t\t$this->m_anggota->permanent_delete($row);\r\n\r\n\t\t\t//this is sample code if you cannot delete, but you must update status\r\n\t\t\t//$this->m_anggota->update_single_column('ang_deleted', 1, $row);\r\n\t\t\t$all_deleted[] = $row;\r\n\t\t}\r\n\t\twrite_log('anggota', 'delete', 'PK = ' . implode(\",\", $all_deleted));\r\n\r\n\t\tajax_response();\r\n\t}", "final public function delete() {\n global $config; \n # Borrar el elemento de la base de datos\n $this->db->query(\"DELETE FROM guarderia_2 WHERE id_guarderia = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'sedes/&success=true');\n }", "function delete_buku_tamu($id_bukutamu){\n $id_bukutamu = array('id_buku_tamu' => $id_bukutamu);\n $this->load->model('fungsi');\n $this->fungsi->Delete('apps_siperat_buku_tamu', $id_bukutamu);\n redirect(base_url('/admin/'),'refresh');\n\t}", "public function delete($id){\n $this->db->where('id', $id);\n $this->db->delete('pegawai'); // Untuk mengeksekusi perintah delete data\n }", "public function actionDelete()\n {\n $id_mata_kuliah_tayang = Yii::$app->getRequest()->getQueryParam('jk');\n $id_mahasiswa = Yii::$app->getRequest()->getQueryParam('js');\n\n $mata_kuliah_tayang = MataKuliahTayang::find()\n ->joinWith('refCpmks')\n ->where([MataKuliahTayang::tableName() . '.id' => $id_mata_kuliah_tayang])\n ->all();\n\n $count = count($mata_kuliah_tayang[0]['refCpmks']);\n\n foreach ($mata_kuliah_tayang as $key => $value) {\n foreach ($value['refCpmks'] as $key => $value) {\n $exist = CapaianMahasiswa::findOne(['id_ref_mahasiswa' => $id_mahasiswa, 'id_ref_cpmk' => $value->id]);\n // $exist->status = 0;\n $exist->delete();\n Yii::$app->session->setFlash('erro', [['Delete', 'Data Berhasil Dihapus']]);\n }\n }\n return $this->redirect(['nilai-upload', 'jk' => $id_mata_kuliah_tayang]);\n }", "public function vymaz(){\r\n $db = napoj_db();\r\n $sql =<<<EOF\r\n DELETE FROM Diskusie WHERE id = \"$this->ID\";\r\nEOF;\r\n $ret = $db->exec($sql);\r\n if(!$ret){\r\n echo $db->lastErrorMsg();\r\n }\r\n $db->close();\r\n }", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n // need to delete from tag maps too\n // tbd\n }", "public function deleteVesti($id){\n\t\t\t$this->db->where('skolaId', $id);\n\t\t\t$this->db->delete('vesti');\n\t\t}", "function admin_delete($id){\n\t\t$this->loadModel('Pri');\n\t\t$this->Pri->delete($id);\n\t\t$this->Session->setFlash('Le contenu a bien été supprimé'); \n\t\t$this->redirect('admin/prix/index'); \n\t}", "function delete_all($table,$column=\"id\") {\n global $_REQUEST;\n global $lang;\n\n // usun wszsytkei zaznaczone rekordy\n if (! empty($_REQUEST[$this->del])) {\n $del=$_REQUEST[$this->del];\n\n if (is_object(@$this->delete_obj)) {\n $data=$this->deleteCheck($table,$column,$del,$this->delete_obj);\n $del=$data['deleted'];\n }\n\n // lista rekordow do usuniecia\n while (list($id,) = each($del)) {\n if (! empty($id)) {\n $this->delete_one_record($id,$table,$column);\n }\n }\n } else {\n if ($this->show_empty_info==true) {\n print \"<center>\".$lang->delete_empty.\"</center>\";\n }\n }\n return;\n }", "public function actionDeleteFine() \r\n {\r\n extract($_POST);\r\n $res=0;\r\n $searchCriteria=new CDbCriteria;\r\n $query = \"Delete From `HajzMaster` where `HajzID`='$HajzID'\";\r\n $command =Yii::app()->db->createCommand($query);\r\n \r\n if($command->execute()) $res=1;\r\n print CJSON::encode($res);\r\n }", "function deleteTurmaCatequese()\n {\n $sql = \"UPDATE TurmaCatequese SET status = 0 WHERE id=:id\";\n $query = $this->db->prepare($sql);\n $query->bindParam(\":id\",$this->id);\n $query->execute();\n echo json_encode(\"{'message': 'Turma apagada'}\");\n }", "public function actionDelete()\n {\n try{\n $id = $_POST['hapusIndex'];\n\n if($id == \"all\"){\n $session = new Session();\n $id_perkara = $session->get('id_perkara');\n\n PdmBa13::updateAll(['flag' => '3'], \"id_perkara = '\" . $id_perkara . \"'\");\n }else{\n for($i=0;$i<count($id);$i++){\n $model = $this->findModel($id[$i]);\n $model->flag = '3';\n $model->update();\n }\n }\n Yii::$app->getSession()->setFlash('success', [\n 'type' => 'success',\n 'duration' => 3000,\n 'icon' => 'fa fa-users',\n 'message' => 'Data Berhasil di Hapus',\n 'title' => 'Hapus Data',\n 'positonY' => 'top',\n 'positonX' => 'center',\n 'showProgressbar' => true,\n ]);\n return $this->redirect(['index']);\n }catch (Exception $e){\n Yii::$app->getSession()->setFlash('success', [\n 'type' => 'success',\n 'duration' => 3000,\n 'icon' => 'fa fa-users',\n 'message' => 'Data Gagal di Hapus',\n 'title' => 'Hapus Data',\n 'positonY' => 'top',\n 'positonX' => 'center',\n 'showProgressbar' => true,\n ]);\n return $this->redirect(['index']);\n }\n }", "public function deleteSeksi($id = null) // DONE\n {\n if ($id == null) {\n redirect(base_url('seksi'));\n }\n $this->modeladmin->deleteData('seksi',1,$id);\n $this->session->set_flashdata('pesan','Dihapus');\n }", "function del($param) {\n extract($param);\n $conexion->getPDO()->exec(\"DELETE FROM operario WHERE fk_usuario = '$id'; \n DELETE FROM usuario WHERE id_usuario='$id'\");\n echo $conexion->getEstado();\n }", "public function multidelete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'detailfasilitaskesehatan', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$totaldata = $this->postring->valid($_POST['totaldata'], 'xss');\n\t\t\tif ($totaldata != \"0\") {\n\t\t\t\t$items = $_POST['item'];\n\t\t\t\tforeach($items as $item){\n\t\t\t\t\t$query = $this->podb->deleteFrom('detailfasilitaskesehatan')->where('id', $this->postring->valid($item['deldata'], 'sql'));\n\t\t\t\t\t$query->execute();\n\t\t\t\t}\n\t\t\t\t$this->poflash->success('Detailfasilitaskesehatan has been successfully deleted', 'admin.php?mod=detailfasilitaskesehatan');\n\t\t\t} else {\n\t\t\t\t$this->poflash->error('Error deleted detailfasilitaskesehatan data', 'admin.php?mod=detailfasilitaskesehatan');\n\t\t\t}\n\t\t}\n\t}", "function deletePreDetalle2()\n {\n $sql='DELETE FROM predetalle WHERE idPreDetalle = ?';\n $params=array($this->idPre);\n return Database::executeRow($sql, $params);\n }", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n }", "public function actionDelete()\n {\n $session = new session();\n $no_register_perkara = $session->get('no_register_perkara');\n $arr= array();\n $id_tahap = $_POST['hapusIndex'][0];\n \n if($id_tahap=='all'){\n $id_tahapx=PdmT14::find()->select(\"no_surat_t14\")->where(['no_register_perkara'=>$no_register_perkara])->asArray()->all();\n foreach ($id_tahapx as $key => $value) {\n $arr[] = $value['no_surat_t12'];\n \n }\n $id_tahap=$arr;\n }else{\n $id_tahap = $_POST['hapusIndex'];\n }\n\n \n\n $count = 0;\n foreach($id_tahap AS $key_delete => $delete){\n try{\n PdmT14::deleteAll(['no_register_perkara' => $no_register_perkara, 'no_surat_t14'=>$delete]);\n }catch (\\yii\\db\\Exception $e) {\n $count++;\n }\n }\n if($count>0){\n Yii::$app->getSession()->setFlash('success', [\n 'type' => 'danger',\n 'duration' => 5000,\n 'icon' => 'fa fa-users',\n 'message' => $count.' Data Tidak Dapat Dihapus Karena Sudah Digunakan Di Persuratan Lainnya',\n 'title' => 'Error',\n 'positonY' => 'top',\n 'positonX' => 'center',\n 'showProgressbar' => true,\n ]);\n return $this->redirect(['index']);\n }\n\n return $this->redirect(['index']);\n }", "public function deleting(Seguimiento $Seguimiento){\n \n }", "public function DeleteDisData($tabel, $where1, $where2){\n $this->db->where('id_surat', $where1);\n $this->db->where('jenis_disposisi', $where2);\n $res = $this->db->delete($tabel);\n return $res;\n }", "public function delete_fk_kehadiran($tahun,$id)\n\t{\n\t\t$this->db->where('idsiswa',$id);\n\t\t$this->db->where('idtahun_pelajaran',$tahun);\n $this->db->delete('sr_kehadiran');\n\t}", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "function hapus_pengguna($id){\n\n $this->db->where('id_user', $id);\n $this->db->delete('tb_user'); \n\n \n \n\t}", "function hapus_data($where,$table){\n $this->db->where($where); //menangkap array dari variabel $where yang dikirimkan dari controller hapus\n $this->db->delete($table);\n }", "public function eliminar($data)\n {\n $cliente=$this->db->query('delete from tab_cliente where id_cliente='.$data); \n }", "function delete($id) {\n $this->db->where('id', $id);\n $this->db->delete('rit');\n }", "function delete_tujuan($id)\n {\n return $this->db->delete('tujuan',array('id'=>$id));\n }", "public function limparTabela(){\r\n\t\t$sql = 'DELETE FROM oficina';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->execute();\r\n\t}", "public function borrar() {\n $id = $this->input->post(\"id\");\n $this->AdministradorModel->delete($this->tabla, $id);\n }", "public function delete()\n {\n \t$id = request()->input('id');\n\n \t//ambil data pendaftaran kp dengan id lalu delete\n \t$ujian_skripsi = ujian_skripsi::find($id);\n \t$ujian_skripsi->delete();\n \t\n \t//ambil data untuk ditampilkan kembali\n \t$datas = ujian_skripsi::all();\n\n \treturn view('admin.ad-ujian_skripsi')->with('datas', $datas);\n }", "public function deleteStudentInfoFromEventTable(){\n \n $deleteId = $_POST[\"edeleteId\"];\n \n if ($this->databaseConnection()){\n $queryDelete = $this->db_connection->prepare('DELETE FROM events WHERE eid = :deleteId');\n $queryDelete->bindValue(':deleteId', $deleteId ,PDO::PARAM_INT);\n $queryDelete->execute();\n // Return something to display the we have delete the entry \n }\n }", "public Function deleteAction($table, $key)\r\n\t{\r\n\t\t$bdd = singleton::getInstance();\r\n\t\ttry{\r\n\t\t\t/*TODO : prepare the request for one row delete */\r\n\r\n\t\t\t if ($key == null) {\r\n \tprint( \"id non correspondante! \\n\");\r\n \texit;\r\n }\r\n\r\n\t\t\telse {\r\n\t\t\t\tif($key == intval($key)){\r\n\t\t\t\tprint \"appel deleteAction avec $table, $key \\n\";\r\n\t\t\t\t$sql = \"delete from $table where id = $key\";\r\n \tprint( \"sql: $sql \\n\");\r\n \t$stmt = $bdd ->prepare($sql);\r\n \t$stmt -> execute();\r\n \tprint \"suppression réussie\";\r\n \t$tab = $stmt-> fetchAll(PDO::FETCH_ASSOC);\r\n \tprint json_encode( $tab);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (PDOException $e) {\r\n \t\techo $e->getMessage();\r\n \texit;\r\n\t\t}\r\n\r\n\t}", "public function deleteAction() {\n $id = (int) $this->params()->fromRoute('id', 0);\n if (!$id) {\n return $this->redirect()->toRoute('backend-guildes-list');\n }\n $oTable = $this->getTableGuilde();\n $oEntite = $oTable->findRow($id);\n $oTable->delete($oEntite);\n $this->flashMessenger()->addMessage($this->_getServTranslator()->translate(\"La guilde a été supprimée avec succès.\"), 'success');\n return $this->redirect()->toRoute('backend-guildes-list');\n }", "public function delete($id)\n {\n mysqli_query($this->koneksi,\"delete from ulangan where id='$id'\");\n }", "public function deleteRecord()\n { \n $sql = \"DELETE FROM Cubans WHERE Id = :Id\";\n $statement = $this->connect->prepare($sql);\n $statement->bindValue(':Id', $this->id);\n $statement->execute();\n }", "public function delete_faseetapa($id_p){ \n\n $this->db->where('proy_id', $id_p);\n $this->db->delete('_proyectofaseetapacomponente');\n }", "public function actionDeletedetail()\n\t{\n\t\t$id=$_POST['id'];\n\t\tforeach($id as $ids)\n\t\t{\n\t\t $model=Dodetail::model()->findbyPK($ids);\n\t\t $model->delete();\n\t\t}\n\t\techo CJSON::encode(array(\n 'status'=>'success',\n 'div'=>'Data deleted'\n\t\t\t\t));\n Yii::app()->end();\n\t}", "function onDelete($param)\n {\n $key=$param['key'];\n \n // define duas acoes\n $action1 = new TAction(array($this, 'Delete'));\n \n // define os parametros de cada acao\n $action1->setParameter('key', $key);\n \n //encaminha a chave estrangeira\n $action1->setParameter('fk', filter_input(INPUT_GET, 'fk'));\n\n // exibe um dialogo ao usuario\n new TQuestion('Deseja realmente excluir o registro ?', $action1, $action2);\n }", "function newskomentar_deletedata($tbl_newskomentar, $id){\n\t$sql = mysql_query(\"DELETE * FROM $tbl_newskomentar WHERE id = '$id'\");\n\treturn $sql;\n}", "public function delete()\r\n {\r\n $db = Database::getDatabase();\r\n $db->consulta(\"DELETE FROM puesto WHERE idPue = {$this->idPue};\");\r\n }", "public function deleteSolicitudes($id){\r\n $this->db->where();\r\n $this->db->delete(\"Solicitudes\");\r\n }", "public function delete(){\n $record = actualite::find($this->selectedId);\n $record->delete();\n\n /* update image file */\n Storage::delete('public/_actualite/'.$this->selectedId.'.png');\n /* $this->photo->storePubliclyAs('public/_actualite/'.$this->selectedId.'.png'); */\n\n session()->flash('message', 'actualite modifié avec succès');\n $this->emit('Deleted');\n $this->dispatchBrowserEvent('Deleted');\n $this->resetFields();\n }", "public function delete($id)\n {\n mysqli_query($this->koneksi,\"delete from formulir where id='$id'\");\n }", "function deletePreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->cliente);\n return Database::executeRow($sql, $params);\n }", "function submitDeleteLogistik()\n\t{\n\t\t$execQueryDelete = $this->Kesehatan_M->delete('logistik',array('id'=>$this->input->post('id')));\n\t\tif ($execQueryDelete) {\n\t\t\talert('alert','success','Berhasil','Data berhasil dihapus');\n\t\t\tredirect(\"Dokter/logistik\");\n\t\t}else{\n\t\t\tvar_dump($execQueryDelete);\n\t\t}\n\t}", "public function actionDelete($nim){\r\n if(Tugas::model()->deleteByPk($nim)){\r\n // setelah berhasil menghapus data, alihkan ke index\r\n $this->redirect(array(self::INDEX));\r\n }else{\r\n // jika proses menghapus data gagal, tampilkan error 404 \r\n throw new CHttpException(404,'The requested page does not exist.');\r\n }\r\n }", "function delete() {\n\t \t\n\t \t$sql = \"DELETE FROM evs_database.evs_group (gru_id, gru_name, gru_head_dept,gru_company_id)\n\t \tVALUES(?, ?, ?,?) \n\t\tWHERE gru_id = '$gru_id' \";\n\t\t\n\t \t$this->db->query($sql, array($this->gru_id, $this->gru_name, $this->gru_head_dept ,$this->gru_company_id));\n\t }", "function dataDeletesk($id) {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t= \"DELETE FROM sk\n\t\t\t\t\t\t\t WHERE id= '$id'\";\n\t\t\t\t\n\t\t\t\t$sql\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\t// CEK SQL\n\t\t\t\tif($sql == TRUE) {\n\t\t\t\t\treturn TRUE;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}", "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "function index_delete() {\n\t\t$id = $this->delete('id');\n\t\t$this->db->where('id', $id);\n\t\t$delete = $this->db->delete('driver_detail');\n\t\tif ($delete) {\n\t\t\t$this->response(array('status' => 'success'), 201);\n\t\t} else {\n\t\t\t$this->response(array('status' => 'fail', 502));\n\t\t}\n\t}", "function cmdDeleteGeneradorClick($sender, $params)\n {\n global $sContrato;\n $Estimacion=$this->txtEstimacion->Text;\n $this->txtQueOpcion->Text==\"\";\n $sql = \"select sContrato, iNumeroEstimacion from estimaciones\n where\n sContrato='$sContrato'\n and iNumeroEstimacion='$Estimacion'\";\n $result=mysql_query($sql);\n if (!$row=mysql_fetch_array($result))\n {\n $sql = \"delete\n from estimacionperiodo\n where\n sContrato='$sContrato'\n and iNumeroEstimacion='$Estimacion'\";\n mysql_query($sql);\n }\n if(mysql_error())\n {\n ?>\n <script>\n alert(\" <?php echo \" Error al Eliminar los Datos\".mysql_error() ?>\");\n </script>\n <?php\n }\n }", "public function actionDelete() {}", "public function actionDelete() {}", "public function deleteStudentFromBranchTable(){\n\n $deleteId = $_POST[\"bdeleteId\"];\n \n if ($this->databaseConnection()){\n $queryDelete = $this->db_connection->prepare('DELETE FROM branch WHERE bid = :deleteId');\n $queryDelete->bindValue(':deleteId', $deleteId ,PDO::PARAM_INT);\n $queryDelete->execute();\n // Return something to display the we have delete the entry \n }\n }", "public function producto_delete($cod){\r\n $sql = \"DELETE FROM productos WHERE id_producto=:miCod\";\r\n\r\n $resultado=$this->db->prepare($sql);\r\n \r\n $resultado->execute(array(\":miCod\"=>$cod));\r\n }", "function delete() {\n \tglobal $mysql;\n \tif(empty($this->id)) return;\n \t$tablename = $this->class_name();\n \t$id = $this->id;\n \t$query = \"DELETE FROM $tablename WHERE id=$id\";\n \t$mysql->update($query);\n }", "function delete_siswa_by_rombel($id_kelas)\n {\n $this->db->where('id_kelas', $id_kelas);\n $this->db->where('id_tahun', $_SESSION['id_tahun_pelajaran']);\n $this->db->delete('rombel');\n }", "function delete() {\n$id = intval( $_GET[\"id\"] );\n//delete the database record\n$q1 = \"delete from qlns_administrator where ctn_id = '$id'\";\n@mysql_query($q1) or die(mysql_error());\necho \"<script> alert ('Xóa thành viên thành công ! ') </script>\";\necho \"<div align='center'> <font color=blue size=3><img src='images/undo.gif' border='0'><a href='admin.php?dialoose=select'> Trở về </a>\";\n}", "public function excluir($id){\n\t\t\tglobal $app;\n\t\t\t$sth = $this->PDO->prepare(\"DELETE FROM sedecchamados WHERE _id = :id\");\n\t\t\t$sth ->bindValue(':id',$id);\n\t\t\t$app->render('default.php',[\"data\"=>['status'=>$sth->execute()==1]],200); \n\t\t}", "function delete_tahun_pelajaran($id)\n {\n return $this->db->delete('tahun_pelajaran',array('id'=>$id));\n }", "public function deleteMahasiswa($id){\n $this->db->query(\"DELETE FROM $this->tabel WHERE id=:id\");\n $this->db->bind('id', $id);\n $this->db->execute();\n return $this->db->rowCount();\n }", "public function delete($nim) {\n\t\t//$nim = nim data yang dikirim dari controller (sebagai filter data yang dihapus)\n\t\t$this->db->where('nim', $nim);\n\t\treturn $this->db->delete('anggota');\n\n\t\t//DELETE FROM anggota WHERE nim = 1\n\t}", "function supprimer1($connexion,$nomTable,$nomClePrimaire,$valeurClePrimaire) { \n $req =$connexion -> query(\"DELETE FROM $nomTable WHERE $nomClePrimaire = '$valeurClePrimaire'\");\n }", "public function delete()\n {\n if (!$_POST) {\n // Jika diakses tidak dengan menggunakan method post, kembalikan ke home (forbidden)\n $this->session->set_flashdata('error', 'Akses pengeluaran barang dari keranjang ditolak!');\n redirect(base_url('home'));\n }\n\n $id = $this->input->post('id');\n\n if (!$this->cartout->where('id', $id)->first()) { // Jika cart tidak ditemukan\n $this->session->set_flashdata('warning', 'Maaf data tidak ditemukan');\n redirect(base_url('cartout'));\n }\n\n if ($this->cartout->where('id', $id)->delete()) { // Jika penghapusan cart berhasil\n $this->session->set_flashdata('success', '1 Barang berhasil dikeluarkan dari keranjang');\n } else {\n $this->session->set_flashdata('error', 'Oops, terjadi suatu kesalahan');\n }\n\n redirect(base_url('cartout'));\n }", "function delete()\n\t{\n\t\t$id = $this->uri->rsegment(3);\n\t\t$info = $this->football_spain_model->get_info($id);\n\t\tif (!$info) \n\t\t{\n\t\t\t$this->session->set_flashdata('message', 'Không có thông tin phù hợp');\n\t\t\tredirect(admin_url('spain/index'));\n\t\t\texit;\n\t\t}elseif($this->football_spain_model->delete($id)){\n\t\t\t$this->session->set_flashdata('message', 'Xóa thành công bài viết : ' . $info->title);\n\t\t\tredirect(admin_url('spain/index'));\n\t\t\texit;\n\t\t}else{\n\t\t\t$this->session->set_flashdata('message', 'Xóa không thành công bài viết : ' . $info->title);\n\t\t\tredirect(admin_url('spain/index'));\n\t\t\texit;\n\t\t}\n\n\t}", "function deleteid($id_cekdahak)\n\t\t{\n\t\t\t$data['dahak'] = $this->Pendataan_model->Deletedahak($id_cekdahak);\n\t\t\tredirect('Cek_dahak/listdahak');\n\t\t\t//$this->load->view(\"cekdahak/form_cekdahak2\", $data);\n\t\t}", "public function prosesDelete($id) {\r\n $d = Bus::find($id);\r\n// proses delete data\r\n $perj = Perjalanan::where('id', '=', $id)->count();\r\n if ($perj==0) {\r\n $d->delete($d);\r\n return redirect::to('/admin/bus');\r\n } else {\r\n ?>\r\n <script>\r\n alert('Gagal menghapus data, data masih digunakan pada tabel Perjalanan')\r\n window.location=\"/admin/bus\"\r\n </script>\r\n <?php\r\n\r\n //return redirect::to('/admin/supir');\r\n }\r\n \r\n }", "function delete() {\n\t\t$sql = \"DELETE FROM cost_detail\n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq));\n\t}", "function row_delete()\n\t{\n\t $this->db->where('id', $id);\n\t $this->db->delete('testimonials'); \n\t}", "public function deleteDataGejala($id_gejala)\n {\n $this->db->where('id_gejala', $id_gejala);\n $this->db->delete('tb_gejala');\n }", "function delete(){\n\t\t$sql = \"DELETE FROM `tours` WHERE `id`='\".addslashes($this->id).\"'\";\n\n\t\t$this->connection->send_query($sql);\n\t}" ]
[ "0.7582198", "0.7570794", "0.7505625", "0.7505525", "0.74891657", "0.7473354", "0.74533033", "0.74091506", "0.7398261", "0.7397392", "0.7389918", "0.73883504", "0.7378342", "0.73296016", "0.7300721", "0.7253201", "0.72474706", "0.72435135", "0.7241015", "0.7179692", "0.71768445", "0.71545315", "0.71458566", "0.7121404", "0.71178466", "0.71172565", "0.71103895", "0.7105991", "0.7084391", "0.7070643", "0.706727", "0.70669216", "0.70641446", "0.70420086", "0.70321774", "0.702024", "0.70141554", "0.7011627", "0.7006816", "0.70028865", "0.69945306", "0.69840723", "0.6971629", "0.69690925", "0.6968421", "0.6967193", "0.69624615", "0.69617426", "0.69587594", "0.69553834", "0.69286454", "0.6925647", "0.6921932", "0.6921845", "0.69121426", "0.6906077", "0.6903936", "0.6888579", "0.6878488", "0.6877241", "0.6875772", "0.68750453", "0.68658555", "0.6863443", "0.6860121", "0.6856057", "0.68488234", "0.6846995", "0.68461853", "0.68443584", "0.68392766", "0.6835653", "0.6827014", "0.6824208", "0.6821402", "0.6817242", "0.681377", "0.6813558", "0.6813156", "0.67925847", "0.679131", "0.6784322", "0.6784322", "0.678143", "0.6780995", "0.677343", "0.67733526", "0.6769468", "0.67682284", "0.6767437", "0.6767313", "0.6764117", "0.6756808", "0.67495173", "0.67477095", "0.6747131", "0.67469907", "0.67468053", "0.67441577", "0.67427975", "0.67393345" ]
0.0
-1
function for delete user
public function deleteUser(Request $request){ $data = $this->getTotalUserOnProgressProject($request->user); if ($data == 0) { User::where('id', '=', $request->user)->delete(); return response()->json([ 'status' => true, 'data' => 'Teknisi berhasil dihapus!!!', ]); }else{ return response()->json([ 'status' => false, 'data' => 'Teknisi masih dalam pengerjaan instalasi!!!', ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_user($user);", "public function deleteUser()\n {\n $this->delete();\n }", "function delete_user()\n {\n\n //return true if successful\n }", "public function delete() {\n\t\t$query = \"DELETE FROM Users WHERE userId = :id\";\n\t\t$query_params = array(':id' => $this->userData['userId']);\n\t\texecuteSQL($query, $query_params);\n\t}", "public function userDeleted();", "function deleteUser()\n {\n $validateF = new ValidateFunctions();\n if ($_SESSION['id'] == $_GET['']) {\n logUserOut();\n }\n $id = $validateF->sanitize($_GET['id']);\n $userRp = new UserRepository();;\n $hasUser = $userRp->getOneFromDB($id);\n if ($hasUser != 0) {\n $this->deleteUserImage($id);\n $this->removeUser($id);\n $_SESSION['success'] = ['User deleted successfully'];\n } else {\n $_SESSION['error'] = ['No user found.'];\n }\n header('Location:index.php?action=adminUsers');\n }", "public function delete($user){\n }", "function delete(){\n $user_id = $this->uri->rsegment('3');\n $this->_del($user_id);\n redirect(admin_url('user'));\n\n }", "function deleteUser(){\n\t\t\tif($this->rest->getRequestMethod() != \"DELETE\"){\n\t\t\t\t$this->rest->response('',406);\n\t\t\t}\n\t\t\t//Validate the user\n\t\t\t$validUser = $this->validateUser(\"admin\", \"basic\");\n\t\t\tif ($validUser) {\n\t\t\t\tif (isset($_POST['_id'])){\n\t\t\t\t\t$where = \"_id='\".$_POST['_id'].\"'\";\n\t\t\t\t\t$delete = $this->model->getUser('*',$where);\n\t\t\t\t\t$result = $this->model->deleteUser($where);\n\t\t\t\t\tif($result) {\n\t\t\t\t\t\t$response_array['status']='success';\n\t\t\t\t\t\t$response_array['message']='One record deleted.';\n\t\t\t\t\t\t$response_array['data']=$delete;\n\t\t\t\t\t\t$this->rest->response($response_array, 200);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response_array['status']='fail';\n\t\t\t\t\t\t$response_array['message']='The record does not exist';\n\t\t\t\t\t\t$data['user_id'] = $_POST['_id'];\n\t\t\t\t\t\t$response_array['data']=$data;\n\t\t\t\t\t\t$this->rest->response($response_array, 404);\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\t\t\t\t\t$this->rest->response('No parameters given',204);\t// If no records \"No Content\" status\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t$this->rest->response('Unauthorized Access ',401);\n\t\t\t}\n\t\t\t\n\t\t}", "public function delete($user)\n {\n\n }", "private function deleteUser()\n {\n try \n {\n $request = $_REQUEST;\n\n if(!isset($request['userid']) || $request['userid']==\"\")\n throw_error_msg(\"user id not provided\");\n else if(!is_numeric($request['userid']))\n throw_error_msg(\"invalid user id\");\n else\n $userid = (int)$request['userid'];\n\n global $userquery;\n $user = $userquery->delete_user($userid);\n \n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'user deleted successfully', \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage()); \n } \n }", "public function delete_delete()\n {\n $response = $this->UserM->delete_user(\n $this->delete('id')\n );\n $this->response($response);\n }", "public function deleteUser($userId);", "public function deleteAction() {\n $uid = $this->getInput('uid');\n $info = Admin_Service_User::getUser($uid);\n if ($info && $info['groupid'] == 0) $this->output(-1, '此用户无法删除');\n if ($uid < 1) $this->output(-1, '参数错误');\n $result = Admin_Service_User::deleteUser($uid);\n if (!$result) $this->output(-1, '操作失败');\n $this->output(0, '操作成功');\n }", "function deleteuser(){\n\n\t\t$id = $this->input->post('id');\n\n\t\t$this->setting_model->delete('londontec_users','user_id',$id);\n\t\n\t}", "function system_delete_user($uid)\n{\n}", "public function userDeleted()\n\t{\n\t\tself::authenticate();\n\n\t\t$userId = FormUtil::getPassedValue('user', null, 'GETPOST');\n\t\tif(!is_string($userId)) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\t$user = $this->entityManager->getRepository('Owncloud_Entity_DeleteUser')->findOneBy(array('uname' => $userId));\n\t\tif(!($user instanceof Owncloud_Entity_DeleteUser)) {\n\t\t\treturn self::ret(false);\n\t\t}\n\t\t$this->entityManager->remove($user);\n\t\t$this->entityManager->flush();\n\n\t\treturn self::ret(true);\n\t}", "public function deleteUser()\n {\n \n $headers = getallheaders();\n $token = $headers['Authorization'];\n $key = $this->key;\n $userData = JWT::decode($token, $key, array('HS256'));\n $id_user = Users::where('email', $userData->email)->first()->id;\n $id_users = $_POST['idUser'];\n $id = $id_users;\n\n $user = Users::find($id);\n\n $rolUser = Users::where('email', $userData->email)->first();\n \n\n if ($rolUser->rol_id == 1){\n\n $user_name = Users::where('id', $id_users)->first()->name;\n Users::destroy($id);\n\n return $this->success('Acabas de borrar a', $user_name);\n\n }else{\n return $this->error(403, 'No tienes permisos');\n }\n \n\n if (is_null($user)) \n {\n return $this->error(400, 'El lugar no existe');\n }\n // }else{\n\n // $user_name = Users::where('id', $id_users)->first()->name;\n // Users::destroy($id);\n\n // return $this->success('Carlos he borrado el usuario', $user_name);\n // }\n }", "private function deleteUser()\r\n {\r\n if (isset($_GET['id'])) {\r\n\r\n $id_user = $_GET['id'];\r\n UserDAO::deleteUser($id_user);\r\n $_SESSION['deleteUser'] = '';\r\n header('Location:' . BASE_URL . \"users\");\r\n exit();\r\n }\r\n }", "public function Delete(){\n $query = \"DELETE FROM user where id=\".$this->id;\n\n $result = $this->dbh->exec($query);\n if ($result) {\n Message::setMessage(\"<div class='yes'>Removed Permanently</div>\");\n } else {\n\n Message::setMessage(\"<div class='no'>Failed to Remove</div>\");\n }\n Utility::redirect(\"volunteers.php\");\n }", "function wp_delete_signup_on_user_delete($id, $reassign, $user)\n {\n }", "protected function deleteUser()\n {\n $userId = $this->request->variable('user_id',0);\n\n if($userId === 0)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'Invalid data supplied',\n 'error' => ['User ID was not supplied']\n ]);\n }\n\n // Determine if this user is an administrator\n $arrUserData = $this->auth->obtain_user_data($userId);\n $this->auth->acl($arrUserData);\n $isAdmin = $this->auth->acl_get('a_');\n\n if($isAdmin)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'User was not deleted because they are an admin',\n 'error' => ['phpBB admin accounts cannot be automatically deleted. Please delete via ACP.']\n ]);\n }\n\n user_delete('remove', $userId);\n\n // Send success response\n $this->sendResponse([\n 'status' => 'success',\n 'message' => 'phpBB user was deleted',\n 'data' => [\n 'user_id' => $userId\n ]\n ]);\n }", "function user_delete($user_id) {\n\t\t\n\t\tif(!$this->has_access(__FUNCTION__, __CLASS__, $this->output_data['module'])) {\n\t\t\tset_warning_message('Sory you\\'re not allowed to access this page.');\n\t\t\tredirect('admin');\n\t\t\texit;\n\t\t} elseif($user_id == get_user_id()){\n\t\t\tset_warning_message('Sory you cannot delete your own account.');\n\t\t\tredirect('admin');\n\t\t\texit;\n\t\t} else { \n\t\t\t$this->user_model->delete_user($user_id);\n\t\t\tset_success_message('Successfully delete user');\n\t\t\t$this->show_list();\n\t\t}\n\t}", "public function deleteUserById($user_id){\n $this->dao->deleteUserByid($user_id);\n }", "public function deleteUser()\n {\t\t\n\t\t$user = $this->checkToken();\n\t\tif ($user) {\t\n\t\t\t$userModel = UserModel::find($user->id);\n\t\t\t$userModel->destroy();\n\t\t\t$this->expireToken($userModel);\n\t\t\treturn $this->sendResponse('Your account has been deleted');\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to delete this account');\n }", "public function deleteUser(){\n\t\t$sql = \"SELECT COUNT(aid) AS theCount FROM administrator where uid=:uid\";\n\n\t\tif($stmt = $this->_db->prepare($sql)){\n\t\t\t$stmt->bindParam(\":uid\", $_SESSION['UID'], PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t\t$row = $stmt->fetch();\n\t\t\tif($row['theCount']==0){\n\t\t\t\treturn \"<h2> Error </h2>\" . \n\t\t\t\t\t\"<p> Only administrators can do this. </p>\";\n\t\t\t}\n\t\t\t$stmt ->closeCursor();\n\t\t}\n\t\telse{\n\t\t\treturn \"Something went wrong checking the admin table.\";\n\t\t}\n\t\t\n\t\t//TODO: send the deleted user an email telling them they have been deleted\n\t\t\n\t\t$sql = \"DELETE FROM user WHERE uid=:uid\";\n\t\tif($stmt = $this->_db->prepare($sql)){\n\t\t\t$stmt->bindParam(\":uid\", $_GET['u'], PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t}\n\t\telse{\n\t\t\treturn \"Something went wrong deleting the user.\";\n\t\t}\n\n\t\treturn \"done\";\n\t}", "public function delete() {\n try {\n $db = Database::getInstance();\n $sql = \"DELETE FROM `User` WHERE username = :username\";\n $stmt = $db->prepare($sql);\n $stmt->execute([\"username\" => $this->username]);\n } catch (PDOException $e) {\n exitError(500, \"Internal error.\");\n }\n }", "public function delete_user()\n {\n \n $user_id = $this->uri->segment(4);\n\t //dump($user_id);\n\t \n\t $query = $this->Product_model->delete_user($user_id);\n\t if($query){\n\t\t \n\t\t redirect('admin/Dashboard/users'); \n\t\t \n\t\t}else{\n\t\t\t\n\t\t\t echo 'error'; \n\t\t\t}\n\t\n }", "public function deleting(User $user)\n {\n //\n }", "public function deleting(User $user)\n {\n //\n }", "public function deleting(User $user)\n {\n //\n }", "public function delete(){\n\t\t\t$id = $_GET['id'];\n\t\t\t$result = $this->userrepository->delete($id);\n\t\t\tif($result = true){\n\t\t\t\theader(\"Location: index.php/admin/index/delete\");\n\t\t\t}\n\t\t}", "public function deleted_user_action($id) {\r\n $this->db->delete_by_user_id($id);\r\n }", "public function delete(): void\n {\n $id = $this->id;\n $this->fetch(\n 'DELETE FROM user WHERE id = ?;',\n [$id]\n );\n }", "public function deleteUser()\n {\n\n $this->displayAllEmployees();\n $id = readline(\"Unesite broj ispred zaposlenika kojeg želite izbrisati :\");\n $check = readline(\"Jeste li sigurni? da/ne: \");\n\n if ($check === 'da'){\n $this->employeeStorage->deleteEmployee($id);\n }\n\n }", "static public function delete(){\n\n\t\tinclude ($GLOBALS['PATH'] . '/classes/requests/users/DeleteRequest.php');\n\n\t\t$requests = new DeleteRequest;\n\t\t$errors = $requests->validate();\n\t\t\n\t\tif(count($errors) > 0){\n\n\t\t\t//Verifica se id não existe no banco ou deixar enviar, força o redirecionamento para pagina /users\n\t\t\tif( isset($errors['id']) ){\n\n\t\t\t\t$back = '/users?errors=' . json_encode(['id' => $errors['id']]);\n\n\t\t\t}else{\n\n\t\t\t\t$back = explode('?', $_SERVER['HTTP_REFERER'])[0] ?? '/users';\n\t\t\t\t$back .= '?id='.$_POST['id'].'&errors=' . json_encode($errors);\n\n\t\t\t}\n\n\t\t\theader('Location: ' . $back);\n\n\t\t}else{\n\n\t\t\t//Caso não houver nenhum impedimento, faz o delete do usuario\n\t\t\t$conn = Container::getDB();\n\t\t\t$user = new User;\n\t\t\t$crud = new CrudUser($conn, $user);\n\n\t\t\t$crud->delete($_POST['id']);\n\n\t\t\t//Redireciona para pagina de /users\n\t\t\theader('Location: /users?success=Usuário deletado com sucesso');\n\t\t\t\n\t\t}\n\n\t}", "function deleteUser($username)\r\n {\r\n $this->querySimpleExecute('delete from t_user where useUsername = ' . $username);\r\n }", "function delete_user($user_id = 0)\n\t{\n\t\t//delete user\n\t\t$this->db->where('user_id', $user_id);\n\t\t$this->db->delete('ci_users');\n\t}", "public function delete_a_user()\n {\n $is_successful = $this->user->Delete($_GET['rowID']);\n if ($is_successful) {\n header('Location: http://localhost/MVC/public');\n } else {\n // print error\n echo 'could not redirect';\n }\n }", "public function delete($user)\n {\n $user->deleteProfilePhoto();\n $user->tokens->each->delete();\n\n // $user->delete(); csak logikai törlés a megngedett\n $user->update([\"name\" => \"deleted\".$user->id,\n \"email\" => \"deleted\".$user->id.\"@deleted.com\",\n \"password\" => \"psw\".rand(100000,999999)]);\n\n \\DB::table('members')\n ->where('user_id','=',$user->id)\n ->delete();\n\n }", "public function delete(User $user)\n {\n //\n }", "public function destroy($id)\n {\n // delete user\n }", "function delete ($post) {\n \tif ( !isset($post['id']) || !User::exists($post['id']) ) {\n \t\t$_SESSION['fail'] = \"You must select a user\";\n \t\theader( 'Location: index.php?action=index');\n \t\texit;\n \t}\n \t\n \t// delete the record\n \t$user = User::find( $post['id']);\n \t$user->delete();\n \t\n \t// set our success redirect\n \t$_SESSION['success'] = 'The user was deleted successfully.';\n \theader( 'Location: index.php?action=index');\n \texit;\n }", "function delete_user($id)\n {\n return $this->db->delete('users',array('id'=>$id));\n }", "function delete_user($id)\n {\n return $this->db->delete('users',array('id'=>$id));\n }", "function delete_user($id)\n {\n return $this->db->delete('users',array('id'=>$id));\n }", "public function deleteUser()\n {\n $userId = $this->input->post('userId');\n $userInfo = array('isDeleted' => 1, 'updatedBy' => $this->vendorId, 'updatedDtm' => date('Y-m-d H:i:sa'));\n\n $result = $this->user_model->deleteUser($userId, $userInfo);\n\n if ($result > 0) {\n echo (json_encode(array('status' => true)));\n } else {\n echo (json_encode(array('status' => false)));\n }\n }", "function deleteUser($id){\n\t\t$this->db->where('id_usuario', $id);\n\t\t$this->db->delete('usuarios');\n\t}", "public function delete_user() {\n $query = 'DELETE FROM ' . $this->table_name . ' WHERE vendor_id = :vendor_id';\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Clean data\n\n // Bind data\n $stmt->bindParam(':vendor_id', $this->vendor_id);\n\n // Execute query\n if($stmt->execute()) {\n return true;\n }\n\n //Error $stmt->error;\n return false;\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function delete($username)\n {\n }", "public function userdelete() {\n if (func_num_args() > 0):\n $uid = func_get_arg(0);\n try {\n $db = Zend_Db_Table::getDefaultAdapter();\n $where = (array('user_id = ?' => $uid));\n $db->delete('users', $where);\n } catch (Exception $e) {\n throw new Exception($e);\n }\n return $uid;\n else:\n throw new Exception('Argument Not Passed');\n endif;\n }", "public function user_delete_post()\n { \n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n \n $id = $data['id'];\n $where = array(\n 'id' => $id\n );\n $this->model->delete('users', $where);\n $resp = array('rccode' => 200,'message' =>'success');\n $this->response($resp);\n }", "function wpmu_delete_user($id)\n {\n }", "public function destroy()\n {\n $id=$this->seguridad->verificateInt($_REQUEST['delete_id']);\n $token = $_REQUEST['token'];\n $usuario = parent::showImgUser($id);\n if($id && $token)\n {\n if($usuario->img_usuario != 'assets/uploud/profile/default.svg')\n {\n unlink($usuario->img_usuario);\n }\n parent::deleteUser($id,$token);\n }\n }", "public function delete($id_user){\n\t\t\t \n\t\t\t$this -> query = \"DELETE FROM usuari WHERE id='$id_user'\";\n\t\t\t$this -> executa_query();\n\t\t}", "public function delete()\n { if (is_null($this->id))\n trigger_error(\"User::delete(): Attempt to delete a User object that does not have its ID property set.\", E_USER_ERROR);\n\n // Delete the User\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $st = $conn->prepare(\"DELETE FROM users WHERE id = :id LIMIT 1\");\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT); \n $st->execute();\n \n $conn = null;\n }", "public function deleteUser(request $request){\n \n $afi = User::find($request->id);\n $afi->delete();\n \n }", "function delete()\n {\n if($this->isManager() == TRUE)\n {\n echo(json_encode(array('status'=>'access')));\n }\n else\n {\n $id = $this->input->post('userId');\n $userInfo = array('isDeleted'=> 1,'updatedBy'=>$this->vendorId, 'field' => $id,'updatedDtm'=>date('Y-m-d H:i:s'));\n \n $result = $this->model->deleteUser($id);\n \n if ($result > 0) { echo(json_encode(array('status'=>TRUE, 'id' => $id))); }\n else { echo(json_encode(array('status'=>FALSE, 'id' => $id))); }\n }\n }", "public function delete(){\n\t\t$user_id = $this->input->post(\"user_id\");\n\t\t$username = $this->input->post(\"username\");\n\n\t\t$condition = array(\n\t\t\t\"user_id\" => $user_id\n\t\t);\n\n\t\t$this->load->model(\"User_model\", \"users\", true);\n\n\t\t$this->users->delete($condition);\n\n\t\t$toast = array('state' => true, 'msg' => $username.' is Deleted Successfully!');\n\t\t$this->session->set_flashdata('toast', $toast);\n\n\t\techo \"success\";\n\t}", "public function procDeleteUser() {//IF time permits, re-implement using new User classes\r\n global $session;\n\r\n /* uid error checking */\n $field = \"deluser\"; //Use the field for uid\r\n $subuid = $_POST[$field];\r\n\r if($subuid == $session->user->getUID()) { /* Make sure no one tries and delete themselves */\n $session->form->setError($field, \"* You can't delete yourself!<br />\");\n }\n\n if($session->form->num_errors > 0) { /* Errors exist, have user correct them */\n $_SESSION['value_array'] = $_POST;\r\n $_SESSION['error_array'] = $session->form->getErrorArray();\r\n } else { /* Delete user from database */\r\n $session->database->removeUser($subuid, DB_TBL_ADMINS);\r\n $session->database->removeUser($subuid, DB_TBL_TELLERS);\r\n $session->database->removeUser($subuid, DB_TBL_CUSTOMERS);\n }\n header(\"Location: \".$session->referrer);\r\n }", "public function delete() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"UPDATE users SET state='DELETED' WHERE id = ?\");\n\t\t$stmt->execute(array($this->id));\n\t}", "function validate_user_deletion()\n{ }", "public function deleteUser()\n {\n try\n {\n $deletedUser = $this->usersController->deleteUser($_POST['id']);\n echo json_encode($deletedUser);\n if ($deletedUser)\n {\n return true;\n } else\n {\n return false;\n } \n } catch (Exception $e)\n {\n return false;\n }\n }", "public function deleteUser(){\n\t\t$id = $_POST[\"id\"];\n\t\ttry {\n\t\t\trequire CONTROLLER_DIR . '/dbConnecterController.php';\n\t\t\t$result = $db->query('SELECT * FROM users WHERE id=\"'.$id.'\"');\n\n\t\t\t$row = $result->fetchColumn();\n\t\t\t\tif(!$row == 0){\n\t\t\t\t\t$statement = $db->query('DELETE FROM users WHERE id=\"'.$id.'\" ');\n\t\t\t\t\t$db = null;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tdie(\"No data present.\");\n\t\t\t\t}\t\n\n\t\t} catch (PDOException $e) {\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t\t\tdie();\n\t\t}\n\t}", "public function delUser($user_id)\n {\n $user = User::findOrFail($user_id);\n if ($user) {\n $user->delete();\n return redirect()->back();\n }else{\n\n return redirect()->back();\n }\n }", "function deleteUserDB($id){\n $data = User::find($id);\n session()->flash('deleteUser',$data['username']);\n $data->delete();\n return redirect('user/rabin?age=20');\n }", "function procDeleteUser() {\n global $session, $database, $form;\n /* Username error checking */\n $subuser = $this->checkUsername(\"deluser\");\n\n /* Errors exist, have user correct them */\n if ($form->num_errors > 0) {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n header(\"Location: \" . $session->referrer);\n }\n /* Delete user from database */ else {\n $q = \"DELETE FROM \" . TBL_USERS . \" WHERE username = '$subuser'\";\n $database->query($q);\n header(\"Location: \" . $session->referrer);\n }\n }", "function delete($conn)\n{\n $response[\"loggedIn\"] = getSessionValue(\"user\", \"\") != \"\";\n if (!$response[\"loggedIn\"])\n {\n $response[\"error\"] = \"You must login to delete your user account.\";\n return $response;\n } \n \n // make sure the user exists...\n $userID = getSessionValue(\"user\", \"\")[\"userID\"];\n $stmt = $conn->prepare(\"SELECT USER_ID FROM USER WHERE USER_ID = ?\");\n $stmt->bind_param(\"i\", $userID);\n $stmt->execute();\n if (!$stmt->fetch()) \n {\n $response[\"error\"] = sprintf(\"User %d does not exist.\", $userID);\n return $response;\n }\n $stmt->close();\n \n // delete the user...\n $stmt = $conn->prepare(\"DELETE FROM USER WHERE USER_ID = ?\");\n $stmt->bind_param(\"i\", $userID);\n $stmt->execute();\n \n // log the user out...\n setSessionValue(\"user\", \"\");\n $response[\"loggedIn\"] = false;\n return $response;\n}", "public function user_delete($data = array())\n\t{\n\t\tunset($data['user']['u_password']);\n\t\t\n\t\t$this->CI->logger->add('users/user_delete', $data);\n\t}", "public function deleteUser($id_user){\n\t\t$delete=$this->delete(array(\"id_users\"=>$id_user));\n\t return $delete;\n\t}", "public function delete_user($user){\n if(empty($user->email))\n {\n $this->res->SetObject(RCD::EC_EMPTY, RCD::ED_EMPTY, FALSE, NULL);\n }\n $where = array('id'=>$id);\n $this->db->where(array('id' => $user['id']));\n if($this->db->delete(self::user))\n {\n $this->res->SetObject(RCD::SC, RCD::SD, FALSE, NULL);\n }\n else\n {\n $this->res->SetObject(RCD::EC_DELETE, RCD::ED_DELETE, TRUE, NULL);\n }\n }", "public function delete_user($id)\n\t{\n\t\t$termination_date = date(\"Y-m-d H:i\");\n\t\t$dbres = $this->db->query(\"update user SET delete_status='1',termination_date='$termination_date' where id = $id \");\n\t\tredirect(site_url() . 'sys/get_employees?msg_del=success');\n\t}", "public static function deleteAccount(){\n\n //if user is logged in proceed, else send them to login\n if(login::isLoggedIn()){\n \n //if user clicked submit proceed\n if(isset($_POST['delete-account'])) {\n \n //grab the user's id and proceed to deletion\n $userId = login::isLoggedIn();\n \n database::query(\"DELETE FROM login_tokens WHERE fk_users_id = :userId\", array(':userId'=>$userId));\n database::query(\"DELETE FROM users WHERE users_id = :userId\", array(':userId'=>$userId));\n\n controller::redirectTo('login');\n \n }\n \n } else {\n controller::redirectTo('login');\n }\n }", "public function deleteAction(){\n \n $req=$this->getRequest();\n $user=Doctrine::getTable('Users')->find($req->getParam('id')); \n\n // Gli utenti developer non possono essere eliminati \n if ($user->Role->developer){\n $this->errors->addError(\"L'utente Developer non pu&ograve; essere cancellato.\");\n $this->emitSaveData();\n return;\n }\n \n $q=Doctrine_Query::create()\n ->delete()\n ->from('Users')\n ->addWhere('ID = ?',$this->getRequest()->getParam('id'))\n ->execute();\n \n $this->emitJson(array(\"success\"=>true));\n }", "function delete_usuario($user_id)\n {\n return $this->db->delete('usuarios',array('user_id'=>$user_id));\n }", "function delete($id)\n\t{\n\t\tglobal $connect;\n\t\t$sql = \"DELETE FROM USER WHERE ID='\".$id.\"'\";\n\t\t$req = $connect->prepare($sql);\n\t\t$req->execute() or die(print_r($connect->erroInfo()));\n\t\theader('Location: adminShowUser.php');\n\t}", "public function delete(){\t\t\tif( is_null( $this->id ) ) trigger_error( \"User::delete(): Attempt to delete a user object that does not have its ID property set.\", E_USER_ERROR );\r\n\t\t\t\r\n\t\t\t//Delete the object\r\n\t\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t\t$st = $conn->prepare ( \"DELETE FROM \".TABLENAME_GROUPS.\" WHERE id = :id LIMIT 1\" );\r\n\t\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t\t$st->execute();\r\n\t\t\t$conn = null;\t\t\r\n\t\t}", "function user_remove($user_info)\n {\n }", "function procDeleteUser(){\r\n\t\t\tglobal $session, $database, $form;\r\n\t\t\t/* Username error checking */\r\n\t\t\t$subuser = $this->checkUsername(\"deluser\");\r\n\t\t\t\r\n\t\t\t/* Errors exist, have user correct them */\r\n\t\t\tif($form->num_errors > 0){\r\n\t\t\t\t$_SESSION['value_array'] = $_POST;\r\n\t\t\t\t$_SESSION['error_array'] = $form->getErrorArray();\r\n\t\t\t\theader(\"Location: \".$session->referrer);\r\n\t\t\t}\r\n\t\t\t/* Delete user from database */\r\n\t\t\telse{\r\n\t\t\t\t$q = \"DELETE FROM \".TBL_USERS.\" WHERE username = '$subuser'\";\r\n\t\t\t\t$database->query($q);\r\n\t\t\t\theader(\"Location: \".$session->referrer);\r\n\t\t\t}\r\n\t\t}", "public static function delete(Users $user)\n {\n $email=$user->Email;\n DB::delete(\"user\",\"Email='$email' AND IsDeleted=0\");\n \n //$conn->close();\n header('location: DeleteUser.php');\n\n }", "public function delete(){\n\t\t$this->_getDAO(false);\n\t\treturn $this->dao->delete($this->user->getID(), $this->ident);\n\t}", "function deleteUser($params = null)\n {\n $key = $params[\":ID\"];\n $this->modelUser->deleteUser($key);\n $this->view->ShowUsersLocation();\n }", "function deleteUser()\r\n{\r\n\tif (isset($_GET['userId']) && (int)$_GET['userId'] > 0) {\r\n\t\t$userId = (int)$_GET['userId'];\r\n\t} else {\r\n\t\theader('Location: index.php');\r\n\t}\r\n\t\r\n\t\t$User = $_SESSION[\"username\"];\r\n\t\r\n\t$sql = \"DELETE FROM tbl_user \r\n\t WHERE user_id = $userId\";\r\n\tdbQuery($sql);\r\n\t\r\n\tdbQuery(\"INSERT INTO tbl_history (h_user, h_date, h_history)\r\n\t\t VALUES ('$User', NOW(), 'Deleted a User')\");\r\n\theader('Location: index.php?success=You Have Successfully Deleted this User');\r\n}", "function deleteUser($id)\r\n {\r\n $sql = \"DELETE FROM users WHERE ID_user='\" . $id . \"'\";\r\n $stmt = $this->connect()->query($sql);\r\n if (!$stmt) {\r\n echo \"Something wrong in the binding process. sql error?\";\r\n exit();\r\n } else {\r\n echo \"Delete Successful\";\r\n }\r\n }", "function deleteUser($id)\n {\n if ($this->isAdmin() == TRUE) {\n echo(json_encode(array('status' => 'access')));\n } else {\n $userId = $id;\n $userInfo = array(/*'isDeleted' => 1,*/ 'updatedBy' => $this->vendorId, 'update_time' => date('Y-m-d H:i:s'));\n\n $result = $this->user_model->deleteUser($userId, $userInfo);\n\n if ($result > 0) {\n echo(json_encode(array('status' => TRUE)));\n } else {\n echo(json_encode(array('status' => FALSE)));\n }\n redirect('userListing');\n\n }\n }", "public function destroy()\n {\n $userId = Helper::getIdFromUrl('user');\n \n if ((Helper::checkUrlIdAgainstLoginId($userId)) !== 'super-admin') {\n Usermodel::load()->destroy($userId);\n } else { \n View::render('errors/403.view', [\n 'message' => 'You cannot delete yourself!',\n ]);\n }\n }", "function mysql_deluser($username)\n{\n $user_id = mysql_auth_user_id($username);\n\n dbDelete('entity_permissions', \"`user_id` = ?\", array($user_id));\n dbDelete('users_prefs', \"`user_id` = ?\", array($user_id));\n dbDelete('users_ckeys', \"`username` = ?\", array($username));\n\n return dbDelete('users', \"`username` = ?\", array($username));\n}", "public function delete($id) {\n\t\t// Delete the user\n\t\t$this->getDb()->delete('t_user', array('idUser' => $id));\n\t}" ]
[ "0.8863591", "0.8567542", "0.8365634", "0.83250105", "0.83135945", "0.83026123", "0.8286389", "0.8215944", "0.821493", "0.82109296", "0.8111183", "0.8104923", "0.80565375", "0.8048568", "0.8038105", "0.80012244", "0.7984279", "0.7983247", "0.7936053", "0.7934755", "0.7918247", "0.78824955", "0.7869717", "0.7842607", "0.7828228", "0.7818936", "0.7792288", "0.77912986", "0.7783215", "0.7783215", "0.7783215", "0.7781184", "0.7779382", "0.7766444", "0.77591836", "0.77581066", "0.77407604", "0.7729575", "0.7724752", "0.7722424", "0.7712352", "0.7705288", "0.77031034", "0.7691543", "0.7691543", "0.7691543", "0.7689554", "0.76870817", "0.7672092", "0.7671976", "0.7671976", "0.7671976", "0.7671976", "0.7671976", "0.7671976", "0.7671976", "0.7671976", "0.7671976", "0.7671976", "0.7671976", "0.7671976", "0.7671976", "0.7660854", "0.7652505", "0.76524305", "0.76461184", "0.7634271", "0.7623495", "0.76207834", "0.760785", "0.76060456", "0.7603539", "0.7602298", "0.75979066", "0.7597426", "0.7557514", "0.7554194", "0.7551631", "0.7546719", "0.75086653", "0.7506107", "0.75013447", "0.74963856", "0.7493854", "0.74933046", "0.7486359", "0.74818754", "0.748169", "0.74758804", "0.7465751", "0.7462172", "0.7459475", "0.7457422", "0.7454148", "0.745127", "0.74498403", "0.7449529", "0.7445047", "0.74377126", "0.74219054", "0.7410606" ]
0.0
-1
TestController constructor. appel des service/table
public function __construct() { parent::__construct(); if ($this->ctrLog()) { Render::getInstance()->setTemplate('default'); $this->loadService("Item"); $this->loadService("Map"); $this->loadService("Movement"); $this->loadService("Quest"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "function __construct(){\n $this->Connection=Connector::GetConnection();\n if($this->TestStructure){\n $this->TestTableStructure();\n }\n }", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __construct(Controller $controller)\n {\n $this->con = $controller;\n }", "public function setUp()\n {\n $this->controller_name = 'QueryController';\n }", "public function __construct()\n {\n parent::__construct();\n $this->tables = [\n 'leagues',\n 'players',\n\t 'league_player',\n 'scores',\n 'jobs',\n 'failed_jobs',\n ];\n }", "public function __construct()\n {\n $this->db = new DbController(\"mysql\");\n }", "function __construct() \n {\n // Creation de la table\n self::createTableIfNeeded();\n }", "function __construct() {\n\t //llamo al contructor de Controller.php\n\t parent::__construct();\n\n\t //instancio el modelo\n $this->modelo(array('cortos','ediciones','categorias'));\n\n\n\t}", "public function testListServiceDatas()\n {\n\n }", "public function setUp(): void\n {\n parent::setUp();\n $this->controller = new TaskController();\n }", "protected function setUp()\n {\n $this->controller = new Controller;\n }", "public function init() {\n parent::init();\n $this->controller = Tour::getTableSchema()->name;\n }", "public function __construct()\n {\n $this->data = new DataController();\n }", "public function __construct(AuthenticationService $authService/*, UsuarioTable $usuarioTable*/)\n {\n $this->authService = $authService;\n }", "public function __construct(){\n \n $this->create_tables();\n \n }", "function __construct() {\r\n\t\t\r\n\t\t$this->conexaoDB=new DB();\r\n\t\t$this->tabela=\"retirante\";\r\n\t\r\n\t}", "public function __construct($config)\n {\n $this->component = component($this->componentName)->prop('table', $this);\n $this->config = $config;\n $this->table = new CrudTable($config);\n $this->setDefaults();\n }", "public function __construct () {\n $this->model = 'App\\\\' . $this->model;\n $this->model = new $this->model();\n\n // Get the column listing for a given table\n $this->table_columns = Schema::getColumnListing( $this->table );\n }", "public function test___construct() {\n\t\t}", "public function test___construct() {\n\t\t}", "function __construct() {\r\n\t\tparent::__construct();\r\n\t\tmakeTestDB('temp1');\r\n\t}", "public function testIndex()\n {\n\n\n\n\n\n }", "function __construct() {\n //con esta linea se hereda el constructor de la clase Controller\n parent::__construct();\n }", "protected function setUp()\n\t{\n\t\t$this->object = new Test_Controller;\n\t}", "public function __construct()\n {\n parent::__construct(self::TABLE);\n }", "protected function setUp()\r\n {\r\n $this->session = new NashEarlySession(self::$config[\"authenticationPath\"], self::$config[\"servicePath\"]);\r\n $this->object = new ContaService($this->session);\r\n $this->session->login(self::$config);\r\n \r\n $empresaService = new EmpresaService($this->session);\r\n $empresa = $empresaService->getEmpresasSelecionaveis(1, 0)[0];\r\n $empresaService->selecionaEmpresa($empresa->getId());\r\n }", "public function setUp()\n {\n $this->controllerInfo = new ControllerInfo();\n }", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "protected function setUp() {\n $this->object = new Table;\n }", "public function test__construct() {\n\n $obj = new DataTablesRequest();\n\n $this->assertEquals([], $obj->getColumns());\n $this->assertEquals(0, $obj->getDraw());\n $this->assertEquals(10, $obj->getLength());\n $this->assertEquals([], $obj->getOrder());\n $this->assertInstanceOf(ParameterBag::class, $obj->getQuery());\n $this->assertInstanceOf(ParameterBag::class, $obj->getRequest());\n $this->assertNull($obj->getSearch());\n $this->assertEquals(0, $obj->getStart());\n $this->assertNull($obj->getWrapper());\n }", "protected function setUp() {\n $this->db = new SQLiteDatabase(__DIR__ . '/test_messages_controller.db');\n $this->messages_controller = new MessagesController($this->db);\n $users_controller = new UsersController($this->db);\n $arguments = ['username' => 'Bob']; //id = 1\n $users_controller->post($arguments);\n $arguments = ['username' => 'Jill']; //id = 2\n $users_controller->post($arguments);\n }", "public function __construct()\n\t\t{\n\t\t\t$this->_db_table = new Application_Model_DbTable_TourType();\n\t\t}", "protected function setUp()\n {\n $this->object = new \\Yana\\Db\\Ddl\\Table('table');\n }", "public function __construct () {\n\t\t$view_parameters = [];\n\t\t$view_parameters['table_name'] = $_GET['table_name'];\n\t\t\n\t\t$q = '\n\t\t\tSELECT *\n\t\t\tFROM `'.$_GET['table_name'].'`';\n\t\t$r = \\Core\\Database::query ($q);\n\t\t\n\t\t$view_parameters['table_rows'] = $r;\n\t\t\n\t\t$view = new TableView ($view_parameters);\n\t\t$view->render ();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->set_table('users');\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->params = [];\n $this->tables = [];\n }", "public function __construct()\n {\n //\n $this->test = DB::table('registrations')\n ->where('test',0)->get();\n }", "public function setUp()\n {\n $this->controller_name = 'CreateController';\n }", "protected function setUp()\n {\n $app = new \\Slim\\Slim();\n ORM::configure('sqlite::memory:');\n $db = ORM::get_db();\n $this->model = new \\Model\\HolidayModel($app, $db);\n $this->model->setup();\n\n $this->ctrl = new \\MyLib\\HolidayCtrl($this->model);\n\n }", "public function __construct($table)\n {\n $this->table=$table;\n }", "public function __construct()\n {\n parent::__construct('testutils\\mvvm\\TestModel');\n }", "public function __construct()\n {\n parent::__construct();//, $this->fields);\n parent::findTable($this->tableName);\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct()\n {\n parent::__construct();\n\n if (!$this->table) {\n $this->table = strtolower(str_replace('_model','',get_class($this))); //fungsi untuk menentukan nama tabel berdasarkan nama model\n }\n }", "public function testListServices()\n {\n\n }", "function __construct()\n {\n if (empty($this->table)) {\n $this->table = get_called_class();\n }\n }", "public function __construct(teste $teste)\n {\n parent::__construct();\n }", "protected function setUp() {\n $this->object = new Controller;\n }", "function __construct() {\n parent::__construct();\n $this->__resTraitConstruct();\n\n // Configure limits on our controller methods\n // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php\n $this->methods['add_post']['limit'] = 500;\n // 500 requests per hour per user/key\n $this->methods['update_post']['limit'] = 500;\n // 100 requests per hour per user/key\n $this->methods['single_get']['limit'] = 500;\n // 100 requests per hour per user/key\n $this->methods['list_post']['limit'] = 500;\n // 100 requests per hour per user/key\n $this->methods['delete_get']['limit'] = 500;\n // 100 requests per hour per user/key\n $this->methods['image_upload_post']['limit'] = 500;\n // 100 requests per hour per user/key\n $this->methods['image_list_get']['limit'] = 500;\n\n $this->methods['delete_image_get']['limit'] = 500;\n // 100 requests per hour per user/key\n $this->load->model( 'tbl_generic_model' );\n $this->load->model( 'fu_model' );\n $this->table = 'event_master';\n }", "public function testInit()\n {\n\n }", "function __construct(){\n\t\t\t$this->model = new model(); //variabel model merupakan objek baru yang dibuat dari class model\n\t\t\t$this->model->table=\"tb_dosen\";\n\t\t}", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "private function __construct() {\n\t\t$this->verifyBasicDatabaseTableSetup();\n\t}", "public function testCreateService()\n {\n\n }", "public function setUp()\n {\n $this->controller_name = 'NodeMomentController';\n }", "protected abstract function createTestTable();", "public function __construct ()\n {\n $this->setName(__CLASS__);\n $this->addTestSuite('Auth_ManualTest');\n $this->addTestSuite('Auth_DBTest');\n }", "public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }", "public function __construct(){\n\t\tparent::__construct($this->table);\n\t}", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "public function __construct()\n {\n $this->model = new MainModel();\n $this->params[\"pagination\"][\"totalItemsPerPage\"] = 5;\n view()->share ('controllerName', $this->controllerName);//đặt controllerName cho all action\n }", "function __construct()\n {\n $this->view = new View();\n $this->model = new si_cf_parametroModel();\n }", "function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"service_company_branches\";\n }", "function __construct()\n\t\t{\n\t\t\tparent::__construct();\n\t\t\t$this->_actionModel = new Action_Model();//khoi tao class\n\t\t}", "public function __construct(Test $test)\n {\n $this->test = $test;\n }", "public function testSetInitTable() {\n\n $obj = new ParamEtiquettes();\n\n $obj->setInitTable(\"initTable\");\n $this->assertEquals(\"initTable\", $obj->getInitTable());\n }", "public function __construct(UsersTable $table)\n {\n $sessionManager = new SessionManager();\n $this->sessionContainer = new Container('ContainerNamespace', $sessionManager);\n $this->table = $table;\n $this->user = new UserManagement;\n }", "function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"orders\";\n }", "public function initTable(){\n\t\t\t\n\t\t}", "public function __construct()\n {\n parent::__construct();\n// $this->table = DB_PREFIX.'_action';\n $this->table = $this::$T_HINT;\n }", "public function __construct() {\n $this->db = Database::getDatabase();\n $this->dbConnection = $this->db->getConnection();\n $this->tblUser = $this->db->getUserTable();\n $this->tblLibrary = $this->db->getLibraryTable();\n $this->tblMovie = $this->db->getMovieTable();\n $this->tblEpisode = $this->db->getEpisodeTable();\n $this->tblTv = $this->db->getTvTable();\n }", "public function __construct()\n { \n parent::__construct();\n\n $this->init($this->_sCoreTable);\n }", "public function setUp()\n {\n $dsn = 'mysql:host=localhost;dbname=demo';\n\n $pdo = new \\PDO($dsn, 'root', '');\n\n $driver = new MySQLDriver($pdo, 'demo');\n\n $this->table = new Table('post', $driver);\n }", "public function __construct($table)\n {\n $this->table = $table;\n }", "protected function setUp()\n {\n $this->object = new UserController;\n }", "function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"special_fees\";\n }", "public function __construct()\n {\n $this->table = 'ci_users';\n $this->dependents = array(\n array(\n 'table' => 'ci_jobseekers',\n 'key' => 'user_id'\n )\n );\n }", "function __construct()\n {\n parent::__construct();\n\t\t// Other stuff\n\t\t$this->_prefix = $this->config->item('DX_table_prefix');\n\t\t$this->_table = $this->_prefix.$this->config->item('DX_app_module');\n }", "public function __construct()\n {\n global $viewController, $database, $settings, $message, $tableName, $tableColumns;\n\n // get the database table names\n $name = array_key_exists('dbName', $_GET) ? $_GET['dbName'] : null;\n $tableName = $database->secureInput($name);\n\n // check if database name is empty\n if ($tableName == null || empty($tableName)) {\n $message->setError(\"Missing table name to edit\", \\ALS\\Message::Error);\n } else {\n\n // load the required table columns\n $tableColumns = $database->getTableColumns($tableName);\n }\n\n // load the required scripts\n global $customScripts;\n $customScripts = '<script src=\"' . $settings->getTemplatesURL() . 'assets/js/popper.min.js\"></script>' . \"\\n\";\n $customScripts .= '<script src=\"' . $settings->getTemplatesURL() . 'plugins/datatables/jquery.dataTables.min.js\"></script>' . \"\\n\";\n $customScripts .= '<script src=\"' . $settings->getTemplatesURL() . 'plugins/datatables/dataTables.bootstrap4.min.js\"></script>' . \"\\n\";\n $customScripts .= '<script src=\"' . $settings->getTemplatesURL() . 'plugins/datatables/dataTables.responsive.min.js\"></script>' . \"\\n\";\n $customScripts .= '<script src=\"' . $settings->getTemplatesURL() . 'plugins/datatables/responsive.bootstrap4.min.js\"></script>' . \"\\n\";\n\n // load the view\n $viewController->loadView(\"ad_db_editTables.html\");\n }", "public function __construct()\n\t{\n\t\t$this->tableObjects = Array();\n\t\t$this->count = 0;\n\t}", "public function __construct(){\n \n $pagini = new PaginaModel();\n $pagina = $pagini->pagina(100);\n $this->continut = $pagini->content;\n \n $pagini->inchideConexiune();\n }", "public function __construct($table) {\n if(strcmp($table, \"user\") == 0){\n $this->_dbTable = new Application_Model_DbTable_User();\n }\n else{\n $this->_dbTable = new Application_Model_DbTable_Organization();\n }\n \n }", "function __construct()\r\n\t{\r\n // Call the Controller constructor\r\n\t\tparent::__construct();\r\n\t\t$this->config->load_db_items();\r\n\t}", "public function __construct()\n {\n $this->setUpTableFactory();\n $this->setupElementFactory();\n $this->loadConfig();\n }", "function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"user_sub_users\";\n }", "public function __construct() {\r\n // appelle le contructeur du parent Controller\r\n parent::__construct();\r\n // génère le modele pour l'interface avec la table comments\r\n $this->loadModel('Comments'); \r\n }", "public function __construct()\n\t\t{\n\t\t\t$this->tableName = 'users';\n\t\t\t//$this->id=$id;\n\t\t\tparent::__construct();\n\t\t}", "public function __construct(){\n $this->table=\"usuarios\";\n parent::__construct($this->table);\n }", "protected function setUp() {\n\t\tparent::setUp ();\n\t\t$sm = Bootstrap::getServiceManager();\n\t\t$em = $sm->get('doctrine.entitymanager.orm_default');\n\t\t$service = new Creacion($em);\n\t\t$this->_service = new Transaccional($em,$service);\n\t}", "public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }", "public function __construct($table){\n parent::__construct($table);\n }", "function __construct($table){\n\t\tparent::__construct($table);\n\t}", "protected function setUp()\n {\n $this->testingControllerClass = '\\\\com\\\\googlecode\\\\myquicknet\\\\testing\\\\TestingController';\n }", "public function __construct()\n\t{\n\t\t$this->userService = new UserService();\n\t\t$this->helper = new HelperController();\n\t}", "function __construct()\n {\n parent::__construct();\n\n $this->_load_models();\n\n $this->load->driver('session');\n $this->session_id = $this->session->userdata('id');\n $this->load->helper(array('url', 'date'));\n\n // Configure limits on our controller methods\n // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php\n // $this->methods['index_get']['limit'] = 500; // 500 requests per hour per index/key\n // $this->methods['index_post']['limit'] = 100; // 100 requests per hour per index/key\n // $this->methods['index_delete']['limit'] = 50; // 50 requests per hour per index/key\n }", "protected function _initTest(){\n }", "public function __construct()\n {\n $this->controller = new Controller;\n $this->error_message = 'bad request or duplicate data';\n }", "public function setUp() {\n\n\t\t$this->controller = new tx_t3deploy_cacheController();\n\t\t\n\t}", "public function __construct() {\r\n\t\tparent::__construct($this->controllerName);\t\r\n\t\t$this->load->model('todo_model');\r\n\r\n\t\t$this->data = array(\r\n\t\t\t'title' => 'Orpheus.todo',\r\n\t\t\t'loadedControllers' => Registry::getLoadedLibs()\r\n\t\t\t);\r\n\t\t\r\n\t\t\r\n\t\t//$this->index();\r\n\t\t\r\n\t}", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }" ]
[ "0.7201288", "0.65505636", "0.6537525", "0.6493896", "0.6491644", "0.6491465", "0.6477455", "0.6403381", "0.63700837", "0.6369787", "0.6338954", "0.6335251", "0.6332442", "0.62987995", "0.6288129", "0.62836766", "0.6278978", "0.6248895", "0.6248034", "0.6239682", "0.6239682", "0.6222786", "0.6217345", "0.620509", "0.6201376", "0.61993337", "0.6164033", "0.6129503", "0.612749", "0.6127473", "0.61246926", "0.6124368", "0.6121745", "0.611911", "0.6111688", "0.6101287", "0.6098838", "0.60749775", "0.6068884", "0.6064042", "0.60628957", "0.60599023", "0.60493124", "0.60466665", "0.6042916", "0.6033201", "0.6032258", "0.6025408", "0.60242105", "0.6021577", "0.6020385", "0.6020351", "0.6018838", "0.6018633", "0.60163534", "0.6015221", "0.60127455", "0.60127306", "0.600935", "0.60068756", "0.60066783", "0.59821826", "0.5974969", "0.5968221", "0.59665215", "0.59659976", "0.5965634", "0.59640306", "0.5963939", "0.5956376", "0.59543395", "0.5953577", "0.5949966", "0.5948931", "0.59479624", "0.5946173", "0.59445196", "0.5944343", "0.5940799", "0.5939881", "0.5933932", "0.59333897", "0.5931841", "0.59285855", "0.5926681", "0.5925365", "0.5920776", "0.59185773", "0.5916755", "0.59164363", "0.59153706", "0.5914727", "0.59130955", "0.59122366", "0.59113044", "0.5906219", "0.59008175", "0.5900622", "0.59002614", "0.5896398", "0.58913976" ]
0.0
-1
Fungsi untuk inisialisasi serial port
function common_init_serial($dev){ //Set permission ke 777 (Read, Write, Execute) Untuk semua orang shell_exec('sudo chmod 777 ' . $dev); //Siapkan parameter komunikasi serial shell_exec('sudo /bin/stty -F ' . $dev . ' cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function common_serial_read($query, $dev){\r\n\t//Inisialisasi serial port\r\n\t//Siapkan port arduino untuk bisa digunakan\r\n\t//common_init_serial($dev);\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//Alamat perangkat\r\n\t$serial->deviceSet($dev);\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t//Buka koneksi (tulis)\r\n\t$serial->deviceOpen('w+');\r\n\t//kirim query (delay 1 detik)\r\n\t$serial->sendMessage($query,1);\r\n\t//baca balasan\r\n\t$mp = $serial->readPort();\r\n\t//tutup koneksi\r\n\t$serial->deviceClose();\r\n\t//kembalikan hasil\r\n\treturn $mp;\r\n}", "function common_serial_write($query, $dev){\r\n\t//Inisialisasi serial port\r\n\t//Siapkan port arduino untuk bisa digunakan\r\n\t//common_init_serial($dev);\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//Alamat perangkat\r\n\t$serial->deviceSet($dev);\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t//Buka koneksi (tulis)\r\n\t$serial->deviceOpen('w+');\r\n\t//kirim query (delay 1 detik)\r\n\t$serial->sendMessage($query,0);\r\n\t//baca balasan\r\n\t$mp = $serial->readPort();\r\n\t//tutup koneksi\r\n\t$serial->deviceClose();\r\n\t//kembalikan hasil\r\n\treturn null;\r\n}", "function common_serial_get_connected_device($query,$pass){\r\n//Inisialisasi serial port\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t$devList = common_serial_scan();\r\n\tforeach($devList as $dev){\r\n\t\t//Siapkan port arduino untuk bisa digunakan\r\n\t\tcommon_init_serial($dev);\t\r\n\t\t//Alamat perangkat\r\n\t\t$serial->deviceSet($dev);\r\n\t\t//Buka koneksi (tulis)\r\n\t\t$serial->deviceOpen('w+');\r\n\t\t//kirim query (delay 1 detik)\r\n\t\t$serial->sendMessage($query,1);\r\n\t\t//baca balasan\r\n\t\t$mp = $serial->readPort();\r\n\t\t//tutup koneksi\r\n\t\t$serial->deviceClose();\t\r\n\r\n\t\t//cek hasil query\r\n\t\tif($mp == $pass){\r\n\t\t\t//Jika respon sama dengan query\r\n\t\t\t//kembalikan alamat perangkat terkoneksi\r\n\t\t\treturn $dev;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}", "function common_serial_scan() {\r\n\t//Daftar perangkat serial, untuk Linux akan dimulai dengan ttyACMx atau ttyUSBx\r\n\t$acm = \"ttyACM\";\r\n\t$usb = \"ttyUSB\";\r\n\t//Dapatkan daftar perangkat yang terhubung ke komputer\r\n\t$cmd = shell_exec('ls /dev/');\r\n\t//Cari perangkat serial yang tersedia\r\n\t//cari ACM\r\n\t$flagACM = strpos($cmd, $acm);\r\n\t//cari USB\r\n\t$flagUSB = strpos($cmd, $usb);\r\n\t\r\n\t//Buat array untuk menyimpan daftar perangkat dengan alamat serial\r\n\t//yang tersedia\r\n\t$devList = array();\r\n\t\r\n\t//Query perangkat\r\n\tif($flagACM == true){\r\n\t\t//Pisahkan nilai raw berdasarkan string acm\r\n\t\t$rawACM = explode($acm, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer ACM\r\n\t\tforeach($rawACM as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer ACM yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyACM' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif($flagUSB == true) {\r\n\t\t//Pisahkan nilai raw berdasarkan string usb\r\n\t\t$rawUSB = explode($usb, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer USB\r\n\t\tforeach($rawUSB as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer USB yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyUSB' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//Kembalikan daftar perangkat serial yang terdeteksi\r\n\treturn $devList;\r\n}", "function gettemp(){\nglobal $serial;\nwhile( empty($read)){\n$serial->deviceOpen();\n$serial->sendMessage(\"4\");\n//usleep(200000);\n$read = $serial->readPort();\n$serial->deviceClose();\n}\n$read2= trim($read);\nreturn $read2;\n\n}", "function teleinfor ($port = \"/dev/ttyAMA0\") {\n // Resultat : liste etiquette=>valeur\n $trame_array = array();\n \n // Ouvrir le port en lecture\n $handle = fopen ($port, \"r\");\n $char = \"\";\n $contents = \"\";\n while (fread($handle, 1) != chr(2));\n do {\n $char = fread($handle, 1);\n if ($char != chr(2)) $contents .= $char;\n } while ($char != chr(2));\n\n // Fermer le port\n fclose ($handle);\n\n // Supprimer les caracteres debut/fin de trame\n $trame = substr($contents,1,-1);\n\n // Separer les messages\n $trame = explode(chr(10).chr(10), $trame);\n\n // Verifier les checksum et supprimer les trames incorrectes\n foreach ($trame as $key=>$message) {\n \n // Separer l'etiquette, la valeur et le checksum\n $message = explode (chr(32), $message, 3);\n list ($etiquette, $valeur, $checksum) = $message;\n \n // Supprimer le message si incomplet ou incorrect (checksum invalide) \n if (count($message)<3 || \n checksum($etiquette, $valeur) != $checksum \n\t\t \n\t//\t|| \n // messize($etiquette) != strlen($valeur) \n ) { \n unset($trame[$key]); \n \n } else {\n // Enregistrer le message dans la liste trame_array\n $trame_array[$etiquette] = $valeur;\n\t\t\t \n }\n }\n \n return $trame_array;\n }", "function porte1() {\n\t\tsystem (\"gpio write 21 off\");\n\t\tsleep ( 1 );\n\t\tsystem (\"gpio write 21 on\");\n\t\t}", "function abrirPorta($strPorta=\"LPT1:\") {\n\n $fp = fopen($strPorta,\"w\");\n\n return $fp;\n }", "function ncurses_baudrate()\n{\n}", "private function set_serial($serial) {\n\t\t$this->set_region(substr($serial, 0, 2));\n\t\t$this->serial = $serial;\n\t}", "function common_device_init(){\r\n\t//Get perangkat mekanik yang terhubung\r\n\t//Get query dan pass\r\n\t$query = \"SELECT * FROM tbl_konfigurasi\";\r\n\t$conf = mysql_fetch_assoc(mysql_query($query));\r\n\t//Reset FIFO Camera\r\n\t$file = $_SERVER['DOCUMENT_ROOT'] . '/FIFO';\r\n\tfile_put_contents($file, '');\r\n\t//Get parameter mekanik yang diambil dari database\r\n\t$query = $conf['konfigurasi_query'];\r\n\t$pass = $conf['konfigurasi_pass'];\r\n\t$pwm = $conf['konfigurasi_pwm'];\r\n\t$servoX = $conf['konfigurasi_servoX'];\r\n\t$servoY = $conf['konfigurasi_servoY'];\r\n\t$laser = $conf['konfigurasi_laser'];\r\n\t$flash = $conf['konfigurasi_flash'];\r\n\t\r\n\t$dev = common_serial_get_connected_device($query, $pass);\r\n\t//Set variabel dev menjadi variabel sesi agar mudah diakses\r\n\tif(empty($dev) || !isset($dev)){\r\n \t\t$dev = '/dev/null';\r\n\t}\r\n\t$_SESSION['dev'] = $dev;\r\n\t//Simpan alamat perangkat terhubung\r\n\t$query = sprintf(\"UPDATE tbl_konfigurasi SET konfigurasi_dev = '%s'\", mysql_real_escape_string($dev));\r\n\t//Eksekusi query\r\n\tmysql_query($query);\r\n\t//Inisialisasi perangkat agar bisa digunakan\r\n\tcommon_init_serial($dev);\r\n\t//Set parameter mekanik sebelumnya\r\n\tcommon_serial_write('m'.$servoX.'o'.$servoY.'o',$dev);\r\n\tcommon_serial_write('p'.$pwm.'o',$dev);\r\n}", "function GenerarSerial()\n\t{\n\t\t$this->Serial = CifradorCodigo::generarNumero(\n\t\tCifradorCodigo::LongitudBitsSerialMaximo\n\t\t);\n\t}", "function send_message($serial, $instruction, $addrh, $addrl, $data1, $data2, $text)\r\n{\r\n\tusleep(COMM_WAIT_BETWEEN_MESSAGES);\r\n\r\n\t$sum = ($instruction + $addrh + $addrl + $data1 + $data2) & 255;\r\n\t$message = pack(\"CCCCCCC\", $instruction, $addrh, $addrl, $data1, $data2, $sum, 13);\r\n\t$try = 0;\r\n\t$result = -1;\r\n\tdo\r\n\t{\r\n\t//\tprint($text);\r\n\t\t\r\n\t\t$serial->sendMessage($message);\r\n\t\t\r\n\t\tusleep(COMM_WAIT_RESPONSE_DELAY);\r\n\t\t\r\n\t\t$read = $serial->readPort(7);\r\n\t\t\r\n\t\tif (strlen($read) == 7)\r\n\t\t{\r\n\t\t\t$data = unpack(\"C*\", $read);\t// first item has index 1 !!!\r\n\t\t\t\r\n\t\t\tif ($data[3] == 0x99 and $data[4] == 0x99 and $data[5] == 0x99)\r\n\t\t\t{\r\n//\t\t\t\tprint(\"No data available\");\r\n\t\t\t\t$result = -2;\r\n\t\t\t}\r\n\t\t\telse if ($data[1] == 0x00 and $data[2] == 0x00 and $data[3] == 0x00 and $data[4] == 0x00 and $data[5] == 0x00)\r\n\t\t\t{\r\n//\t\t\t\tprint(\"Unit busy\");\r\n\t\t\t\t$result = -3;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$result = ($data[3] << 16) + ($data[4] << 8) + $data[5];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($result < 0 and ++$try < COMM_NR_OF_RETRIES)\r\n\t\t{\t// retry\r\n\t\t\tusleep(COMM_RETRY_DELAY);\r\n\t\t}\r\n\t} while ($result < 0 and $try < COMM_NR_OF_RETRIES);\r\n\t\r\n\treturn $result;\r\n}", "public function getPort();", "public function getPort();", "public function getPort();", "public function getPort();", "function fermerToutesPortes(){\n\t\tfor ( $i = 25 ; $i <= 28 ; $i++ ) {\n\t\t$gpio=$i-4;\n\t\t$porte = system ( \"gpio read \".$i);\n\t\tif ($porte == \"0\"){\n\t\t\t\tsystem (\"gpio write \". $gpio .\" off\");\n\t\t\t\tsleep ( 1 );\n\t\t\t\tsystem (\"gpio write \". $gpio .\" on\");\n\t\t\t}\n\n\t\t}\n\t}", "protected function getDeviceSwitchPortsRequest($serial)\n {\n // verify the required parameter 'serial' is set\n if ($serial === null || (is_array($serial) && count($serial) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $serial when calling getDeviceSwitchPorts'\n );\n }\n\n $resourcePath = '/devices/{serial}/switch/ports';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($serial !== null) {\n $resourcePath = str_replace(\n '{' . 'serial' . '}',\n ObjectSerializer::toPathValue($serial),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getPort() {}", "function setDeviceState($dserial, $state) {\n\t#$non_num_pattern = \"/[^0-9A-Z]/\";\n\t\n\t#if(preg_match($non_num_pattern, $dserial) || preg_match($non_num_pattern, $state)) {\n\t#\tdie('Non decimal character detected');\n\t#}\n\t\n\t$state = intval($state, 10);\n\t\n\tif($state == DeviceState::Off) $msg = 'off';\n\telse if($state == DeviceState::On) $msg = 'on';\n\telse die('Invalid state' . $state);\n\t\n\t$msg .= '/pi/' . $dserial;\n\t\n\t$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\tif(!$sock) die('PHP cannot create socket');\n\t\n\tif(!socket_connect($sock, SCRIPT_IP, SCRIPT_PORT)) {\n\t\tsocket_close($sock);\n\t\tdie('Cannot connect to PiHome.py ip and port at ' . SCRIPT_IP . ', ' . SCRIPT_PORT);\n\t}\n\t\n\tsocket_send($sock, $msg, strlen($msg), 0);\n\t\n\tsocket_close($sock);\n}", "public function serial() : string;", "function SetPort($namePort = \"\") {\n $archivo = 'C:\\IntTFHKA\\Puerto.dat';\n $fp = fopen($archivo, \"w\");\n $string = \"\";\n $write = fputs($fp, $string);\n $string = $namePort;\n $write = fputs($fp, $string);\n fclose($fp);\n\n $this->NamePort = $namePort;\n }", "function connect($ip_address, $port)\n {\n //$this->connector = new FilePrintConnector(\"/dev/usb/lp0\");\n //$this->connector = new WindowsPrintConnector(\"smb://192.168.0.6/POS-80\");\n //$this->connector = new CupsPrintConnector(\"POS-80\");\n //$this->printer = new Printer($this->connector);\n /* Close printer */\n\n /*$this->connector = new FilePrintConnector(\"php://stdout\");\n $this->printer = new Printer($this->connector);\n */\n\n try {\n //$this->connector = new CupsPrintConnector(\"POS-80C\");\n $this->connector = new WindowsPrintConnector(\"POSS-80\");\n \n /* Print a \"Hello world\" receipt\" */\n $this->printer = new Printer($this->connector);\n //$this->printer -> text(\"TE AMO MCUHO MI VIDA..!\\n\");\n //$this->printer -> cut();\n \n /* Close printer */\n //$this->printer -> close();\n } catch (Exception $e) {\n echo \"Couldn't print to this printer: \" . $e -> getMessage() . \"\\n\";\n }\n }", "function DENON_InputSource($id, $value) // Input Source\n{\n CSCK_SendText($id, \"SI\".$value.chr(13));\n}", "public function getPort(): int;", "protected function getDeviceSwitchPortRequest($serial, $port_id)\n {\n // verify the required parameter 'serial' is set\n if ($serial === null || (is_array($serial) && count($serial) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $serial when calling getDeviceSwitchPort'\n );\n }\n // verify the required parameter 'port_id' is set\n if ($port_id === null || (is_array($port_id) && count($port_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $port_id when calling getDeviceSwitchPort'\n );\n }\n\n $resourcePath = '/devices/{serial}/switch/ports/{portId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($serial !== null) {\n $resourcePath = str_replace(\n '{' . 'serial' . '}',\n ObjectSerializer::toPathValue($serial),\n $resourcePath\n );\n }\n // path params\n if ($port_id !== null) {\n $resourcePath = str_replace(\n '{' . 'portId' . '}',\n ObjectSerializer::toPathValue($port_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "final public function getPort(): int {}", "public function validacionserial($serial)\n {\n $query = \"select id_equipo, COUNT(*) as canti FROM `equipo` WHERE estado =1 and serial_equipo ='\" . $serial . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "function control_gpio()\n{\n $data = read_file();\n // fetch data from object\n foreach ($data->equipment as $value) {\n if ($value->status == 1) {\n //execute command line using exec function\n exec(\"gpio -g mode {$value->port} out\");\n exec(\"gpio -g write {$value->port} 1\");\n } else {\n exec(\"gpio -g write {$value->port} 0\"); \n }\n }\n \n}", "public function __construct($serial)\n {\n parent::__construct($serial);\n\n $this->sound = 'Baa!';\n }", "function updateSerial($serial) {\n\t$viererString = str_split($serial,4);\n\t$zweierString = str_split($viererString[1],2);\n\t// SerialCut ist Jahr,Monat,Tag,Nummer\n\t$serialCut = array(\"Y\" => $viererString[0], \"m\" => $zweierString[0], \"d\" => $zweierString[1], \"n\" => $viererString[2]);\n\tforeach($serialCut as $type => $value) {\n\t\tif($type!=\"n\") {\n\t\t\tif($value!=strftime(\"%\".$type)) {\n\t\t\t\t$serialCut[$type]=strftime(\"%\".$type);\n\t\t\t\t$serialCut[\"n\"]=\"01\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$value++;\n\t\t\t$serialCut[\"n\"]=str_pad($value,2,0,STR_PAD_LEFT);\n\t\t}\n\t}\n\treturn $serialCut[\"Y\"].$serialCut[\"m\"].$serialCut[\"d\"].$serialCut[\"n\"];\t\n}", "public function validacionserialasignado($serial)\n {\n $query = \"select COUNT(*) as cantidad FROM `equipo`\n INNER JOIN asignacion_equipo on fkID_equipo=id_equipo\n WHERE asignacion_equipo.estado =1 and fkID_equipo='\" . $serial . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "public function encenderPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"ON\");\n $this->setEncendidoPizarra(1);\n\n }", "public function getPort(): int\n {\n }", "public function getPort():? int;", "public function serial() {\n\t\tif(is_null($this->serial))\n\t\t\tthrow new DataAuthenticatorException('Unable to find a valid serial');\n\t\treturn $this->serial;\n\t}", "public function apagarPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"OFF\");\n $this->setEncendidoPizarra(0);\n\n }", "abstract function setOutputPort( OutputPortInterface $output );", "public function usb()\n {\n }", "function IMuPort()\n {\n\n return 40082;\n }", "public function getPort(){\r\n return $this->Port;\r\n }", "public function __toString() : string\n {\n return 'Serial';\n }", "function sendcmd($in, $address, $service_port)\n{\n $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n if ($socket === false) {\n return \"socket_create() failed: reason: \" . socket_strerror(socket_last_error()) . \"\\n\";\n }\n\n $result = socket_connect($socket, $address, $service_port);\n if ($result === false) {\n return \"socket_connect() failed.\\nReason: ($result) \" . socket_strerror(socket_last_error($socket)) . \"\\n\";\n }\n \n socket_write($socket, $in, strlen($in));\n $mess = \"\";\n /*$next = \"\";*/\n sleep(1);\n \n /*$next = socket_read($socket, 4096);*/\n\t\n\twhile(0 != socket_recv($socket, $out, 4096, MSG_DONTWAIT)){ \n\tif($out != null) \n\t\t$mess .= $out; \n\t}; \n\t\n /*$mess .= $next;*/\n \n socket_close($socket);\n return $mess;\n}", "public function port()\n {\n }", "private function set_device(){\n\t\n\t}", "function do_read_data()\r\n{\r\n\tglobal\t$TABLE_PDU_LOG;\r\n\tglobal\t$FIELD_UNIT, $FIELD_KWH_TOTAL, $FIELD_KWH_DISPLAY, $FIELD_CURRENT, $FIELD_TEMPERATURE;\r\n\tglobal\t$a_unit, $a_temp, $a_kwhtotal, $a_kwhdisplay, $a_current;\r\n\r\n//\tprint(\"Reading...\\n\\n\");\r\n\r\n\t$db = connect_to_database();\r\n\r\n\t$serial = new phpSerial;\r\n\t$serial->deviceSet(SERIAL_PORT);\r\n\t$serial->configure();\r\n\t$serial->deviceOpen();\r\n\r\n\t// get all data from the units\r\n//\tprint(\"kWh total\\n\");\r\n\t$result = send_message($serial, 56, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read kWh total\r\n\tread_all_units($db, $serial, 56);\t\t\t\t\t\t\t\t\t\t\t\t\t// read kWh total from all units\r\n\r\n//\tprint(\"kWh display\\n\");\r\n\t$result = send_message($serial, 143, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read kWh display\r\n\tread_all_units($db, $serial, 143);\t\t\t\t\t\t\t\t\t\t\t\t\t// read kWh display from all units\r\n\r\n//\tprint(\"Current\\n\");\r\n\t$result = send_message($serial, 68, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read current\r\n\tread_all_units($db, $serial, 68);\t\t\t\t\t\t\t\t\t\t\t\t\t// read current from all units\r\n\r\n//\tprint(\"Temperature\\n\");\r\n\t$result = send_message($serial, 90, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read temperature\r\n\tread_all_units($db, $serial, 90);\t\t\t\t\t\t\t\t\t\t\t\t\t// read temperature from all units\r\n\r\n\t// store the data in the database\r\n\tfor ($i = 0; $i < count($a_unit); $i++)\r\n\t{\r\n\t\tif ($a_unit[$i] > 0)\r\n\t\t{\r\n\t\t\t$sql = \"INSERT INTO $TABLE_PDU_LOG ($FIELD_UNIT, $FIELD_KWH_TOTAL, $FIELD_KWH_DISPLAY, $FIELD_CURRENT, $FIELD_TEMPERATURE) \".\r\n\t\t\t \"VALUES ($a_unit[$i],$a_kwhtotal[$i],$a_kwhdisplay[$i],$a_current[$i],$a_temp[$i])\";\r\n\t\t\tif (!($mysql_result = mysql_query($sql))) print(mysql_error($db) .\"\\n\");\r\n\t\t}\r\n\t}\r\n\r\n\t$serial->deviceClose();\r\n\tmysql_close($db);\r\n}", "public function enviarNumero( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\", \"MARCADO\",$this->getNumeroIP());\n $this->enviarPeticion($cmd->getComando());\n\n }", "protected function getDeviceSwitchRoutingInterfacesRequest($serial)\n {\n // verify the required parameter 'serial' is set\n if ($serial === null || (is_array($serial) && count($serial) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $serial when calling getDeviceSwitchRoutingInterfaces'\n );\n }\n\n $resourcePath = '/devices/{serial}/switch/routing/interfaces';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($serial !== null) {\n $resourcePath = str_replace(\n '{' . 'serial' . '}',\n ObjectSerializer::toPathValue($serial),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "protected function getConfiguredPort() {}", "protected function readDevice()\n {\n $trame = '';\n $i=0;\n while (strlen($trame)==0 && $i < 3) {\n $trame = $this->readTrame();\n $i++;\n }\n\n echo date('Y-m-d H:i:s T').\" Read attempt : \".$i.\" for \".strlen($trame).\" octet(s)\\n\";\n\n $trame = chop(substr($trame, 1, -1)); // on supprime les caracteres de debut et fin de trame\n\n $messages = explode(chr(10), $trame); // on separe les messages de la trame\n $new = [];\n foreach ($messages as $msg) {\n $ligne = explode(' ', $msg, 3);\n if (count($ligne)<2) {\n continue;\n }\n $new[$ligne[0]] = $ligne[1];\n }\n return $new;\n }", "function getPorts($pDB)\n {\n $pconfEcho = new paloSantoConfEcho($pDB);\n $pconfEcho->deleteEchoCanceller();\n $pconfEcho->deleteCardParameter();\n //$this->deleteCardManufacturer($pDB);\n //$data = array();\n global $arrLang;\n $tarjetas = array(); \n $data = array();\n $data2 = array();\n $data3 = array();\n $exist_data = \"no\";\n unset($respuesta);\n exec('/usr/sbin/lsdahdi',$respuesta,$retorno);\n\n if($retorno==0 && $respuesta!=null && count($respuesta) > 0 && is_array($respuesta)){\n $idTarjeta = 0;\n $count = 0; \n foreach($respuesta as $key => $linea){\n $estado_asterisk = _tr('Unknown');\n $estado_asterisk_color = \"gray\";\n $estado_dahdi_image = \"conn_unkown.png\";\n if(preg_match(\"/^### Span[[:space:]]+([[:digit:]]{1,}): ([[:alnum:]| |-|\\/]+)(.*)$/\",$linea,$regs)){\n $idTarjeta = $regs[1];\n $dataCardParam = $this->getCardManufacturerById($pDB, $idTarjeta);\n if(empty($dataCardParam)){\n $dataCardParam['manufacturer'] = \" \";\n $dataCardParam['num_serie'] = \" \";\n $dataCardParam['id_card'] = \" \";\n }else $dataCardParam['id_card']=$idTarjeta;\n if($dataCardParam['manufacturer']!=\" \"){ \n $exist_data=\"yes\";\n $data3['manufacturer'] = $pDB->DBCAMPO($dataCardParam['manufacturer']); \n }else{ $data3['manufacturer'] = $pDB->DBCAMPO(\" \");\n $exist_data = \"no\";\n }\n\n if($dataCardParam['num_serie']!=\" \"){ \n $exist_data=\"yes\";\n $data3['num_serie'] = $pDB->DBCAMPO($dataCardParam['num_serie']);\n }else{ $data3['num_serie'] = $pDB->DBCAMPO(\" \");\n $exist_data = \"no\";\n }\n if($dataCardParam['manufacturer']==\" \" && $dataCardParam['num_serie']==\" \" && $dataCardParam['id_card']==\" \"){\n $data3['id_card'] = $pDB->DBCAMPO($regs[1]); \n $this->addCardManufacturer($pDB, $data3);\n }else $this->updateCardParameter($pDB, $data3, array(\"id_card\"=>$regs[1]));\n $tarjetas[\"TARJETA$idTarjeta\"]['DESC'] = array(\n 'ID' => $regs[1],\n 'TIPO' => $regs[2],\n 'ADICIONAL' => $regs[3],\n 'MANUFACTURER' => $exist_data,\n 'MEDIA' => NULL,\n 'MEDIA_SWITCHABLE' => file_exists(\"/etc/wanpipe/wanpipe{$idTarjeta}.conf\"));\n $count++;\n $data2['id_card'] = $pDB->DBCAMPO($regs[1]);\n $data2['type'] = $pDB->DBCAMPO($regs[2]);\n $data2['additonal'] = $pDB->DBCAMPO($regs[3]);\n\n $pconfEcho->addCardParameter($data2);\n }\n else if(preg_match(\"/[[:space:]]*([[:digit:]]+) ([[:alnum:]_]+)[[:space:]]+([[:alnum:]-]+)[[:space:]]*(.*)/\",$linea,$regs1)){\n //Estados de las lineas\n if(preg_match(\"/Hardware-assisted/i\",$regs1[3].$regs1[4]) || preg_match(\"/HDLC(FCS)?/i\",$regs1[3])){\n if(preg_match(\"/In use.*RED/i\",$regs1[4])){\n $estado_asterisk = _tr('Detected by Asterisk');\n $estado_asterisk_color = \"green\";\n $estado_dahdi_image = \"conn_alarm_HC.png\";\n }\n else if(preg_match(\"/In use/i\",$regs1[4])){\n $estado_asterisk = _tr('Detected by Asterisk');\n $estado_asterisk_color = \"green\";\n $estado_dahdi_image = \"conn_ok_HC.png\";\n }\n else if(preg_match(\"/RED/i\",$regs1[4])){\n $estado_asterisk = _tr('Not detected by Asterisk');\n $estado_asterisk_color = \"#FF7D7D\";\n $estado_dahdi_image = \"conn_alarm_HC.png\";\n }\n else{\n $estado_asterisk = _tr('Not detected by Asterisk');\n $estado_asterisk_color = \"#FF7D7D\";\n $estado_dahdi_image = \"conn_ok_HC.png\";\n }\n }\n else if(preg_match(\"/In use.*RED/i\",$regs1[4])){\n $estado_asterisk = _tr('Detected by Asterisk');\n $estado_asterisk_color = \"green\";\n $estado_dahdi_image = \"conn_alarm.png\";\n }\n else if(preg_match(\"/In use/i\",$regs1[4])){\n $estado_asterisk = _tr('Detected by Asterisk');\n $estado_asterisk_color = \"green\";\n $estado_dahdi_image = \"conn_ok.png\";\n }\n else if(preg_match(\"/RED/i\",$regs1[4])){\n $estado_asterisk = _tr('Not detected by Asterisk');\n $estado_asterisk_color = \"#FF7D7D\";\n $estado_dahdi_image = \"conn_alarm.png\";\n }\n else{\n $estado_asterisk = _tr('Not detected by Asterisk');\n $estado_asterisk_color = \"#FF7D7D\";\n $estado_dahdi_image = \"conn_ok.png\";\n }\n\n //Tipo de las lineas\n $tipo = $regs1[2];\n $tarjetas[\"TARJETA$idTarjeta\"]['DESC']['MEDIA'] = $tipo;\n \n $dataType=preg_split('/[:]/',$regs1[4],2);\n if(count($dataType)>1){\n $arrEcho=preg_split('/[)]/',$dataType[1],2);\n $data['num_port'] = $pDB->DBCAMPO($regs1[1]);\n $data['name_port'] = $pDB->DBCAMPO($regs1[2]);\n $data['echocanceller'] = $pDB->DBCAMPO(trim($arrEcho[0]));\n $data['id_card'] = $pDB->DBCAMPO($count);\n $pconfEcho->addEchoCanceller($data);\n }else if($regs1[3]!=\"HDLCFCS\" && $regs1[3] != 'Hardware-assisted'){\n $data['num_port'] = $pDB->DBCAMPO($regs1[1]);\n $data['name_port'] = $pDB->DBCAMPO($regs1[2]);\n $data['echocanceller'] = $pDB->DBCAMPO(\"none\");\n $data['id_card'] = $pDB->DBCAMPO($count);\n $pconfEcho->addEchoCanceller($data);\n }\n $tarjetas[\"TARJETA$idTarjeta\"]['PUERTOS'][\"PUERTO$regs1[1]\"] = array('LOCALIDAD' =>$regs1[1],'TIPO' => $tipo, 'ADICIONAL' => \"$regs1[2] - $regs1[3]\", 'ESTADO_ASTERISK' => $estado_asterisk,'ESTADO_ASTERISK_COLOR' => $estado_asterisk_color,'ESTADO_DAHDI' => $estado_dahdi_image);\n\n }\n else if(preg_match(\"/[[:space:]]*([[:digit:]]+) ([[:alnum:]]+)/\",$linea,$regs1)){\n if($regs1[2] == 'unknown'){\n $estado_asterisk = _tr('Unknown');\n $estado_asterisk_color = 'gray';\n $estado_dahdi_image = 'conn_unkown.png';\n }else if(preg_match(\"/EMPTY/i\",$regs1[2])){\n $estado_asterisk = _tr('Channel Empty');\n $estado_asterisk_color = 'gray';\n $estado_dahdi_image = 'conn_empty.png';\n }\n $tarjetas[\"TARJETA$idTarjeta\"]['PUERTOS'][\"PUERTO$regs1[1]\"] = array('LOCALIDAD' =>$regs1[1],'TIPO' => \"&nbsp;\", 'ADICIONAL' => $regs1[2], 'ESTADO_ASTERISK' => $estado_asterisk,'ESTADO_ASTERISK_COLOR' => $estado_asterisk_color,'ESTADO_DAHDI' => $estado_dahdi_image);\n }\n }\n }\n\n if(count($tarjetas)<=0){ //si no hay tarjetas instaladas\n $this->errMsg = _tr(\"Cards undetected on your system, press for detecting hardware detection.\");\n $tarjetas = array();\n }\n if(count($tarjetas)==1){ //si aparace la tarjeta por default ZTDUMMY\n $valor = $tarjetas[\"TARJETA1\"]['DESC']['TIPO'];\n if(preg_match(\"/^DAHDI_DUMMY\\/1/i\", $valor))\n {\n $this->errMsg = _tr(\"Cards undetected on your system, press for detecting hardware detection.\");\n $tarjetas = array();\n }\n }\n return($tarjetas);\n }", "private function getPort()\n {\n if ($this->min_port > $this->max_port)\n {\n throw new PhpSIPException (\"Min port is bigger than max port.\");\n }\n \n // waiting until file will be locked for writing \n // (1000 milliseconds as timeout)\n $fp = @fopen($this->lock_file, 'a+b');\n \n if (!$fp)\n {\n throw new PhpSIPException (\"Failed to open lock file \".$this->lock_file);\n }\n \n $startTime = microtime();\n \n do\n {\n $canWrite = flock($fp, LOCK_EX);\n // If lock not obtained sleep for 0 - 100 milliseconds,\n // to avoid collision and CPU load\n if(!$canWrite) usleep(round(rand(0, 100)*1000));\n \n } while ((!$canWrite)and((microtime()-$startTime) < 1000));\n \n if (!$canWrite)\n {\n throw new PhpSIPException (\"Failed to lock a file in 1000 ms.\");\n }\n \n //file was locked\n $size = filesize($this->lock_file);\n if ($size)\n {\n $contents = fread($fp, $size);\n $pids = explode(\",\",$contents);\n $this->pids = $contents;\n }\n else\n {\n $pids = false;\n }\n \n ftruncate($fp, 0);\n \n // we are the first one to run, initialize \"PID\" => \"port number\" array\n if (!$pids)\n {\n if (!fwrite($fp, $this->min_port))\n {\n throw new PhpSIPException(\"Fail to write data to a lock file.\");\n }\n \n $this->src_port = $this->min_port;\n }\n // there are other programs running now\n else\n {\n // check if there are any empty ports left\n if (count($pids) >= ($this->max_port - $this->min_port))\n {\n throw new PhpSIPException(\"No more ports left to bind.\");\n }\n \n asort($pids,SORT_NUMERIC);\n \n $prev = current($pids);\n \n if ($prev > $this->min_port)\n {\n $src_port = $this->min_port;\n }\n else\n {\n foreach ($pids as $port)\n {\n if (($port - $prev) > 1)\n {\n $src_port = $prev + 1;\n break;\n }\n \n $prev = $port;\n }\n \n if (($prev + 1) >= $this->max_port)\n {\n throw new PhpSIPException(\"No more ports left to bind. We shouldn't be here!\");\n }\n \n $src_port = $prev + 1;\n }\n \n if (in_array($src_port,$pids))\n {\n throw new PhpSIPException(\"Fail to obtain free port number.\");\n }\n \n $pids[] = $src_port;\n \n if (!fwrite($fp, implode(\",\",$pids)))\n {\n throw new PhpSIPException(\"Failed to write data to lock file.\");\n }\n \n $this->src_port = $src_port;\n }\n \n if (!fclose($fp))\n {\n throw new PhpSIPException(\"Failed to close lock_file\");\n }\n \n }", "public function hasPort(){\n return $this->_has(12);\n }", "public function getTxSerialHardware()\n\t{\n\t\treturn $this->tx_serial_hardware;\n\t}", "public function setLocalPort(int $port): void {}", "public function port() : ?int;", "public function setSerial($v)\n\t{\n\n\n\t\tif ($v === null) {\n\t\t\t$this->setSerialId(NULL);\n\t\t} else {\n\t\t\t$this->setSerialId($v->getId());\n\t\t}\n\n\n\t\t$this->aSerial = $v;\n\t}", "public function get_interface_switch_port_encapsulation($interface_obj)\r\n\t{\r\n\t}", "function ParameterHolenSTOPP($ETA_ComID)\r\n {\r\n $ParameterListeEnde = \"{MO\";\r\n $ParameterListeEndeBytes = chr(01) . chr(01);\r\n $ParameterListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n $Daten = $ParameterListeEnde . $ParameterListeEndeBytes . $ParameterListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "function fecharPorta(&$fp) {\n\n fclose($fp);\n }", "function crtprtlx2591N($ip,$impname) {\n\t\t$connection_parameters = array(I5_OPTIONS_JOBNAME=>'I5JOB',I5_OPTIONS_INITLIBL=>'PGMCOMET',I5_OPTIONS_LOCALCP=>'UTF-8;ISO8859-1'); //i5_OPTIONS_IDLE_TIMEOUT=>120,I5_OPTIONS_LOCALCP=>'CCSID'\n\t\tif ($conn = @i5_connect ( '127.0.0.1', 'hdh', 'hdh', $connection_parameters )) {\n\t\t\t$step1 = \"CRTDEVPRT DEVD($impname) DEVCLS(*LAN) TYPE(3812) MODEL(1) LANATTACH(*IP) PORT(9100) PPRSRC1(*CONT132) PPRSRC2(*NONE) FONT(011) FORMFEED(*AUTOCUT) PRTERRMSG(*INFO) MFRTYPMDL(*LEX2391) RMTLOCNAME('$ip') SYSDRVPGM(*IBMSNMPDRV)\";\n\t\t\t$step2 = i5_command($step1);\n\t\t\t// demarrage editeur\n\t\t\t$step3 = i5_command(\"VRYCFG CFGOBJ($impname) CFGTYPE(*DEV) STATUS(*ON)\");\n\t\t\t$step4 = i5_command(\"STRPRTWTR $impname\");\n\t\t}\n\t\tif (!i5_close($conn)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $step2;\n\t}", "protected function _setControllerPort($port){\n\t\tif (is_numeric($port) AND $port > 0 AND $port <= 49151)\n\t\t\t$this->_controllerPort = $port;\n\t\telse{\n\t\t\t// Send error with 2 methodes because it's critical programming error\n\t\t\t// And kill the script\n\t\t\t$trace = debug_backtrace();\n\t\t\t$errorMessage = 'Argument 3 for SpykeeControllerClient::__construct() have to be an valid port addresse (between 1 and 49151 included), called in'\n\t\t\t\t\t.$trace[0]['file'].' on line '.$trace[0]['line'];\n\t\t\tthrow new SpykeeException('Unable to launch Spykee Script', $errorMessage);\n\t\t}\n\t}", "public function getPort()\n {\n return (int)$this->port;\n }", "public function getPort(): int\n\t{\n\t\treturn $this->iPort;\n\t}", "function PrinterLog_logArduino($command, $output = '') {\r\n\treturn PrinterLog__logToFile('log_arduino', $command, $output); \r\n}", "public function setPort(int $port): void\n {\n }", "function get_port(){\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('port');\n\t\t\treturn $this->db->get();\n\t\t}", "public function disConnect();", "public function verAtrilEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"ATRIL\");\n\n }", "function conectar($dirip){\n $_SESSION[\"modbus\"] = new ModbusMaster($dirip, \"TCP\");\n}", "public function getMessPort ()\n {\n return $this->mess_port;\n }", "function testPort($a, $allowzero=FALSE) {\r\n // first octet may not be 0\r\n if ($a == 0 && $allowzero == FALSE)\r\n return 1;\r\n if ($a < 0 or $a > 65535)\r\n return 1;\r\n if (!is_numeric($a))\r\n\t\treturn 1;\r\n return 0;\r\n}", "public function read(){\n \treturn ser_read();\n }", "public function __construct(Temboo_Session $session, Google_ComputeEngine_Instances_GetSerialPortOutput $choreo, $inputs = array(), $async = false, $store_results = true)\n {\n parent::__construct($session, $choreo, $inputs, $async, $store_results);\n }", "public function SetPortEnvio($portEnvio){\n\t\t\t\n\t\t\t\t$this->portEnvio = $portEnvio;\n\t\t\n\t\t}", "function do_button_out($rbuf)\r\n{\r\n\techo \"cmd: $rbuf\\r\\n\";\r\n\t$cmd = array();\r\n\t$cmd = explode(\" \", $rbuf, 2);\r\n\r\n\tif($cmd[0] == \"pwr\")\r\n\t{\r\n\t\tif($cmd[1] == \"1\")\r\n\t\t{\r\n\t\t\techo \"POWER button pressed\\r\\n\";\r\n\t\t\tuio_out(0, PC_PWR_BTN, HIGH);\r\n\t\t\tuio_out(0, MB_PWR_BTN_LED, LOW);\r\n\t\t}\r\n\t\telse if($cmd[1] == \"0\")\r\n\t\t{\r\n\t\t\techo \"POWER button released\\r\\n\";\r\n\t\t\tuio_out(0, PC_PWR_BTN, LOW);\r\n\t\t\tuio_out(0, MB_PWR_BTN_LED, HIGH);\r\n\t\t}\r\n\t}\r\n\telse if($cmd[0] == \"rst\")\r\n\t{\r\n\t\tif($cmd[1] == \"1\")\r\n\t\t{\r\n\t\t\techo \"RESET button pressed\\r\\n\";\r\n\t\t\tuio_out(0, PC_RST_BTN, HIGH);\r\n\t\t\tuio_out(0, MB_RST_BTN_LED, LOW);\r\n\t\t}\r\n\t\telse if($cmd[1] == \"0\")\r\n\t\t{\r\n\t\t\techo \"RESET button released\\r\\n\";\r\n\t\t\tuio_out(0, PC_RST_BTN, LOW);\r\n\t\t\tuio_out(0, MB_RST_BTN_LED, HIGH);\r\n\t\t}\r\n\t}\r\n}", "public function get_data($serial = '')\n {\n\n $out = array();\n $temp = array();\n if (! $this->authorized()) {\n $out['error'] = 'Not authorized';\n } else {\n $bluetooth = new bluetooth_model;\n foreach ($bluetooth->retrieve_records($serial) as $prefs) {\n $temp[] = $prefs->rs;\n }\n foreach ($temp as $value) {\n $out[$value['device_type']] = $value['battery_percent'];\n }\n }\n\n $obj = new View();\n $obj->view('json', array('msg' => $out));\n }", "public function verPortatilEnPizarra( $portatil ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"PORTATIL_\".$portatil);\n\n }", "public function getPort() {\n return @$this->attributes['port'];\n }", "public static function tcp_sender(): void\n {\n //Set TCP server host address and port\n sock::$host = self::host;\n sock::$port = self::port;\n\n //Set Socket type to 'tcp:sender'\n sock::$type = 'tcp:sender';\n\n //Create Socket (sender)\n $ok = sock::create();\n\n if (!$ok) exit('TCP Sender creation failed!');\n\n do {\n $data = [];\n\n echo 'Please input your commands, we will send it to others: ';\n\n $msg = fgets(STDIN);\n\n $data[] = ['msg' => $msg];\n\n //Send data to Server\n $result = sock::write($data);\n\n echo PHP_EOL . '============================================' . PHP_EOL;\n echo $result[0] ? 'Message: \"' . trim($msg) . '\" sent successfully!' : 'Send failed!';\n echo PHP_EOL . '============================================' . PHP_EOL;\n\n //Listen to TCP port\n sock::listen();\n\n //Read data from server\n $msg = sock::read();\n\n $received = current($msg)['msg'];\n\n $list = false !== strpos($received, PHP_EOL) ? explode(PHP_EOL, $received) : [$received];\n\n $list = array_filter($list);\n\n if (empty($list)) continue;\n\n if (1 < count($list) || 'OK! ' !== substr($list[0], 0, 4)) {\n echo PHP_EOL . 'Wow, you have messages unread!' . PHP_EOL;\n echo PHP_EOL . '↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓' . PHP_EOL . PHP_EOL;\n }\n\n foreach ($list as $cmd) {\n $cmd = trim($cmd);\n\n if ('OK! ' === substr($cmd, 0, 4)) {\n echo PHP_EOL . $cmd . PHP_EOL . PHP_EOL;\n continue;\n }\n\n echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' . PHP_EOL;\n echo $cmd . PHP_EOL;\n echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' . PHP_EOL . PHP_EOL;\n echo '!!!Do NOT execute the command that you don\\'t know!!!' . PHP_EOL;\n echo 'Execute the messages? (y/n): ';\n echo PHP_EOL . PHP_EOL;\n\n $input = fgets(STDIN);\n\n if ('y' === strtolower(trim($input))) {\n exec($cmd, $out);\n echo 'Executed. The command shows:' . PHP_EOL;\n echo '============================================' . PHP_EOL;\n var_dump($out);\n echo '============================================' . PHP_EOL . PHP_EOL . PHP_EOL . PHP_EOL;\n }\n }\n } while (true);\n }", "public function encender() {\n $respuesta=self::$plasma->estadoPlasma();\n\tif ( $respuesta == 'OFF' ){\n\t $respuesta=self::$plasma->encender();\n\t}\n\n }", "public function get_data($serial_number = '')\n {\n $obj = new View();\n if (! $this->authorized()) {\n $obj->view('json', array('msg' => 'Not authorized'));\n return;\n }\n $power = new Power_model($serial_number);\n $temp_format = conf('temperature_unit');\n $power->rs['temp_format'] = $temp_format; // Add the temp format for use in the client tab's JavaScript \n $obj->view('json', array('msg' => $power->rs));\n }", "public function setPort($port);", "public function setPort($port);", "function communicationOpen($host, $port=1025) {\n\t\t/*http://php.net/manual/en/function.socket-create.php*/\n\t\t$this->socket = socket_create(AF_INET, SOCK_STREAM, 0);\n\t\t\n\t\tif ($this->socket === false) {\n\t\t\t$this->error = 'ERR - Impossibile creare una connessione socket';\n\t\t\treturn false;\n\t\t}\n\n\t\tsocket_set_option($this->socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => 1, 'usec' => 500));\n\t\tsocket_set_option($this->socket, SOL_SOCKET, SO_SNDTIMEO, array('sec' => 1, 'usec' => 500));\n\n\t\t$result = socket_set_nonblock($this->socket);\n\t\tif ($result === false) {\n\t\t\t$this->error = 'ERR - Impossibile impostare la connessione socket come non bloccante';\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Attempting to connect\n\t\t// $result = @socket_connect($this->socket, $host, $port) or die(\"Could not connect socket (2)\"); \n\t\t$timeout = 2;\n\t\t$time = time();\n\n\t\t// loop until a connection is gained or timeout reached\n\t\twhile (!@socket_connect($this->socket, $host, $port)) {\n\t\t\t$err = socket_last_error($this->socket);\n\n\t\t\tif($err === 56 || $err ===10056) {\n\t\t\t\t// Success!\n\t\t\t\t//TODO: controllare error codes e vedere che cosa vuol dire 56 e 10056\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// if timeout reaches then call exit();\n\t\t\tif ((time() - $time) >= $timeout) {\n\t\t\t\tsocket_close($this->socket);\n\t\t\t\t$this->error = 'ERR - Timeout nella creazione della comunicazione TCP';\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// sleep for a bit\n\t\t\tusleep(100000); //0.1 secondi\n\t\t}\n\n\t\t$result = socket_set_block($this->socket);\n\t\tif ($result === false) {\n\t\t\t$this->error = 'ERR - Impossibile impostare la connessione socket come bloccante';\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->ip = $host;\n\t\t\n\t\treturn true;\n\t}", "function TestDevice($device)\n{\n # NOTE: due to how PHP handles files/pipes/devices through fopen/fread, etc., fseek\n # won't work in PHP to specify a different offset for the device, but shell execution\n # of normal command line options (like dd/echo) works\n if ($dev != \"/dev/null\") {\n echo \"Communicating with device $device\\n\";\n for ($i = 0; $i < 16; ++$i) {\n printf(\"Reading from offset 0x%02X\\n\", $i);\n $cmd = \"/usr/bin/dd if=$device bs=1 count=1 skip=$i 2>/dev/null | /usr/bin/hexdump -e '/1 \\\"0x\\\" \\\"%02X\\\" \\\"\\\\n\\\"'\";\n echo \"data read = \".exec($cmd).\"\\n\";\n }\n for ($i = 0; $i < 16; ++$i) {\n printf(\"Writing 0x00 to offset 0x%02X\\n\", $i);\n shell_exec(\"echo -n \\\"\\\\0\\\" | /usr/bin/dd of=$device bs=1 count=1 seek=$i 2>/dev/null\");\n echo \"wrote data\\n\";\n }\n } else {\n echo \"usage: test /dev/accesio/device\";\n }\n}", "public function __construct(Temboo_Session $session)\n {\n parent::__construct($session, '/Library/Google/ComputeEngine/Instances/GetSerialPortOutput/');\n }", "public function verRedThinkClientEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"THINK_CLIENT\");\n\n }", "function read()\n {\n }", "static public function getPort() {\n\t\treturn self::port;\n\t}", "private function getPort ()\n\t\t{\n\t\t\t$server_config = $this->config['server'];\n\t\t\t$config_data = file( $this->config['server'] );\n\t\t\t$i=0;\n\t\t\twhile ( $i < count ( $config_data ) ) {\n\t\t\t\tif(strstr ( $config_data [$i] , \"port\" ) ) { /* line of port in server.conf */\n\t\t\t\t\t$buffer = explode (\" \" , $config_data[$i] ) ;\n\t\t\t\t\tif ( count ( $buffer ) == 2 ) \n\t\t\t\t\t\t$this->result['data']['port'] = trim($buffer[1]);\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn;\n\t\t}", "function is_port($port) {\n\tif (!is_numericint($port))\n\treturn false;\n\n\tif (($port < 1) || ($port > 65535))\n\treturn false;\n\telse\n\treturn true;\n}", "public abstract function registerDevice();", "function Parameter_Liste_weiterenParameterHolen($ETA_ComID)\r\n {\r\n $ParameterListeStart =\"{MF\";\r\n\r\n\t\t\tIf (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 0) {\r\n \t$ParameterListeStartBytes = chr(02) . chr(02) . chr(01) . chr(01); //Standard\r\n\t } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 1) {\r\n \t$ParameterListeStartBytes = chr(02) . chr(03) . chr(01) . chr(02); //Service\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 2) {\r\n\t\t\t \t$ParameterListeStartBytes = chr(02) . chr(04) . chr(01) . chr(03); //Profi\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 3) {\r\n \t\t\t \t$ParameterListeStartBytes = chr(02) . chr(05) . chr(01) . chr(04); //Expert\r\n\t\t\t}\r\n $ParameterListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n $Daten = $ParameterListeStart . $ParameterListeStartBytes . $ParameterListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "public function getNbPorte(){return $this->nbPorte;}", "public function serch()\n {\n }", "public function setTxSerialHardware($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->tx_serial_hardware !== $v) {\n\t\t\t$this->tx_serial_hardware = $v;\n\t\t\t$this->modifiedColumns[] = C060InventarioPeer::TX_SERIAL_HARDWARE;\n\t\t}\n\n\t\treturn $this;\n\t}", "protected function updateDeviceSwitchPortRequest($serial, $port_id, $update_device_switch_port = null)\n {\n // verify the required parameter 'serial' is set\n if ($serial === null || (is_array($serial) && count($serial) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $serial when calling updateDeviceSwitchPort'\n );\n }\n // verify the required parameter 'port_id' is set\n if ($port_id === null || (is_array($port_id) && count($port_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $port_id when calling updateDeviceSwitchPort'\n );\n }\n\n $resourcePath = '/devices/{serial}/switch/ports/{portId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($serial !== null) {\n $resourcePath = str_replace(\n '{' . 'serial' . '}',\n ObjectSerializer::toPathValue($serial),\n $resourcePath\n );\n }\n // path params\n if ($port_id !== null) {\n $resourcePath = str_replace(\n '{' . 'portId' . '}',\n ObjectSerializer::toPathValue($port_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($update_device_switch_port)) {\n $_tempBody = $update_device_switch_port;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "function updateDoorSwitch($dserial, $sserial) {\n\t$query = sprintf(\"UPDATE DoorTriggers SET switchserial=%s WHERE doorserial=%s\",\n\t\tmysql_real_escape_string($sserial),\n\t\tmysql_real_escape_string($dserial)\n\t);\n\t\n\tdb_query($query);\n}" ]
[ "0.70534635", "0.6981254", "0.66941357", "0.66211706", "0.64824206", "0.6466116", "0.58802855", "0.586714", "0.58508915", "0.58391196", "0.5777454", "0.57718396", "0.5717882", "0.57110524", "0.57110524", "0.57110524", "0.57110524", "0.56612426", "0.55679154", "0.5565901", "0.5493812", "0.5473732", "0.54671365", "0.5425777", "0.5371208", "0.52575004", "0.51618177", "0.51542246", "0.511826", "0.5088385", "0.5055386", "0.5040641", "0.4998694", "0.49983025", "0.49735945", "0.49372214", "0.49009898", "0.48875847", "0.48520008", "0.48511833", "0.48496786", "0.48270634", "0.47972086", "0.47676104", "0.47436652", "0.47129467", "0.47123837", "0.46880743", "0.46822202", "0.46751854", "0.46481562", "0.46374202", "0.4626386", "0.45839208", "0.4543783", "0.45434102", "0.4542203", "0.45357814", "0.45355105", "0.4515055", "0.45130742", "0.45095518", "0.44995308", "0.44854787", "0.4469615", "0.44645324", "0.4456673", "0.44539112", "0.4444489", "0.44331765", "0.44306627", "0.44299936", "0.44161308", "0.44080776", "0.4402259", "0.43936443", "0.43757185", "0.43755683", "0.437133", "0.43660322", "0.43608677", "0.4351717", "0.4351666", "0.4347154", "0.4347154", "0.4343304", "0.434189", "0.4338637", "0.4337735", "0.43340418", "0.4326328", "0.43227637", "0.4314487", "0.43104947", "0.43003786", "0.42934728", "0.42917857", "0.42899343", "0.42730775", "0.42715484" ]
0.74173486
0
Fungsi untuk mencetak bahasa yg sedang digunakan
function common_current_language(){ if($_SESSION['lang'] == 'id'){ return 'Bahasa Indonesia'; } else if($_SESSION['lang'] == 'en'){ return 'English'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tampilDataGalang(){\n\t\t\n\t}", "public function masodik()\n {\n }", "function _is_pejabat_penunjang_nt(){\n\t\t$CI \t\t=& get_instance();\n\t\t$kd \t\t= $CI->session->userdata('kd_dosen');\n\t\t$tgl \t\t= date('d-m-Y');\n\t\t$api_url \t= URL_API_SIMPEG1.'simpeg_mix/data_search';\n\t\t$parameter = array('api_kode' =>1121, 'api_subkode' => 3, 'api_search' => array($tgl, $kd, 1));\n\t\t$data = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t//print_r ($data);\n\t\t$value = array();\n\t\t//echo $data[count($data)-1]->STR_NAMA;\n\t\tif(!empty($data)){\n\t\t\t//$kd_jab \t= $data[count($data)-1]->STR_ID;\n\t\t\t//ini harusnya yang aktif, bukan yang index 0 ; \n\t\t\tforeach ($data as $d) {\n\t\t\t\t$kd_jab \t= $d->STR_ID;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/jabatan';\n\t\t\t\t$parameter = array('api_kode' =>20000, 'api_subkode' => 1, 'api_search' => array($kd_jab));\n\t\t\t\t$data2 = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif(!empty($data2)){\n\t\t\t\t\t//$value['nama_jabatan'] = $data[count($data)-1]->STR_NAMA;\n\t\t\t\t\t$value['nama_jabatan'] = $d->STR_NAMA;\n\t\t\t\t\t$value['sks_maks'] = $this->_get_sks_max($d->STR_ID);//$data2[0]->SKS_MAX;\n\t\t\t\t\t$value['bukti_penugasan'] = 'Surat Keputusan';\n\t\t\t\t\t$value['masa_penugasan'] = '1 Tahun';\n\t\t\t\t\t$value['tgl_mulai'] = $d->RR_TANGGAL_MULAI_F;\n\t\t\t\t\t$value['tgl_selesai'] = $d->RR_TANGGAL_AKHIR_F;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $value;\n\t\t#return $data;\n\t\t\n\t}", "function cek_ujian_akhir_mhs(){\n\t\t\t$bimbingan = $this->cek_mhs_ujian_ta();\n\t\t\t$data = array();\n\t\t\t$ta = $this->session->userdata('kd_ta');\n\t\t\t$smt = $this->session->userdata('kd_smt');\n\n\t\t\tforeach ($bimbingan as $bbg) {\n\t\t\t\t$mhs \t= $this->get_data_mhs($bbg['NIM']);\n\t\t\t\t$waktu \t= $this->periode_semester(str_replace('-', '/', $bbg['TGL_MUNA']), $mhs[0]['KD_PRODI']);\n\t\t\t\tif($waktu){\n\t\t\t\t\tforeach ($waktu as $wkt) {\n\t\t\t\t\t\tif($ta == $wkt['KD_TA'] && $smt == $wkt['KD_SMT']){\n\t\t\t\t\t\t\t$data[] = $bbg;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\tforeach ($data as $ta) {\n\t\t\t\t$nim = $ta['NIM'];\n\t\t\t\t$judul_ta = $ta['JUDUL'];\n\t\t\t\t$kd_kur_mhs = $this->kurikulum_mahasiswa($nim);\n\t\t\t\t$temp = $this->get_data_mhs($nim);\n\t\t\t\t$jenjang = $temp[0]['NM_JENJANG'];\n\t\t\t\t$prodi = $temp[0]['NM_PRODI'];\n\n\t\t\t\t$list_mk = $this->api->get_api_json(\n\t\t\t\t\tURL_API_SIA.'sia_kurikulum/data_search',\n\t\t\t\t\t'POST',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'api_kode'=>40000,\n\t\t\t\t\t\t'api_subkode' => 15,\n\t\t\t\t\t\t'api_search' => array($kd_kur_mhs)\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tforeach ($list_mk as $mk) {\n\t\t\t\t\t$get_makul = strtoupper($mk['NM_MK']);\n\t\t\t\t\t$get_jenjang = strtoupper($mk['NM_PEND']);\n\t\t\t\t\tif($get_jenjang == \"S0\"){\n\t\t\t\t\t\tif($get_makul == \"TUGAS AKHIR\" || $get_makul == \"SKRIPSI\" || $get_makul == \"TUGAS AKHIR/SKRIPSI\" || $get_makul == \"SKRIPSI/TUGAS AKHIR\"){\n\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if($get_jenjang == \"S1\"){\n\t\t\t\t\t\tif($get_makul == \"TUGAS AKHIR\" || $get_makul == \"SKRIPSI\" || $get_makul == \"TUGAS AKHIR/SKRIPSI\" || $get_makul == \"SKRIPSI/TUGAS AKHIR\"){\n\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if($get_jenjang==\"S2\"){\n\t\t\t\t\t\tif($get_makul == \"TESIS\" || $get_makul == \"TESIS/TUGAS AKHIR\" || $get_makul == \"TUGAS AKHIR/TESIS\"){\n\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if($get_jenjang==\"S3\"){\n\t\t\t\t\t\tif($get_makul == \"DISERTASI\" || $get_makul == \"DISERTASI/TUGAS AKHIR\" || $get_makul == \"TUGAS AKHIR/DISERTASI\"){\n\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//BUAT NARASI + INPUT DATA KE DB + ADA CEK DUPLUKASI DATA\n\t\t\t\t//BUAT NARASI + INPUT DATA KE DB + ADA CEK DUPLUKASI DATA\n\t\t\t\t$narasi = \"Menguji Tugas Akhir \".$jenjang.\", Program Studi \".$prodi.\", Judul \".$judul_ta.\", \".$jml_sks.\" SKS\";\n\t\t\t\t$narasi = str_replace(\"'\", \"\", $narasi);\n\t\t\t\t$narasi = strip_tags($narasi);\n\t\t\t\t//$narasi = str_replace(\",\", \"\", $narasi);\n\t\t\t\t$sks_rule = round($this->aturan_beban_sks2(strtoupper($jenjang), $jml_sks, 1, 'TUGAS_AKHIR'),2);\n\n\t\t\t\t//ATURAN SKS_RULE UNTUK MENGUJI TA\n\t\t\t\tif($jenjang == 'S0'){\n\t\t\t\t\t//sks_rule sementara untuk menguji TA S0 \n\t\t\t\t\t$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t}elseif($jenjang == 'S1'){\n\t\t\t\t\t//sks_rule sementara untuk menguji TA S0 \n\t\t\t\t\t$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t}\n\t\t\t\telseif($jenjang == 'S2'){\n\t\t\t\t\t$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t}elseif($jenjang == 'S3'){\n\t\t\t\t\t$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t}\n\n\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\n\t\t\t\t// $kd_jbk = 'A';\n\t\t\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\t\t$jenis_kegiatan = $narasi;\n\t\t\t\t/*$jenis_kegiatan ='test';*/\n\t\t\t\t$bukti_penugasan = '-';\n\t\t\t\t// $sks_penugasan = $sks_rule;\n\t\t\t\t$masa_penugasan = '1 Semester';\n\t\t\t\t$bkt_dokumen = '-';\n\t\t\t\t$kd_jbk \t\t= 'A';\n\t\t\t\t$bkt_penugasan \t= '-';\n\t\t\t\t$bkt_dokumen \t= '-';\n\t\t\t\t$rekomendasi \t= 'LANJUTKAN';\n\t\t\t\t$capaian \t\t= 100;\n\t\t\t\t$jml_jam \t\t= 1;\n\t\t\t\t$outcome \t\t= '-';\n\t\t\t\t$file_penugasan = '-';\n\t\t\t\t$file_capaian \t= '-';\n\t\t\t\t// $sks_bkt = $sks_rule;\n\t\t\t\t$thn = $this->session->userdata('ta');\n\t\t\t\tif($smt == 2) $semester = 'GENAP'; else $semester = 'GANJIL';\n\n\t\t\t\t// $rekomendasi = 'LANJUTKAN';\n\t\t\t\t// $jumlah_jam = null;\n\t\t\t\t// $capaian = '100';\n\t\t\t\t// $outcome = null;\n\t\t\t\t// $file_penugasan = null;\n\t\t\t\t// $file_capaian = null;\n\n\t\t\t\t//insert into BKD_BEBAN_KERJA && BKD_REMUN_KINERJA\n\n\t\t\t\t//cek apakah sudah ada data atau belum ?\n\t\t\t\t $cek_mhs_bimbingan = $this->cek_api_mhs_ujian($nim);\n\t\t\t\t \n\t\t\t\tif(!$cek_mhs_bimbingan){\n\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia_ta';\n\t\t\t\t\t$parameter = array('api_search'=>array($kd_jbk, $kd_dosen, $jenis_kegiatan, $bkt_penugasan, $sks_rule, $masa_penugasan, $bkt_dokumen, $sks_rule, $thn, $semester, $rekomendasi, $jml_jam, $capaian, $outcome, $file_penugasan, $file_capaian, $ta, $smt));\n\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t// echo 'simpan ke db bkd_beban_kerja dan BKD_REMUN_KINERJA sukses'; echo '<br>';\n\t\t\t\t\t\t// $api_url \t= URL_API_BKD.'bkd_beban_kerja/get_current_data_tersimpan';\n\t\t\t\t\t\t// $parameter\t= array('api_search' => array('BKD.BKD_BEBAN_KERJA','KD_BK'));\n\t\t\t\t\t\t// $getid = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t\t\t\t$getid = $simpan;\n\t\t\t\t\t\t$nm_keg = $jenis_kegiatan;\n\t\t\t\t\t\t#simpan data pendidikan\n\t\t\t\t\t\t//catatan: $parameter ke dua adalah kd_kat, parameter ini nantinya otomatis, misalya ketika ada status sebagai pembimbing, maka\n\t\t\t\t\t\t//akan berubah menjadi kd_kat untuk membimbing\n\n\t\t\t\t\t\t$status_pindah = $this->get_status_pindah(4);\n\n\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pendidikan_ta';\n\t\t\t\t\t\t$parameter\t= array('api_search' => array($getid, '4', $nm_keg, $jenjang, '-', '1', $jml_sks, '1', '1', 'A', '1', $prodi, $nim, $status_pindah));\n\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t\t//echo 'simpan ke data pendidikan sukses'; echo '<br>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t }else{\n\t\t\t\t\t\n\t\t\t\t }\n\t\t\t}\n\t}", "function auto_menguji_ta(){\n\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\n\t\t\t\t$data = $this->get_current_ujian_ta(2); //mengambil data menguji tugas akhir pada semester ini (2)\n\n\t\t\t\tforeach ($data as $ta) {\n\t\t\t\t\t$cek_nilai_mhs = $this->get_status_ta($ta['NIM']);\n\t\t\t\t\tif($cek_nilai_mhs){\n\t\t\t\t\t\t$nim = $ta['NIM'];\n\t\t\t\t\t\t$judul_ta = $ta['JUDUL'];\n\t\t\t\t\t\t$kd_kur_mhs = $this->kurikulum_mahasiswa($nim);\n\t\t\t\t\t\t$temp = $this->get_data_mhs($nim);\n\t\t\t\t\t\t$jenjang = $temp[0]['NM_JENJANG'];\n\t\t\t\t\t\t$prodi = $temp[0]['NM_PRODI'];\n\t\t\t\t\t\t$prodi = str_replace(\"'\", \"\", $prodi);\n\t\t\t\t\t\t$prodi = strip_tags($prodi);\n\n\t\t\t\t\t\t$list_mk = $this->api->get_api_json(\n\t\t\t\t\t\t\tURL_API_SIA.'sia_kurikulum/data_search',\n\t\t\t\t\t\t\t'POST',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'api_kode'=>40000,\n\t\t\t\t\t\t\t\t'api_subkode' => 15,\n\t\t\t\t\t\t\t\t'api_search' => array($kd_kur_mhs)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tforeach ($list_mk as $mk) {\n\t\t\t\t\t\t\t$get_makul = strtoupper($mk['NM_MK']);\n\t\t\t\t\t\t\t$get_jenjang = strtoupper($mk['NM_PEND']);\n\t\t\t\t\t\t\tif($get_jenjang == \"S0\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"TUGAS AKHIR\" || $get_makul == \"SKRIPSI\" || $get_makul == \"TUGAS AKHIR/SKRIPSI\" || $get_makul == \"SKRIPSI/TUGAS AKHIR\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($get_jenjang == \"S1\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"TUGAS AKHIR\" || $get_makul == \"SKRIPSI\" || $get_makul == \"TUGAS AKHIR/SKRIPSI\" || $get_makul == \"SKRIPSI/TUGAS AKHIR\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($get_jenjang==\"S2\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"TESIS\" || $get_makul == \"TESIS/TUGAS AKHIR\" || $get_makul == \"TUGAS AKHIR/TESIS\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($get_jenjang==\"S3\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"DISERTASI\" || $get_makul == \"DISERTASI/TUGAS AKHIR\" || $get_makul == \"TUGAS AKHIR/DISERTASI\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\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//BUAT NARASI + INPUT DATA KE DB + ADA CEK DUPLUKASI DATA :\n\n\t\t\t\t\t\t$narasi = \"Menguji Tugas Akhir \".$jenjang.\", Program Studi \".$prodi.\", Judul \".$judul_ta.\", \".$jml_sks.\" SKS\";\n\t\t\t\t\t\t$narasi = str_replace(\"'\", \"\", $narasi);\n\t\t\t\t\t\t$narasi = strip_tags($narasi);\n\t\t\t\t\t\t//$narasi = str_replace(\",\", \"\", $narasi);\n\t\t\t\t\t\t//$sks_rule = round($this->aturan_beban_sks2(strtoupper($jenjang), $jml_sks, 1, 'TUGAS_AKHIR'),2);\n\t\t\t\t\t\t$jml_mhs = 1;\n\n\t\t\t\t\t\t//ATURAN SKS_RULE UNTUK MENGUJI TA\n\t\t\t\t\t\t$kd_kat = '74'; //4 untuk menguji (sebagai ketua dan anggota)\n\t\t\t\t\t\tif($jenjang == 'S0'){\n\t\t\t\t\t\t\t//sks_rule sementara untuk menguji TA S0 \n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 2);\n\t\t\t\t\t\t\t$kd_kat = '74';\n\t\t\t\t\t\t}elseif($jenjang == 'S1'){\n\t\t\t\t\t\t\t//sks_rule sementara untuk menguji TA S0 \n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 2);\n\t\t\t\t\t\t\t$kd_kat = '74';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($jenjang == 'S2'){\n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 3);\n\t\t\t\t\t\t\t$kd_kat = '74'; //74 untuk menguji sebagai anggota\n\t\t\t\t\t\t}elseif($jenjang == 'S3'){\n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 4);\n\t\t\t\t\t\t\t$kd_kat = '74'; //74 untuk menguji sebagai anggota\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\t\t\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\n\t\t\t\t\t\t// $kd_jbk = 'A';\n\t\t\t\t\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\t\t\t\t$jenis_kegiatan = $narasi;\n\t\t\t\t\t\t/*$jenis_kegiatan ='test';*/\n\t\t\t\t\t\t$bukti_penugasan = '-';\n\t\t\t\t\t\t// $sks_penugasan = $sks_rule;\n\t\t\t\t\t\t$masa_penugasan = '1 Semester';\n\t\t\t\t\t\t$bkt_dokumen = '-';\n\t\t\t\t\t\t$kd_jbk \t\t= 'A';\n\t\t\t\t\t\t$bkt_penugasan \t= '-';\n\t\t\t\t\t\t$bkt_dokumen \t= '-';\n\t\t\t\t\t\t$rekomendasi \t= 'LANJUTKAN';\n\t\t\t\t\t\t$capaian \t\t= 100;\n\t\t\t\t\t\t$jml_jam \t\t= 1;\n\t\t\t\t\t\t$outcome \t\t= '-';\n\t\t\t\t\t\t$file_penugasan = '-';\n\t\t\t\t\t\t$file_capaian \t= '-';\n\t\t\t\t\t\t// $sks_bkt = $sks_rule;\n\t\t\t\t\t\t$thn = $this->session->userdata('ta');\n\t\t\t\t\t\tif($smt == 2) $semester = 'GENAP'; else $semester = 'GANJIL';\n\n\n\n\t\t\t\t\t\t//cek kemana data akan pergi :)\n\t\t\t\t\t\t$kewajiban_serdos = $this->cek_kewajiban_serdos($kd_dosen);\n\n\t\t\t\t\t\t$status_pindah = $this->get_status_pindah($kd_kat);\n\n\t\t\t\t\t\t$jalur_data = 0;\n\t\t\t\t\t\tif($status_pindah == 0){\n\t\t\t\t\t\t\t$jalur_data = $this->cek_jalur_data_kat($kd_kat);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$sts_pakai = 1;\n\t\t\t\t\t\tif($status_pindah == 0){\n\t\t\t\t\t\t\tif($kewajiban_serdos == 0){\n\t\t\t\t\t\t\t\t$sts_pakai = 0;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tif($jalur_data != 0){\n\t\t\t\t\t\t\t\t\t$sts_pakai = 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}\n\n\n\t\t\t\t\t\t//cek apakah sudah ada data atau belum ?\n\t\t\t\t\t\t $cek_mhs_bimbingan = $this->cek_api_mhs_ujian($nim);\n\n\t\t\t\t\t\t //cek nilai mahasiswa ta sudah ada apa belum :\n\t\t\t\t\t\t //$cek_nilai_mhs = $this->get_status_ta($nim);\n\t\t\t\t\t\t $cek_mhs_ujian_ta = $this->cek_api_data_pendidikan($kd_dosen, $ta, $smt, $kd_kat, $nim);\n\t\t\t\t\t\t $cek_status_ketua_ta = $this->cek_api_data_pendidikan($kd_dosen, $ta, $smt, '73', $nim);\n\t\t\t\t\t\t \n\t\t\t\t\t\t//if(!$cek_mhs_bimbingan){\n\t\t\t\t\t\tif(!$cek_mhs_ujian_ta && !$cek_status_ketua_ta){\n\n\t\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia_ta_maps';\n\t\t\t\t\t\t\t$parameter = array('api_search'=>array($kd_jbk, $kd_dosen, $jenis_kegiatan, $bkt_penugasan, $sks_rule, $masa_penugasan, $bkt_dokumen, $sks_rule, $thn, $semester, $rekomendasi, $jml_jam, $capaian, $outcome, $file_penugasan, $file_capaian, $ta, $smt, $sts_pakai));\n\t\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\t\tif($simpan){\n\n\t\t\t\t\t\t\t\t$getid = $simpan;\n\t\t\t\t\t\t\t\t$nm_keg = $jenis_kegiatan;\n\n\t\t\t\t\t\t\t\t$status_pindah = $this->get_status_pindah($kd_kat);\n\n\t\t\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pendidikan_ta';\n\t\t\t\t\t\t\t\t$parameter\t= array('api_search' => array($getid, $kd_kat, $nm_keg, $jenjang, '-', '1', $jml_sks, '1', '1', 'A', '1', $prodi, $nim, $status_pindah));\n\t\t\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t\t\t\t//echo 'simpan ke data pendidikan sukses'; echo '<br>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t}", "function data_mhs(){\r\n\t\t\techo \"KodeMataKuliah : \".$this->KodeMataKuliah.\"<br />\";\r\n\t\t\techo \"SKS : \".$this->SKS.\"<br />\";\r\n\t\t\techo \"Daftar matakuliah yang diambil:<br />\";\r\n\t\t\t\r\n\t\t\t$i = 0; // nomor urut daftar SKS matakuliah yang diambil\r\n\t\t\tforeach($this->NamaMataKuliah as $mk){\r\n\t\t\t\techo ++$i.\". \".$mk.\"<br />\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Cuma buat ganti baris aja kok :-)\r\n\t\t\techo \"<br />\";\r\n\t\t}", "public function set_pengiriman($id){ // untuk membuat database langkah pengiriman\n\t\t$cek = $this->M_biodata->get_biodata($id)->result();\n\t\t$this->load->model('M_transaksi');\n\t\tif (count($cek)>0){\n\t\t\tforeach ($cek as $c){\n\t\t\t\t\n\t\t\t};\n\t\t\t$data = array(\n\t\t\t'nama' => $c->namaAlumni,\n\t\t\t'alamat' => $c->alamat,\n\t\t\t'noHp' => $c->noHp,\n\t\t\t'id_pemesan' => $c->id_alumni\n\t\t\t);\t\n\t\t\t$this->M_transaksi->set_pengiriman($data,'pengiriman');\n\t\t$this->set_pembayaran($id);\n\t\t}\n\t}", "private function generateNilaiAkhir($thn_ajaran = NULL, $smt = NULL, $kode_kel = NULL, $nbi = NULL) {\r\n if ( !$this->session->userdata('isLecturerTps') && !$this->session->userdata('isAdminTps') ) {\r\n redirect('public/home','refresh');\r\n }\r\n\r\n $dataFilter = [\r\n 'thn_ajaran' => $thn_ajaran,\r\n 'smt' => $smt,\r\n 'kode_kel' => $kode_kel,\r\n 'nbi' => $nbi\r\n ];\r\n\r\n $dataAnggota = $this->M_anggota->getAnggota($dataFilter)->row();\r\n\r\n if ( $dataAnggota ) {\r\n \r\n $setting = $this->M_setting->getSetting()->row();\r\n\r\n // Bobot masing masing nilai\r\n $bobot_bimbingan = $setting->bobot_bimbingan;\r\n $bobot_moderator = $setting->bobot_moderator;\r\n $bobot_penguji1 = $setting->bobot_penguji1;\r\n $bobot_penguji2 = $setting->bobot_penguji2;\r\n $kom_a = $setting->kom_a;\r\n $kom_b = $setting->kom_b;\r\n $kom_c = $setting->kom_c;\r\n $kom_d = $setting->kom_d;\r\n // Bobot masing masing nilai\r\n\r\n // nilai bimbingan\r\n $bimb = ( $bobot_bimbingan/100 ) * $dataAnggota->nilai_bimb;\r\n // nilai bimbingan\r\n\r\n // nilai moderator\r\n $kom_a_mod = ( $kom_a/100 ) * $dataAnggota->nilai_11;\r\n $kom_b_mod = ( $kom_b/100 ) * $dataAnggota->nilai_12;\r\n $kom_c_mod = ( $kom_c/100 ) * $dataAnggota->nilai_13;\r\n $kom_d_mod = ( $kom_d/100 ) * $dataAnggota->nilai_14;\r\n\r\n $tot_mod = ( $kom_a_mod + $kom_b_mod + $kom_c_mod + $kom_d_mod ) * ( $bobot_moderator/100 );\r\n // nilai moderator\r\n \r\n // nilai penguji 1\r\n $kom_a_p1 = ( $kom_a/100 ) * $dataAnggota->nilai_21;\r\n $kom_b_p1 = ( $kom_b/100 ) * $dataAnggota->nilai_22;\r\n $kom_c_p1 = ( $kom_c/100 ) * $dataAnggota->nilai_23;\r\n $kom_d_p1 = ( $kom_d/100 ) * $dataAnggota->nilai_24;\r\n\r\n $tot_p1 = ( $kom_a_p1 + $kom_b_p1 + $kom_c_p1 + $kom_d_p1 ) * ( $bobot_penguji1/100 );\r\n // nilai penguji 1\r\n \r\n // nilai penguji 2\r\n $kom_a_p2 = ( $kom_a/100 ) * $dataAnggota->nilai_31;\r\n $kom_b_p2 = ( $kom_b/100 ) * $dataAnggota->nilai_32;\r\n $kom_c_p2 = ( $kom_c/100 ) * $dataAnggota->nilai_33;\r\n $kom_d_p2 = ( $kom_d/100 ) * $dataAnggota->nilai_34;\r\n\r\n $tot_p2 = ( $kom_a_p2 + $kom_b_p2 + $kom_c_p2 + $kom_d_p2 ) * ( $bobot_penguji2/100 );\r\n // nilai penguji 2\r\n\r\n // Perhitungan nilai kahir\r\n $totalNilai = $bimb + $tot_mod + $tot_p1 + $tot_p2;\r\n // Perhitungan nilai kahir\r\n \r\n $dataUpdate = ['nilai_akhir' => $totalNilai];\r\n $updateNilaiAkhir = $this->M_anggota->update($thn_ajaran,$smt,$kode_kel,$nbi,$dataUpdate);\r\n\r\n if ( $updateNilaiAkhir ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "private function generateNilaiHuruf($thn_ajaran = NULL, $smt = NULL, $kode_kel = NULL, $nbi = NULL) {\r\n if ( !$this->session->userdata('isLecturerTps') && !$this->session->userdata('isAdminTps') ) {\r\n redirect('public/home','refresh');\r\n }\r\n\r\n $dataFilter = [\r\n 'thn_ajaran' => $thn_ajaran,\r\n 'smt' => $smt,\r\n 'kode_kel' => $kode_kel,\r\n 'nbi' => $nbi\r\n ];\r\n\r\n $dataAnggota = $this->M_anggota->getAnggota($dataFilter)->row();\r\n\r\n if ( $dataAnggota ) {\r\n\r\n // Perhitungan Nilai Huruf\r\n if ( $dataAnggota->nilai_akhir > 85 )\r\n $nilaiHuruf = 'A';\r\n else if ( $dataAnggota->nilai_akhir > 80 && $dataAnggota->nilai_akhir <= 85 )\r\n $nilaiHuruf = 'A-';\r\n else if ( $dataAnggota->nilai_akhir > 75 && $dataAnggota->nilai_akhir <= 80 )\r\n $nilaiHuruf = 'AB';\r\n else if ( $dataAnggota->nilai_akhir > 70 && $dataAnggota->nilai_akhir <= 75 )\r\n $nilaiHuruf = 'B+';\r\n else if ( $dataAnggota->nilai_akhir > 65 && $dataAnggota->nilai_akhir <= 70 )\r\n $nilaiHuruf = 'B';\r\n else if ( $dataAnggota->nilai_akhir > 60 && $dataAnggota->nilai_akhir <= 65 )\r\n $nilaiHuruf = 'B-';\r\n else if ( $dataAnggota->nilai_akhir > 55 && $dataAnggota->nilai_akhir <= 60 )\r\n $nilaiHuruf = 'BC';\r\n else if ( $dataAnggota->nilai_akhir > 50 && $dataAnggota->nilai_akhir <= 55 )\r\n $nilaiHuruf = 'C+';\r\n else if ( $dataAnggota->nilai_akhir > 45 && $dataAnggota->nilai_akhir <= 50 )\r\n $nilaiHuruf = 'C';\r\n else if ( $dataAnggota->nilai_akhir > 40 && $dataAnggota->nilai_akhir <= 45 )\r\n $nilaiHuruf = 'C-';\r\n else if ( $dataAnggota->nilai_akhir > 35 && $dataAnggota->nilai_akhir <= 40 )\r\n $nilaiHuruf = 'CD';\r\n else if ( $dataAnggota->nilai_akhir > 30 && $dataAnggota->nilai_akhir <= 35 )\r\n $nilaiHuruf = 'D';\r\n else if ( $dataAnggota->nilai_akhir >= 0 && $dataAnggota->nilai_akhir <=30 )\r\n $nilaiHuruf = 'E';\r\n else\r\n $nilaiHuruf = 'F';\r\n // Perhitungan Nilai Huruf\r\n\r\n $dataUpdate = ['nilai_huruf' => $nilaiHuruf];\r\n $updateHuruf = $this->M_anggota->update($thn_ajaran,$smt,$kode_kel,$nbi,$dataUpdate);\r\n\r\n if ( $updateHuruf ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } else {\r\n return false;\r\n }\r\n }", "function hitung()\n\t{\n\t\t$this->model->hitungMhs();\n\t\t//$this->dashboardukmapendaftar(); //controller dikembalikan ke method index setelah selesai mengakses method ini.\n\t}", "function SuoritaLisaysToimet(){\n /*Otetaan puuhaId piilotetustaKentasta*/\n $puuhaid = $_POST['puuha_id'];\n \n /* Hae puuhan tiedot */\n $puuha = Puuhat::EtsiPuuha($puuhaid);\n $suositus=luoSuositus($puuhaid,null);\n \n /*Tarkistetaan oliko suosituksessa virheita*/\n if(OlioOnVirheeton($suositus)){\n LisaaSuositus($suositus,$puuhaid);\n header('Location: puuhanTiedotK.php?puuhanid=' . $puuhaid . '.php');\n } else {\n $virheet = $suositus->getVirheet();\n naytaNakymaSuosituksenKirjoitusSivulle($puuha, $suositus, $virheet, \"Lisays\");\n }\n}", "function analisisK($perangkaan, $jadual, $key, $data)\n{\n\t$sv = $perangkaan['sv'];\n\t$hasil = $perangkaan['hasil'];\n\t$belanja = $perangkaan['belanja'];\n\t$aset = $perangkaan['aset'];\n\t$sewa = $perangkaan['asetsewa'];\n\t$noKey = substr($key, 0, 3);\n\t//echo \"<hr>$key : $sewaHarta \";\n\t\n\tif (in_array($key, array('thn','batch','Estab') ) )\n\t{\n\t\t$value = $data;\n\t\t\n\t}\n\telseif ($sv=='205') \n\t{//untuk survey 205 sahaja\n\t\tif ($jadual == 'q04_2010' && $noKey == 'F09') \n\t\t\t$nilai = ($sewa==0) ? 0 : (($data / $sewa) * 100);\n\t\telseif ($jadual == 'q04_2010' && $noKey != 'F09') \n\t\t\t$nilai = ($aset==0) ? 0 : (($data / $aset) * 100);\n\t\telseif ($jadual == 'q08_2010')\n\t\t\t$nilai = ($hasil==0) ? 0 : (($data / $hasil) * 100 );\n\t\telseif ($jadual == 'q09_2010')\n\t\t\t$nilai = ($belanja==0) ? 0 : (($data / $belanja) * 100 );\n\t\t$value = number_format($nilai,4,'.',',') . '%';\n\t\t$name = 'name=\"' . $sv . '_' . $jadual . '[' . $key . ']\"';\n\t}\n\telse\n\t{\n\t\tif ($jadual == 's'.$sv.'_q02_2010')\n\t\t\t$nilai = ($hasil==0) ? 0 : (($data / $hasil) * 100 );\n\t\telseif ($jadual == 's'.$sv.'_q03_2010')\n\t\t\t$nilai = ($belanja==0) ? 0 : (($data / $belanja) * 100 );\n\t\telseif ($jadual == 's'.$sv.'_q04_2010')\n\t\t\t$nilai = ($aset==0) ? 0 : (($data / $aset) * 100 );\n\t\t$value = number_format($nilai,4,'.',',') . '%';\n\t\t$name = 'name=\"' . $jadual . '[' . $key . ']\"';\n\n\t}\n\t// istihar pembolehubah \n\t$input = '<input type=\"text\" ' . $name . ' value=\"' \n\t\t . $data . '\" class=\"input-large\">' . $value;\n\treturn '<td>' . $input . '</td>' . \"\\r\";\n}", "public function cariWaktuTerbaik($kelas, $id_guru, $hari, $bebanJam, $kelompokMapel, $metode = 1, $id_mapel, $nama_mapel, $id_tugas)\n\t{\n\t\t/*\n\t\t* jumlah pembagian jam \n\t\t* cek apakah ada jadwal yg ngepress\n\t\t* cek apakah ada jadwal yang ada tapi tidak ngpress\n\t\t* jika sudah tidak ada tambahi metode\n\t\t* kalau sudah tidak bisa maka geser\n\t\t* kalau sudah tidak bisa lagi maka kepepet\n\t\t*/\n\n\t\t$pembagianJam = $this->pembagianWaktu($kelompokMapel, $bebanJam, $metode);\n\t\t$dataHari = explode(',', $hari);\n\t\tforeach ($pembagianJam as $valuePembagianjam) {\n\t\t\t$hasilJadwal = $this->jadwalPas($kelas, $valuePembagianjam, $dataHari, $id_guru);\n\t\t\t// * cek hasil statusnya\n\t\t\tswitch ($hasilJadwal['status']) {\n\t\t\t\tcase 'Press':\n\t\t\t\t\techo \" sesi press\";\n\t\t\t\t\t$status = '<div style=\"background-color: #c82333\">error</div>';\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\tprint_r($hasilJadwal['sesi']);\n\t\t\t\t\techo \"<br>\";\n\n\t\t\t\t\tforeach ($hasilJadwal['sesi'] as $keyHariJadwal => $sesi) {\n\t\t\t\t\t\t$jadwaltersedia = $this->Jadwal_Model->getJadwalGuru_Kelas_Hari($kelas, $keyHariJadwal, $id_guru);\n\t\t\t\t\t\tif (count($jadwaltersedia) == 0) {\n\t\t\t\t\t\t\t$saranSesi = [];\n\t\t\t\t\t\t\tforeach ($sesi as $valueSesi) {\n\t\t\t\t\t\t\t\t$saranSesi = $this->sesiUrut($kelas, $keyHariJadwal, $valueSesi);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!empty($saranSesi)) {\n\t\t\t\t\t\t\t\t$this->Jadwal_Model->isiJadwal($kelas, $keyHariJadwal, $saranSesi, $id_guru, $id_mapel, $nama_mapel, $id_tugas);\n\t\t\t\t\t\t\t\t$status = \"<div style='background-color: #218838;'>sukses</div>\";\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\t\t\t\t\techo \"<br>\";\n\t\t\t\t\techo \"$status : \";\n\t\t\t\t\tprint_r($saranSesi);\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tidakPress':\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\techo \"<div style='background-color: #7FFFD4 ;'>proses dahulu</div>\";\n\t\t\t\t\t$tempTotal = 0;\n\t\t\t\t\t$hariyangdipilih = '';\n\t\t\t\t\t$status = '<div style=\"background-color: #c82333\">error</div>';\n\n\t\t\t\t\tforeach ($hasilJadwal['sesi'] as $keyHariJadwal => $sesi) {\n\t\t\t\t\t\t$jadwaltersedia = $this->Jadwal_Model->getJadwalGuru_Kelas_Hari($kelas, $keyHariJadwal, $id_guru);\n\t\t\t\t\t\tif (count($jadwaltersedia) == 0) {\n\t\t\t\t\t\t\tif ($tempTotal < count($sesi)) {\n\t\t\t\t\t\t\t\t$tempTotal = count($sesi);\n\t\t\t\t\t\t\t\t$hariyangdipilih = $keyHariJadwal;\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\techo \"---$hariyangdipilih==>temp Total : \" . $tempTotal . \"---<br>\";\n\n\t\t\t\t\tif ($hariyangdipilih == '') {\n\t\t\t\t\t\tforeach ($hasilJadwal['sesi'] as $keyHariJadwal => $sesi) {\n\t\t\t\t\t\t\t// echo \"<br>\";\n\t\t\t\t\t\t\t// echo \"tidak ada pilihan lain jumlah jadwal \" . count($jadwaltersedia);\n\t\t\t\t\t\t\tif ($tempTotal < count($sesi)) {\n\t\t\t\t\t\t\t\t$tempTotal = count($sesi);\n\t\t\t\t\t\t\t\t$hariyangdipilih = $keyHariJadwal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo 'hari yang dipilih kosong';\n\t\t\t\t\t}\n\n\t\t\t\t\t// print_r($hasilJadwal['sesi'][$hariyangdipilih]);\n\t\t\t\t\tforeach ($hasilJadwal['sesi'][$hariyangdipilih] as $valueSesi) {\n\t\t\t\t\t\t$saranSesi = $this->sesiUrut($kelas, $hariyangdipilih, $valueSesi);\n\t\t\t\t\t\tif (!empty($saranSesi)) {\n\t\t\t\t\t\t\t// $this->Jadwal_Model->isiJadwal($kelas, $hariyangdipilih, $hasilJadwal['sesi'][$hariyangdipilih][0], $id_guru, $id_mapel, $nama_mapel, $id_tugas);\n\t\t\t\t\t\t\t$this->Jadwal_Model->isiJadwal($kelas, $hariyangdipilih, $saranSesi, $id_guru, $id_mapel, $nama_mapel, $id_tugas);\n\t\t\t\t\t\t\t$status = \"<div style='background-color: #218838;'>sukses</div>\";\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\techo \"<br>\";\n\t\t\t\t\techo \"$status : \";\n\t\t\t\t\tprint_r($saranSesi);\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tidakMuat':\n\t\t\t\t\techo \"tidak muat\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "function berinamateman ($teman) {\n $this->nama_teman=$teman;\n }", "public function valorpasaje();", "function absender_bestimmen($absender,$db){\n$query1=\"select * from user\";\n\t$antwort1=$db->query($query1);\n\t$antwort1=array_bildung($antwort1);\n\t\n\t$i=0;\n\tforeach($absender[Absender] as $name => $inhalt){\n\tif($inhalt==0){\n\t\t$absender[Absender][$i]=\"Information an Alle !\";\n\t}\n\t\n\t\t$k=0;\n\t\tforeach($antwort1[id] as $name1 => $inhalt1){\n\t\t\tif($inhalt==$inhalt1){\n\t\t\t\t$absender[Absender][$i]=$antwort1[Name][$k].\"&nbsp;&nbsp;\".$antwort1[Vorname][$k].\"&nbsp;&nbsp;- \".$antwort1[Bemerkung][$k].\" -\";\n\t\t\t}\n\t\t$k++;\n\t\t}\n\t$i++;\n\t}\n\treturn $absender;\n}", "function perpraktikum($mhsw, $khs, $bipot, $ada, $pmbmhswid=1) {\r\n // Jumlah Matakuliah praktikum/responsi yg diambil mhsw. \r\n $jml = GetaField('krstemp k left outer join jadwal j on k.JadwalID=j.JadwalID', \r\n \"k.TahunID='$khs[TahunID]' and k.MhswID='$mhsw[MhswID]' and j.JenisJadwalID\", \r\n 'R', \"count(*)\") *2;\r\n if (($jml == 0) and (empty($mhsw['MhswID']))) $jml = 2;\r\n $totharga = $bipot['Jumlah'];\r\n if (empty($ada) && ($totharga > 0)) {\r\n $s0 = \"insert into bipotmhsw(PMBID, MhswID, TahunID, BIPOT2ID, BIPOTNamaID,\r\n PMBMhswID, TrxID, Jumlah, Besar, Catatan,\r\n LoginBuat, TanggalBuat)\r\n values('$mhsw[PMBID]', '$mhsw[MhswID]', '$khs[TahunID]', '$bipot[BIPOT2ID]', '$bipot[BIPOTNamaID]',\r\n '$pmbmhswid', '$bipot[TrxID]', $jml, '$totharga', '$mk',\r\n '$_SESSION[_Login]', now())\";\r\n $r0 = _query($s0);\r\n }\r\n else {\r\n $s0 = \"update bipotmhsw set Jumlah=$jml, Besar='$totharga',\r\n PMBMhswID='$pmbmhswid',\r\n Catatan='Total SKS: $totsks',\r\n LoginEdit='$_SESSION[_Login]', TanggalEdit=now()\r\n where BIPOTMhswID='$ada[BIPOTMhswID]' \";\r\n $r0 = _query($s0);\r\n }\r\n}", "function lebih($slug) {\n\n\t\t/* ---- PREPARE VARIABLE ------*/\n\t\t$arr_slug\t\t= explode('_', $slug);\n\t\t$pegawai_result = $this->db->get_where('pegawai', array('id_pegawai' => $arr_slug[1]))->result();\n\t\t$pegawai \t\t= $pegawai_result['0']->nama_pegawai;\n\t\t$jabatan\t\t= $pegawai_result['0']->jabatan_pegawai;\n\t\t$nip \t\t= $pegawai_result['0']->nip_pegawai;\n\t\t$surat_result \t= $this->db->get_where('data_rinci', array('id_surat' => $arr_slug[0],\n\t\t\t'id_pegawai' => $arr_slug[1]))->result();\n\t\t$nomor \t\t\t= $surat_result['0']->nomor;\n\n\t\t//Get data rinci\n\t\t$data_rinci_all\t= $this->db->get_where('data_rinci',\n\t\t\tarray('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$id_tiket = $data_rinci_all['0']->id_tiket;\n\t\t$id_transport2 = $data_rinci_all['0']->id_transport2;\n\t\t\t\n\t\t//get data uang tiket\n\t\tif ($id_tiket == 0) {\n\t\t\t$sbu_tiket = 0;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$transport2 = $this->db->get_where('biaya_transport',array('id' => $id_transport2))->result();\n\t\t\t$rute = $transport2['0']->provinsi;\n\n\t\t} else {\n\t\t\t$tiket_result = $this->db->get_where('tiket_pesawat',array('id' => $id_tiket))->result();\n\t\t\t$sbu_tiket = $tiket_result['0']->biaya_tiket;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$rute = $tiket_result['0']->rute;\n\t\t}\n\n\t\t//get real pengeluaran untuk tiket\n\t\t$r_tiket_result = $this->db->get_where('spd_rampung', array('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$r_tiket = $r_tiket_result != NULL ? $r_tiket_result['0']->tiket : 0;\n\n\t\t$ppk \t\t\t= $this->db->get_where('pejabat_administratif',\n\t\t\tarray('jabatan' => 'Pejabat Pembuat Komitmen'))->result();\n\t\t$nama_ppk \t\t\t\t= $ppk['0']->nama;\n\t\t$nip_ppk \t\t\t\t= $ppk['0']->nip;\n\n\t\t$var_tgl_skrg = $this->tanggal_indo(date('Y').'-'.date('m').'-'.date('d'), '-');\n\t\t$var_tgl_surat \t= $this->tanggal_indo($surat_result['0']->tgl_surat,'/');\n\n\t\t/* -----------------------------*/\n\t\tif(empty($r_tiket_result)) {\n\t\t\techo \"<script> \t\n \talert('Anda belum mengisi SPD Rampung!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\n\t\tif($sbu_tiket<$r_tiket) {\n\t\t\t$pdf = new PDF_MC_Table('p','mm','A4');\n\t\t\t$pdf->AddPage();\n\t\t\t$pdf->SetFont('Arial','B',14);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->MultiCell(0,25,\"SURAT PERNYATAAN\",0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(25,7,'',0,0);\n\t\t\t$pdf->MultiCell(0,6,\"Yang bertandatangan di bawah ini :\",0,'L');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Nama',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$pegawai,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'NIP',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$nip,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Jabatan',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$jabatan,0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Berdasarkan Surat Tugas Nomor:'.$nomor.' tanggal '.$var_tgl_surat.' dengan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sesungguhnya bahwa : input alasan lebih here',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'1. Tiket '.$rute.' (PP) dengan jumlah tiket pesawat di bawah ini melebihi dengan',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'SBU tahun '.date('Y').', meliputi :',0,1);\n\t\t\t$pdf->Ln();\n\n\t\t\t//here is table\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'No.',1,0,'C',0);\n\t\t\t$pdf->Cell(70,5,'Uraian',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Nilai SBU',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Pengeluaran Rill',1,0,'C',0);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\n\t\t\t$counterrr = 1;\n\t\t\t\t$pdf->SetWidths(array(10, 70, 40, 40));\n\t\t\t\tfor($i=0;$i<1;$i++) {\n\t\t\t\t\t$pdf->Row(array($counterrr,\"Tiket Pesawat \".$rute. \" (PP)\",\"Rp \".$sbu_tiket_ena, \"Rp \".number_format($r_tiket,2,',','.')));\n\t\t\t\t\t$counterrr++;\n\t\t\t\t}\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'','LB',0,'L',0);\n\t\t\t$pdf->Cell(70,5,'Jumlah','LRB',0,'C',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Ln();\n\t\t\t\n\t\t\t//end of table\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'2. Bahwa tiket '.$rute.' (PP) dengan jumlah uang tersebut pada angka (1)',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'melebihi jumlah SBU dan benar - benar dikeluarkan dengan bukti rill kuitansi tiket',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Perjalanan Dinas dimaksud.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Demikian pernyataan ini kami buat dengan sebenarnya, untuk dipergunakan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sebagaimana mestinya.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t//Footer Surat\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(10,6,\"\",0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'L');\n\t\t\t$pdf->Cell(15,6,'',0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'R');\n\t\t\t$pdf->Cell(20,6,'',0,0,'C');\n\t\t\t$pdf->MultiCell(60,6,'Jakarta, '.$var_tgl_skrg,0,'R');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(18,6,'',0,0,'L');\n\t\t\t$pdf->MultiCell(55,6,'Mengetahui/Menyetujui',0,'R');\n\t\t\t$pdf->Cell(100,6,'Pejabat Pembuat Komitmen',0, 0,'C');\n\t\t\t$pdf->MultiCell(50,6,'Pelaksana SPD',0,'R');\n\t\t\t$pdf->Cell(100,6,' Pusat Data Informasi dan Humas',0, 0,'C');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','BU',12);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(100,6,$nama_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,$pegawai,0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(100,6,\"NIP. \".$nip_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,'NIP. '.$nip,0,'C');\n\n\t\t\t//Cetak gans\n\t\t\t$filename = \"Lebih - \".$arr_slug[0].\" - \".$pegawai.$this->extension;\n\t\t\t$pdf->setTitle($filename);\n\t\t\t$pdf->Output(\"I\", $filename);\n\t\t} else {\n\t\t\techo \"<script> \t\n \talert('Tidak bisa mencetak karena biaya tiket tidak lebih dari SBU!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\t}", "function hapusawalan1($kata){\n if(substr($kata,0,4)==\"meng\"){\n if(substr($kata,4,1)==\"e\"||substr($kata,4,1)==\"u\"){\n $kata = \"k\".substr($kata,4);\n }else{\n $kata = substr($kata,4);\n }\n }else if(substr($kata,0,4)==\"meny\"){\n $kata = \"ny\".substr($kata,4);\n }else if(substr($kata,0,3)==\"men\"){\n $kata = substr($kata,3);\n }else if(substr($kata,0,3)==\"mem\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"p\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,2)==\"me\"){\n $kata = substr($kata,2);\n }else if(substr($kata,0,4)==\"peng\"){\n if(substr($kata,4,1)==\"e\" || substr($kata,4,1)==\"a\"){\n $kata = \"k\".substr($kata,4);\n }else{\n $kata = substr($kata,4);\n }\n }else if(substr($kata,0,4)==\"peny\"){\n $kata = \"s\".substr($kata,4);\n }else if(substr($kata,0,3)==\"pen\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"t\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,3)==\"pem\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"p\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,2)==\"di\"){\n $kata = substr($kata,2);\n }else if(substr($kata,0,5)==\"keter\"){\n $kata = substr($kata,5);\n }else if(substr($kata,0,3)==\"ter\"){\n $kata = substr($kata,3);\n }else if(substr($kata,0,2)==\"ke\"){\n $kata = substr($kata,2);\n }\n return $kata;\n }", "public function aksi_ubah_kata_sandi_profil_saya()\n {\n $kata_sandi_awal = $this->input->post('kata_sandi_awal');\n $data_lama = sha1($kata_sandi_awal);\n\n $kata_sandi = $this->input->post('kata_sandi');\n $kata_sandi_hash = sha1($kata_sandi);\n\n $data_baru = array(\n 'kata_sandi' => $kata_sandi_hash,\n );\n\n $where = $this->input->post('id_admin');\n\n $admin = $this->m_admin->cek_admin($where);\n\n if ($data_lama === $admin['kata_sandi']) {\n $this->m_admin->ubah_kata_sandi_profil_saya($where, $data_baru, 'admin');\n $this->session->set_flashdata('success', '<b>Kata Sandi</b> Berhasil Diubah');\n redirect('admin/form_ubah_kata_sandi_profil_saya/' . $where);\n } else {\n $this->session->set_flashdata('error', '<b>Kata Sandi Lama</b> Salah');\n redirect('admin/form_ubah_kata_sandi_profil_saya/' . $where);\n }\n }", "function tampil_bentuk_sedia(){\n $data['login'] = 'Halaman Login';\n $data['title'] = 'Kelola Satuan Sedia';\n $data['query'] = $this->m_barang->tampil_satuan_sedia();\n $this->template->load('static','barang/satuan/satuansedia', $data);\n }", "public function aksi_ubah_kata_sandi_kades()\n {\n $kata_sandi = $this->input->post('kata_sandi');\n $kata_sandi_hash = sha1($kata_sandi);\n $data = array(\n 'kata_sandi' => $kata_sandi_hash,\n );\n\n $detailhere = $this->input->post('id_kades');\n\n if ($this->m_admin->aksi_ubah_kata_sandi_kades($detailhere, $data, 'kepala_desa')); {\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/list_data_kades');\n }\n }", "public function AggiornaPrezzi(){\n\t}", "function jml_mhs_bimbingan_kkn(){\n\t\t\t$nip \t= $this->session->userdata('id_user'); //'197510242009121002';//\n\t\t\t$smt \t= array(1,2,3);\n\t\t\t$ta \t= $this->session->userdata('kd_ta');\n\t\t\t$kd_current_smt = $this->session->userdata('kd_smt');\n\t\t\t$jumlah_mahasiswa = 0;\n\n\t\t\t//GET ID DPL :\n\t\t\t\n\t\t\t$url \t\t= 'kkn_dosen/data_search';\n\t\t\t$api_url \t= URL_API_KKN.$url;\n\t\t\t$parameter \t= array(\n\t\t\t\t'api_kode' => 201400,\n\t\t\t\t'api_subkode' => 1,\n\t\t\t\t'api_search' => array('KKN.KKN_DPL2014','ID_DPL',array('NIP' => $nip)));\n\n\t\t\t$dpl = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter);\n\n\t\t\tif($dpl){\n\t\t\t\t//GET LIST KELOMPOK KKN\n\t\t\t\t$id_dpl \t= $dpl[0]['ID_DPL'];\n\n\t\t\t\tforeach ($smt as $kd_smt) {\n\t\t\t\t\t$parameter2 = array(\n\t\t\t\t\t\t'api_kode' => 201402,\n\t\t\t\t\t\t'api_subkode' => 1,\n\t\t\t\t\t\t'api_search' => array($ta,$kd_smt,$id_dpl)\n\t\t\t\t\t);\n\n\t\t\t\t\t$kelompok = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter2);\n\n\t\t\t\t\tforeach ($kelompok as $kel) {\n\t\t\t\t\t\t//GET LIST DATA MAHASISWA PER KELOMPOK\n\t\t\t\t\t\t$id_kelompok = $kel['ID_KELOMPOK'];\n\n\t\t\t\t\t\t$parameter \t= array(\t'api_kode' => 201401,\n\t\t\t\t\t\t\t\t\t\t'api_subkode' => 2,\n\t\t\t\t\t\t\t\t\t\t'api_search' => array($id_kelompok));\n\n\t\t\t\t\t\t$member \t= $this->s00_lib_api->get_api_json($api_url, 'POST', $parameter);\n\t\t\t\t\t\tforeach ($member as $mbr) {\n\t\t\t\t\t\t\t//CEK SEMESTER MAHASISWA KKN\n\t\t\t\t\t\t\t$nim \t= $mbr['NIM'];\n\t\t\t\t\t\t\t$tgl \t= str_replace('-', '/', $mbr['TGL_DAFTAR']);\n\t\t\t\t\t\t\t$data_mhs \t= $this->get_data_mhs($nim);\n\t\t\t\t\t\t\t$kd_prodi \t= $data_mhs[0]['KD_PRODI'];\n\n\t\t\t\t\t\t\t$semester \t= $this->periode_semester($tgl, $kd_prodi);\n\n\t\t\t\t\t\t\t$kd_ta_data \t= $semester[0]['KD_TA'];\n\t\t\t\t\t\t\t$kd_smt_data \t= $semester[0]['KD_SMT'];\n\n\t\t\t\t\t\t\t//JIKA SESUAI DENGAN SEMESTER SAAT INI MAKA :\n\t\t\t\t\t\t\tif($ta == $kd_ta_data && $kd_current_smt == $kd_smt_data){\n\t\t\t\t\t\t\t\t$jumlah_mahasiswa++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//$jumlah_mahasiswa++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\treturn $jumlah_mahasiswa;\n\t\t}", "function cariPosisi($batas){\nif(empty($_GET['halpengumuman'])){\n\t$posisi=0;\n\t$_GET['halpengumuman']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengumuman']-1) * $batas;\n}\nreturn $posisi;\n}", "function jml_mhs_bimbingan_ta($periode = ''){\n\t\t\t// \t\t \t\t 2 --> untuk ujian tugas akhir (munaqasah)\n\n\t\t\t$kd_dosen \t= $this->session->userdata('kd_dosen');\n\t\t\t$ta \t\t= $this->session->userdata('kd_ta');\n\t\t\t$kd_smt \t= $this->session->userdata('kd_smt');\n\t\t\t$jumlah_mahasiswa = 0;\n\n\t\t\t$url \t\t= 'sia_skripsi_bimbingan/jadwalTA';\n\t\t\t$api_url \t= 'http://service.uin-suka.ac.id/servtugasakhir/sia_skripsi_public/'.$url;\n\t\t\t$parameter \t= array('api_kode' => 1000, 'api_subkode' => 1, 'api_search' => array($kd_dosen, $periode));\n\t\t\t$data \t \t= $this->s00_lib_api->get_api_json($api_url, 'POST', $parameter);\n\n\t\t\tif($data){\n\t\t\t\tforeach ($data as $key) {\n\t\t\t\t\t$nim \t= $key['NIM'];\n\t\t\t\t\t$tgl \t= str_replace('-', '/', $key['TGL_MUNA']);\n\n\t\t\t\t\t$data_mhs \t= $this->get_data_mhs($nim);\n\t\t\t\t\t$kd_prodi \t= $data_mhs[0]['KD_PRODI'];\n\n\t\t\t\t\t$semester \t= $this->periode_semester($tgl, $kd_prodi);\n\n\t\t\t\t\t$kd_ta_data \t= $semester[0]['KD_TA'];\n\t\t\t\t\t$kd_smt_data \t= $semester[0]['KD_SMT'];\n\n\t\t\t\t\tif($ta == $kd_ta_data && $kd_smt == $kd_smt_data){\n\t\t\t\t\t\t$jumlah_mahasiswa++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $jumlah_mahasiswa;\n\t\t}", "function data_prosesan()\n{\n //$jadual['medan'][]='*';\n /*$jadual['medan'][]='newss,ssm,nama,tel,fax,responden,' .\n '(SELECT keterangan FROM msic WHERE msic=msic2000 LIMIT 1,1) as keterangan,' .\n 'msic2000,msicB2000,fe';*/\n $sama='j1.newss,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn, ';\n $sama2='j2.newss,concat(j2.tahun_rujukan,\"-\",j2.siri_kekerapan) as blnthn, ';\n //$jadual['medan'][]=$sama . 'ssm, nama, operator, sv, kekerapan_sv'; \n //$jadual['medan'][]=$sama . 'ng, po, data_anggaran, cara_maklum_balas, cara_terima, sumber_pertubuhan, kategori_sample';\n //$jadual['medan'][]=$sama . 'status_operasi, status_lain_pbb, bil_bulan_bco, siasatan_bermula, siasatan_berakhir';\n //$jadual['medan'][]=$sama . 'no_jln_bgn, tmn_kg, bandar_kawasan, poskod, negeri, daerah, catatan';\n //$jadual['medan'][]=$sama . 'responden, jawatan, email, notel, lamanweb, tarikh';\n //$jadual['medan'][]=$sama . 'responden2, jawatan2, email2, notel2, nofax2';\n //$jadual['medan'][]=$sama . '`no_jln_bgn-lokasi`, `tmn_kg-lokasi`, `bandar_kawasan-lokasi`, ' .\n //'`poskod-lokasi`, `negeri-lokasi` ng, `daerah-lokasi` dp';\n $jadual['medan'][]='j1.newss,j1.ssm,j1.nama,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn ';\n $jadual['medan'][]=$sama . \"\\r\" . 'msic_lama, (SELECT keterangan FROM msic WHERE msic=msic_lama LIMIT 1,1) as keterangan,' . \n 'msic_baru, utama '; \n //$jadual['medan'][]=$sama . \"\\r\\t\" . 'F3001, F3002, catatan_soalan3, ' . 'F5001, F5002, F5003, F5104, catatan_soalan5';\n $jadual['medan'][]=$sama . 'F6001, F6002, F6003, F6004, F6005, F6101, F6102, F6103, F6104, F6105, catatan_soalan6';\n $jadual['medan'][]=$sama . 'F7001, F7002, F7003, catatan_soalan7, ' .\n 'F8001, catatan_soalan8, F9001, catatan_soalan9';\n //$jadual['medan'][]=$sama . 'cara_anggaran, bulan_terakhir_data_sebenar, bil_bulan_data_telah_dianggar';\n\n //$jadual['medan'][]=$sama . 'Deskripsi_Produk_Oleh_Responden, Produk_Tetap, Deskripsi_Produk_Tetap,\n //Produk_Tambahan, Deskripsi_Produk_Tambahan, UnitKuantitiAsal, UnitKuantitiLain'; \n $produk='Deskripsi_Produk_Tetap Nama, Produk_Tetap Kod, ';\n $jadual['medan'][]=$sama . $produk . 'KuantitiPengeluaran, KuantitiJualan, NilaiJualan, ' .\n 'format(NilaiJualan/KuantitiJualan,2) as HargaUnit, UnitKuantitiKini';\n //$jadual['medan'][]=$sama . $produk . 'ProsesanKuantitiPengeluaran, ProsesanKuantitiJualan, ProsesanNilaiJualan, AUP';\n $jadual['medan'][]=$sama . $produk . 'F2497, F2498, F2499, Catatan';\n $jadual['medan'][]=$sama . \"\\r\\t\" . \n 'F3001, F3002, catatan_soalan3, ' .\n 'F5001, F5002, F5003, F5104, catatan_soalan5';\n\n //$jadual['medan'][]=$sama . 'catatan';\n $jadual['medan'][]=$sama . 'F4001, F4002, F4003, F4004';\n $jadual['medan'][]=$sama . 'F4101, F4102, F4103, F4104';\n $jadual['medan'][]=$sama . 'F4201, F4202, F4203, F4204';\n $jadual['medan'][]=$sama . 'catatan \"Nota \", F4302, F4303, F4304';\n\n // bulanan\n //$bulan=($_GET['bln']==null)? '':'AND siri_kekerapan=\"'.bersih($_GET['bln']).'\"';\n $bulan_penuh = array('Januari', 'Februari', 'Mac', 'April', \n 'Mei', 'Jun', 'Julai', 'Ogos', \n 'September', 'Oktober', 'November', 'Disember');\n //$kerap='\"'.$bulan_penuh[0].'\",\"'.$bulan_penuh[1].'\",\"'.$bulan_penuh[2].'\"';\n //$bulan=($_GET['bln']==null)? '':'AND j1.siri_kekerapan in ('.$kerap.')';\n //$myJadual=array('mm_rangka','mm_rangka');\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_info'; } // bil medan = 15\n for($z=1;$z <= 2;$z++) { $jadual['nama'][]='prosesmm_jualan'; }\n $jadual['nama'][]='prosesmm_info';\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_gajistaf'; }\n $join1='prosesmm_info';\n $join2='prosesmm_jualan';\n $join3='prosesmm_gajistaf';\n \n return $jadual;\n}", "function hilang($slug) {\n\n\t\t/* ---- PREPARE VARIABLE ------*/\n\t\t$arr_slug\t\t= explode('_', $slug);\n\t\t$pegawai_result = $this->db->get_where('pegawai', array('id_pegawai' => $arr_slug[1]))->result();\n\t\t$pegawai \t\t= $pegawai_result['0']->nama_pegawai;\n\t\t$jabatan\t\t= $pegawai_result['0']->jabatan_pegawai;\n\t\t$nip \t\t= $pegawai_result['0']->nip_pegawai;\n\t\t$surat_result \t= $this->db->get_where('data_rinci', array('id_surat' => $arr_slug[0],\n\t\t\t'id_pegawai' => $arr_slug[1]))->result();\n\t\t$nomor \t\t\t= $surat_result['0']->nomor;\n\n\t\t//Get data rinci\n\t\t$data_rinci_all\t= $this->db->get_where('data_rinci',\n\t\t\tarray('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$id_tiket = $data_rinci_all['0']->id_tiket;\n\t\t$id_transport2 = $data_rinci_all['0']->id_transport2;\n\t\t\t\n\t\t//get data uang tiket\n\t\tif ($id_tiket == 0) {\n\t\t\t$sbu_tiket = 0;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$transport2 = $this->db->get_where('biaya_transport',array('id' => $id_transport2))->result();\n\t\t\t$rute = $transport2['0']->provinsi;\n\n\t\t} else {\n\t\t\t$tiket_result = $this->db->get_where('tiket_pesawat',array('id' => $id_tiket))->result();\n\t\t\t$sbu_tiket = $tiket_result['0']->biaya_tiket;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$rute = $tiket_result['0']->rute;\n\t\t}\n\t\t// $tiket_result\t= $this->db->get_where('tiket_pesawat',array('id' => $id_tiket))->result();\n\t\t// $sbu_tiket = $tiket_result['0']->biaya_tiket;\n\n\t\t//get real pengeluaran untuk tiket\n\t\t$r_tiket_result = $this->db->get_where('spd_rampung', array('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$r_tiket_row = $this->db->get_where('spd_rampung', array('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->num_rows();\n\t\t$r_tiket = $r_tiket_result != NULL ? $r_tiket_result['0']->tiket : 0;\n//\t\t$r_tiket = $r_tiket_result['0']->tiket;\n\t\t$ppk \t\t\t= $this->db->get_where('pejabat_administratif',\n\t\t\tarray('jabatan' => 'Pejabat Pembuat Komitmen'))->result();\n\t\t$nama_ppk \t\t\t\t= $ppk['0']->nama;\n\t\t$nip_ppk \t\t\t\t= $ppk['0']->nip;\n\n\t\t$var_tgl_skrg = $this->tanggal_indo(date('Y').'-'.date('m').'-'.date('d'), '-');\n\t\t$var_tgl_surat \t= $this->tanggal_indo($surat_result['0']->tgl_surat,'/');\n\n\t\tif($r_tiket_row <= 0) {\n\t\t\techo \"<script> \t\n \talert('Anda harus mengisi SPD Rampung Dulu!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t} else {\n\t\t\t/* -----------------------------*/\n\t\t\t$pdf = new PDF_MC_Table('p','mm','A4');\n\t\t\t$pdf->AddPage();\n\t\t\t$pdf->SetFont('Arial','B',14);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->MultiCell(0,25,\"SURAT PERNYATAAN\",0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(25,7,'',0,0);\n\t\t\t$pdf->MultiCell(0,6,\"Yang bertandatangan di bawah ini :\",0,'L');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Nama',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$pegawai,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'NIP',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$nip,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Jabatan',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$jabatan,0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Berdasarkan Surat Tugas Nomor: '. $nomor .' tanggal '.$var_tgl_surat.' dengan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sesungguhnya bahwa :',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'1. Boarding Pass '.$rute.' dengan jumlah tiket pesawat dibawah ini tidak',0,1);\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'melebihi dengan SBU tahun '.date('Y').', meliputi :',0,1);\n\t\t\t$pdf->Ln();\n\n\t\t\t//here is table\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'No.',1,0,'C',0);\n\t\t\t$pdf->Cell(70,5,'Uraian',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Nilai SBU',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Pengeluaran Rill',1,0,'C',0);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$counterrr = 1;\n\t\t\t$pdf->SetWidths(array(10, 70, 40, 40));\n\t\t\tfor($i=0;$i<1;$i++) {\n\t\t\t\t$pdf->Row(array($counterrr,\"Tiket Pesawat \".$rute,\"Rp \".$sbu_tiket_ena, \"Rp \".number_format($r_tiket,2,',','.')));\n\t\t\t\t$counterrr++;\n\t\t\t}\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'','LB',0,'L',0);\n\t\t\t$pdf->Cell(70,5,'Jumlah','LRB',0,'C',0);\n\t\t\t$pdf->Cell(7,5,'Rp','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Cell(7,5,'Rp','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Ln();\n\t\t\t//end of table\n\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'2. Boarding Pass '.$rute.' hilang dengan jumlah uang tersebut pada angka',0,1);\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'(1) sesuai dengan SBU dan benar - benar dikeluarkan sesuai dengan bukti rill kuitansi',0,1);\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'tiket Perjalanan Dinas dimaksud.',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'3. Apabila dikemudian hari ditemukan suatu temuan terkait Boarding Pass tersebut,',0,1);\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'maka saya akan bertanggung jawab.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Demikian pernyataan ini kami buat dengan sebenarnya, untuk dipergunakan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sebagaimana mestinya.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t//Footer Surat\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(10,6,\"\",0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'L');\n\t\t\t$pdf->Cell(15,6,'',0,0,'L');\n\t\t\t$pdf->Cell(5,6,'',0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'R');\n\t\t\t$pdf->Cell(20,6,'',0,0,'C');\n\t\t\t$pdf->MultiCell(60,6,'Jakarta, '.$var_tgl_skrg,0,'R');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,6,'',0,0,'L');\n\t\t\t$pdf->MultiCell(55,6,'Mengetahui/Menyetujui',0,'C');\n\t\t\t$pdf->Cell(85,6,'Pejabat Pembuat Komitmen',0, 0,'C');\n\t\t\t$pdf->MultiCell(65,6,'Pelaksana SPD',0,'R');\n\t\t\t$pdf->Cell(85,6,' Pusat Data Informasi dan Humas',0, 0,'C');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','BU',12);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(85,6,$nama_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(105,6,$pegawai,0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(85,6,\"NIP. \".$nip_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(105,6,'NIP. '.$nip,0,'C');\n\n\t\t\t//Cetak gans\n\t\t\t$filename = \"Hilang - \".$arr_slug[0].\" - \".$pegawai.$this->extension;\n\t\t\t$pdf->setTitle($filename);\n\t\t\t$pdf->Output(\"I\", $filename);\n\t\t}\n\n\n\t}", "function BBdekat_tempatIbadah(){\n\t\t$this->db->select('batas_bawah');\n\t\t$this->db->where('nama_parameter', 'dekat');\n\t\t$q = $this->db->get('parameter');\n\t\t$data = $q->result_array();\n\n\t\treturn $hasil = $data[1]['batas_bawah'];\n\t}", "public function cekJadwalBentrok($hari=NULL,$guru=NULL,$jamke=NULL){\r\n // ini diinput manual dikarenakan\r\n // untuk mengAllow kelas yang mata pelajaran olahraga\r\n \r\n $idOlahraga= $this->db->query(\"SELECT id_mapel from mapel where (nama_mapel LIKE '%Olahraga%' ) OR (nama_mapel LIKE '%olahraga%' )\")->result_array()[0]['id_mapel'];\r\n \r\n $queryCekOlahraga=$this->db->query(\"SELECT * FROM guru WHERE id_guru='$guru' AND id_mapel='$idOlahraga'\")->num_rows();\r\n\r\n if($queryCekOlahraga>=1){\r\n $result=0;\r\n }else{\r\n $result=$this->db->query(\"SELECT nama_guru, kelas.kelas, kelas.nama_kelas, id_hari,jadwal.id_guru,id_jam_jadwal FROM jadwal JOIN guru ON guru.id_guru = jadwal.id_guru JOIN kelas ON kelas.id_kelas = jadwal.id_kelas WHERE id_hari='$hari' AND jadwal.id_guru='$guru' AND id_jam_jadwal='$jamke'\")->result_array();\r\n }\r\n\r\n\r\n return $result;\r\n\r\n }", "public function aksi_cari_nik_ubah_kata_sandi_kades()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $nik_kades = $this->input->post('nik');\n $detailhere = array('nik' => $nik_kades);\n $data_detail['detail_kades'] = $this->m_admin->cari_nik_kades($detailhere, 'kepala_desa')->result();\n\n $kades = $this->m_admin->cek_nik_kades($nik_kades);\n\n if ($nik_kades === $kades['nik']) {\n $this->m_admin->cari_nik_kades($detailhere, 'kepala_desa');\n\n $this->session->set_flashdata('success', 'Data Berhasil Ditemukan');\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/form_ubah_kata_sandi_kades', $data_detail);\n $this->load->view('footer');\n } else {\n $this->session->set_flashdata('error', '<b>NIK</b> Tidak Ditemukan');\n redirect('admin/form_cari_nik_ubah_kata_sandi_kades');\n }\n }", "abstract public function getPasiekimai();", "public function dang_ky_giang_vien() {\n //Dang nhap roi\n if (isset($_SESSION['uid']) && $_SESSION['level'] == 3) {\n\n $timeModel = $this->model('timeModel');\n $time = $timeModel->getTime(1);\n\n if ($this->input->comparingCurrentTimeWithDeadline($time['start'], $time['end'])) {\n\n $data['status'] = TRUE; // hệ thống đang trong thời gian mở đăng kí cho sinh viên đăng ký giảng viên\n } else {\n $data['status'] = FALSE; // Hệ thống đã đóng đăng ký nên sinh viên không thể đăng ký giảng viên được nữa\n }\n \n $name = $this->input->post('name');\n $dept = $this->input->post('dept');\n $degree = $this->input->post('degree');\n $data['teachers'] = $this->input->searchTeacherInputBased($name,$dept,$degree);\n \n $data['depts'] = $this->teacherModel->getDeptData();\n $data['degrees'] = $this->teacherModel->getDegreeData();\n $data['st_tc'] = $this->studentModel->getStudentAndTeacher($_SESSION['uid']);\n \n if($data['st_tc']['isConfirmed'] == 0){\n \n $data['st_tc']['isConfirmed'] = \"Chưa Đồng Ý\";\n }elseif($data['st_tc']['isConfirmed'] == 1){\n \n $data['st_tc']['isConfirmed'] = \"Đã Đồng Ý\";\n }else{\n \n $data['st_tc']['isConfirmed'] = \"Bạn Đã Bị Từ Chối, Xin Mời Đăng Ký Giảng Viên Khác\";\n }\n\n if (isset($_SESSION['notice'])) {\n \n $data['notice'] = $_SESSION['notice']; //Gán session thông báo cho biến $data['notice'] để truyền đến view\n $_SESSION['notice'] = null; //Huy session notice\n }\n $this->view('includes/header', $data);\n $this->view('student/registerTeacher', $data);\n $this->view('includes/footer', $data);\n $this->view('notice/notice_student/notice_assign_project',$data);\n } else { //Chua dang nhap, chuyen huong nguoi dung den trang chu\n $this->redirect_to();\n }\n }", "function berinamateman($teman){\n\t\t$this->nama_teman=$teman;\n\t}", "function hapus_pengguna($nama_pengguna) {\n global $conn; //memanggil koneksi di global variabel\n $u = generate_id('pengguna', 'nama_pengguna'); //menggenerate id dengan fungsi generator\n $e = generate_id('pengguna', 'email'); //email juga\n $n = generate_id('pengguna', 'nomor_hp'); //nomor hp juga\n //diupdate dengan data tersebut, agar tidak terdeteksi sama jika ada penambahan data baru yang kebetulan memang sama dengan data yang sudah dihapus\n //tidak dihapus karena akan berpengaruh pada tabel yang berkaitan dengan data tersebut, cuma diupdate saja dan yang bersifat unik akan diganti data acak di atas\n //selain itu, mengeset kolom aktif menjadi 0\n $q = $conn->prepare(\"UPDATE pengguna SET aktif='0', nama_pengguna='$u', email='$e', nomor_hp='$n' WHERE nama_pengguna='{$_GET['nama-pengguna']}' AND aktif='1'\");\n $q->execute();\n //menonaktifkan rekening juga berdasarkan nama pengguna yang dimasukkan (jika ada, jika tidak ada [jenis admin] tetap akan melakukan ini dan tidak berefek apa-apa)\n $q = $conn->prepare(\"UPDATE rekening SET aktif='0' WHERE nama_pengguna='$u' AND aktif='1'\");\n $q->execute();\n}", "public function auto_insert_pengabdian(){\n\t\t\t$ta = $this->session->userdata('kd_ta');\n\t\t\t$smt = $this->session->userdata('kd_smt');\n\t\t\t$get_api_pengabdian = $this->get_jml_pengabdian();\n\t\t\t\n\t\t\tif(isset($get_api_pengabdian)){\n\t\t\t\tforeach ($get_api_pengabdian as $key) {\n\t\t\t\t\t$id_transaksi = $key['ID_TRANSAKSI'];\n\t\t\t\t\t$kode_pengabdian = $key['KD_PENGABDIAN'];\n\t\t\t\t\t$judul_pengabdian = $key['JUDUL_PENGABDIAN'];\n\n\t\t\t\t\t$narasi = $judul_pengabdian;\n\t\t\t\t\t$narasi = str_replace(\"'\", \"\", $narasi);\n\t\t\t\t\t$narasi = strip_tags($narasi);\n\t\t\t\t\t\n\t\t\t\t\t$jml_mhs = 1;\n\t\t\t\t\t//sementara pakai api yang ketua penelitian kelompok, untuk sekedar uji coba saja\n\t\t\t\t\t$sks_rule = $this->sksrule->_nilai_sks($jml_mhs, 1004, 1);\n\t\t\t\t\t$nim = $id_transaksi;\n\n\t\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\t\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\n\t\t\t\t\t// $kd_jbk = 'A';\n\t\t\t\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\t\t\t$jenis_kegiatan = $narasi;\n\t\t\t\t\t/*$jenis_kegiatan ='test';*/\n\t\t\t\t\t$bukti_penugasan = '-';\n\t\t\t\t\t// $sks_penugasan = $sks_rule;\n\t\t\t\t\t$masa_penugasan = '1 Semester';\n\t\t\t\t\t$bkt_dokumen = '-';\n\t\t\t\t\t$kd_jbk \t\t= 'C';\n\t\t\t\t\t$bkt_penugasan \t= '-';\n\t\t\t\t\t$bkt_dokumen \t= '-';\n\t\t\t\t\t$rekomendasi \t= 'LANJUTKAN';\n\t\t\t\t\t$capaian \t\t= 100;\n\t\t\t\t\t$jml_jam \t\t= 1;\n\t\t\t\t\t$outcome \t\t= '-';\n\t\t\t\t\t$file_penugasan = '-';\n\t\t\t\t\t$file_capaian \t= '-';\n\t\t\t\t\t// $sks_bkt = $sks_rule;\n\t\t\t\t\t$thn = $this->session->userdata('ta');\n\t\t\t\t\tif($smt == 2) $semester = 'GENAP'; else $semester = 'GANJIL';\n\t\t\t\t\t\n\t\t\t\t\t$cek_dosen_pengabdian = $this->cek_api_dosen_pengabdian($id_transaksi);\n\n\t\t\t\t\tif(!$cek_dosen_pengabdian){\n\n\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia_ta';\n\t\t\t\t\t\t$parameter = array('api_search'=>array($kd_jbk, $kd_dosen, $jenis_kegiatan, $bkt_penugasan, $sks_rule, $masa_penugasan, $bkt_dokumen, $sks_rule, $thn, $semester, $rekomendasi, $jml_jam, $capaian, $outcome, $file_penugasan, $file_capaian, $ta, $smt));\n\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t\t// echo 'simpan ke db bkd_beban_kerja dan BKD_REMUN_KINERJA sukses'; echo '<br>';\n\t\t\t\t\t\t\t// $api_url \t= URL_API_BKD.'bkd_beban_kerja/get_current_data_tersimpan';\n\t\t\t\t\t\t\t// $parameter\t= array('api_search' => array('BKD.BKD_BEBAN_KERJA','KD_BK'));\n\t\t\t\t\t\t\t// $getid = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t\t\t\t\t$getid = $simpan;\n\t\t\t\t\t\t\t$nm_keg = $jenis_kegiatan;\n\n\t\t\t\t\t\t\t$status_pindah = 1;\n\t\t\t\t\t\t\t$jenjang = 'S1';\n\t\t\t\t\t\t\t$prodi = '-';\n\t\t\t\t\t\t\t$nim = $id_transaksi;\n\t\t\t\t\t\t\t#simpan data pendidikan\n\t\t\t\t\t\t\t//catatan: $parameter ke dua adalah kd_kat, parameter ini nantinya otomatis, misalya ketika ada status sebagai pembimbing, maka\n\t\t\t\t\t\t\t//akan berubah menjadi kd_kat untuk membimbing\n\t\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pengabdian_dosen';\n\t\t\t\t\t\t\t$parameter\t= array('api_search' => array($getid, '131', $nm_keg, $jenjang, '-', '1', $sks_rule, '1', '1', 'A', '1', $prodi, $nim, $status_pindah));\n\t\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t\t\t//echo 'simpan ke data pendidikan sukses'; echo '<br>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t }else{\n\t\t\t\t\t\t\n\t\t\t\t\t }\n\n\t\t\t\t}\n\t\t\t}else{\n\n\t\t\t}\n\t\t\t\n\t\t}", "function Atv_setAksesKegiatan($akses): string\n{\n if ($akses == 'presensi') return '5';\n elseif ($akses == 'tambahan') return '7';\n}", "public function pemrosesanSeleksiUnit()\n {\necho(\"<br/><br/>**********HASIL FILTERING TOKEN / ENTITY*********<br/><br/>\");\n //pemfilteran berdasarkan pilihan kriteria.\n if(Pembantu::gunakanLemma($this->penanda_filter_token_entity)) // gunakan pemfilteran token.\n {\nPembantu::cetakDebug(\"Gunakan Filter Token<br/>\");\n $totalUnit = count($this->array_objek_unit);\n for($i=0; $i < $totalUnit; $i++)\n {\n $this->array_hasil_filtering[$i] = $this->filterArrayToken($this->array_objek_unit[$i]);\necho(\"Hasil untuk file \" . $this->array_objek_unit[$i]->nama . \" :: \" . json_encode($this->array_hasil_filtering[$i]) . \"<br/><br/>\");\n }\n }\n else // gunakan pemfilteran entity.\n {\nPembantu::cetakDebug(\"Gunakan Filter Entity<br/>\");\n $totalUnit = count($this->array_objek_unit);\n for($i=0; $i < $totalUnit; $i++)\n {\n $this->array_hasil_filtering[$i] = $this->filterArrayEntity($this->array_objek_unit[$i]);\necho(\"Hasil untuk file \" . $this->array_objek_unit[$i]->nama . \" :: \" . json_encode($this->array_hasil_filtering[$i]) . \"<br/><br/>\");\n }\n }\n\necho \"<br/><br/>**********HASIL PERHITUNGAN FREKUENSI KEMUNCULAN TOKEN PADA TIAP UNIT STRING*********<br/><br/>\";\n //Hitung Frekuensi kemunculan token berdasarkan string unit.\n $totalHasil = count($this->array_hasil_filtering);\n $this->array_freq_hasil_filtering = array();\n $isMultipleEDU = false;\n $jumlahUnitString = count($this->array_objek_unit[0]->array_unit_string[0]); //menentukan apakah double EDU atau triple EDU.\n\n if($this->penanda_unit_string == Umum::UNIT_STRING_DOUBLE_EDU || $this->penanda_unit_string == Umum::UNIT_STRING_TRIPLE_EDU) // jika unit string adalah double EDU atau Triple EDU\n {\n $isMultipleEDU = true;\n }\n\n for($i=0; $i<$totalHasil;$i++)\n {\n $totalUnitString = count($this->array_objek_unit[$i]->array_unit_string); // jumlah unit string.\n $this->array_freq_hasil_filtering[$i] = array();\n $awalIdxNER = 0;\n\n //abou 25-08-2013 : unused\n// $idxAwalUnitSebelumnya = 0;\n// $jumlahKataUnitSebelumnya = 0;\n// $jumlahKataUnitSebelumnya_akhir = 0; //khusus triple EDU\n\necho(\"Total UnitString = $totalUnitString<br/>\");\n for($j=0;$j<$totalUnitString;$j++)\n {\n $this->array_freq_hasil_filtering[$i][$j] = array();\n $jumlahToken = count($this->array_hasil_filtering[$i]);\n $indexAkhirPencarian = count($this->array_objek_unit[$i]->array_unit_string[$j]);\n\n /*\n * abou 25-08-2013 : Tidak perlu digunakan, NER dan POS sudah tersimpan sesuai urutan per kata dalam array unit string.\n * \n if($isMultipleEDU) //aboubakr 20120916 : tentukan awalIdxkata tiap unitnya\n {\n if($this->array_objek_unit[$i]->array_unit_string[$j][0][0] != 'NULL')\n {\n $awalIdxNER = $idxAwalUnitSebelumnya;\n }\n else\n {\n $awalIdxNER = $idxAwalUnitSebelumnya + $jumlahKataUnitSebelumnya;\n }\n\n //aboubakr 20120916 : Hitung jumlah kata Unit sebelumnya\n // jika akhirnya tidak NULL\n if($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1][0] != 'NULL')\n {\n $jumlahKataUnitSebelumnya_akhir = count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1]);\n\n $idxAwalUnitSebelumnya += $jumlahKataUnitSebelumnya;\n if($this->penanda_unit_string == Umum::UNIT_STRING_TRIPLE_EDU) // aboubakr 20120916 : tambahan untuk triple EDU.\n {\n $jumlahKataUnitSebelumnya = count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-2]);\n $jumlahKataUnitSebelumnya += count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1]);\n }\n else\n {\n $jumlahKataUnitSebelumnya = count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1]); // aboubakr 20120916 : hitung jumlah kata unit terakhir, karena tidak null.\n }\n }\n else // unit terakhir NULL.\n {\n $jumlahKataUnitSebelumnya = count($this->array_objek_unit[$i]->array_unit_string[$j][0]); // aboubakr 20120916 : hitung jumlah kata unit awal, karena unit terakhir null. Dipastikan ada.\n if($this->penanda_unit_string == Umum::UNIT_STRING_TRIPLE_EDU) // aboubakr 20120916 : tambahan untuk triple EDU.\n {\n $jumlahKataUnitSebelumnya += count($this->array_objek_unit[$i]->array_unit_string[$j][1]); // aboubakr 20120916 : tambahkan untuk triple edu.\n }\n }\n//echo \"Unit ke-$j -> \" . $this->array_objek_unit[$i]->array_unit_string[$j][0][0] . \" :: idxSebelum = $idxAwalUnitSebelumnya , jumlahKataSebelum = $jumlahKataUnitSebelumnya , awalIndex = $awalIdxNER<br/>\";\n }\n */\n \n//Pembantu::cetakDebug(\"[abouDebug] NER Array \" . json_encode($this->array_objek_unit[$i]->array_ner) . \"<br/>\");//suspect 18022013 : ga dicek di fungsi hitungKata!!!\n \n $arrayUnitStringMultiEDU = array(); //abou 25-08-2013 : gunakan sebagai iterator awalIdxNER.\n for($k = 0; $k < $jumlahToken; $k++)\n {\n if($isMultipleEDU) // jika unit string adalah double EDU atau Triple EDU\n {\n if($k==0) //abou 25-08-2013 : cukup sekali proses, gunakan untuk sisa token.\n {\n $totalKataDalamUnit = 0;\n for($x=0;$x<$jumlahUnitString;$x++)\n {\n $jumlahTokenUnitString = count($this->array_objek_unit[$i]->array_unit_string[$j][$x]);\n\n for($y=0;$y<$jumlahTokenUnitString;$y++)\n {\n $totalKataDalamUnit++;\n if($this->array_objek_unit[$i]->array_unit_string[$j][$x][$y] != 'NULL')\n {\n array_push($arrayUnitStringMultiEDU, $this->array_objek_unit[$i]->array_unit_string[$j][$x][$y]);\n }\n }\n }\n }\n\n//Pembantu::cetakDebug(\"Kata Dicari : \" . $this->array_hasil_filtering[$i][$k] . \" , array target cari sampai index ke-$indexAkhirPencarian : \" . json_encode($arrayUnitStringMultiEDU) . \"<br/>\"); \n //16062013 : Pisahkan untuk pengecekan NER dan POS. Jika Filter yang digunakan filter NER, supply array NER untuk parameter ke 3, otherwise, supply array POS.\n if($this->penanda_filter_token_entity > Umum::FILTER_MASK_POS)\n {\n //$this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_ner,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_ner_unit,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n }\n else\n {\n //$this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_pos,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_pos_unit,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n }\n }\n else // untuk selain multiple EDU.\n {\n//Pembantu::cetakDebug(\"Kata Dicari : \" . $this->array_hasil_filtering[$i][$k] . \" array target cari sampai index ke-$indexAkhirPencarian <br/>\");\n if($this->penanda_filter_token_entity > Umum::FILTER_MASK_POS)\n {\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$this->array_objek_unit[$i]->array_unit_string[$j],$this->array_objek_unit[$i]->array_ner,$awalIdxNER,$this->penanda_filter_token_entity,0,$indexAkhirPencarian,false);\n }\n else\n {\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$this->array_objek_unit[$i]->array_unit_string[$j],$this->array_objek_unit[$i]->array_pos,$awalIdxNER,$this->penanda_filter_token_entity,0,$indexAkhirPencarian,false);\n }\n }\n }\n\n if(!$isMultipleEDU) //aboubakr 20120916 : jika bukan multiple EDU.\n {\n $awalIdxNER += $indexAkhirPencarian;\n }\n else\n {\n $awalIdxNER += count($arrayUnitStringMultiEDU);\n }\n }\nPembantu::cetakDebug(\"Hasil Frekuensi Untuk File - \" . $this->array_objek_unit[$i]->nama . \" ==> \" . json_encode($this->array_freq_hasil_filtering[$i]) . \"<br/><br/>\");\n }\n\n// Tulis hasil modul seleksi unit.\n $akhiranNamaFile = \"\";\n if($this->penanda_unit_string == Umum::UNIT_STRING_DOKUMEN)\n {\n $akhiranNamaFile = Umum::AKHIRAN_TABEL_FREQ_DOC;\n }\n else if($this->penanda_unit_string == Umum::UNIT_STRING_SENTENCE)\n {\n $akhiranNamaFile = Umum::AKHIRAN_TABEL_FREQ_STC;\n }\n else\n {\n $akhiranNamaFile = Umum::AKHIRAN_TABEL_FREQ_EDU;\n }\n\n if(!is_dir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_TOKEN))\n {\n mkdir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_TOKEN,0777,true); //buat folder keluaran 1. \n }\n if(!is_dir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE))\n {\n mkdir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE,0777,true); //buat folder keluaran 2.\n }\n// mkdir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE_TR,0,true); //buat folder keluaran 2 - transpose. No Need\n for($i=0;$i<$totalHasil;$i++)\n {\n TulisHasil::tuliskanHasilSeleksiUnit(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_TOKEN . $this->array_objek_unit[$i]->nama . Umum::AKHIRAN_HASIL_SELEKSI_UNIT,$this->array_hasil_filtering[$i],false);\n TulisHasil::tuliskanTabelFrekuensiSeleksiUnit(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE . $this->array_objek_unit[$i]->nama . $akhiranNamaFile, $this->array_freq_hasil_filtering[$i],false);\n// TulisHasil::tuliskanTabelFrekuensiSeleksiUnit(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE_TR . $this->array_objek_unit[$i]->nama . $akhiranNamaFile, $this->array_freq_hasil_filtering[$i],true);\n }\n }", "function cek_jabatan_kedepan(){\n\t\t\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t$ta = $this->_generate_ta($this->session->userdata('r_ta'));\n\t\t$smt = $this->_generate_smt($this->session->userdata('r_smt'));\n\t\t\n\t\t$tahun = $this->session->userdata('r_ta');\n\t\t$semester = $this->session->userdata('r_smt');\n\t\t\n\t\t$data = $this->setting->_is_pejabat_penunjang_nt();\n\t\t$tgl_laporan = $this->setting->_tanggal_akhir_laporan($ta, $smt, 'rbkd');\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_rbkd';\n\t\t$parameter = array('api_search' => array('D', $kd_dosen, $tahun, $semester));\n\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t# data kegiatan\n\t\t$kegiatan = $data['nama_jabatan'];\n\t\t$masa_penugasan = $data['masa_penugasan'];\n\t\t$bukti_penugasan = $data['bukti_penugasan']; $bkt_dokumen = $data['bukti_penugasan'];\n\t\t$sks = $data['sks_maks'];\n\t\t\n\t\tif(count($data['data_beban']) <= 1){\n\t\t\tif($data['tgl_selesai'] == '' || \n\t\t\t\tdate('d-m-Y', strtotime($data['tgl_selesai'])) > \n\t\t\t\tdate('d-m-Y', strtotime(str_replace('/','-', $tgl_laporan)))\n\t\t\t){\n\t\t\t\t\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_rbkd';\n\t\t\t\t$parameter = array('api_search' => array('D', $kd_dosen, $kegiatan, $bukti_penugasan, $sks, $masa_penugasan, $tahun, $semester, '', $ta, $smt));\n\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t}\n\t\t}\n\t\tredirect('bkd/dosen/bebankerja/rbkd/D');\t\t\n\t}", "public function aksi_cari_nik_ubah_kata_sandi_rt()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $detailhere = $this->input->post('nik');\n $data_detail['detail_rt'] = $this->m_admin->get_detail_rt_ubah_kata_sandi($detailhere)->result();\n\n $rt = $this->m_admin->cek_nik_rt($detailhere);\n\n if ($detailhere === $rt['nik']) {\n\n $this->m_admin->get_detail_rt($detailhere);\n\n $this->session->set_flashdata('success', 'Data Berhasil Ditemukan');\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/form_ubah_kata_sandi_rt', $data_detail);\n $this->load->view('footer');\n } else {\n $this->session->set_flashdata('error', '<b>NIK</b> Tidak Ditemukan');\n redirect('admin/form_cari_nik_ubah_kata_sandi_rt');\n }\n }", "public function gerasenha($data);", "public function kumpul(){\r\n\t\t$no_tim=$this->session->userdata('no_tim');\r\n\t\t$soal = $this->input->post('soal');\r\n\t\tforeach ($soal as $key => $value) {\r\n\t\t\t$query = $this->Mysql->read('soal', array('no_soal'=>$value), 'no_soal', 'ASC', null, null)->row_array();\r\n\t\t\tif ($query['jawaban_benar']==$this->input->post('jawaban_'.$value)) {\r\n\t\t\t\t$isBenar = 1;\r\n\t\t\t}else{\r\n\t\t\t\t$isBenar = 0;\r\n\t\t\t}\r\n\t\t\t$data = array(\r\n\t\t\t\t\t'no_tim'=>$this->session->userdata('no_tim'),\r\n\t\t\t\t\t'no_soal'=>$value,\r\n\t\t\t\t\t'jawab'=>$this->input->post('jawaban_'.$value),\r\n\t\t\t\t\t'is_benar'=>$isBenar\r\n\t\t\t\t);\r\n\t\t\t$update = $this->Mysql->create('ljk',$data);\r\n\t\t}\r\n\t\tredirect(site_url('tim'), 'refresh');\r\n\t}", "function cariPosisi($batas){\nif(empty($_GET['halpengajar'])){\n\t$posisi=0;\n\t$_GET['halpengajar']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengajar']-1) * $batas;\n}\nreturn $posisi;\n}", "public function aksi_ubah_kata_sandi_profil_saya()\n\t{\n\t\t$kata_sandi_awal = $this->input->post('kata_sandi_awal');\n\t\t$data_lama = sha1($kata_sandi_awal);\n\n\t\t$kata_sandi = $this->input->post('kata_sandi');\n\t\t$kata_sandi_hash = sha1($kata_sandi);\n\n\t\t$data_baru = array(\n\t\t\t'kata_sandi' => $kata_sandi_hash,\n\t\t);\n\n\t\t$where = $this->input->post('id_warga');\n\n\t\t$warga = $this->m_warga->cek_warga($where);\n\n\t\tif ($data_lama === $warga['kata_sandi']) {\n\t\t\t$this->m_warga->ubah_kata_sandi_profil_saya($where, $data_baru, 'warga');\n\t\t\t$this->session->set_flashdata('success', '<b>Kata Sandi</b> Berhasil Diubah');\n\t\t\tredirect('warga/form_ubah_kata_sandi_profil_saya/' . $where);\n\t\t} else {\n\t\t\t$this->session->set_flashdata('error', '<b>Kata Sandi Lama</b> Salah');\n\t\t\tredirect('warga/form_ubah_kata_sandi_profil_saya/' . $where);\n\t\t}\n\t}", "public function hapus_toko(){\n\t}", "public function themmh($loai=\"\")\r\n {\r\n $khoa_result=$this->mmonhoc->get_khoa();\r\n $loai_monhoc_result=$this->mmonhoc->get_loai_monhoc();\r\n $nhom_monhoc_result=$this->mmonhoc->get_ma_monhoc_nhom();\r\n $data[\"khoa_result\"]=$khoa_result;\r\n $data[\"loai_monhoc_result\"]=$loai_monhoc_result;\r\n $data[\"nhom_monhoc_result\"]=$nhom_monhoc_result;\r\n $data[\"loai\"]=$loai; \r\n \r\n \r\n $data[\"data_title\"]=\"Thao tác thêm môn học\";\r\n \r\n \r\n $data[\"title\"]=\"Trang thêm môn học\"; \r\n $this->load->view(\"admin/vmonhoc_add\",$data); \r\n }", "function klasifikasi(){\n\t\t$klasifikasi['data']=$this->mamdani->getdata();\n\t\t$klasifikasi['klas']=$this->mamdani->klasifikasi3();\n\t\t\t\t\n\t\tforeach ($klasifikasi['data'] as $key) {\n\t\t$id=$key->id;\n\t\t$tot= $key->total_bobot;\n\t\tforeach($klasifikasi['klas'] as $data){\n\t\t\tif(($data->min <= $key->total_bobot) && ($key->total_bobot <= $data->max)){\n\t\t\t\t// $ting[]= $data->nama; \n\t\t\t\t$this->db->query(\"UPDATE tb_klasifikasi_penduduk SET klasifikasi='$data->nama' where id='$key->id' \");\n\t\t\tbreak;\n\t\t}\n\t}\n\t}\n\tredirect('fuzzy/view_hasil_klasifikasi_penduduk');\n}", "public function verifikasi_pendebetan_angsuran_pembiayaan_koptel()\n\t{\n\t\t$debug = false; // debug non aktif\n\t\t$nik = $this->input->post('nik');\n\t\t$filename = $this->input->post('filename');\n\t\t$akun = $this->input->post('akun');\n\t\t$referensi = $this->input->post('referensi');\n\t\t$seq = $this->input->post('seq');\n\t\t$angsuran_id = $filename;\n\t\tdate_default_timezone_set('Asia/Jakarta');\n\t\t$trx_date = $this->datepicker_convert(true,$this->input->post('trx_date'),'/');\n\t\t$ins_data = array();\n\t\t$ins_data_trx = array();\n\n\t\t$this->db->trans_begin();\n\n\t\t/* get angsuran */\n\t\t$angsurans = $this->model_transaction->get_angsuran_temp_by_id($angsuran_id);\n\t\tfor ($i = 0 ;$i < count($angsurans) ; $i++)\n\t\t{\n\t\t\t$angsuran = $angsurans[$i];\n\t\t\t$a_account_financing_no = $angsuran['account_financing_no'];\n\t\t\t$a_jumlah_angsuran = $angsuran['pokok']+$angsuran['margin'];\n\n\t\t\t$data_financing = $this->model_transaction->get_account_financing_by_account($a_account_financing_no,$a_jumlah_angsuran);\n\t\t\tif ($angsuran['pokok'] > 0 || $angsuran['margin']>0)\n\t\t\t{\n\t\t\t\t$b_account_financing_no = $angsuran['account_financing_no'];\n\t\t\t\t$b_angsuran_pokok = $angsuran['pokok'];\n\t\t\t\t$b_angsuran_margin = $angsuran['margin'];\n\t\t\t\t$b_jtempo_angsuran_last = $data_financing['jto_last'];\n\t\t\t\t$b_jtempo_angsuran_next = $data_financing['jto_next'];\n\t\t\t\t$b_jangka_waktu = $data_financing['jangka_waktu'];\n\t\t\t\t$b_counter_angsuran = $data_financing['counter_angsuran'];\n\t\t\t\t$b_saldo_pokok = $data_financing['saldo_pokok'];\n\t\t\t\t$b_saldo_margin = $data_financing['saldo_margin'];\n\t\t\t\t$b_flag_jadwal_angsuran = $data_financing['flag_jadwal_angsuran'];\n\t\t\t\t$b_periode_jangka_waktu = $data_financing['periode_jangka_waktu'];\n\t\t\t\t$b_tanggal_jtempo = $data_financing['tanggal_jtempo'];\n\n\t\t\t\t// generate uuid for history\n\t \t\t$b_trx_detail_id = uuid(false);\n\t\t \t$b_trx_account_financing_id = uuid(false);\n\n\t\t \t// new declare\n\t\t\t\t$b_jumlah_angsuran = $b_angsuran_pokok+$b_angsuran_margin;\n\t\t\t\t// $b_new_counter_angsuran = $b_counter_angsuran+1;\n\t\t\t\t$b_new_counter_angsuran = $b_counter_angsuran;\n\t\t\t\t$b_trx_type = 3;\n\t\t\t\t$b_trx_account_type = 1;\n\t\t\t\t$is_pelunasan = false;\n\t\t\t\t$jtempo_angsuran_next = $b_jtempo_angsuran_next;\n\n\t\t\t\tif ($b_flag_jadwal_angsuran==1) {\n\t\t\t\t\tif($b_periode_jangka_waktu==0){\n\t\t\t\t\t\t$jtempo_angsuran_next = date(\"Y-m-d\",strtotime($jtempo_angsuran_next.' +1 days'));\n\t\t\t\t\t}else if($b_periode_jangka_waktu==1){\n\t\t\t\t\t\t$jtempo_angsuran_next = date(\"Y-m-d\",strtotime($jtempo_angsuran_next.' +1 weeks'));\n\t\t\t\t\t}else if($b_periode_jangka_waktu==2){\n\t\t\t\t\t\t$jtempo_angsuran_next = date(\"Y-m-d\",strtotime($jtempo_angsuran_next.' +1 month'));\n\t\t\t\t\t}\n\t\t\t\t\tif($b_jangka_waktu==$b_new_counter_angsuran) {\n\t\t\t\t\t\t$jtempo_angsuran_next = $b_tanggal_jtempo;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif($b_jangka_waktu==$b_new_counter_angsuran) {\n\t\t\t\t\t\t$jtempo_angsuran_next = $b_tanggal_jtempo;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$jtempo_angsuran_next = $data_financing['jto_next2'];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// collect array for angsuran\n\t\t \t// if this angsuran is pelunasan then this condition will not run\n\t\t \t// else will insert to trx_detail and trx_account_financing\n\t\t \tif ($b_new_counter_angsuran!=$b_jangka_waktu) {\n\t\t \t\t$data_trx = array(\n\t\t\t\t\t\t\t 'b_trx_detail_id' => $b_trx_detail_id\n\t\t\t\t\t\t\t,'b_trx_type' => $b_trx_type\n\t\t\t\t\t\t\t,'b_trx_account_type' => $b_trx_account_type\n\t\t\t\t\t\t\t,'b_account_financing_no' => $b_account_financing_no\n\t\t\t\t\t\t\t,'b_jumlah_angsuran' => $b_jumlah_angsuran\n\t\t\t\t\t\t\t,'b_trx_account_financing_id' => $b_trx_account_financing_id\n\t\t\t\t\t\t\t,'trx_date' => $trx_date\n\t\t\t\t\t\t\t// ,'b_jtempo_angsuran_next' => $b_jtempo_angsuran_last\n\t\t\t\t\t\t\t,'b_jtempo_angsuran_next' => $b_jtempo_angsuran_next\n\t\t\t\t\t\t\t,'b_angsuran_pokok' => $b_angsuran_pokok\n\t\t\t\t\t\t\t,'b_angsuran_margin' => $b_angsuran_margin\n\t\t\t\t\t\t\t,'referensi' => $referensi\n\t\t\t\t\t\t\t,'seq' => $seq\n\t\t\t\t\t\t\t,'akun' => $akun\n\t\t\t\t\t\t\t,'b_new_counter_angsuran' => $b_new_counter_angsuran\n\t\t \t\t\t);\n\n\t\t \t\t$ins = $this->get_trx_angsuran_data($data_trx);\n\t\t \t\t$ins_data_trx[] = $ins['ins_data_trx'];\n\t\t \t\t$ins_data[] = $ins['ins_data'];\n\t\t\t\t} else {\n\t\t \t\t$is_pelunasan = true;\n\t\t\t\t}\n\n\t\t\t\tif ($is_pelunasan) {\n\t\t\t\t\t$jtempo_angsuran_next = $b_tanggal_jtempo;\n\t\t\t\t}\n\n\t\t\t\t// update saldo account pembiayaan\n\t\t\t\t$pembiayaan = array(\n\t\t\t\t\t'saldo_pokok'=>$b_saldo_pokok-$b_angsuran_pokok,\n\t\t\t\t\t'saldo_margin'=>$b_saldo_margin-$b_angsuran_margin,\n\t\t\t\t\t'jtempo_angsuran_last'=>$b_jtempo_angsuran_next,\n\t\t\t\t\t'jtempo_angsuran_next'=>$jtempo_angsuran_next,\n\t\t\t\t\t'counter_angsuran'=>$b_new_counter_angsuran\n\t\t\t\t);\n\n\t\t\t\t// begin\n\t\t\t\t// do this section if flag_jadwal_angsuran = non reguler ( 0 )\n\t\t\t\t$param_pembiayaan_schedulle=array();\n\t\t\t\t$pembiayaan_schedulle=array();\n\t\t\t\tif ($b_flag_jadwal_angsuran==0){\n\t\t\t\t\t$param_pembiayaan_schedulle = array(\n\t\t\t\t\t\t'account_no_financing'=>$b_account_financing_no\n\t\t\t\t\t\t,'tangga_jtempo'=>$b_jtempo_angsuran_next\n\t\t\t\t\t);\n\t\t\t\t\t$pembiayaan_schedulle = array(\n\t\t\t\t\t\t\t'status_angsuran'=>1,\n\t\t\t\t\t\t\t'tanggal_bayar'=>$trx_date,\n\t\t\t\t\t\t\t'bayar_pokok'=>$b_angsuran_pokok,\n\t\t\t\t\t\t\t'bayar_margin'=>$b_angsuran_margin\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// end \n\n\t\t\t\tif ($is_pelunasan) {\n\t\t\t\t\t$pembiayaan['status_rekening'] = 2;\n\n\t\t\t\t\t$pembiayaan_lunas = array(\n\t\t\t\t\t\t\t'account_financing_lunas_id'=>$b_trx_account_financing_id,\n\t\t\t\t\t\t\t'account_financing_no'=>$b_account_financing_no,\n\t\t\t\t\t\t\t'saldo_pokok'=>$b_saldo_pokok,\n\t\t\t\t\t\t\t'saldo_margin'=>$b_saldo_margin,\n\t\t\t\t\t\t\t'potongan_margin'=>0,\n\t\t\t\t\t\t\t'status_pelunasan'=>1,\n\t\t\t\t\t\t\t'tanggal_lunas'=>$trx_date,\n\t\t\t\t\t\t\t'create_by'=>$this->session->userdata('user_id'),\n\t\t\t\t\t\t\t'created_date'=>date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'verify_by'=>$this->session->userdata('user_id'),\n\t\t\t\t\t\t\t'verifiy_date'=>date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'saldo_catab'=>0\n\t\t\t\t\t\t);\n\n\t\t\t\t\t$trx_pembiayaan_lunas = array(\n\t\t\t\t\t\t\t'trx_account_financing_id'=>$b_trx_account_financing_id\n\t\t\t\t\t\t\t,'branch_id' => $this->session->userdata('branch_id')\n\t\t\t\t\t\t\t,'trx_detail_id' => $b_trx_detail_id\n\t\t\t\t\t\t\t,'account_financing_no' => $b_account_financing_no\n\t\t\t\t\t\t\t,'trx_financing_type' => '2'\n\t\t\t\t\t\t\t,'trx_date' => $trx_date\n\t\t\t\t\t\t\t,'jto_date' => $b_jtempo_angsuran_next\n\t\t\t\t\t\t\t,'pokok' => $b_saldo_pokok\n\t\t\t\t\t\t\t,'margin' => $b_saldo_margin\n\t\t\t\t\t\t\t,'catab' => '0'\n\t\t\t\t\t\t\t,'description' => 'PELUNASAN PEMBIAYAAN Rek.'.$b_account_financing_no\n\t\t\t\t\t\t\t,'created_date' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t,'created_by' => $this->session->userdata('user_id')\n\t\t\t\t\t\t\t,'verify_by' => $this->session->userdata('user_id')\n\t\t\t\t\t\t\t,'verify_date' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t,'trx_status' => 1\n\t\t\t\t\t\t\t,'freq' => 1\n\t\t\t\t\t\t\t,'angsuran_ke' => $b_jangka_waktu\n\t\t\t\t\t\t\t,'account_cash_code'=>$akun\n\t\t\t\t\t\t\t,'tipe_angsuran'=>'2'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t$trx_detail = array(\n\t\t\t\t\t\t\t'trx_detail_id' => $b_trx_detail_id\n\t\t\t\t\t\t\t,'trx_type' => '2'\n\t\t\t\t\t\t\t,'trx_account_type' => '3'\n\t\t\t\t\t\t\t,'account_no' => $b_account_financing_no\n\t\t\t\t\t\t\t,'flag_debit_credit' => 'C'\n\t\t\t\t\t\t\t,'amount' => ($b_saldo_pokok+$b_saldo_margin)\n\t\t\t\t\t\t\t,'trx_date' => $trx_date\n\t\t\t\t\t\t\t,'description' => 'PELUNASAN PEMBIAYAAN Rek.'.$b_account_financing_no\n\t\t\t\t\t\t\t,'created_date' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t,'created_by' => $this->session->userdata('user_id')\n\t\t\t\t\t\t);\n\n\t\t\t\t\tif ($debug==true) {\n\t\t\t\t\t\techo 'Pelunasan-------------------------------------<br>';\n\t\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\t\tprint_r($pembiayaan_lunas);\n\t\t\t\t\t\tprint_r($trx_detail);\n\t\t\t\t\t\tprint_r($trx_pembiayaan_lunas);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->model_transaction->insert_account_financing_lunas($pembiayaan_lunas);\n\t\t\t\t\t\t$this->model_transaction->insert_trx_detail($trx_detail);\n\t\t\t\t\t\t$this->model_transaction->insert_trx_account_financing($trx_pembiayaan_lunas);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t// end check of if pelunasan\n\n\t\t\t\t$param_pembiayaan = array('account_financing_no'=>$b_account_financing_no);\n\n\t\t\t\tif ($debug==true) {\n\t\t\t\t\techo 'ANGSURAN NORMAL '.$i.' -------------------------------------<br>';\n\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\tprint_r($pembiayaan);\n\t\t\t\t\tprint_r($param_pembiayaan);\n\t\t\t\t\tprint_r($pembiayaan_schedulle);\n\t\t\t\t} else {\n\t\t\t\t\t$this->model_transaction->update_account_financing($pembiayaan,$param_pembiayaan);\n\t\t\t\t\tif (count($pembiayaan_schedulle)>0) {\n\t\t\t\t\t\t$this->model_transaction->update_account_financing_schedulle($pembiayaan_schedulle,$param_pembiayaan_schedulle);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$log_payed_data = $this->model_transaction->get_log_payed_data($angsuran_id,$trx_date);\n\t\tif ($debug==true) {\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($ins_data);\n\t\t\tprint_r($ins_data_trx);\n\t\t\tdie();\n\t\t} else {\n\t\t\tif(count($ins_data)>0){\n\t\t\t\t$this->model_transaction->insert_angsuran_into_mfi_trx_financing($ins_data);\n\t\t\t}\n\t\t\tif(count($ins_data_trx)>0){\n\t\t\t\t$this->model_transaction->insert_angsuran_into_trx_detail($ins_data_trx);\n\t\t\t}\n\t\t\tif(count($log_payed_data)>0){\n\t\t\t\t$this->model_transaction->insert_log_trx_pendebetan($log_payed_data);\n\t\t\t}\n\t\t}\n\n\t\tif ($debug==true) {\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($angsuran_id);\n\t\t\tprint_r($akun);\n\t\t\tprint_r($referensi);\n\t\t\tprint_r($param_temp);\n\t\t\t// print_r($param_temp_detail);\n\t\t\tdie();\n\t\t} else {\n\t\t\t$this->model_transaction->fn_proses_jurnal_angsuran_pyd_koptel($angsuran_id,$akun,$referensi); // proses jurnal transaksi pembiayaan\n\t\t\t// $this->model_transaction->delete_from_mfi_angsuran_temp_detail_unins($param_temp_detail);\n\t\t\t$this->db->update('mfi_angsuran_temp',array('status'=>2),array('angsuran_id'=>$angsuran_id));\n\n\t\t\t$check_tab = $this->model_transaction->get_mfi_angsuran_temp_tab($angsuran_id);\n\t\t\tif($check_tab->num_rows() > 0)\n\t\t\t{\n\t\t\t\tforeach($check_tab->result_array() as $list){\n\t\t\t\t\t$arrdata = json_decode($list['data'], true);\n\t\t\t\t\t$this->add_setoran_tunai($arrdata);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->db->update('mfi_angsuran_temp_tab',array('status'=>1),array('angsuran_id'=>$angsuran_id));\n\t\t}\n\n\t\tif($this->db->trans_status()==true){\n\t\t\t$this->db->trans_commit();\n\n\t\t\t$this->db->query(\"UPDATE mfi_trx_account_financing SET seq='$seq', reference_no='$no_ref' WHERE trx_account_financing_id='$id_transaksi'\");\n\n\t\t\t$return = array('success'=>true,'trx_date'=>$trx_date);\n\t\t}else{\n\t\t\t$this->db->trans_rollback();\n\t\t\t$return = array('success'=>false);\n\t\t}\n\n\t\techo json_encode($return);\n\t}", "function papan_catur($angka) {\r\n}", "function select_tb_penduduk(){\n\t\t$this->load->model('mamdani');\n\t\t//$klasifikasi['klasifikasi']=$this->mamdani->getdata();\n\t\t$klasifikasi['jumlah_aset']=$this->mamdani->jumlah_aset();\n\t\t$klasifikasi['tingkat']= $this->mamdani->klasifikasi3();\n\n\t\t$this->load->view('templates/header');\n\t\t$this->load->view('admin/lihatdata/tabel_klasifikasi_penduduk',$klasifikasi);\n\t\t$this->load->view('templates/footer');\n\t\t// var_dump($jml_aset);\n\t\t// die;\n\n\t}", "function selmundat($xent, &$area, &$habit, &$freg, &$dia_fer, &$des_fer ) {\n\t$sqls=\"select * from munp1.municip where cod = '$xent'\";\n\t$ress=mysql_db_query(\"munp1\",$sqls); //\n\t\tif ($ress) {\n\t\t\t\t$regs=mysql_fetch_array($ress);\n\t\t\t\tif ( $regs ) {\n\t\t\t\t\t\t\t\t$area = $regs[\"med_area\"];\n\t\t\t\t\t\t\t\t$habit = $regs[\"num_habit\"];\n\t\t\t\t\t\t\t\t$freg = $regs[\"num_freg\"];\n\t\t\t\t\t\t\t\t$dia_fer = $regs[\"dat_fermun\"];\n\t\t\t\t\t\t\t\t$des_fer = $regs[\"des_fermun\"];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmysql_free_result($ress);\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n \t\t\t\t\telse return 0;\n\t\t }\n// printf(\"vai sair 0\");\nreturn 0;\n}", "public function jadikanKetua()\n {\n // Menghapus hak akses sebagai anggota dari pengirim undangan\n $this->hakAksesPengguna()->detach(\n HakAkses::where('nama', HakAkses::ANGGOTA)->first()\n );\n\n // menjadikan pengirim undangan sebagai ketua\n $this->hakAksesPengguna()->attach(\n HakAkses::where('nama', HakAkses::KETUA_TIM)->first(), [\n 'status_request' => 'Approved'\n ]\n );\n }", "public function satu_harga_post()\n\n {\n\n $ins['id_bbm'] = $_POST['id_bbm'];\n\n $ins['no_spbu'] = str_replace(\" \", \"\", $_POST['no_spbu']);\n\n\n\n // stok awal\n\n $stok_awal_length = strlen((string)$_POST['stok_awal']);\n\n if ($stok_awal_length > 6) {\n\n $ins['stok_awal'] = 'error';\n\n } else {\n\n $ins['stok_awal'] = $_POST['stok_awal'];\n\n }\n\n\n\n // penerimaan\n\n $terima_length = strlen((string)$_POST['terima']);\n\n if ($terima_length > 6) {\n\n $ins['terima'] = 'error';\n\n } else {\n\n $ins['terima'] = $_POST['terima'];\n\n }\n\n\n\n// \t\t$ins['terima'] = $_POST['terima'];\n\n if ($ins['terima'] == '000' || $ins['terima'] == '0') {\n\n $ins['terima'] = 0;\n\n } else if ($ins['terima'] == \"\") {\n\n $ins['terima'] = \"\";\n\n } else {\n\n $ins['terima'] = $ins['terima'];\n\n }\n\n\n\n // jual\n\n $jual_length = strlen((string)$_POST['jual']);\n\n if ($jual_length > 6) {\n\n $ins['jual'] = 'error';\n\n } else {\n\n $ins['jual'] = $_POST['jual'];\n\n }\n\n\n\n $ins['stok_akhir'] = $ins['stok_awal'] + $ins['terima'] - $ins['jual'];\n\n\n\n // jika spbu sudah pernah melakukan transaksi dengan id_bbm tertentu\n\n $rowCount = $this->db->query(\"SELECT * FROM kg_bbm_satu_harga WHERE no_spbu = '{$ins[\"no_spbu\"]}' AND id_bbm = '{$ins[\"id_bbm\"]}' ORDER BY create_date DESC\")->num_rows();\n\n if ($rowCount > 0) {\n\n $ins['loses'] = $ins['stok_awal'] - $this->get_stok_akhir($ins['no_spbu'], $ins['id_bbm']);\n\n } else {\n\n $ins['loses'] = 0;\n\n }\n\n\n\n $ins['modify_date'] = date(\"Y-m-d H:i:s\");\n\n $ins['create_date'] = date(\"Y-m-d H:i:s\");\n\n $ins['tgl'] = date(\"Y-m-d\");\n\n\n\n // filter input\n\n if ($ins['stok_awal'] == 'error') {\n\n echo \"Angka Stok awal tidak boleh lebih dari 6 digit\";\n\n } else if ($ins['jual'] == 'error') {\n\n echo \"Angka penjualan tidak boleh lebih dari 6 digit\";\n\n } else if ($ins['terima'] === \"error\") {\n\n echo \"Angka penerimaan BBM tidak boleh lebih dari 6 digit\";\n\n } else if ($ins['terima'] === \"\") {\n\n echo \"Angka penerimaan BBM harus diisi 0\";\n\n } else if ($ins['id_bbm'] == 0) {\n\n echo \"Pilihan BBM harus dipilih salah satu\";\n\n } else if ($ins['jual'] == \"\" || $ins['stok_awal'] == \"\") {\n\n echo \"Kolom harus diisi\";\n\n } else {\n\n\n\n // if user ingin revisi input di tanggal yang sama\n\n\n\n $q_cek_input = $this->db->query(\"SELECT * FROM kg_bbm_satu_harga WHERE id_bbm = '\" . $ins['id_bbm'] . \"' AND\n\n\t\t no_spbu = '\" . $ins['no_spbu'] . \"' AND tgl = '\" . $ins['tgl'] . \"' \");\n\n\n\n // if spbu sudah input\n\n if ($q_cek_input->num_rows() > 0) {\n\n\n\n $this->db->where('id_bbm', $ins['id_bbm']);\n\n $this->db->where('no_spbu', $ins['no_spbu']);\n\n $this->db->where('tgl', $ins['tgl']);\n\n\n\n // update just modified_date\n\n unset($ins['create_date']);\n\n // update all data except modified date\n\n if ($this->db->update('kg_bbm_satu_harga', $ins)) {\n\n $this->response([\"status\" => \"ok\", \"message\" => \"updated\"]);\n\n } else {\n\n echo \"Input Stock Gagal\";\n\n }\n\n\n\n } else {\n\n\n\n if ($this->db->insert(\"kg_bbm_satu_harga\", $ins)) {\n\n $this->response([\"status\" => \"ok\", \"message\" => \"inserted\"]);\n\n } else {\n\n echo \"Input Stock Gagal\";\n\n }\n\n\n\n }\n\n\n\n }\n\n }", "public function no_faktur(){\n $tahun_sekarang = date('Y');\n $bulan_sekarang = date('m');\n $tahun_terakhir = substr($tahun_sekarang, 2);\n \n //mengecek jumlah karakter dari bulan sekarang\n $cek_jumlah_bulan = strlen($bulan_sekarang);\n\n //jika jumlah karakter dari bulannya sama dengan 1 maka di tambah 0 di depannya\n if ($cek_jumlah_bulan == 1) {\n $data_bulan_terakhir = \"0\".$bulan_sekarang;\n }\n else{\n $data_bulan_terakhir = $bulan_sekarang;\n }\n \n //ambil bulan dan no_faktur dari tanggal penjualan terakhir\n $penjualan = Penjualan::select([DB::raw('MONTH(created_at) bulan'), 'no_faktur'])->orderBy('id','DESC')->first();\n\n if ($penjualan != NULL) {\n $ambil_nomor = substr($penjualan->no_faktur, 0, -8);\n $bulan_akhir = $penjualan->bulan;\n }\n else{\n $ambil_nomor = 1;\n $bulan_akhir = 13;\n }\n \n /*jika bulan terakhir dari penjualan tidak sama dengan bulan sekarang, \n maka nomor nya kembali mulai dari 1, jika tidak maka nomor terakhir ditambah dengan 1\n */\n if ($bulan_akhir != $bulan_sekarang) {\n $no_faktur = \"1/IM/\".$data_bulan_terakhir.\"/\".$tahun_terakhir;\n }\n else {\n $nomor = 1 + $ambil_nomor ;\n $no_faktur = $nomor.\"/IM/\".$data_bulan_terakhir.\"/\".$tahun_terakhir;\n }\n\n return $no_faktur;\n //PROSES MEMBUAT NO. FAKTUR ITEM MASUK\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "public function aksi_cari_nik_ubah_kata_sandi_warga()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $nik_warga = $this->input->post('nik');\n $detailhere = array('nik' => $nik_warga);\n $data_detail['detail_warga'] = $this->m_admin->cari_nik_warga($detailhere, 'warga')->result();\n\n $warga = $this->m_admin->cek_nik_warga($nik_warga);\n\n if ($nik_warga === $warga['nik']) {\n $this->m_admin->cari_nik_warga($detailhere, 'warga');\n\n $this->session->set_flashdata('success', 'Data Berhasil Ditemukan');\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/form_ubah_kata_sandi_warga', $data_detail);\n $this->load->view('footer');\n } else {\n $this->session->set_flashdata('error', '<b>NIK</b> Tidak Ditemukan');\n redirect('admin/form_cari_nik_ubah_kata_sandi_warga');\n }\n }", "public function content_pengiriman_otw($id_cabang)\n {\n $query = \"\n select id_pk_penerimaan,id_pk_brg_pemenuhan,id_pk_brg_pengiriman,brg_pengiriman_qty,brg_pengiriman_note,brg_pemenuhan_status,pengiriman_tgl,cabang_daerah,toko_nama,toko_kode,brg_nama,brg_kode,ifnull(penerimaan_tgl,'-') as penerimaan_tgl\n from tbl_brg_pengiriman\n inner join mstr_pengiriman on mstr_pengiriman.id_pk_pengiriman = tbl_brg_pengiriman.id_fk_pengiriman and mstr_pengiriman.pengiriman_status = 'aktif' #harus yang jadi terkirim bukan yang dicancel\n inner join mstr_cabang on mstr_cabang.id_pk_cabang = mstr_pengiriman.id_fk_cabang #dapetin daerah cabang\n inner join mstr_toko on mstr_toko.id_pk_toko = mstr_cabang.id_fk_toko #dapetin nama toko\n inner join tbl_brg_pemenuhan on tbl_brg_pemenuhan.id_pk_brg_pemenuhan = tbl_brg_pengiriman.id_fk_brg_pemenuhan #cuman untuk dapetin id_cabang_minta & id_barang\n inner join tbl_brg_permintaan on tbl_brg_permintaan.id_pk_brg_permintaan = tbl_brg_pemenuhan.id_fk_brg_permintaan and tbl_brg_permintaan.id_fk_cabang = ? #menentukan peminta barang yang akan jadi penerima\n inner join mstr_barang on mstr_barang.id_pk_brg = tbl_brg_permintaan.id_fk_brg #dapetin detail barang\n left join tbl_brg_penerimaan on tbl_brg_penerimaan.id_fk_brg_pengiriman = tbl_brg_pengiriman.id_pk_brg_pengiriman and tbl_brg_penerimaan.brg_penerimaan_qty > 0 #dianggap diterima apabila brgditerima > 0 (klo delete, ini ke 0 sendiri)\n left join mstr_penerimaan on mstr_penerimaan.id_pk_penerimaan = tbl_brg_penerimaan.id_fk_penerimaan and mstr_penerimaan.penerimaan_status = 'aktif' and mstr_penerimaan.penerimaan_tipe = 'permintaan' #dianggap diterima apabila status penerimaan > 0\n where tbl_brg_pengiriman.brg_pengiriman_qty > 0 #dianggap terkirim apabila tidak di cancel (klo cancel, qty jadi 0)\n and brg_pemenuhan_status = 'perjalanan'\n union\n select id_pk_penerimaan,id_pk_brg_pemenuhan,id_pk_brg_pengiriman,brg_pengiriman_qty,brg_pengiriman_note,brg_pemenuhan_status,pengiriman_tgl,warehouse_alamat as cabang_daerah,warehouse_nama as toko_nama,'-' as toko_kode,brg_nama,brg_kode,ifnull(penerimaan_tgl,'-') as penerimaan_tgl\n from tbl_brg_pengiriman\n inner join mstr_pengiriman on mstr_pengiriman.id_pk_pengiriman = tbl_brg_pengiriman.id_fk_pengiriman and mstr_pengiriman.pengiriman_status = 'aktif' #harus yang jadi terkirim bukan yang dicancel\n inner join mstr_warehouse on mstr_warehouse.id_pk_warehouse = mstr_pengiriman.id_fk_warehouse\n inner join mstr_cabang on mstr_cabang.id_pk_cabang = mstr_warehouse.id_fk_cabang #dapetin daerah cabang\n inner join mstr_toko on mstr_toko.id_pk_toko = mstr_cabang.id_fk_toko #dapetin nama toko\n inner join tbl_brg_pemenuhan on tbl_brg_pemenuhan.id_pk_brg_pemenuhan = tbl_brg_pengiriman.id_fk_brg_pemenuhan #cuman untuk dapetin id_cabang_minta & id_barang\n inner join tbl_brg_permintaan on tbl_brg_permintaan.id_pk_brg_permintaan = tbl_brg_pemenuhan.id_fk_brg_permintaan and tbl_brg_permintaan.id_fk_cabang = ? #menentukan peminta barang yang akan jadi penerima\n inner join mstr_barang on mstr_barang.id_pk_brg = tbl_brg_permintaan.id_fk_brg #dapetin detail barang\n left join tbl_brg_penerimaan on tbl_brg_penerimaan.id_fk_brg_pengiriman = tbl_brg_pengiriman.id_pk_brg_pengiriman and tbl_brg_penerimaan.brg_penerimaan_qty > 0 #dianggap diterima apabila brgditerima > 0 (klo delete, ini ke 0 sendiri)\n left join mstr_penerimaan on mstr_penerimaan.id_pk_penerimaan = tbl_brg_penerimaan.id_fk_penerimaan and mstr_penerimaan.penerimaan_status = 'aktif' and mstr_penerimaan.penerimaan_tipe = 'permintaan' #dianggap diterima apabila status penerimaan > 0\n where tbl_brg_pengiriman.brg_pengiriman_qty > 0 #dianggap terkirim apabila tidak di cancel (klo cancel, qty jadi 0)\n and brg_pemenuhan_status = 'perjalanan'\n order by pengiriman_tgl DESC\";\n $args = array(\n $id_cabang, $id_cabang\n );\n //executeQuery($query,$args); echo $this->db->last_query();\n return executeQuery($query, $args);\n }", "public function kosongkanDataBarang() {\n $this->daftar_barang = [];\n $this->editData();\n }", "function apa_kabar() {\n return \"Apa kabar dunia?\"; //tidak menampilkan apapun\n}", "public function luu_tt_sanpham()\n\t\t{\n\t\t\t//lay du lieu tu view \n\t\t\tif (isset($_POST['tensanpham'])&& isset($_POST['tenloaisanpham'])&& isset($_POST['img'])&& isset($_POST['mota'])&& isset($_POST['baohanh'])&& isset($_POST['gia'])){\n\t\t\t\t//goi ham luu data cua model san pham\n\t\t\t\t$this->tensanpham = $_POST['tensanpham'];\n\t\t\t\t$this->id_loaisp = $_POST['tenloaisanpham'];\n\t\t\t\t$this->img = $_POST['img'];\n\t\t\t\t$this->mota = $_POST['mota'];\n\t\t\t\t$this->baohanh = $_POST['baohanh'];\n\t\t\t\t$this->gia = $_POST['gia'];\n\t\t\t\t//goi ham luu data cua model sanpham\n\t\t\t\t$kq = $this->sanpham_model->insert_sanpham($this->tensanpham,$this->id_loaisp,$this->img,$this->mota,$this->baohanh,$this->gia);\n\t\t\t\tif ($kq) {\n\t\t\t\t\techo 'luu du lieu thanh cong -- sanphamcontroller';\n\t\t\t\t} else {\n\t\t\t\t\techo'luu du lieu that bai -- sanphamcontroller';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\techo 'ban chua nhap du lieu -- sanphamcontroller';\n\t\t\t}\t\t\t\n\t\t}", "function berinama($saya){\n\t\t$this->nama_saya=$saya;\n\t}", "function halamanf3($jum)\n{// function halaman() - mula\n $mula = '<div style=\"background-color: #fffaf0; color:black;text-align:center\">';\n $tamat = '</div>';\n $page = $jum['page'];\n // Tentukan had query berasaskan nombor halaman semasa.\n //$jum['dari'] = (($jum['page'] * $jum['max']) - $jum['max']); \n // Tentukan bilangan halaman. $jum['muka_surat'] \n\t$jum['max'] = 30; // ubahsuai bil max untuk cetakf3\n\t$muka_surat = ceil($jum['bil_semua'] / $jum['max']);\n $bil_semua = $jum['bil_semua'];\n $baris_max = $jum['max'];\n \n $url = dpt_url(); // sepatutnya kawalan/semua/30/1/amin/\n $class = ( !isset($url[0]) ) ? null : $url[0]; //'kawalan'; \n $fungsi = 'cetakf3'; //( !isset($url[1]) ) ? null : $url[1]; //'semua'; \n $batch = ( !isset($url[2]) ) ? null : $url[2]; //'30'; \n $item = ( !isset($url[3]) ) ? null : $url[3]; //'30'; \n $ms = ( !isset($url[4]) ) ? null : $url[4]; //'ms'; \n //$fe = ( !isset($url[4]) ) ? null : $url[4]; //'fe'; \n \n //return \"\\$batch:$batch|\\$bil_semua:$bil_semua|\\$baris_max:$baris_max|\\$muka_surat:$muka_surat\";\n\t\n\t$senarai = URL . \"$class/$fungsi/$batch/$baris_max/\";\n $halaman = \"\\n$mula\\r\" \n\t\t. '<ul class=\"pagination pagination-sm\">' \n\t\t. \"\\r<li><a>Bil:($bil_semua) ms($muka_surat)- Papar halaman</a></li>\";\n \n if($page > 1) // Bina halaman sebelum\n $halaman .= \"\\r<li><a href='$senarai\" . ($page-1) . \"'>&laquo;</a></li>\";\n for($i = 1; $i <= $muka_surat; $i++) // Bina halaman terkini\n {$halaman .= ($page==$i)? \"\\r<li><a href='$senarai$i'>($i)</a></li>\" : \n\t\t\"\\r<li><a href='$senarai$i'>$i</a></li>\";}\n if($page < $muka_surat) // Bina halaman akhir\n $halaman .= \"\\r<li><a href='$senarai\" . ($page+1) . \"'>&raquo;</a></li>\";\n \n $halaman .= \"\\n</ul>\\n$tamat\";\n\n return $halaman;\n\t\n}", "public function aksi_ubah_kata_sandi_rt()\n {\n $kata_sandi = $this->input->post('kata_sandi');\n $kata_sandi_hash = sha1($kata_sandi);\n $data = array(\n 'kata_sandi' => $kata_sandi_hash,\n );\n\n $detailhere = $this->input->post('id_rt');\n\n if ($this->m_admin->aksi_ubah_kata_sandi_rt($detailhere, $data, 'rt')); {\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/list_data_rt');\n }\n }", "function cariPosisi($batas){\nif(empty($_GET['halproduk'])){\n\t$posisi=0;\n\t$_GET['halproduk']=1;\n}\nelse{\n\t$posisi = ($_GET['halproduk']-1) * $batas;\n}\nreturn $posisi;\n}", "function spefisik($dataid_kematian)\n\t{\n\n\t\t# codenya sql sepert select*from penduduk where nik = $datanik dimna $datanik adalah yg sudah dipilih. jadi cuma 1 row.\n\t\t$query = $this->db->query(\"SELECT*FROM `kematian` left join penduduk on kematian.nik = penduduk.nik where id_kematian = '$dataid_kematian' \");\n\n\t\t// itu adalah perintah sql join 2 table, yaitupenduduk dan kematian, karena data yanglenkap ada ditable pendudukjadiharus dijoin, \n\t\treturn $query->row();\n\t\t\n\t}", "function haki($param = null, $id = null){\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\n\t\t$data['p_ta'] = $this->input->post(\"thn\");\n\t\t$data['p_smt'] = $this->input->post(\"smt\");\n\t\tif ($data['p_ta'] == null && $data['p_smt'] == null){\n\t\t\t$data['ta'] = $this->session->userdata('ta');\n\t\t\t$data['smt'] = $this->session->userdata('smt');\t\t\n\t\t}else{\n\t\t\t$data['ta'] = $this->input->post(\"thn\");\n\t\t\t$data['smt'] = $this->input->post(\"smt\");\n\t\t}\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_data_haki';\n\t\t$parameter = array('api_search' => array($kd_dosen));\n\t\t$data['haki'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t# get data dosen prodi \n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_all_dosen';\n\t\t\t$parameter = array('api_search' => array());\n\t\t\t$data['dosen'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_bebankerja';\n\t\t\t\n\t\t\t$thn= $this->session->userdata('ta');\n\t\t\t$smt=$this->session->userdata('smt');\n\t\t\t$parameter = array('api_search' => array('H',$kd_dosen, $thn, $smt));\n\t\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\tif ($param != null){\n\t\t\t$data['jenis_haki'] = $this->s00_lib_api->get_api_jsob(URL_API_BKD.'bkd_beban_kerja/get_jenis_haki','POST',array());\t\n\t\t\tif($param == 'tambah'){\n\t\t\t\tif($id != null){\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_haki';\n\t\t\t\t\t$parameter = array('api_search' => array($id));\n\t\t\t\t\t$ch=$data['curr_haki'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_bkd';\n\t\t\t\t\t$parameter = array('api_search' => array($ch->KD_BK, 'H'));\n\t\t\t\t\t$data['current_data'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t}\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_all_dosen';\n\t\t\t\t$parameter = array('api_search' => array());\n\t\t\t\t$data['dosen'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/form_haki',$data);\n\t\t\t}\n\t\t\telse if ($param == 'detail'){\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_haki';\n\t\t\t\t$parameter = array('api_search' => array($id));\n\t\t\t\t$data['curr_haki'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\t\t\t\t\t\t\t\n\n\t\t\t\t# GET PARTNER\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/partner';\n\t\t\t\t$parameter = array('api_kode' => 11000, 'api_subkode' => 1, 'api_search' => array($id,'HAKI'));\n\t\t\t\t$data['partner'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t\t\t#print_r($data['partner']); die();\n\t\t\t\t$data['nama_partner'] = array();\n\t\t\t\tforeach ($data['partner'] as $p){\n\t\t\t\t\t$data['nama_partner'][$p->PARTNER] = $this->get_nama_partner($p->PARTNER);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/daftar_haki',$data);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/daftar_haki',$data);\n\t\t\t}\n\t\t}else{\n\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t$this->output99->output_display('dosen/daftar_haki',$data);\n\t\t}\n\t}", "function cariPosisi($batas){\nif(empty($_GET['halhasillulusadministrasi'])){\n\t$posisi=0;\n\t$_GET['halhasillulusadministrasi']=1;\n}\nelse{\n\t$posisi = ($_GET['halhasillulusadministrasi']-1) * $batas;\n}\nreturn $posisi;\n}", "function spd($slug) {\n\t\t$arr_slug\t\t= explode('_', $slug);\n\t\t$pegawai_result = $this->db->get_where('pegawai', array('id_pegawai' => $arr_slug[1]))->result();\n\t\t$pegawai \t\t= $pegawai_result['0']->nama_pegawai;\n\t\t$jabatan\t\t= $pegawai_result['0']->jabatan_pegawai;\n\t\t$golongan \t\t= $pegawai_result['0']->golongan_pegawai;\n\t\t$surat_result \t= $this->db->get_where('data_rinci', array('id_surat' => $arr_slug[0],\n\t\t\t'id_pegawai' => $arr_slug[1]))->result();\n\t\t$nomor \t\t\t= $surat_result['0']->nomor;\n\t\t$kegiatan \t\t= $surat_result['0']->kegiatan;\n\n\t\t//Get data rinci\n\t\t$data_rinci_all\t= $this->db->get_where('data_rinci',\n\t\t\tarray('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$jenis = $data_rinci_all['0']->jenis;\n\t\t$id_harian = $data_rinci_all['0']->id_harian;\n\t\t$id_penginapan = $data_rinci_all['0']->id_penginapan;\n\t\t$id_transport = $data_rinci_all['0']->id_transport;\n\t\t$id_transport2 = $data_rinci_all['0']->id_transport2;\n\t\t$id_tiket = $data_rinci_all['0']->id_tiket;\n\n\t\t//get data uang harian\n\t\t$harian_result\t= $this->db->get_where('uang_harian',array('id' => $id_harian))->result();\n\t\t$harian = $harian_result['0']->luar_kota;\n\t\t//get data uang penginapan\n\t\t$penginapan_result\t= $this->db->get_where('biaya_penginapan',array('id' => $id_penginapan))->result();\n\t\t$sbu_penginapan = $penginapan_result['0']->eselon_4;\n\n\t\t//get data uang tiket\n\t\t//handler tiket\n\t\tif ($id_tiket == 0) {\n\t\t\t$sbu_tiket = 0;\n\t\t\t$transport1 = $this->db->get_where('biaya_transport',array('id' => $id_transport))->result();\n\t\t\t$berangkat = $transport1['0']->provinsi;\n\t\t\t$transport2 = $this->db->get_where('biaya_transport',array('id' => $id_transport2))->result();\n\t\t\t$tujuan = $transport2['0']->provinsi;\n\t\t\t$angkutan = 'Darat';\n\n\t\t} else {\n\t\t\t//get data tiket pesawat\n\t\t\t$tiket_result = $this->db->get_where('tiket_pesawat',array('id' => $id_tiket))->result();\n\t\t\t$tiket = $tiket_result['0']->biaya_tiket;\n\t\t\t$sbu_tiket = $tiket_result['0']->biaya_tiket;\n\t\t\t$rute = $tiket_result['0']->rute;\n\t\t\t$rute_arr = explode('-', $rute);\n\t\t\t$berangkat = $rute_arr[0];\n\t\t\t$tujuan = $rute_arr[1];\n\t\t\t$angkutan = 'Udara dan Darat';\n\t\t}\n\n\t\t//get data uang transport\n\t\t$transport_result\t= $this->db->get_where('biaya_transport',array('id' => $id_transport))->result();\n\t\t$transport = $transport_result['0']->besaran;\n\n\n\t\t$ppk \t\t\t= $this->db->get_where('pejabat_administratif',\n\t\t\tarray('jabatan' => 'Pejabat Pembuat Komitmen'))->result();\n\n\t\t$nama_ppk \t\t\t\t= $ppk['0']->nama;\n\t\t$nip_ppk \t\t\t\t= $ppk['0']->nip;\n\n\t\t$var_tgl_mulai \t= $this->tanggal_indo($surat_result['0']->tgl_mulai, '-');\n\t\t$var_tgl_akhir \t= $this->tanggal_indo($surat_result['0']->tgl_akhir, '-');\n\t\t$var_tgl_surat \t= $this->tanggal_indo($surat_result['0']->tgl_surat,'/');\n\t\t$jumlah_hari\t= $this->hitung_hari($surat_result['0']->tgl_mulai, $surat_result['0']->tgl_akhir)+1;\n\n\t\t$var_tgl_rampung = $this->db->get_where('spd_rampung',\n\t\t\tarray('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$var_tgl_rampung = $var_tgl_rampung != NULL ? $this->tanggal_indo($var_tgl_rampung['0']->tgl,'/') : 0;\n\n\t\tif (empty($var_tgl_rampung)) {\n\t\t\techo \"<script> \t\n \talert('Anda harus mengisi SPD Rampung dulu!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\t\t$pdf = new FPDF('p','mm','A4');\n\t\t$pdf->AddPage();\n\t\t$pdf->SetFont('Arial','B',8);\n\t\t$pdf->Cell(150,3,'BADAN NASIONAL PENANGGULANGAN BENCANA',0,0,'L');\n\t\t$pdf->SetFont('Arial','',7);\n\t\t$pdf->Cell(25,3,'Lembar ke : ',0,'L');\n\t\t$pdf->Ln();\n\t\t$pdf->Cell(150,3,'Jl. Pramuka Kav. 38 - Jakarta Timur 13120',0,0,'L');\n\t\t$pdf->Cell(25,3,'Kode No. : '.$nomor,0,'L');\n\t\t$pdf->Ln();\n\t\t$pdf->Cell(150,3,'',0,0,'L');\n\t\t$pdf->Cell(25,3,'Nomor : ',0,0,'L');\n\t\t$pdf->Ln();\n\t\t$pdf->Ln();\n\t\t$pdf->SetFont('Arial','BU',12);\n\t\t$pdf->Cell(0,10,'SURAT PERINTAH DINAS',0,1,'C');\n\t\t//this is the table\n\t\t$pdf->Cell(10,7,'',0,0);\n\t\t$pdf->SetFont('Arial','',8);\n\t\t$pdf->Cell(10,5,'1.','LT',0,'C',0);\n\t\t$pdf->Cell(70,5,'Pejabat Pembuat Komitmen','LTR',0,'L',0);\n\t\t$pdf->Cell(90,5,'Pusat Data Informasi dan Humas','TR',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'','LB',0,'C',0);\n\t\t$pdf->Cell(70,5,'','LBR',0,'L',0);\n\t\t$pdf->Cell(90,5,'','BR',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'2.','L',0,'C',0);\n\t\t$pdf->Cell(70,5,'Nama Pegawai yang','LR',0,'L',0);\n\t\t$pdf->Cell(90,5,$pegawai,'R',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'','LB',0,'C',0);\n\t\t$pdf->Cell(70,5,'diperintahkan','LBR',0,'L',0);\n\t\t$pdf->Cell(90,5,'','BR',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'3.','L',0,'C',0);\n\t\t$pdf->Cell(70,5,'a. Pangkat dan golongan','LR',0,'L',0);\n\t\t$pdf->Cell(90,5,'a. '.$golongan,'R',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'','L',0,'C',0);\n\t\t$pdf->Cell(70,5,'b. Jabatan / Instansi','LR',0,'L',0);\n\t\t$pdf->Cell(90,5,'b. ','R',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'','LB',0,'C',0);\n\t\t$pdf->Cell(70,5,'c. Tingkat biaya perjalanan dinas','LBR',0,'L',0);\n\t\t$pdf->Cell(90,5,'c. C','BR',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'4','L',0,'C',0);\n\t\t$pdf->Cell(70,5,'Maksud perjalanan Dinas','LR',0,'L',0);\n\t\t$pdf->MultiCell(90,5,'Melakukan kegiatan '.$kegiatan,'LR','L');\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'','LB',0,'C',0);\n\t\t$pdf->Cell(70,5,'','LBR',0,'L',0);\n\t\t$pdf->Cell(90,5,'','BR',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'5','LB',0,'C',0);\n\t\t$pdf->Cell(70,5,'Alat angkutan yang dipergunakan','LBR',0,'L',0);\n\t\t$pdf->Cell(90,5, $angkutan,'BR',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'6.','L',0,'C',0);\n\t\t$pdf->Cell(70,5,'a. Tempat berangkat','LR',0,'L',0);\n\t\t$pdf->Cell(90,5,'a. Jakarta' ,'R',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'','LB',0,'C',0);\n\t\t$pdf->Cell(70,5,'b. Tempat tujuan','LBR',0,'L',0);\n\t\t$pdf->Cell(90,5,'b.'.$tujuan,'BR',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'7.','L',0,'C',0);\n\t\t$pdf->Cell(70,5,'a. Lamanya perjalanan Dinas','LR',0,'L',0);\n\t\t$pdf->Cell(90,5,'a. '. $jumlah_hari .' ('. $this->terbilang($jumlah_hari) .') Hari','R',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'','L',0,'C',0);\n\t\t$pdf->Cell(70,5,'b. Tanggal berangkat','LR',0,'L',0);\n\t\t$pdf->Cell(90,5,'b. '.$var_tgl_mulai,'R',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'','L',0,'C',0);\n\t\t$pdf->Cell(70,5,'c. Tanggal harus kembali /','LR',0,'L',0);\n\t\t$pdf->Cell(90,5,'c. '.$var_tgl_akhir,'R',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'','LB',0,'C',0);\n\t\t$pdf->Cell(70,5,' Tiba di tempat baru','LBR',0,'L',0);\n\t\t$pdf->Cell(90,5,'','BR',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n $pdf->Cell(10,5,'8.','L',0,'C',0);\n\t\t$pdf->Cell(25,5,'Pengikut :','L',0,'L',0);\n\t\t$pdf->Cell(45,5,'Nama','R',0,'L',0);\n\t\t$pdf->Cell(50,5,'Tanggal Lahir','R',0,'C',0);\n\t\t$pdf->Cell(40,5,'Keterangan','R',0,'C',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n $pdf->Cell(10,5,'','L',0,'C',0);\n\t\t$pdf->Cell(25,5,'1.','L',0,'C',0);\n\t\t$pdf->Cell(45,5,'','R',0,'L',0);\n\t\t$pdf->Cell(50,5,'','R',0,'C',0);\n\t\t$pdf->Cell(40,5,'','R',0,'C',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n $pdf->Cell(10,5,'','L',0,'C',0);\n\t\t$pdf->Cell(25,5,'2.','L',0,'C',0);\n\t\t$pdf->Cell(45,5,'','R',0,'L',0);\n\t\t$pdf->Cell(50,5,'','R',0,'C',0);\n\t\t$pdf->Cell(40,5,'','R',0,'C',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n $pdf->Cell(10,5,'','L',0,'C',0);\n\t\t$pdf->Cell(25,5,'3.','L',0,'C',0);\n\t\t$pdf->Cell(45,5,'','R',0,'L',0);\n\t\t$pdf->Cell(50,5,'','R',0,'C',0);\n\t\t$pdf->Cell(40,5,'','R',0,'C',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n $pdf->Cell(10,5,'','L',0,'C',0);\n\t\t$pdf->Cell(25,5,'4.','L',0,'C',0);\n\t\t$pdf->Cell(45,5,'','R',0,'L',0);\n\t\t$pdf->Cell(50,5,'','R',0,'C',0);\n\t\t$pdf->Cell(40,5,'','R',0,'C',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n $pdf->Cell(10,5,'','LB',0,'C',0);\n\t\t$pdf->Cell(25,5,'5.','LB',0,'C',0);\n\t\t$pdf->Cell(45,5,'','RB',0,'L',0);\n\t\t$pdf->Cell(50,5,'','RB',0,'C',0);\n\t\t$pdf->Cell(40,5,'','RB',0,'C',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'9.','L',0,'C',0);\n\t\t$pdf->Cell(70,5,'Pembebanan anggaran :','LR',0,'L',0);\n\t\t$pdf->Cell(90,5,'','R',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'','L',0,'C',0);\n\t\t$pdf->Cell(70,5,'a. Instansi','LR',0,'L',0);\n\t\t$pdf->Cell(90,5,'a. BADAN NASIONAL PENANGGULANGAN BENCANA','R',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'','LB',0,'C',0);\n\t\t$pdf->Cell(70,5,'b. Mata Anggaran','LBR',0,'L',0);\n\t\t$pdf->Cell(90,5,'b. 524111','BR',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n $pdf->Cell(10,5,'10.','L',0,'C',0);\n\t\t$pdf->Cell(70,5,'Pejabat Pembuat Komitmen','LR',0,'L',0);\n\t\t$pdf->Cell(90,5,'Pusat Data Informasi dan Humas','R',0,'L',0);\n $pdf->Ln();\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(10,5,'','LB',0,'C',0);\n\t\t$pdf->Cell(70,5,'','LBR',0,'L',0);\n\t\t$pdf->Cell(90,5,'','BR',0,'L',0);\n $pdf->Ln();\n //end of table\n $pdf->Cell(10,7,'',0,0);\n\t\t$pdf->Cell(70,6,'Coret yang tidak perlu',0,0,'L');\n\t\t$pdf->Ln();\n\t\t$pdf->Cell(112,7,'',0,0);\n\t\t$pdf->Cell(30,5,'Dikeluarkan di :',0,0,'L');\n\t\t$pdf->Cell(20,5,'Jakarta',0,0,'L');\n\t\t$pdf->Ln();\n\t\t$pdf->SetFont('Arial','',8);\n\t\t$pdf->Cell(112,7,'',0,0);\n\t\t$pdf->Cell(30,5,'Pada tanggal :','B',0,'L');\n\t\t$pdf->Cell(20,5,$var_tgl_rampung,'B',0,'L');\n\t\t$pdf->Ln();\n\t\t$pdf->Ln();\n\t\t$pdf->Cell(116.5,7,'',0,0);\n\t\t$pdf->Cell(40,4,'Pejabat Pembuat Komitmen',0,0,'C');\n\t\t$pdf->Ln();\n\t\t$pdf->Cell(116.5,7,'',0,0);\n\t\t$pdf->Cell(40,4,'Pusat Data Informasi dan Humas',0,0,'C');\n\t\t$pdf->Ln();\n\t\t$pdf->Ln();\n\t\t$pdf->Ln();\n\t\t$pdf->Ln();\n\t\t$pdf->SetFont('Arial','U',8);\n\t\t$pdf->Cell(116.5,6,'',0,0);\n\t\t$pdf->Cell(40,4,$nama_ppk,0,0,'C');\n\t\t$pdf->Ln();\n\t\t$pdf->SetFont('Arial','',8);\n\t\t$pdf->Cell(116.5,6,'',0,0);\n\t\t$pdf->Cell(40,4,'NIP. '.$nip_ppk,0,0,'C');\n\n\t\t//Cetak gans\n\t\t$filename = \"Surat Perintah Dinas - \".$arr_slug[0].\" - \".$pegawai.$this->extension;\n\t\t$pdf->setTitle($filename);\n\t\t$pdf->Output(\"I\", $filename);\n\t}", "function isNaikGaji($conn,$idpegawai,$tglkgb){\n\t\t\t$tglkgb = Cstr::formatDate($tglkgb);\n\t\t\t$bln = substr($tglkgb,5,2);\n\t\t\t$isnaik = true;\n\t\t\t//cek apakah pegawai sudah diproses naik pangkat\n\t\t\t$kgb = $conn->GetOne(\"select idpegawai from \".self::table('pe_kgb').\" \n\t\t\t\t\twhere idpegawai = $idpegawai and datepart(month,tglkgb)='$bln'\");\n\t\t\t\t\t\n\t\t\n\t\t\tif(!empty($kgb))\n\t\t\t\t$isnaik = false;\n\t\t\t\t\n\t\t\t//mendapatkan next pangkat\n\t\t\t$rown = mKenaikan::getNaikGaji($conn,$idpegawai,$tglkgb);\n\t\t\t\n\t\t\t//cek untuk status pegawai yang naik pangkat\n\t\t\t$sql = \"select p.idpegawai,coalesce(p.nik+' - ','')+\".static::schema.\".f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as pegawai,\n\t\t\t\t\tu.kodeunit+' - '+u.namaunit as namaunit,pl.golongan as golonganlama,p.tmtpangkat as tmtpangkatlama,cast(p.masakerjathngol as varchar)+' tahun '+cast(p.masakerjablngol as varchar)+' bulan' as mklama,\n\t\t\t\t\t'\".$rown['idpangkat'].\"' as pangkatbaru,'\".$rown['tmtpangkat'].\"' as tmtpangkat,substring(right(replicate('0', 4) + cast(\".$rown['mkg'].\" as varchar), 4),1,2) as mkthn, substring(right(replicate('0', 4) + cast(\".$rown['mkg'].\" as varchar), 4),3,2) as mkbln\n\t\t\t\t\tfrom \".self::table('ms_pegawai').\" p\n\t\t\t\t\tleft join \".self::table('ms_unit').\" u on u.idunit=p.idunit\n\t\t\t\t\tleft join \".self::table('ms_pangkat').\" pl on pl.idpangkat=p.idpangkat\n\t\t\t\t\tleft join \".self::table('pe_kgb').\" k on k.idpegawai=p.idpegawai and k.tglkgb = '$tglkgb'\n\t\t\t\t\twhere p.idpegawai = $idpegawai and p.idstatusaktif = 'AA'\";\n\t\t\t$row = $conn->GetRow($sql);\t\n\t\t\t\t\t\t\n\t\t\tif(empty($row))\n\t\t\t\t$isnaik = false;\n\t\t\t\t\n\t\t\t$a_data = array('kgb' => $kgb, 'row' => $rown, 'isnaik' => $isnaik, 'sql' => $sql);\n\t\t\t\n\t\t\treturn $a_data;\n\t\t}", "public function kirimbarang(){\n\t\t$no_order \t= $this->input->post('no_order');\n\t\t$ket \t= $this->input->post('ket');\n\t\tif ($ket == 'Modifikasi') {\n\t\t\t$get = $this->M_monitoringorder->getdatamodif(\"where no_order = '$no_order'\");\n\t\t}elseif ($ket == 'Baru') {\n\t\t\t$get = $this->M_monitoringorder->getdatabaru(\"where no_order = '$no_order'\");\n\t\t}else {\n\t\t\t$get = $this->M_monitoringorder->getdatarekondisi(\"where no_order = '$no_order'\");\n\t\t}\n\t\t// echo \"<pre>\";print_r($get);exit();\n\t\t$cek \t\t= $this->M_monitoringorder->cekaction($no_order, \"and person = 10\"); // status 10 = barang sudah selesai / akan kirim ke seksi pengorder\n\t\tif (empty($cek)) {\n\t\t\t$this->M_monitoringorder->saveaction($no_order, 10, 1, '', date('Y-m-d H:i:s'), $this->session->user);\n\t\t}else {\n\t\t\t$this->M_monitoringorder->updateaction($no_order, 10, 1, '', date('Y-m-d H:i:s'), $this->session->user);\n\t\t}\n\t\tif (stripos($get[0]['jenis'], 'FIXTURE') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,7);\n\t\t}elseif (stripos($get[0]['jenis'], 'MASTER') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,6);\n\t\t}elseif (stripos($get[0]['jenis'], 'GAUGE') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,5);\n\t\t}elseif (stripos($get[0]['jenis'], 'ALAT LAIN') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,9);\n\t\t}else {\n\t\t\t$jenis = $get[0]['jenis'];\n\t\t}\n\t\t$this->send_email_kirim($get[0]['pengorder'], $get[0]['no_order'], $get[0]['seksi'], $jenis);\n\t\tredirect(base_url('OrderToolMakingAdminPPC/MonitoringOrder/'));\n\t}", "function tampilSikap($nilai) {\nif($nilai== '1'){ \n\t$nilai = 'Kurang';\n}\nelseif($nilai== '2'){ \n\t$nilai = 'Cukup';\n}\nelseif($nilai== '3'){ \n\t$nilai = 'Baik';\n}\nelse { \n\t$nilai = 'Baik Sekali';\n}\n\treturn $nilai;\n}", "public function barang_keluar()\n {\n $uri = $this->uri->segment(3);\n $where = array( 'id_transaksi' => $uri);\n $data['list_data'] = $this->M_kasir->get_data('tb_barang_masuk',$where);\n $data['list_satuan'] = $this->M_kasir->select('tb_satuan');\n $data['list_bahan'] = $this->M_kasir->select('tb_bahan');\n $data['list_tas'] = $this->M_kasir->select('tb_tas');\n $data['avatar'] = $this->M_kasir->get_data_gambar('tb_upload_gambar_user',$this->session->userdata('name'));\n $this->load->view('kasir/perpindahan_barang/form_update',$data);\n }", "function cek_dpl(){\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t$ta = $this->session->userdata('ta');\n\t\t$smt = $this->session->userdata('smt');\n\t\t# cek data beban kerja\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/cek_data_bkd';\n\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $ta, $smt));\n\t\t$data['jml'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t#echo $data['jml']; print_r($parameter); die();\n\t\tif ($data['jml'] == 0){\n\t\t\t$url\t\t= 'http://service.uin-suka.ac.id/servsiasuper/index.php/';\n\t\t\t$parameter\t= array('api_kode' => 1000, 'api_subkode' => 1, 'api_search' => array($kd_dosen));\n\t\t\t$data\t\t= $this->mdl_bkd->get_api_kkn('kkn_admin/data_dpl_kkn', 'json', 'POST', $parameter);\n\t\t\tif(count($data) > 0){\n\t\t\t\t$tema = $data[0]['TEMA_KKN'];\n\t\t\t\t$angkatan = $data[0]['ANGKATAN'];\n\t\t\t\t$periode = $data[0]['PERIODE'];\n\t\t\t\t$ta = $data[0]['TA'];\n\t\t\t\t$tgl_mulai = $data[0]['TANGGAL_MULAI'];\n\t\t\t\t$tgl_selesai = $data[0]['TANGGAL_SELESAI'];\n\t\t\t\t$kelompok = $data[0]['JUM_KELOMPOK'];\n\t\t\t\t# BEBAN KERJA\n\t\t\t\t$jenis_kegiatan = \"Menjadi Dosen Pembimbing Lapangan (DPL) KKN, Angkatan \".$angkatan.\", Periode \".$periode.\", dengan Tema \\\"\".$tema.\"\\\", Kelompok \".$kelompok;\n\t\t\t\t$masa_penugasan = \"1 Semester\";\n\t\t\t\t$bukti_penugasan = '-'; $bkt_dokumen = '-';\n\t\t\t\t$sks_rule = 1;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia';\n\t\t\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $jenis_kegiatan, $bukti_penugasan, $sks_rule, $masa_penugasan, $sks_rule, $bkt_dokumen, $ta, $smt, 'LANJUTKAN','100'));\n\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif($simpan){\n\t\t\t\t\t# get last id beban kerja \n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_current_data_tersimpan';\n\t\t\t\t\t$parameter\t= array('api_search' => array('BKD.BKD_BEBAN_KERJA','KD_BK'));\n\t\t\t\t\t$getid = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter); \n\t\t\t\t\t#simpan data pengabdian\n\t\t\t\t\t$sumber_dana = '-'; $jumlah_dana = 0;\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pengabdian';\n\t\t\t\t\t$parameter\t= array('api_search' => array($getid, $tgl_mulai, $tgl_selesai, $tema, $sumber_dana, $jumlah_dana, '50'));\n\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t}\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}else{\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}\n\t\t}else{\n\t\t\tredirect('bkd/dosen/bebankerja/data/C');\t\t\n\t\t}\n\t}", "public function jadwalPas($kelas, $pembagianJam, $hari, $id_guru)\n\t{\n\t\techo \"jumlah hari yang tersedia :\" . count($hari) . \"<br>\";\n\t\techo \"<div style='background-color: #DC143C'>Pembagian_jam ($pembagianJam sks) -> </div>\";\n\t\t// echo implode(\", \", $pembagianJam);\n\t\t// foreach ($pembagianJam as $beban_jam) {\n\t\t// echo \"value pembagian : $beban_jam <br>\";\n\t\t$error = 0;\n\t\tforeach ($hari as $valueDataHari) {\n\t\t\t$jumlahHariKosong = 0;\n\t\t\t// echo $kelas;\n\t\t\techo $valueDataHari;\n\t\t\t$dataJadwal = $this->Jadwal_Model->getDataPenjadwalan($kelas, $valueDataHari, $id_guru);\n\t\t\t// echo \"</br>\";\n\t\t\t// print_r($dataJadwal);\n\t\t\t// echo \"</br>\";\n\t\t\t$data = [];\n\t\t\tif ($pembagianJam <= count($dataJadwal)) {\n\t\t\t\tforeach ($dataJadwal as $dataHari) {\n\t\t\t\t\tif ($dataHari->kode_jadwal == '-' && $dataHari->keterangan == 'kosong') {\n\t\t\t\t\t\t$jumlahHariKosong++;\n\t\t\t\t\t\t$data[] = $dataHari->sesi;\n\t\t\t\t\t\tif (count($data) == $pembagianJam) {\n\t\t\t\t\t\t\t$sesi[$valueDataHari][] = $data;\n\t\t\t\t\t\t\t$data = [];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$data = [];\n\t\t\t\t\t\t$jumlahHariKosong = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($jumlahHariKosong == $pembagianJam) {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'status' => 'Press',\n\t\t\t\t\t\t'sesi' => $pembagianBebanJam[$pembagianJam][] = $sesi\n\t\t\t\t\t];\n\t\t\t\t} else if ($jumlahHariKosong > $pembagianJam) {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'status' => 'tidakPress',\n\t\t\t\t\t\t'sesi' => $pembagianBebanJam[$pembagianJam][] = $sesi\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'status' => 'ada sesuatu',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$error++;\n\t\t\t\tif ($error == count($hari)) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'status' => 'tidakMuat'\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// }\n\t\treturn $result;\n\t}", "function _dispen_hari(){\n\t\t$CI =& get_instance();\n\t\t$api_url \t= URL_API_SIA.'sia_sistem/data_view';\n\t\t$parameter = array('api_kode' =>200002, 'api_subkode' => 1, 'api_search' => array());\n\t\t$data \t\t= $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\treturn $data[0]->KADALUWARSA_HARI1;\n\t}", "public function ranckegiatan_kegiatan(){\t\t\t\t\n\t\t$std = new stdClass();\n\t\t$login = $this->session->userdata('SESS_LOGIN');\n\t\t$SESS_TAHUN = $this->session->userdata('SESS_TAHUN');\n\t\tif ($login){\n\t\t\t$table='dbsipd_'.$SESS_TAHUN.'.t_kegiatan_keg';\t\n\t\t\t$ArrWhere=array('KDRANCKEG');\n\t\t\t$arrFilterAdd=array('TGLVALID','HASIL_MONITORING');\n\t\t\t$action=$this->uri->segment(3);\t\t\t\t\t\n\t\t\t$std->status=$this->m_action->actionData($action, $table, $this->input->post(),$ArrWhere,$arrFilterAdd);\n\t\t}else{\n\t\t\t$std->status='failed';\n\t\t}\n\t\t$this->load->view('json', array(\"response\" => $std->status));\t\n\t}", "public function aksi_ubah_kata_sandi_warga()\n {\n $kata_sandi = $this->input->post('kata_sandi');\n $kata_sandi_hash = sha1($kata_sandi);\n $data = array(\n 'kata_sandi' => $kata_sandi_hash,\n );\n\n $detailhere = $this->input->post('id_warga');\n\n if ($this->m_admin->aksi_ubah_kata_sandi_warga($detailhere, $data, 'warga')); {\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/list_data_warga');\n }\n }", "public function karyawan(){\n $this->setActualJadwal(TRUE);\n $this->load->model('jadwal_detail_model', 'jdm');\n $periodeTerpilih = $this->input->post('periode');\n if(empty($periodeTerpilih)){\n $tanggalTerpilih = date('Y-m-d');\n }else{\n $tanggalTerpilih = date($periodeTerpilih.'-01');\n }\n \n $idJadwal = $this->jdm->fields(['jadwal_id'])->get_by(['nik' => $this->getNIK(), 'tanggalabsensi' => $tanggalTerpilih]);\n if(!empty($idJadwal)){\n $this->load->model('User_model', 'um');\n $_POST['key'] = ['id' => $idJadwal->jadwal_id];\n $bawahan = $this->getBawahan();\n $nikBawahan = array_column($this->um->as_array()->fields('ref_nik')->get_many(array_keys($bawahan)),'ref_nik');\n $this->setFilterNik($nikBawahan);\n $this->setMarkToday(TRUE);\n $this->edit();\n }else{\n echo 'Data jadwal tidak ditemukan untuk tanggal '.tglIndonesia($tanggalTerpilih);\n }\n }", "function getDataSingkatPrakt($conn,$key,$pengajar=true,$nip='') {\n\t\t\t$sql = \"select k.thnkurikulum, k.kodemk, k.kodeunit, k.periode, k.kelasmk, k.koderuang,\n\t\t\t\t\tk.nohari, k.jammulai, k.jamselesai, c.namamk\n\t\t\t\t\tfrom \".static::table('ak_kelaspraktikum').\" k join \".static::table('ak_kurikulum').\" c using (thnkurikulum,kodemk,kodeunit)\n\t\t\t\t\twhere \".static::getCondition($key,null,'k');\n\t\t\t$row = $conn->GetRow($sql);\n\t\t\t\n\t\t\t$row['jadwal'] = Date::indoDay($row['nohari']).', '.CStr::formatjam($row['jammulai']).' - '.CStr::formatjam($row['jamselesai']);\n\t\t\t//$row['jadwal2'] = Date::indoDay($row['nohari2']).', '.CStr::formatjam($row['jammulai2']).' - '.CStr::formatjam($row['jamselesai2']);\n\t\t\t\t\n\t\t\t// ambil data pengajar\n\t\t\tif($pengajar) {\n\t\t\t\t$sql = \"select p.idpegawai::text as nipdosen, akademik.f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as nama from \".static::table('ak_mengajar').\" a\n\t\t\t\t\t\tjoin sdm.ms_pegawai p on a.nipdosen::text = p.idpegawai::text\n\t\t\t\t\t\twhere \".static::getCondition($key,null,'a').\" order by a.nipdosen\";\n\t\t\t\t$rs = $conn->Execute($sql);\n\t\t\t\t\n\t\t\t\t$a_ajar = array();\n\t\t\t\twhile($rowa = $rs->FetchRow())\n\t\t\t\t\t$a_ajar[] = $rowa['nama'].' ('.$rowa['nipdosen'].')';\n\t\t\t\t\n\t\t\t\t$row['pengajar'] = implode('<br>',$a_ajar);\n\t\t\t}\n\t\t\tif(!empty($nip)){\n\t\t\t\t$sql = \"select idpegawai::text as nik, akademik.f_namalengkap(gelardepan,namadepan,namatengah,namabelakang,gelarbelakang) as nama \n\t\t\t\t\t\tfrom sdm.ms_pegawai where nik='$nip' or idpegawai::text='$nip'\";\n\t\t\t\t$rs=$conn->GetRow($sql);\n\t\t\t\t$row['pengajar'] =$rs['nama'].\" (\".$rs['nik'].\")\";\n\t\t\t}\n\t\t\treturn $row;\n\t\t}", "public function getTableAcara(){\r\r\n\t\t$key = 1;\r\r\n\t\tif($this->input->post(\"key\")!==NULL){\r\r\n\t\t\t$key = intval($this->input->post(\"key\"));\r\r\n\t\t\tif($key < 0) $key = 1;\r\r\n\t\t}\r\r\n\t\t$s=true;\r\r\n\t\t$string = \"<h4>Informasi Acara</h4><div class='well'>Data Tidak ditemukan</div>\";\r\r\n\t\t$n = 1;\r\r\n\t\t$z = 1;\r\r\n\t\t$koko = 0;\r\r\n\t\t$this->loadLib('ControlEvent');\r\r\n\t\t$tempKejadian = (new ControlEvent($this->gateControlModel))->getAllData();\r\r\n\t\tif($tempKejadian){\r\r\n\t\t\twhile($tempKejadian->getNextCursor()){\r\r\n\t\t\t\tif($n <= 5 && $z == $key){\r\r\n\t\t\t\t\tif($s){\r\r\n\t\t\t\t\t\t$string = \"<h4>Informasi Acara</h4>\";\r\r\n\t\t\t\t\t\t$s = false;\t\r\r\n\t\t\t\t\t}\t\t\t\r\r\n\t\t\t\t\tif($tempKejadian->getKode() == '1'){\t\r\r\n\t\t\t\t\t\t$string .= \"<div class='well'>\";\r\r\n\t\t\t\t\t\t$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi();\r\r\n\t\t\t\t\t\t//$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi().\" Pada tahun ajaran \".substr($tempKejadian->getTahunAk(),0,strlen($tempKejadian->getTahunAk())-1).\"-\".(intval(substr($tempKejadian->getTahunAk(),0,strlen($tempKejadian->getTahunAk())-1))+1).\" Semester \".$tempKejadian->getTahunAk()[4].\" dimulai pada tanggal \".$tempKejadian->getMulai().\" hingga tanggal \".$tempKejadian->getBerakhir();\r\r\n\t\t\t\t\t\t$string .= \"</div>\";\t\r\r\n\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t$string .= \"<div class='well'>\";\r\r\n\t\t\t\t\t\t$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi();\r\r\n\t\t\t\t\t\t$string .= \"</div>\";\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$koko ++;\r\r\n\t\t\t\t\t$n++;\r\r\n\t\t\t\t}else if($n == 5 && $z < $key){\r\r\n\t\t\t\t\t$n = 1;\r\r\n\t\t\t\t\t$z++;\r\r\n\t\t\t\t}else{\r\r\n\t\t\t\t\t$n++;\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\techo \"1\".$string;\r\r\n\t\tif($key == 1){\r\r\n\t\t\tif($koko == 5)\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"nextPageBerandaBase();\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t\telse\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t}else{\r\r\n\t\t\tif($koko == 5)\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"previousPageBerandaBase();\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"nextPageBerandaBase();\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t\telse\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"previousPageBerandaBase();\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t}\r\r\n\t\t\r\r\n\t}", "public function simpan_data_penerima_bansos()\n {\n $noKK = $this->request->getVar('noKK');\n $kepalaKeluarga = $this->request->getVar('kepalaKeluarga');\n $idBansos = $this->request->getVar('idBansos');\n $namaBansos = $this->request->getVar('namaBansos');\n $kategori = $this->request->getVar('kategori');\n $pendamping = $this->request->getVar('pendamping');\n $nominal = $this->request->getVar('nominal');\n $jumlahData = count($noKK);\n $jumlahBerhasil = 0;\n $jumlahGagal = 0;\n $jumlahTerdaftar = 0;\n $jumlahDataKKTidakDitemukan = 0;\n $jumlahDataBansosTidakDitemukan = 0;\n $jumlahBelumDisetujui = 0;\n for ($i = 0; $i < $jumlahData; $i++) {\n // cek apakah fieldnya kosong\n if ($noKK[$i] == 0 || $idBansos[$i] == 0) {\n $jumlahGagal++;\n } else {\n // cek pada database apakah data KK tersebut ada\n $dataKeluarga = $this->KeluargaModel->where('noKK', $noKK[$i])->first();\n if ($dataKeluarga) {\n // cek pada database apakah data bansos ada\n $dataBansos = $this->DataBansosModel->where('idBansos', $idBansos[$i])->first();\n if ($dataBansos) {\n // cek apakah data keluarga sudah\n $status = 'Disetujui';\n $disetujui = $this->KeluargaModel->where('noKK', $noKK[$i])->where('status', $status)->first();\n if ($disetujui) {\n // cek data peserta apakah sudah terdaftar\n $pesertaBansos = $this->BansosModel->where('noKK', $noKK[$i])->where('idBansos', $idBansos[$i])->first();\n if ($pesertaBansos) {\n $jumlahTerdaftar++;\n } else {\n\n $this->BansosModel->save([\n 'noKK' => $noKK[$i],\n 'kepalaKeluarga' => $kepalaKeluarga[$i],\n 'idBansos' => $idBansos[$i],\n 'namaBansos' => $namaBansos[$i],\n 'kategori' => $kategori[$i],\n 'pendamping' => $pendamping[$i],\n 'nominal' => $nominal[$i],\n 'statusAnggota' => 'Aktif'\n ]);\n $jumlahBerhasil++;\n }\n } else {\n $jumlahBelumDisetujui++;\n }\n } else {\n $jumlahDataBansosTidakDitemukan++;\n }\n } else {\n $jumlahDataKKTidakDitemukan++;\n }\n }\n }\n session()->setFlashdata('pesan', '' . $jumlahBerhasil . ' Berhasil Disimpan, ' . $jumlahTerdaftar . ' Telah Terdaftar, ' . $jumlahDataKKTidakDitemukan . ' Data KK Tidak Ditemukan, ' . $jumlahDataBansosTidakDitemukan . ' Data Bansos Tidak Ditemukan dan ' . $jumlahBelumDisetujui . ' Belum Disetujui');\n return redirect()->to('/Admin/penerima_bansos');\n }", "function pemeriksaan($nomor_pasien)\n\t{\n\t\t$data['pasien'] = $this->Kesehatan_M->read('pasien',array('nomor_pasien'=>$nomor_pasien))->result();\n\t\tif ($data['pasien'] != array()) {\n\t\t\t$data['rekam_medis'] = $this->Kesehatan_M->read('rekam_medis',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('nomor_pasien'\t\t=>\t$nomor_pasien,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'MONTH(tanggal_jam)'=>\tdate('m'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'YEAR(tanggal_jam)'\t=>\tdate('Y'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'DAY(tanggal_jam)'\t=>\tdate('d')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))->result();\n\t\t\t$this->load->view('static/header');\n\t\t\t$this->load->view('static/navbar');\n\t\t\t$this->load->view('dokter/pemeriksaan',$data);\n\t\t\t$this->load->view('static/footer');\n\t\t}else{\n\t\t\t$this->load->view('static/header');\n\t\t\t$this->load->view('static/navbar');\n\t\t\t$data['heading']\t= \"Halaman tidak ditemukan\";\n\t\t\t$data['message']\t= \"<p> Klik <a href='\".base_url().\"Dokter/index'>disini </a>untuk kembali melihat daftar pasien yang sedang antri</p>\";\n\t\t\t$this->load->view('errors/html/error_404',$data);\n\t\t}\n\t}", "function group_data($data_awal_perolehan, $data_akhir_perolehan, $data_hapus_awal, $tgl_akhir = \"\", $tgl_awal = \"\")\n{\n\n //tes\n $data_awal = array();\n\n foreach ($data_awal_perolehan as $arg) {\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Kelompok' ] = $arg[ 'kelompok' ];\n\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'TahunPenyusutan' ] = $arg[ 'TahunPenyusutan' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Aset_ID' ] = $arg[ 'Aset_ID' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Tahun' ] = $arg[ 'Tahun' ];\n\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'TglPembukuan' ] = $arg[ 'TglPembukuan' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Aset_ID' ] = $arg[ 'Aset_ID' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'kodeSatker' ] = \"{$arg['kodeSatker']}\";\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'kodeKelompok' ] = \"{$arg['kelompok']}\";\n\n\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Uraian' ] = $arg[ 'Uraian' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'nilai' ] += $arg[ 'nilai' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'PP' ] += $arg[ 'PP' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'AP' ] += $arg[ 'AP' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'NB' ] += $arg[ 'NB' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'jml' ] += 1;\n }\n\n $data_akhir = array();\n\n foreach ($data_akhir_perolehan as $arg) {\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Kelompok' ] += $arg[ 'kelompok' ];\n\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'TahunPenyusutan' ] = $arg[ 'TahunPenyusutan' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Aset_ID' ] = $arg[ 'Aset_ID' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Tahun' ] = $arg[ 'Tahun' ];\n\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'TglPembukuan' ] = $arg[ 'TglPembukuan' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Aset_ID' ] = $arg[ 'Aset_ID' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'kodeSatker' ] = \"{$arg['kodeSatker']}\";\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'kodeKelompok' ] = \"{$arg['kelompok']}\";\n\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Uraian' ] = $arg[ 'Uraian' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'nilai' ] += $arg[ 'nilai' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'PP' ] += $arg[ 'PP' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'AP' ] += $arg[ 'AP' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'NB' ] += $arg[ 'NB' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'jml' ] += 1;\n }\n\n $data_hapus_tmp = array();\n\n foreach ($data_hapus_awal as $arg) {\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Kelompok' ] += $arg[ 'kelompok' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Uraian' ] += $arg[ 'Uraian' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'nilai' ] += $arg[ 'nilai' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'PP' ] += $arg[ 'PP' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'AP' ] += $arg[ 'AP' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'NB' ] += $arg[ 'NB' ];\n\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Aset_ID' ] = $arg[ 'Tahun' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'TglPembukuan' ] = $arg[ 'TglPembukuan' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Aset_ID' ] = $arg[ 'Aset_ID' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'kodeSatker' ] = \"{$arg['kodeSatker']}\";\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'kodeKelompok' ] = \"{$arg['kelompok']}\";\n\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'jml' ] += 1;\n }\n\n\n $result = array_intersect ($data_awal, $data_akhir);\n//memasukan nilai selisih\n $data_gabungan = array();\n foreach ($result as $key => $value) {\n $tipe = $key;\n $selisih_nilai = $data_akhir[ $tipe ][ 'nilai' ] - $data_awal[ $tipe ][ 'nilai' ];\n $selisih_jml = $data_akhir[ $tipe ][ 'jml' ] - $data_awal[ $tipe ][ 'jml' ];\n $selisih_ap = $data_akhir[ $tipe ][ 'AP' ] - $data_awal[ $tipe ][ 'AP' ];\n $selisih_pp = $data_akhir[ $tipe ][ 'PP' ] - $data_awal[ $tipe ][ 'PP' ];\n $selisih_nb = $data_akhir[ $tipe ][ 'NB' ] - $data_awal[ $tipe ][ 'NB' ];\n\n\n $selisih_nilai_tambah = 0;\n $selisih_nilai_kurang = 0;\n $selisih_jml_tambah = 0;\n $selisih_jml_kurang = 0;\n $selisih_ap_tambah = 0;\n $selisih_ap_kurang = 0;\n $selisih_nb_tambah = 0;\n $selisih_nb_kurang = 0;\n $bp = 0;\n\n /*$selisih_pp_tambah=0;\n $selisih_pp_kurang=0;*/\n if($data_akhir[ $tipe ][ kodeSatker ] == \"\") {\n $data_selisih = $data_awal;\n $selisih_nilai_tambah = 0;\n $selisih_nilai_kurang = $data_awal[ $tipe ][ 'nilai' ];\n $selisih_jml_tambah = 0;\n $selisih_jml_kurang = 1;\n $selisih_ap_tambah = 0;\n $selisih_ap_kurang = $data_awal[ $tipe ][ 'AP' ];\n $selisih_nb_tambah = 0;\n $selisih_nb_kurang = $data_awal[ $tipe ][ 'NB' ];\n $bp = 0;\n\n } else {\n $data_selisih = $data_akhir;\n $kodesatker = $data_selisih[ $tipe ][ kodeSatker ];\n $aset_id = $data_selisih[ $tipe ][ Aset_ID ];\n $kodeKelompok = $data_selisih[ $tipe ][ 'kodeKelompok' ];\n $tglperolehan = $tgl_akhir;\n\n $tglpembukuan = $data_selisih[ $tipe ][ 'TglPembukuan' ];\n list($bp, $selisih_nilai_tambah, $selisih_nilai_kurang, $selisih_ap_tambah, $selisih_ap_kurang) =\n history_aset ($kodesatker, $aset_id, $tglperolehan, $tgl_awal, $tglpembukuan, $kodeKelompok);\n }\n\n\n /*if($selisih_nilai<0)\n $selisih_nilai_kurang=abs($selisih_nilai);\n else $selisih_nilai_tambah=$selisih_nilai;*/\n\n if($selisih_jml < 0)\n $selisih_jml_kurang = abs ($selisih_jml);\n else $selisih_jml_tambah = $selisih_jml;\n\n\n /* if($data_akhir[$tipe]['nilai']!=0 && $data_awal[$tipe]['nilai']!=0 && $selisih_nilai!=0){\n if($selisih_ap<0)\n $selisih_ap_kurang=abs($selisih_ap);\n else $selisih_ap_tambah=$selisih_ap;\n }\n\n if($data_akhir[$tipe]['AP']==\"\"||$data_akhir[$tipe]['AP']==0)\n $selisih_ap_kurang=abs($selisih_ap);\n else if($data_awal[$tipe]['AP']==\"\"||$data_awal[$tipe]['AP']==0)\n $selisih_ap_tambah=$selisih_ap;\n\n $data_gabungan[$tipe]['bp']=$selisih_ap-$selisih_ap_tambah+$selisih_ap_kurang;\n\n if($selisih_nb<0)\n $selisih_nb_kurang=abs($selisih_nb);\n else\n $selisih_nb_tambah=$selisih_nb;\n\n if($selisih_pp<0)\n $selisih_pp_kurang=$selisih_pp;\n else\n $selisih_pp_tambah=$selisih_pp;*/\n\n $data_gabungan[ $tipe ][ 'Kelompok' ] = $tipe;\n $data_gabungan[ $tipe ][ 'Uraian' ] = $data_awal[ $tipe ][ 'Uraian' ];\n $data_gabungan[ $tipe ][ 'nilai' ] = $data_awal[ $tipe ][ 'nilai' ];\n $data_gabungan[ $tipe ][ 'jml' ] = $data_awal[ $tipe ][ 'jml' ];\n $data_gabungan[ $tipe ][ 'ap' ] = $data_awal[ $tipe ][ 'AP' ];\n $data_gabungan[ $tipe ][ 'pp' ] = $data_awal[ $tipe ][ 'PP' ];\n $data_gabungan[ $tipe ][ 'nb' ] = $data_awal[ $tipe ][ 'NB' ];\n\n $data_gabungan[ $tipe ][ 'mutasi_jml_tambah' ] = $selisih_jml_tambah;\n $data_gabungan[ $tipe ][ 'mutasi_jml_kurang' ] = $selisih_jml_kurang;\n\n $data_gabungan[ $tipe ][ 'mutasi_ap_tambah' ] = $selisih_ap_tambah;\n $data_gabungan[ $tipe ][ 'mutasi_ap_kurang' ] = $selisih_ap_kurang;\n\n /* $data_gabungan[$tipe]['mutasi_pp_tambah']=$selisih_pp_tambah;\n $data_gabungan[$tipe]['mutasi_pp_kurang']=$selisih_pp_kurang;*/\n\n $data_gabungan[ $tipe ][ 'mutasi_nb_tambah' ] = $selisih_nb_tambah;\n $data_gabungan[ $tipe ][ 'mutasi_nb_kurang' ] = $selisih_nb_kurang;\n\n $data_gabungan[ $tipe ][ 'bp' ] = $bp;\n\n\n $data_gabungan[ $tipe ][ 'mutasi_nilai_tambah' ] = $selisih_nilai_tambah;\n $data_gabungan[ $tipe ][ 'mutasi_nilai_kurang' ] = $selisih_nilai_kurang;\n\n $data_gabungan[ $tipe ][ 'nilai_akhir' ] = $data_akhir[ $tipe ][ 'nilai' ];\n $data_gabungan[ $tipe ][ 'jml_akhir' ] = $data_akhir[ $tipe ][ 'jml' ];\n $data_gabungan[ $tipe ][ 'ap_akhir' ] = $data_akhir[ $tipe ][ 'AP' ];\n $data_gabungan[ $tipe ][ 'pp_akhir' ] = $data_akhir[ $tipe ][ 'PP' ];\n $data_gabungan[ $tipe ][ 'nb_akhir' ] = $data_akhir[ $tipe ][ 'NB' ];\n\n\n }\n//echo \"array gabungan:<br/><pre>\";\n//print_r($result);\n\n//hitung yang tidak masuk dalam intersection\n $data_awal_alone = array_diff_assoc ($data_awal, $data_gabungan);\n//echo \"array awal sendiri:<br/><pre>\";\n//print_r($data_awal_alone);\n\n $data_awal = array();\n foreach ($data_awal_alone as $tipe => $value) {\n $data_awal[ $tipe ][ 'Kelompok' ] = $tipe;\n $data_awal[ $tipe ][ 'Uraian' ] = $value[ 'Uraian' ];\n $data_awal[ $tipe ][ 'nilai' ] = $value[ 'nilai' ];\n $data_awal[ $tipe ][ 'jml' ] = $value[ 'jml' ];\n $data_awal[ $tipe ][ 'ap' ] = $value[ 'AP' ];\n $data_awal[ $tipe ][ 'pp' ] = $value[ 'PP' ];\n $data_awal[ $tipe ][ 'nb' ] = $value[ 'NB' ];\n $data_awal[ $tipe ][ 'mutasi_nilai_tambah' ] = 0;\n $data_awal[ $tipe ][ 'mutasi_jml_tambah' ] = 0;\n $data_awal[ $tipe ][ 'mutasi_ap_tambah' ] = 0;\n $data_awal[ $tipe ][ 'mutasi_pp_tambah' ] = 0;\n $data_awal[ $tipe ][ 'mutasi_nb_tambah' ] = 0;\n /*\n $data_awal[$tipe]['mutasi_nilai_kurang']=0;\n $data_awal[$tipe]['mutasi_jml_kurang']=0;\n $data_awal[$tipe]['mutasi_ap_kurang']=0;\n $data_awal[$tipe]['mutasi_pp_kurang']=0;\n $data_awal[$tipe]['mutasi_nb_kurang']=0;\n\n $data_awal[$tipe]['nilai_akhir']=$value['nilai'];\n $data_awal[$tipe]['jml_akhir']=$value['jml'];\n $data_awal[$tipe]['ap_akhir']=$value['AP'];\n $data_awal[$tipe]['pp_akhir']=$value['PP'];\n $data_awal[$tipe]['nb_akhir']=$value['NB'];*/\n\n $data_awal[ $tipe ][ 'mutasi_nilai_kurang' ] = $value[ 'nilai' ];\n $data_awal[ $tipe ][ 'mutasi_jml_kurang' ] = $value[ 'jml' ];\n $data_awal[ $tipe ][ 'mutasi_ap_kurang' ] = $value[ 'AP' ];\n $data_awal[ $tipe ][ 'mutasi_pp_kurang' ] = $value[ 'PP' ];\n $data_awal[ $tipe ][ 'mutasi_nb_kurang' ] = $value[ 'NB' ];\n\n $data_awal[ $tipe ][ 'bp' ] = 0;\n\n $data_awal[ $tipe ][ 'nilai_akhir' ] = 0;\n $data_awal[ $tipe ][ 'jml_akhir' ] = 0;\n $data_awal[ $tipe ][ 'ap_akhir' ] = 0;\n $data_awal[ $tipe ][ 'pp_akhir' ] = 0;\n $data_awal[ $tipe ][ 'nb_akhir' ] = 0;\n\n\n }\n\n\n $data_akhir_alone = array_diff_assoc ($data_akhir, $data_gabungan);\n//echo \"array akhir sendiri:<br/><pre>\";\n//print_r($data_akhir_alone);\n\n $data_akhir = array();\n foreach ($data_akhir_alone as $tipe => $value) {\n\n $Aset_ID = $value[ 'Aset_ID' ];\n $TahunPenyusutan = $value[ 'TahunPenyusutan' ];\n $kelompok = $value[ 'Kelompok' ];\n $Tahun = $value[ 'Tahun' ];\n /*$akumulasi_sblm=get_akumulasi_sblm($Aset_ID, $TahunPenyusutan, $kelompok);\n\n if($Tahun==$TahunPenyusutan){\n //pengadaan di tahun berjalan\n $akumulasi_sblm=0;\n $bp=$value['AP'];\n }\n else{\n //transfer dari tempat lain\n if($akumulasi_sblm==0){\n //barang inventarisasi\n $bp=$value['AP'];\n $akumulasi_sblm=0;\n }\n $bp=$value['AP']-$akumulasi_sblm;\n //bila tidak penyusutan lagi\n if($bp==$value['AP'])\n {\n $bp=0;\n $akumulasi_sblm=$value['AP'];\n }\n }*/\n\n $data_akhir[ $tipe ][ 'Kelompok' ] = $tipe;\n $data_akhir[ $tipe ][ 'Uraian' ] = $value[ 'Uraian' ];\n\n $data_akhir[ $tipe ][ 'nilai' ] = 0;\n $data_akhir[ $tipe ][ 'jml' ] = 0;\n $data_akhir[ $tipe ][ 'ap' ] = 0;\n $data_akhir[ $tipe ][ 'pp' ] = 0;\n $data_akhir[ $tipe ][ 'nb' ] = 0;\n\n $selisih_nilai_tambah = 0;\n $selisih_nilai_kurang = 0;\n $selisih_jml_tambah = 0;\n $selisih_jml_kurang = 0;\n $selisih_ap_tambah = 0;\n $selisih_ap_kurang = 0;\n $selisih_nb_tambah = 0;\n $selisih_nb_kurang = 0;\n $bp = 0;\n\n /*$selisih_pp_tambah=0;\n $selisih_pp_kurang=0;*/\n\n $kodesatker = $value[ 'kodeSatker' ];\n $aset_id = $value[ 'Aset_ID' ];\n $kodekelompok = $value[ 'kodeKelompok' ];\n $tglperolehan = $tgl_akhir;\n $tglpembukuan = $value[ 'TglPembukuan' ];\n /* echo \"<pre>\";\n print_r($data_akhir);\n print_r($value);\n echo \"Aset=$tglperolehan==$tipe==$Aset_ID==$tglpembukuan==$kodekelompok<br/>\";\n // exit();*/\n list($bp, $selisih_nilai_tambah, $selisih_nilai_kurang, $selisih_ap_tambah, $selisih_ap_kurang) =\n history_aset ($kodesatker, $Aset_ID, $tglperolehan, $tgl_awal, $tglpembukuan, $kodekelompok);\n if($bp == 0) {\n $selisih_jml_tambah = $value[ 'jml' ];\n $selisih_ap_tambah = $value[ 'AP' ];\n $selisih_nilai_tambah = $value[ 'nilai' ];\n }\n\n /* $data_akhir[$tipe]['mutasi_jml_tambah']=$value['jml'];\n $data_akhir[$tipe]['mutasi_nilai_tambah']=$value['nilai'];\n $data_akhir[$tipe]['mutasi_ap_tambah']=$akumulasi_sblm;//$value['AP'];\n $data_akhir[$tipe]['mutasi_pp_tambah']=$value['PP'];\n $data_akhir[$tipe]['mutasi_nb_tambah']=$value['NB'];\n\n $data_akhir[$tipe]['mutasi_nilai_kurang']=0;\n $data_akhir[$tipe]['mutasi_jml_kurang']=0;\n $data_akhir[$tipe]['mutasi_ap_kurang']=0;\n $data_akhir[$tipe]['mutasi_pp_kurang']=0;\n $data_akhir[$tipe]['mutasi_nb_kurang']=0;\n\n $data_akhir[$tipe]['bp']=$bp;//$value['AP'];*/\n $data_akhir[ $tipe ][ 'mutasi_jml_tambah' ] = $selisih_jml_tambah;\n $data_akhir[ $tipe ][ 'mutasi_jml_kurang' ] = $selisih_jml_kurang;\n\n $data_akhir[ $tipe ][ 'mutasi_ap_tambah' ] = $selisih_ap_tambah;\n $data_akhir[ $tipe ][ 'mutasi_ap_kurang' ] = $selisih_ap_kurang;\n\n /* $data_gabungan[$tipe]['mutasi_pp_tambah']=$selisih_pp_tambah;\n $data_gabungan[$tipe]['mutasi_pp_kurang']=$selisih_pp_kurang;*/\n\n $data_akhir[ $tipe ][ 'mutasi_nilai_tambah' ] = $selisih_nilai_tambah;\n $data_akhir[ $tipe ][ 'mutasi_nilai_kurang' ] = 0;\n\n $data_akhir[ $tipe ][ 'mutasi_nb_tambah' ] = $selisih_nb_tambah;\n $data_akhir[ $tipe ][ 'mutasi_nb_kurang' ] = $selisih_nb_kurang;\n\n $data_akhir[ $tipe ][ 'bp' ] = $bp;\n\n $data_akhir[ $tipe ][ 'nilai_akhir' ] = $value[ 'nilai' ];\n $data_akhir[ $tipe ][ 'jml_akhir' ] = $value[ 'jml' ];\n $data_akhir[ $tipe ][ 'ap_akhir' ] = $value[ 'AP' ];\n $data_akhir[ $tipe ][ 'pp_akhir' ] = $value[ 'PP' ];\n $data_akhir[ $tipe ][ 'nb_akhir' ] = $value[ 'NB' ];\n\n\n }\n\n $data_hapus = array();\n foreach ($data_hapus_tmp as $tipe => $value) {\n $data_hapus[ $tipe ][ 'Kelompok' ] = $tipe;\n $data_hapus[ $tipe ][ 'Uraian' ] = $value[ 'Uraian' ];\n\n $data_hapus[ $tipe ][ 'nilai' ] = 0;\n $data_hapus[ $tipe ][ 'jml' ] = 0;\n $data_hapus[ $tipe ][ 'ap' ] = 0;\n $data_hapus[ $tipe ][ 'pp' ] = 0;\n $data_hapus[ $tipe ][ 'nb' ] = 0;\n $data_hapus[ $tipe ][ 'mutasi_jml_tambah' ] = $value[ 'jml' ];\n $data_hapus[ $tipe ][ 'mutasi_nilai_tambah' ] = $value[ 'nilai' ];\n $data_hapus[ $tipe ][ 'mutasi_ap_tambah' ] = $value[ 'AP' ];\n $data_hapus[ $tipe ][ 'mutasi_pp_tambah' ] = $value[ 'PP' ];\n $data_hapus[ $tipe ][ 'mutasi_nb_tambah' ] = $value[ 'NB' ];\n\n $data_hapus[ $tipe ][ 'mutasi_jml_kurang' ] = $value[ 'jml' ];\n $data_hapus[ $tipe ][ 'mutasi_nilai_kurang' ] = $value[ 'nilai' ];\n $data_hapus[ $tipe ][ 'mutasi_ap_kurang' ] = $value[ 'AP' ];\n $data_hapus[ $tipe ][ 'mutasi_pp_kurang' ] = $value[ 'PP' ];\n $data_hapus[ $tipe ][ 'mutasi_nb_kurang' ] = $value[ 'NB' ];\n\n $data_hapus[ $tipe ][ 'bp' ] = 0;//$value['AP'];\n\n $data_hapus[ $tipe ][ 'nilai_akhir' ] = 0;\n $data_hapus[ $tipe ][ 'jml_akhir' ] = 0;\n $data_hapus[ $tipe ][ 'ap_akhir' ] = 0;\n $data_hapus[ $tipe ][ 'pp_akhir' ] = 0;\n $data_hapus[ $tipe ][ 'nb_akhir' ] = 0;\n\n\n }\n\n\n /*echo \"array akhir:<br/><pre>\";\n print_r($data_akhir);//data-sub-sub\n exit;*/\n $data_gabungan = array_merge ($data_awal, $data_gabungan, $data_akhir, $data_hapus);\n\n//echo \"array gabungan:<br/><pre>\";\n//print_r($data_gabungan);//data-sub-sub\n//\n $data_level5 = array();\n foreach ($data_gabungan as $key => $value) {\n $tmp = explode (\".\", $key);\n $key_baru = \"{$tmp[0]}.{$tmp[1]}.{$tmp[2]}.{$tmp[3]}.{$tmp[4]}\";\n $URAIAN = get_uraian ($key_baru, 5);\n\n $data_level5[ $key_baru ][ 'Uraian' ] = $URAIAN;\n $data_level5[ $key_baru ][ 'Kelompok' ] = $key_baru;\n $data_level5[ $key_baru ][ 'nilai' ] += round($data_gabungan[ $key ][ 'nilai' ],2);\n $data_level5[ $key_baru ][ 'jml' ] += round($data_gabungan[ $key ][ 'jml' ],2);\n $data_level5[ $key_baru ][ 'ap' ] += round($data_gabungan[ $key ][ 'ap' ],2);\n $data_level5[ $key_baru ][ 'pp' ] += round($data_gabungan[ $key ][ 'pp' ],2);\n $data_level5[ $key_baru ][ 'nb' ] += round($data_gabungan[ $key ][ 'nb' ],2);\n $data_level5[ $key_baru ][ 'mutasi_jml_tambah' ] += $data_gabungan[ $key ][ 'mutasi_jml_tambah' ];\n $data_level5[ $key_baru ][ 'mutasi_nilai_tambah' ] += $data_gabungan[ $key ][ 'mutasi_nilai_tambah' ];\n $data_level5[ $key_baru ][ 'mutasi_ap_tambah' ] += $data_gabungan[ $key ][ 'mutasi_ap_tambah' ];\n $data_level5[ $key_baru ][ 'mutasi_pp_tambah' ] += $data_gabungan[ $key ][ 'mutasi_pp_tambah' ];\n $data_level5[ $key_baru ][ 'mutasi_nb_tambah' ] += $data_gabungan[ $key ][ 'mutasi_nb_tambah' ];\n\n $data_level5[ $key_baru ][ 'bp' ] += $data_gabungan[ $key ][ 'bp' ];\n\n $data_level5[ $key_baru ][ 'mutasi_jml_kurang' ] += $data_gabungan[ $key ][ 'mutasi_jml_kurang' ];\n $data_level5[ $key_baru ][ 'mutasi_nilai_kurang' ] += $data_gabungan[ $key ][ 'mutasi_nilai_kurang' ];\n $data_level5[ $key_baru ][ 'mutasi_ap_kurang' ] += $data_gabungan[ $key ][ 'mutasi_ap_kurang' ];\n $data_level5[ $key_baru ][ 'mutasi_pp_kurang' ] += $data_gabungan[ $key ][ 'mutasi_pp_kurang' ];\n $data_level5[ $key_baru ][ 'mutasi_nb_kurang' ] += $data_gabungan[ $key ][ 'mutasi_nb_kurang' ];\n\n $data_level5[ $key_baru ][ 'nilai_akhir' ] += round($data_gabungan[ $key ][ 'nilai_akhir' ],2);\n $data_level5[ $key_baru ][ 'jml_akhir' ] += round($data_gabungan[ $key ][ 'jml_akhir' ],2);\n $data_level5[ $key_baru ][ 'ap_akhir' ] += round($data_gabungan[ $key ][ 'ap_akhir' ],2);\n $data_level5[ $key_baru ][ 'pp_akhir' ] += round($data_gabungan[ $key ][ 'pp_akhir' ],2);\n $data_level5[ $key_baru ][ 'nb_akhir' ] += round($data_gabungan[ $key ][ 'nb_akhir' ],2);\n\n\n }\n //$data_level5 = $data_gabungan;\n $data_level4 = array();\n//Buat array gabungan --> level 4\n foreach ($data_level5 as $key => $value) {\n $tmp = explode (\".\", $key);\n $key_baru = \"{$tmp[0]}.{$tmp[1]}.{$tmp[2]}.{$tmp[3]}\";\n $URAIAN = get_uraian ($key_baru, 4);\n\n $data_level4[ $key_baru ][ 'Uraian' ] = $URAIAN;\n $data_level4[ $key_baru ][ 'Kelompok' ] = $key_baru;\n $data_level4[ $key_baru ][ 'nilai' ] += $data_level5[ $key ][ 'nilai' ];\n $data_level4[ $key_baru ][ 'jml' ] += $data_level5[ $key ][ 'jml' ];\n $data_level4[ $key_baru ][ 'ap' ] += $data_level5[ $key ][ 'ap' ];\n $data_level4[ $key_baru ][ 'pp' ] += $data_level5[ $key ][ 'pp' ];\n $data_level4[ $key_baru ][ 'nb' ] += $data_level5[ $key ][ 'nb' ];\n $data_level4[ $key_baru ][ 'mutasi_jml_tambah' ] += $data_level5[ $key ][ 'mutasi_jml_tambah' ];\n $data_level4[ $key_baru ][ 'mutasi_nilai_tambah' ] += $data_level5[ $key ][ 'mutasi_nilai_tambah' ];\n $data_level4[ $key_baru ][ 'mutasi_ap_tambah' ] += $data_level5[ $key ][ 'mutasi_ap_tambah' ];\n $data_level4[ $key_baru ][ 'mutasi_pp_tambah' ] += $data_level5[ $key ][ 'mutasi_pp_tambah' ];\n $data_level4[ $key_baru ][ 'mutasi_nb_tambah' ] += $data_level5[ $key ][ 'mutasi_nb_tambah' ];\n\n $data_level4[ $key_baru ][ 'bp' ] += $data_level5[ $key ][ 'bp' ];\n\n $data_level4[ $key_baru ][ 'mutasi_jml_kurang' ] += $data_level5[ $key ][ 'mutasi_jml_kurang' ];\n $data_level4[ $key_baru ][ 'mutasi_nilai_kurang' ] += $data_level5[ $key ][ 'mutasi_nilai_kurang' ];\n $data_level4[ $key_baru ][ 'mutasi_ap_kurang' ] += $data_level5[ $key ][ 'mutasi_ap_kurang' ];\n $data_level4[ $key_baru ][ 'mutasi_pp_kurang' ] += $data_level5[ $key ][ 'mutasi_pp_kurang' ];\n $data_level4[ $key_baru ][ 'mutasi_nb_kurang' ] += $data_level5[ $key ][ 'mutasi_nb_kurang' ];\n\n $data_level4[ $key_baru ][ 'nilai_akhir' ] += $data_level5[ $key ][ 'nilai_akhir' ];\n $data_level4[ $key_baru ][ 'jml_akhir' ] += $data_level5[ $key ][ 'jml_akhir' ];\n $data_level4[ $key_baru ][ 'ap_akhir' ] += $data_level5[ $key ][ 'ap_akhir' ];\n $data_level4[ $key_baru ][ 'pp_akhir' ] += $data_level5[ $key ][ 'pp_akhir' ];\n $data_level4[ $key_baru ][ 'nb_akhir' ] += $data_level5[ $key ][ 'nb_akhir' ];\n $data_level4[ $key_baru ][ 'SubSub' ][ $key ] = $data_level5[ $key ];\n\n }\n\n//echo \"array level 4:<br/><pre>\";\n//print_r($data_level4);//data-sub\n\n\n $data_level3 = array();\n//Buat array gabungan --> level 3\n foreach ($data_level4 as $key => $value) {\n $tmp = explode (\".\", $key);\n $key_baru = \"{$tmp[0]}.{$tmp[1]}.{$tmp[2]}\";\n $URAIAN = get_uraian ($key_baru, 3);\n\n $data_level3[ $key_baru ][ 'Uraian' ] = $URAIAN;\n $data_level3[ $key_baru ][ 'Kelompok' ] = $key_baru;\n $data_level3[ $key_baru ][ 'nilai' ] += $data_level4[ $key ][ 'nilai' ];\n $data_level3[ $key_baru ][ 'jml' ] += $data_level4[ $key ][ 'jml' ];\n $data_level3[ $key_baru ][ 'ap' ] += $data_level4[ $key ][ 'ap' ];\n $data_level3[ $key_baru ][ 'pp' ] += $data_level4[ $key ][ 'pp' ];\n $data_level3[ $key_baru ][ 'nb' ] += $data_level4[ $key ][ 'nb' ];\n\n $data_level3[ $key_baru ][ 'mutasi_jml_tambah' ] += $data_level4[ $key ][ 'mutasi_jml_tambah' ];\n $data_level3[ $key_baru ][ 'mutasi_nilai_tambah' ] += $data_level4[ $key ][ 'mutasi_nilai_tambah' ];\n $data_level3[ $key_baru ][ 'mutasi_ap_tambah' ] += $data_level4[ $key ][ 'mutasi_ap_tambah' ];\n $data_level3[ $key_baru ][ 'mutasi_pp_tambah' ] += $data_level4[ $key ][ 'mutasi_pp_tambah' ];\n $data_level3[ $key_baru ][ 'mutasi_nb_tambah' ] += $data_level4[ $key ][ 'mutasi_nb_tambah' ];\n\n $data_level3[ $key_baru ][ 'bp' ] += $data_level4[ $key ][ 'bp' ];\n\n $data_level3[ $key_baru ][ 'mutasi_jml_kurang' ] += $data_level4[ $key ][ 'mutasi_jml_kurang' ];\n $data_level3[ $key_baru ][ 'mutasi_nilai_kurang' ] += $data_level4[ $key ][ 'mutasi_nilai_kurang' ];\n $data_level3[ $key_baru ][ 'mutasi_ap_kurang' ] += $data_level4[ $key ][ 'mutasi_ap_kurang' ];\n $data_level3[ $key_baru ][ 'mutasi_pp_kurang' ] += $data_level4[ $key ][ 'mutasi_pp_kurang' ];\n $data_level3[ $key_baru ][ 'mutasi_nb_kurang' ] += $data_level4[ $key ][ 'mutasi_nb_kurang' ];\n\n\n $data_level3[ $key_baru ][ 'nilai_akhir' ] += $data_level4[ $key ][ 'nilai_akhir' ];\n $data_level3[ $key_baru ][ 'jml_akhir' ] += $data_level4[ $key ][ 'jml_akhir' ];\n $data_level3[ $key_baru ][ 'ap_akhir' ] += $data_level4[ $key ][ 'ap_akhir' ];\n $data_level3[ $key_baru ][ 'pp_akhir' ] += $data_level4[ $key ][ 'pp_akhir' ];\n $data_level3[ $key_baru ][ 'nb_akhir' ] += $data_level4[ $key ][ 'nb_akhir' ];\n $data_level3[ $key_baru ][ 'Sub' ][ $key ] = $data_level4[ $key ];\n\n }\n\n//echo \"array level 3:<br/><pre>\";\n//print_r($data_level3);//data-sub-sub\n\n\n $data_level2 = array();\n//Buat array gabungan --> level 2\n foreach ($data_level3 as $key => $value) {\n $tmp = explode (\".\", $key);\n $key_baru = \"{$tmp[0]}.{$tmp[1]}\";\n $URAIAN = get_uraian ($key_baru, 2);\n\n $data_level2[ $key_baru ][ 'Uraian' ] = $URAIAN;\n $data_level2[ $key_baru ][ 'Kelompok' ] = $key_baru;\n $data_level2[ $key_baru ][ 'nilai' ] += $data_level3[ $key ][ 'nilai' ];\n $data_level2[ $key_baru ][ 'jml' ] += $data_level3[ $key ][ 'jml' ];\n $data_level2[ $key_baru ][ 'ap' ] += $data_level3[ $key ][ 'ap' ];\n $data_level2[ $key_baru ][ 'pp' ] += $data_level3[ $key ][ 'pp' ];\n $data_level2[ $key_baru ][ 'nb' ] += $data_level3[ $key ][ 'nb' ];\n\n $data_level2[ $key_baru ][ 'mutasi_jml_tambah' ] += $data_level3[ $key ][ 'mutasi_jml_tambah' ];\n $data_level2[ $key_baru ][ 'mutasi_nilai_tambah' ] += $data_level3[ $key ][ 'mutasi_nilai_tambah' ];\n $data_level2[ $key_baru ][ 'mutasi_ap_tambah' ] += $data_level3[ $key ][ 'mutasi_ap_tambah' ];\n $data_level2[ $key_baru ][ 'mutasi_pp_tambah' ] += $data_level3[ $key ][ 'mutasi_pp_tambah' ];\n $data_level2[ $key_baru ][ 'mutasi_nb_tambah' ] += $data_level3[ $key ][ 'mutasi_nb_tambah' ];\n\n $data_level2[ $key_baru ][ 'bp' ] += $data_level3[ $key ][ 'bp' ];\n\n $data_level2[ $key_baru ][ 'mutasi_jml_kurang' ] += $data_level3[ $key ][ 'mutasi_jml_kurang' ];\n $data_level2[ $key_baru ][ 'mutasi_nilai_kurang' ] += $data_level3[ $key ][ 'mutasi_nilai_kurang' ];\n $data_level2[ $key_baru ][ 'mutasi_ap_kurang' ] += $data_level3[ $key ][ 'mutasi_ap_kurang' ];\n $data_level2[ $key_baru ][ 'mutasi_pp_kurang' ] += $data_level3[ $key ][ 'mutasi_pp_kurang' ];\n $data_level2[ $key_baru ][ 'mutasi_nb_kurang' ] += $data_level3[ $key ][ 'mutasi_nb_kurang' ];\n\n $data_level2[ $key_baru ][ 'nilai_akhir' ] += $data_level3[ $key ][ 'nilai_akhir' ];\n $data_level2[ $key_baru ][ 'jml_akhir' ] += $data_level3[ $key ][ 'jml_akhir' ];\n $data_level2[ $key_baru ][ 'ap_akhir' ] += $data_level3[ $key ][ 'ap_akhir' ];\n $data_level2[ $key_baru ][ 'pp_akhir' ] += $data_level3[ $key ][ 'pp_akhir' ];\n $data_level2[ $key_baru ][ 'nb_akhir' ] += $data_level3[ $key ][ 'nb_akhir' ];\n $data_level2[ $key_baru ][ 'Kel' ][ $key ] = $data_level3[ $key ];\n // echo \"<pre>\";print_r($data_level3[$key]);\n }\n\n//echo \"array level 2:<br/><pre>\";\n//print_r($data_level2);//data-sub-sub\n\n\n $data_level = array();\n//Buat array gabungan --> level 1\n foreach ($data_level2 as $key => $value) {\n $tmp = explode (\".\", $key);\n $key_baru = \"{$tmp[0]}\";\n $URAIAN = get_uraian ($key_baru, 1);\n\n $data_level[ $key_baru ][ 'Uraian' ] = $URAIAN;\n $data_level[ $key_baru ][ 'Kelompok' ] = $key_baru;\n $data_level[ $key_baru ][ 'nilai' ] += $data_level2[ $key ][ 'nilai' ];\n $data_level[ $key_baru ][ 'jml' ] += $data_level2[ $key ][ 'jml' ];\n $data_level[ $key_baru ][ 'ap' ] += $data_level2[ $key ][ 'ap' ];\n $data_level[ $key_baru ][ 'pp' ] += $data_level2[ $key ][ 'pp' ];\n $data_level[ $key_baru ][ 'nb' ] += $data_level2[ $key ][ 'nb' ];\n\n $data_level[ $key_baru ][ 'mutasi_jml_tambah' ] += $data_level2[ $key ][ 'mutasi_jml_tambah' ];\n $data_level[ $key_baru ][ 'mutasi_nilai_tambah' ] += $data_level2[ $key ][ 'mutasi_nilai_tambah' ];\n $data_level[ $key_baru ][ 'mutasi_ap_tambah' ] += $data_level2[ $key ][ 'mutasi_ap_tambah' ];\n $data_level[ $key_baru ][ 'mutasi_pp_tambah' ] += $data_level2[ $key ][ 'mutasi_pp_tambah' ];\n $data_level[ $key_baru ][ 'mutasi_nb_tambah' ] += $data_level2[ $key ][ 'mutasi_nb_tambah' ];\n\n $data_level[ $key_baru ][ 'bp' ] += $data_level2[ $key ][ 'bp' ];\n\n $data_level[ $key_baru ][ 'mutasi_jml_kurang' ] += $data_level2[ $key ][ 'mutasi_jml_kurang' ];\n $data_level[ $key_baru ][ 'mutasi_nilai_kurang' ] += $data_level2[ $key ][ 'mutasi_nilai_kurang' ];\n $data_level[ $key_baru ][ 'mutasi_ap_kurang' ] += $data_level2[ $key ][ 'mutasi_ap_kurang' ];\n $data_level[ $key_baru ][ 'mutasi_pp_kurang' ] += $data_level2[ $key ][ 'mutasi_pp_kurang' ];\n $data_level[ $key_baru ][ 'mutasi_nb_kurang' ] += $data_level2[ $key ][ 'mutasi_nb_kurang' ];\n\n $data_level[ $key_baru ][ 'nilai_akhir' ] += $data_level2[ $key ][ 'nilai_akhir' ];\n $data_level[ $key_baru ][ 'jml_akhir' ] += $data_level2[ $key ][ 'jml_akhir' ];\n $data_level[ $key_baru ][ 'ap_akhir' ] += $data_level2[ $key ][ 'ap_akhir' ];\n $data_level[ $key_baru ][ 'pp_akhir' ] += $data_level2[ $key ][ 'pp_akhir' ];\n $data_level[ $key_baru ][ 'nb_akhir' ] += $data_level2[ $key ][ 'nb_akhir' ];\n $data_level[ $key_baru ][ 'Bidang' ][ $key ] = $data_level2[ $key ];\n\n }\n\n//echo \"array level :<br/><pre>\";\n//print_r($data_level);//data-sub-sub\n\n return $data_level;\n}", "function perolehan_medali($arr){\n // Kode kamu di sini\n}", "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halkategoriberita'])){\n\t$posisi=0;\n\t$_GET['halkategoriberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halkategoriberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function ToonFormulierAfspraak()\n{\n\n}", "function mutasi($nomor_rekening) {\n global $conn; //memanggil koneksi di global\n //melakukan select pada transaksi yang nomor tujuan atau rekening asal adalah rekening bersangkutan\n //kemudian di joun dengan jenis transaksi sebagai keterangannya\n $q = $conn->prepare(\"SELECT * FROM transaksi t JOIN jenis_transaksi j ON j.id=t.jenis_transaksi WHERE t.rekening_asal='$nomor_rekening' or t.rekening_tujuan='$nomor_rekening' ORDER BY t.waktu\");\n $q->execute();\n return @$q->fetchAll(); //direturn array nya, akan bernilai false jika tidak ada data\n}", "public function cetak_dokumen(){\n\t\t$data['ambil_profil_usp']=$this->Tu_model->Select_satu('tbl_profil_usp', 'aktif', 'Ya');\n $id_pemanfaat = base64_decode($this->uri->segment(3));\n $id_pinjaman = base64_decode($this->uri->segment(4));\n $data['id_pemanfaat'] = $id_pemanfaat;\n $data['id_pinjaman'] = $id_pinjaman;\n $data['aksi'] = 'Dokumen Pinjaman';\n $data['target_kembali'] = 'pinjaman/'.$this->uri->segment(3);\n $data['ambil_dokumen_pinjaman']=$this->Tu_model->Select_satu('tbl_dokumen','id_pinjaman',$id_pinjaman);\n $data['ambil_pemanfaat']=$this->Tu_model->Select_satu('tbl_pemanfaat','id_pemanfaat',$id_pemanfaat);\n $data['ambil_pinjaman']=$this->Tu_model->Select_satu('tbl_pinjaman','id_pinjaman',$id_pinjaman);\n $data['ambil_agunan']=$this->Tu_model->Select_satu('tbl_agunan','id_pinjaman',$id_pinjaman);\n $data['ambil_status_pembayaran']=$this->Tu_model->Select_query(\"select max(tanggal_pinjaman) as tanggal, id_pinjaman , status_pembayaran\n from tbl_pinjaman where id_pemanfaat='$id_pemanfaat'\");\n $data['ambil_kades']=$this->Tu_model->Select_satu('tbl_kades','status_kades',\"Aktif\");\n $data['ambil_bpd']=$this->Tu_model->Select_satu('tbl_bpd','status_bpd',\"Aktif\");\n $data['ambil_pendamping']=$this->Tu_model->Select_satu('tbl_pendamping_desa','status_pendamping_desa ',\"Aktif\");\n $data['ambilPengurus']=$this->Tu_model->Select_satu('tbl_pengurus','status_pengurus',\"Aktif\");\n $this->load->view('tu/pemeriksaan_kelengkapan', $data);\n\n }", "function cariPosisi($batas){\nif(empty($_GET['haldatasiswa'])){\n\t$posisi=0;\n\t$_GET['haldatasiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['haldatasiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "public function stok_barang($id_barang) {\n\t\t $jumlah_barang_masuk=0;\n\t\t $jumlah_barang_keluar=0;\n\t\t $sisa=0;\n\t\t $CI =& get_instance();\n $CI->load->model('M_barang');\n\n\n\t\t$masuk['barang_masuk']= $CI->M_barang->barang_masuk($id_barang);\n\t\t foreach($masuk['barang_masuk'] as $data){\n\t\t\t $jumlah_barang_masuk= $data->barang_masuk;\n\t\t }\n\n\t\t $masuk['barang_keluar']= $CI->M_barang->barang_keluar($id_barang);\n \t\t foreach($masuk['barang_keluar'] as $data){\n \t\t\t $jumlah_barang_keluar= $data->barang_keluar;\n \t\t }\n\t\t return $sisa=$jumlah_barang_masuk - $jumlah_barang_keluar;\n\t\t// echo \"Masuk : $jumlah_barang_masuk <br> keluar : $jumlah_barang_keluar <br> sisa : $sisa\";\n\n\n\t }", "function cariPosisi($batas){\nif(empty($_GET['halhasilkelulusansiswa'])){\n\t$posisi=0;\n\t$_GET['halhasilkelulusansiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['halhasilkelulusansiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "function sawlihat($id)\n\t{\n\t\t//$a = 'A1';\n\t\t//foreach ($q2 as $key) {\n\t\t\t//echo \"<br/>\";\n\t\t\t//echo $key->nidn.\" = \".$a;\n\t\t\t//echo \"<br/>\";\n\t\t\t\n\t\t\t//echo \"Hasil Akhir = \".number_format($kumulatip,2);\n\t\t\t//echo \"<br/>\";\n\t\t\t//$a++;\n\t\t//}\n\t\t$data['tahun'] = $id;\n\t\t$data['q2'] = $this->db->query(\"SELECT DISTINCT nidn,nama_karyawan FROM tbl_jadwal_matakuliah a JOIN tbl_karyawan b on a.nidn = b.nik where tahunajaran = '\".$id.\"'\")->result();\n\t\t$data['page'] = 'penilaian/saw_lihat';\n\t\t$this->load->view('template', $data);\t\n\t}", "function text_arabic($sura,$aya,$text){\n\t\t$table_per_kata\t= get_table(\"SELECT * FROM terjemah_kata WHERE sura='$sura' \n\t\t\t\t\t\t\t\t\tAND aya='$aya'\");\n\t\t// inisialisasi\n\t\t$arr_terjemah = array();\n\t\tforeach($table_per_kata as $j => $row_per_kata){\n\t\t\t$m = $j+1;\n\t\t\t$arr_terjemah[$m] \t\t= $row_per_kata[indonesia]; \n\t\t\t$arr_arab_harokat[$m] \t= $row_per_kata[arab_harokat]; \n\t\t}\n\t\t\n\t\t// explode aya text into word\n\t\t$arr_kata_arab\t= explode(\" \",$text);\n\t\t\n\t\t//menampilkan tiap kata beserta terjemahnya\n\t\t/*echo \"\n\t\t<pre>\n\t\t$sura:$aya \";*/\n\t\t\n\t\t$m = 1;\n\t\tforeach($arr_kata_arab as $k => $kata_arab){\n\t\t\t$event_aya_word =\"\";\n\t\t\t//menampilkan terjemahan per kata\n\t\t\t//echo \"$kata_arab {$arr_arab[$m]}<br>\";\n\t\t\tif($kata_arab==$arr_arab_harokat[$m] ){\n\t\t\t\t$output .= \"\n\t\t\t\t<span id='terjemah_{$sura}_{$aya}_{$m}' \n\t\t\t\t\tstyle='visibility:hidden;position:absolute;width:0px;height:0px;' >\n\t\t\t\t\t{$arr_terjemah[$m]}\n\t\t\t\t</span>\n\t\t\t\t\";\n\t\t\t\t$event_aya_word =\"\n\t\t\t\tonmousemove='move_terjemah($sura,$aya,$m,event)' \n\t\t\t\tonmouseout='hide_terjemah($sura,$aya,$m)'\n\t\t\t\t\";\n\t\t\t\t\n\t\t\t\t$id_kata = \"kata_{$sura}_{$aya}_{$m}\";\n\t\t\t\t$m++;\n\t\t\t}\n\t\t\t//menampilkan kata arab\n\t\t\t$output .= \"\n\t\t\t<span \n\t\t\t\tid='$id_kata'\n\t\t\t\tclass='aya_word'\n\t\t\t\t$event_aya_word >\n\t\t\t\t\".repair_ar($kata_arab).\"\n\t\t\t</span>\n\t\t\t\";\n\t\t}\n\t\treturn $output;\n\t}", "function berinama($saya){\r\n\t\t\t$this->nama_saya = $saya;\r\n\t\t}", "public function Zapis_vsechny_kolize_v_zaveru_formulare ($pole, $idcka_skolizi, $iducast, $formular){\r\n //zapise kolize formulare \r\n self::Zapis_kolize_formulare($pole,$idcka_skolizi, $iducast, $formular);\r\n //-----------------------------------------------------------------------------\r\n \r\n \r\n //a zjisti a zapise kolize ucastnika pro vsechny formulare \r\n $vsechny_kolize_ucastnika_pole = self::Najdi_kolize_vsechny($iducast);\r\n //echo \"<br>**Vsechny kolize_pole v Zapis_vsechny_kolize..... **\";\r\n //var_dump($vsechny_kolize_ucastnika_pole);\r\n \r\n //znevalidneni vsech kolizi pro ucastnika \r\n self::Znevalidni_kolize_ucastnika_vsechny($iducast);\r\n foreach($vsechny_kolize_ucastnika_pole as $jedna_kolize){\r\n if ($jedna_kolize->kolize_nastala) {\r\n $jedna_kolize->Zapis_jednu_kolizi();\r\n } \r\n }\r\n \r\n}", "function HitungUlangBIPOTPMB($PMBID) {\r\n $pmb = GetFields('pmb', \"KodeID='\".KodeID.\"' and PMBID\", $PMBID, '*');\r\n // Hitung Total BIPOT & Pembayaran\r\n $TotalBiaya = GetaField(\"bipotmhsw bm\r\n left outer join bipot2 b2 on bm.BIPOT2ID = b2.BIPOT2ID\",\r\n \"bm.PMBMhswID = 0 and bm.KodeID = '\".KodeID.\"'\r\n and bm.NA = 'N'\r\n and bm.TahunID = '$pmb[PMBPeriodID]' and bm.PMBID\", $PMBID,\r\n \"sum(bm.TrxID * bm.Jumlah * bm.Besar)\")+0;\r\n $TotalBayar = GetaField('bayarmhsw',\r\n \"PMBMhswID = 0 and KodeID = '\".KodeID.\"'\r\n and NA = 'N'\r\n and TahunID = '$pmb[PMBPeriodID]' and PMBID\", $PMBID,\r\n \"sum(Jumlah)\")+0;\r\n // Update data PMB\r\n $s = \"update pmb\r\n set TotalBiaya = $TotalBiaya,\r\n TotalBayar = $TotalBayar\r\n where KodeID = '\".KodeID.\"'\r\n and PMBID = '$PMBID' \r\n limit 1\";\r\n $r = _query($s);\r\n //echo \"<pre>$s</pre>\";\r\n}", "public function pasaje_abonado();", "public function tambah_toko(){\n\t}", "public function get_pembeli_darat() {\r\n $nama = $this->input->get('term'); //variabel kunci yang di bawa dari input text id kode\r\n $tipe = \"darat\";\r\n $query = $this->master->get_pembeli($tipe,$nama); //query model\r\n\r\n if($query == TRUE){\r\n $pelanggan = array();\r\n foreach ($query as $data) {\r\n $pelanggan[] = array(\r\n 'label' => $data->nama_pengguna_jasa, //variabel array yg dibawa ke label ketikan kunci\r\n 'id' => $data->id_pengguna_jasa,\r\n 'nama' => $data->nama_pengguna_jasa , //variabel yg dibawa ke id nama\r\n 'alamat' => $data->alamat, //variabel yang dibawa ke id alamat\r\n 'no_telp' => $data->no_telp, //variabel yang dibawa ke id no telp\r\n 'pengguna'=> $data->pengguna_jasa_id_tarif, //variabel yang dibawa ke id pengguna jasa\r\n );\r\n }\r\n }\r\n\r\n echo json_encode($pelanggan); //data array yang telah kota deklarasikan dibawa menggunakan json\r\n }", "function ler($nome) {\n $x = 1;\n\t while($x < $this->bd[0][0] && !$this->str_igual($nome, $this->bd[$x][2])) {$x++;}\n if($x >= $this->bd[0][0]) {return 0;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\nreturn 1;\n }" ]
[ "0.6612095", "0.6373107", "0.63696927", "0.6341106", "0.6322961", "0.63228834", "0.630111", "0.62974226", "0.6263228", "0.62611514", "0.62510353", "0.6240072", "0.6206894", "0.61959326", "0.618426", "0.61687493", "0.6153263", "0.61291176", "0.611896", "0.611211", "0.6111485", "0.6092627", "0.60827965", "0.6073952", "0.60683703", "0.60660565", "0.60612416", "0.6046656", "0.60454386", "0.6043695", "0.6036185", "0.6030681", "0.6028933", "0.6015226", "0.60087895", "0.60080355", "0.600579", "0.6005757", "0.59959483", "0.5984484", "0.5972555", "0.5967121", "0.5967", "0.5965769", "0.5963482", "0.5960528", "0.5958557", "0.5955375", "0.59553456", "0.5954807", "0.5945898", "0.5945506", "0.5943916", "0.59429234", "0.5937023", "0.59345424", "0.59316313", "0.5929229", "0.59213066", "0.5920216", "0.59154034", "0.5914749", "0.59147435", "0.59133327", "0.59123987", "0.5897377", "0.5892987", "0.58921593", "0.5892153", "0.5890528", "0.5882128", "0.58800656", "0.58765614", "0.5874146", "0.58670205", "0.5865266", "0.58636665", "0.5853574", "0.585346", "0.5847866", "0.584574", "0.58418286", "0.5840638", "0.583613", "0.5830993", "0.583066", "0.5828978", "0.5828491", "0.58208036", "0.5818643", "0.58153677", "0.5811778", "0.58100295", "0.58091897", "0.58084375", "0.5803855", "0.5802247", "0.5798791", "0.5798645", "0.57926095", "0.57861876" ]
0.0
-1
Fungsi untuk menscan serial port yang tersedia
function common_serial_scan() { //Daftar perangkat serial, untuk Linux akan dimulai dengan ttyACMx atau ttyUSBx $acm = "ttyACM"; $usb = "ttyUSB"; //Dapatkan daftar perangkat yang terhubung ke komputer $cmd = shell_exec('ls /dev/'); //Cari perangkat serial yang tersedia //cari ACM $flagACM = strpos($cmd, $acm); //cari USB $flagUSB = strpos($cmd, $usb); //Buat array untuk menyimpan daftar perangkat dengan alamat serial //yang tersedia $devList = array(); //Query perangkat if($flagACM == true){ //Pisahkan nilai raw berdasarkan string acm $rawACM = explode($acm, $cmd); //Cek string hasil explode untuk mencari nomer ACM foreach($rawACM as $raw){ //Variabel untuk menyimpan nomer ACM yang terdeteksi $buildDev = ''; //Get karakter pertama dari hasil explode $firstChar = substr($raw, 0, 1); //Cek karakter kesatu apakah numerik if(is_numeric($firstChar)){ //Jika iya, simpan ke nomer digit pertama $buildDev .= $firstChar; //Get karakter kedua $secondChar = substr($raw, 1, 1); //Cek karakter kedua apakah numerik if(is_numeric($secondChar)){ //Jika iya, simpan digit kedua $buildDev .= $secondChar; //Get karakter ketiga apakah numerik $thirdChar = substr($raw, 2, 1); //Cek karakter ketiga if(is_numeric($thirdChar)){ //Jika iya, simpan digit ketiga $buildDev .= $thirdChar; } } //Selesai, sekarang tambahkan alamat lengkap port serial //diikuti digit nomer port $devList[] = '/dev/ttyACM' . $buildDev; } } } if($flagUSB == true) { //Pisahkan nilai raw berdasarkan string usb $rawUSB = explode($usb, $cmd); //Cek string hasil explode untuk mencari nomer USB foreach($rawUSB as $raw){ //Variabel untuk menyimpan nomer USB yang terdeteksi $buildDev = ''; //Get karakter pertama dari hasil explode $firstChar = substr($raw, 0, 1); //Cek karakter kesatu apakah numerik if(is_numeric($firstChar)){ //Jika iya, simpan ke nomer digit pertama $buildDev .= $firstChar; //Get karakter kedua $secondChar = substr($raw, 1, 1); //Cek karakter kedua apakah numerik if(is_numeric($secondChar)){ //Jika iya, simpan digit kedua $buildDev .= $secondChar; //Get karakter ketiga apakah numerik $thirdChar = substr($raw, 2, 1); //Cek karakter ketiga if(is_numeric($thirdChar)){ //Jika iya, simpan digit ketiga $buildDev .= $thirdChar; } } //Selesai, sekarang tambahkan alamat lengkap port serial //diikuti digit nomer port $devList[] = '/dev/ttyUSB' . $buildDev; } } } //Kembalikan daftar perangkat serial yang terdeteksi return $devList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function common_serial_read($query, $dev){\r\n\t//Inisialisasi serial port\r\n\t//Siapkan port arduino untuk bisa digunakan\r\n\t//common_init_serial($dev);\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//Alamat perangkat\r\n\t$serial->deviceSet($dev);\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t//Buka koneksi (tulis)\r\n\t$serial->deviceOpen('w+');\r\n\t//kirim query (delay 1 detik)\r\n\t$serial->sendMessage($query,1);\r\n\t//baca balasan\r\n\t$mp = $serial->readPort();\r\n\t//tutup koneksi\r\n\t$serial->deviceClose();\r\n\t//kembalikan hasil\r\n\treturn $mp;\r\n}", "function common_serial_get_connected_device($query,$pass){\r\n//Inisialisasi serial port\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t$devList = common_serial_scan();\r\n\tforeach($devList as $dev){\r\n\t\t//Siapkan port arduino untuk bisa digunakan\r\n\t\tcommon_init_serial($dev);\t\r\n\t\t//Alamat perangkat\r\n\t\t$serial->deviceSet($dev);\r\n\t\t//Buka koneksi (tulis)\r\n\t\t$serial->deviceOpen('w+');\r\n\t\t//kirim query (delay 1 detik)\r\n\t\t$serial->sendMessage($query,1);\r\n\t\t//baca balasan\r\n\t\t$mp = $serial->readPort();\r\n\t\t//tutup koneksi\r\n\t\t$serial->deviceClose();\t\r\n\r\n\t\t//cek hasil query\r\n\t\tif($mp == $pass){\r\n\t\t\t//Jika respon sama dengan query\r\n\t\t\t//kembalikan alamat perangkat terkoneksi\r\n\t\t\treturn $dev;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}", "function common_init_serial($dev){\r\n\t//Set permission ke 777 (Read, Write, Execute) Untuk semua orang\r\n\tshell_exec('sudo chmod 777 ' . $dev);\r\n\t//Siapkan parameter komunikasi serial\r\n\tshell_exec('sudo /bin/stty -F ' . $dev . ' cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts');\t\r\n}", "function common_serial_write($query, $dev){\r\n\t//Inisialisasi serial port\r\n\t//Siapkan port arduino untuk bisa digunakan\r\n\t//common_init_serial($dev);\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//Alamat perangkat\r\n\t$serial->deviceSet($dev);\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t//Buka koneksi (tulis)\r\n\t$serial->deviceOpen('w+');\r\n\t//kirim query (delay 1 detik)\r\n\t$serial->sendMessage($query,0);\r\n\t//baca balasan\r\n\t$mp = $serial->readPort();\r\n\t//tutup koneksi\r\n\t$serial->deviceClose();\r\n\t//kembalikan hasil\r\n\treturn null;\r\n}", "function teleinfor ($port = \"/dev/ttyAMA0\") {\n // Resultat : liste etiquette=>valeur\n $trame_array = array();\n \n // Ouvrir le port en lecture\n $handle = fopen ($port, \"r\");\n $char = \"\";\n $contents = \"\";\n while (fread($handle, 1) != chr(2));\n do {\n $char = fread($handle, 1);\n if ($char != chr(2)) $contents .= $char;\n } while ($char != chr(2));\n\n // Fermer le port\n fclose ($handle);\n\n // Supprimer les caracteres debut/fin de trame\n $trame = substr($contents,1,-1);\n\n // Separer les messages\n $trame = explode(chr(10).chr(10), $trame);\n\n // Verifier les checksum et supprimer les trames incorrectes\n foreach ($trame as $key=>$message) {\n \n // Separer l'etiquette, la valeur et le checksum\n $message = explode (chr(32), $message, 3);\n list ($etiquette, $valeur, $checksum) = $message;\n \n // Supprimer le message si incomplet ou incorrect (checksum invalide) \n if (count($message)<3 || \n checksum($etiquette, $valeur) != $checksum \n\t\t \n\t//\t|| \n // messize($etiquette) != strlen($valeur) \n ) { \n unset($trame[$key]); \n \n } else {\n // Enregistrer le message dans la liste trame_array\n $trame_array[$etiquette] = $valeur;\n\t\t\t \n }\n }\n \n return $trame_array;\n }", "function gettemp(){\nglobal $serial;\nwhile( empty($read)){\n$serial->deviceOpen();\n$serial->sendMessage(\"4\");\n//usleep(200000);\n$read = $serial->readPort();\n$serial->deviceClose();\n}\n$read2= trim($read);\nreturn $read2;\n\n}", "function ncurses_baudrate()\n{\n}", "public function validacionserial($serial)\n {\n $query = \"select id_equipo, COUNT(*) as canti FROM `equipo` WHERE estado =1 and serial_equipo ='\" . $serial . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "function DENON_InputSource($id, $value) // Input Source\n{\n CSCK_SendText($id, \"SI\".$value.chr(13));\n}", "function fermerToutesPortes(){\n\t\tfor ( $i = 25 ; $i <= 28 ; $i++ ) {\n\t\t$gpio=$i-4;\n\t\t$porte = system ( \"gpio read \".$i);\n\t\tif ($porte == \"0\"){\n\t\t\t\tsystem (\"gpio write \". $gpio .\" off\");\n\t\t\t\tsleep ( 1 );\n\t\t\t\tsystem (\"gpio write \". $gpio .\" on\");\n\t\t\t}\n\n\t\t}\n\t}", "protected function readDevice()\n {\n $trame = '';\n $i=0;\n while (strlen($trame)==0 && $i < 3) {\n $trame = $this->readTrame();\n $i++;\n }\n\n echo date('Y-m-d H:i:s T').\" Read attempt : \".$i.\" for \".strlen($trame).\" octet(s)\\n\";\n\n $trame = chop(substr($trame, 1, -1)); // on supprime les caracteres de debut et fin de trame\n\n $messages = explode(chr(10), $trame); // on separe les messages de la trame\n $new = [];\n foreach ($messages as $msg) {\n $ligne = explode(' ', $msg, 3);\n if (count($ligne)<2) {\n continue;\n }\n $new[$ligne[0]] = $ligne[1];\n }\n return $new;\n }", "public function validacionserialasignado($serial)\n {\n $query = \"select COUNT(*) as cantidad FROM `equipo`\n INNER JOIN asignacion_equipo on fkID_equipo=id_equipo\n WHERE asignacion_equipo.estado =1 and fkID_equipo='\" . $serial . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "function common_wlan_scan(){\r\n\tglobal $text;\r\n\t//get output dari iwlist\r\n\t$iw_ssid = shell_exec('sudo /sbin/iwlist wlan0 scan');\r\n\t$iw_mac = $iw_ssid;\r\n\t$iw_quality = $iw_ssid;\r\n\t\r\n\t$iw_ssid = explode('ESSID:\"', $iw_ssid);\r\n\t$iw_mac = explode('Address:', $iw_mac);\r\n\t$iw_quality = explode('Quality=', $iw_quality);\r\n\t\r\n\t//get sssid\r\n\t$data_ssid = array();\r\n\t$counter = 0;\r\n\tforeach($iw_ssid as $ssid){\r\n\t\t$tmp = explode('\"',$ssid);\r\n\t\tif(!empty($tmp[0]) && $counter != 0){\r\n\t\t\t$data_ssid[] = $tmp[0];\r\n\t\t}\r\n\t\t$counter++;\r\n\t}\r\n\t\r\n\t//get mac address\r\n\t$data_mac = array();\r\n\t$counter = 0;\r\n\tforeach($iw_mac as $mac){\r\n\t\t$tmp = explode(' ',$mac);\r\n\t\tif(!empty($tmp[1]) && $counter != 0){\r\n\t\t\t$data_mac[] = $tmp[1];\r\n\t\t}\r\n\t\t$counter++;\r\n\t}\r\n\t\r\n\t//get kekuatan sinyal\r\n\t$data_quality = array();\r\n\t$counter = 0;\r\n\tforeach($iw_quality as $signal){\r\n\t\t$tmp = explode(' ',$signal);\r\n\t\tif(!empty($tmp[0]) && $counter != 0){\r\n\t\t\t$tmpb = explode('/',$tmp[0]);\r\n\t\t\t$a = $tmpb[0];\r\n\t\t\t$b = $tmpb[1];\r\n\t\t\t$c = number_format(($a/$b) * 100,0,',','.');\r\n\t\t\t$data_quality[] = $c;\r\n\t\t}\r\n\t\t$counter++;\r\n\t}\r\n\t\r\n\t$result = array(\r\n\t\t'ssid' \t\t=> $data_ssid,\r\n\t\t'mac' \t\t=> $data_mac,\r\n\t\t'signal'\t=> $data_quality\r\n\t);\t\r\n\treturn $result;\r\n}", "function getPorts($pDB)\n {\n $pconfEcho = new paloSantoConfEcho($pDB);\n $pconfEcho->deleteEchoCanceller();\n $pconfEcho->deleteCardParameter();\n //$this->deleteCardManufacturer($pDB);\n //$data = array();\n global $arrLang;\n $tarjetas = array(); \n $data = array();\n $data2 = array();\n $data3 = array();\n $exist_data = \"no\";\n unset($respuesta);\n exec('/usr/sbin/lsdahdi',$respuesta,$retorno);\n\n if($retorno==0 && $respuesta!=null && count($respuesta) > 0 && is_array($respuesta)){\n $idTarjeta = 0;\n $count = 0; \n foreach($respuesta as $key => $linea){\n $estado_asterisk = _tr('Unknown');\n $estado_asterisk_color = \"gray\";\n $estado_dahdi_image = \"conn_unkown.png\";\n if(preg_match(\"/^### Span[[:space:]]+([[:digit:]]{1,}): ([[:alnum:]| |-|\\/]+)(.*)$/\",$linea,$regs)){\n $idTarjeta = $regs[1];\n $dataCardParam = $this->getCardManufacturerById($pDB, $idTarjeta);\n if(empty($dataCardParam)){\n $dataCardParam['manufacturer'] = \" \";\n $dataCardParam['num_serie'] = \" \";\n $dataCardParam['id_card'] = \" \";\n }else $dataCardParam['id_card']=$idTarjeta;\n if($dataCardParam['manufacturer']!=\" \"){ \n $exist_data=\"yes\";\n $data3['manufacturer'] = $pDB->DBCAMPO($dataCardParam['manufacturer']); \n }else{ $data3['manufacturer'] = $pDB->DBCAMPO(\" \");\n $exist_data = \"no\";\n }\n\n if($dataCardParam['num_serie']!=\" \"){ \n $exist_data=\"yes\";\n $data3['num_serie'] = $pDB->DBCAMPO($dataCardParam['num_serie']);\n }else{ $data3['num_serie'] = $pDB->DBCAMPO(\" \");\n $exist_data = \"no\";\n }\n if($dataCardParam['manufacturer']==\" \" && $dataCardParam['num_serie']==\" \" && $dataCardParam['id_card']==\" \"){\n $data3['id_card'] = $pDB->DBCAMPO($regs[1]); \n $this->addCardManufacturer($pDB, $data3);\n }else $this->updateCardParameter($pDB, $data3, array(\"id_card\"=>$regs[1]));\n $tarjetas[\"TARJETA$idTarjeta\"]['DESC'] = array(\n 'ID' => $regs[1],\n 'TIPO' => $regs[2],\n 'ADICIONAL' => $regs[3],\n 'MANUFACTURER' => $exist_data,\n 'MEDIA' => NULL,\n 'MEDIA_SWITCHABLE' => file_exists(\"/etc/wanpipe/wanpipe{$idTarjeta}.conf\"));\n $count++;\n $data2['id_card'] = $pDB->DBCAMPO($regs[1]);\n $data2['type'] = $pDB->DBCAMPO($regs[2]);\n $data2['additonal'] = $pDB->DBCAMPO($regs[3]);\n\n $pconfEcho->addCardParameter($data2);\n }\n else if(preg_match(\"/[[:space:]]*([[:digit:]]+) ([[:alnum:]_]+)[[:space:]]+([[:alnum:]-]+)[[:space:]]*(.*)/\",$linea,$regs1)){\n //Estados de las lineas\n if(preg_match(\"/Hardware-assisted/i\",$regs1[3].$regs1[4]) || preg_match(\"/HDLC(FCS)?/i\",$regs1[3])){\n if(preg_match(\"/In use.*RED/i\",$regs1[4])){\n $estado_asterisk = _tr('Detected by Asterisk');\n $estado_asterisk_color = \"green\";\n $estado_dahdi_image = \"conn_alarm_HC.png\";\n }\n else if(preg_match(\"/In use/i\",$regs1[4])){\n $estado_asterisk = _tr('Detected by Asterisk');\n $estado_asterisk_color = \"green\";\n $estado_dahdi_image = \"conn_ok_HC.png\";\n }\n else if(preg_match(\"/RED/i\",$regs1[4])){\n $estado_asterisk = _tr('Not detected by Asterisk');\n $estado_asterisk_color = \"#FF7D7D\";\n $estado_dahdi_image = \"conn_alarm_HC.png\";\n }\n else{\n $estado_asterisk = _tr('Not detected by Asterisk');\n $estado_asterisk_color = \"#FF7D7D\";\n $estado_dahdi_image = \"conn_ok_HC.png\";\n }\n }\n else if(preg_match(\"/In use.*RED/i\",$regs1[4])){\n $estado_asterisk = _tr('Detected by Asterisk');\n $estado_asterisk_color = \"green\";\n $estado_dahdi_image = \"conn_alarm.png\";\n }\n else if(preg_match(\"/In use/i\",$regs1[4])){\n $estado_asterisk = _tr('Detected by Asterisk');\n $estado_asterisk_color = \"green\";\n $estado_dahdi_image = \"conn_ok.png\";\n }\n else if(preg_match(\"/RED/i\",$regs1[4])){\n $estado_asterisk = _tr('Not detected by Asterisk');\n $estado_asterisk_color = \"#FF7D7D\";\n $estado_dahdi_image = \"conn_alarm.png\";\n }\n else{\n $estado_asterisk = _tr('Not detected by Asterisk');\n $estado_asterisk_color = \"#FF7D7D\";\n $estado_dahdi_image = \"conn_ok.png\";\n }\n\n //Tipo de las lineas\n $tipo = $regs1[2];\n $tarjetas[\"TARJETA$idTarjeta\"]['DESC']['MEDIA'] = $tipo;\n \n $dataType=preg_split('/[:]/',$regs1[4],2);\n if(count($dataType)>1){\n $arrEcho=preg_split('/[)]/',$dataType[1],2);\n $data['num_port'] = $pDB->DBCAMPO($regs1[1]);\n $data['name_port'] = $pDB->DBCAMPO($regs1[2]);\n $data['echocanceller'] = $pDB->DBCAMPO(trim($arrEcho[0]));\n $data['id_card'] = $pDB->DBCAMPO($count);\n $pconfEcho->addEchoCanceller($data);\n }else if($regs1[3]!=\"HDLCFCS\" && $regs1[3] != 'Hardware-assisted'){\n $data['num_port'] = $pDB->DBCAMPO($regs1[1]);\n $data['name_port'] = $pDB->DBCAMPO($regs1[2]);\n $data['echocanceller'] = $pDB->DBCAMPO(\"none\");\n $data['id_card'] = $pDB->DBCAMPO($count);\n $pconfEcho->addEchoCanceller($data);\n }\n $tarjetas[\"TARJETA$idTarjeta\"]['PUERTOS'][\"PUERTO$regs1[1]\"] = array('LOCALIDAD' =>$regs1[1],'TIPO' => $tipo, 'ADICIONAL' => \"$regs1[2] - $regs1[3]\", 'ESTADO_ASTERISK' => $estado_asterisk,'ESTADO_ASTERISK_COLOR' => $estado_asterisk_color,'ESTADO_DAHDI' => $estado_dahdi_image);\n\n }\n else if(preg_match(\"/[[:space:]]*([[:digit:]]+) ([[:alnum:]]+)/\",$linea,$regs1)){\n if($regs1[2] == 'unknown'){\n $estado_asterisk = _tr('Unknown');\n $estado_asterisk_color = 'gray';\n $estado_dahdi_image = 'conn_unkown.png';\n }else if(preg_match(\"/EMPTY/i\",$regs1[2])){\n $estado_asterisk = _tr('Channel Empty');\n $estado_asterisk_color = 'gray';\n $estado_dahdi_image = 'conn_empty.png';\n }\n $tarjetas[\"TARJETA$idTarjeta\"]['PUERTOS'][\"PUERTO$regs1[1]\"] = array('LOCALIDAD' =>$regs1[1],'TIPO' => \"&nbsp;\", 'ADICIONAL' => $regs1[2], 'ESTADO_ASTERISK' => $estado_asterisk,'ESTADO_ASTERISK_COLOR' => $estado_asterisk_color,'ESTADO_DAHDI' => $estado_dahdi_image);\n }\n }\n }\n\n if(count($tarjetas)<=0){ //si no hay tarjetas instaladas\n $this->errMsg = _tr(\"Cards undetected on your system, press for detecting hardware detection.\");\n $tarjetas = array();\n }\n if(count($tarjetas)==1){ //si aparace la tarjeta por default ZTDUMMY\n $valor = $tarjetas[\"TARJETA1\"]['DESC']['TIPO'];\n if(preg_match(\"/^DAHDI_DUMMY\\/1/i\", $valor))\n {\n $this->errMsg = _tr(\"Cards undetected on your system, press for detecting hardware detection.\");\n $tarjetas = array();\n }\n }\n return($tarjetas);\n }", "function send_message($serial, $instruction, $addrh, $addrl, $data1, $data2, $text)\r\n{\r\n\tusleep(COMM_WAIT_BETWEEN_MESSAGES);\r\n\r\n\t$sum = ($instruction + $addrh + $addrl + $data1 + $data2) & 255;\r\n\t$message = pack(\"CCCCCCC\", $instruction, $addrh, $addrl, $data1, $data2, $sum, 13);\r\n\t$try = 0;\r\n\t$result = -1;\r\n\tdo\r\n\t{\r\n\t//\tprint($text);\r\n\t\t\r\n\t\t$serial->sendMessage($message);\r\n\t\t\r\n\t\tusleep(COMM_WAIT_RESPONSE_DELAY);\r\n\t\t\r\n\t\t$read = $serial->readPort(7);\r\n\t\t\r\n\t\tif (strlen($read) == 7)\r\n\t\t{\r\n\t\t\t$data = unpack(\"C*\", $read);\t// first item has index 1 !!!\r\n\t\t\t\r\n\t\t\tif ($data[3] == 0x99 and $data[4] == 0x99 and $data[5] == 0x99)\r\n\t\t\t{\r\n//\t\t\t\tprint(\"No data available\");\r\n\t\t\t\t$result = -2;\r\n\t\t\t}\r\n\t\t\telse if ($data[1] == 0x00 and $data[2] == 0x00 and $data[3] == 0x00 and $data[4] == 0x00 and $data[5] == 0x00)\r\n\t\t\t{\r\n//\t\t\t\tprint(\"Unit busy\");\r\n\t\t\t\t$result = -3;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$result = ($data[3] << 16) + ($data[4] << 8) + $data[5];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($result < 0 and ++$try < COMM_NR_OF_RETRIES)\r\n\t\t{\t// retry\r\n\t\t\tusleep(COMM_RETRY_DELAY);\r\n\t\t}\r\n\t} while ($result < 0 and $try < COMM_NR_OF_RETRIES);\r\n\t\r\n\treturn $result;\r\n}", "function parsescan($arLines)\n {\n #no data in first two lines.skip them.\n array_shift($arLines);\n array_shift($arLines);\n\n $result = array();\n foreach($arLines as $key=>$line)\n {\n if(trim($line) == '')\n {\n continue;\n }\n\n $arMatches = array();\n $temp = array();\n if (!preg_match($this->channelreg, $line, $arMatches))\n print \"channel not found\";\n\n $temp['channel']=$arMatches[0];\n\n $line = trim(substr($line,strlen($arMatches[0])));\n if (!preg_match($this->essidreg, $line, $arMatches))\n print \"essid not found\";\n\n $temp['essid']=trim($arMatches[0]);\n\n $line = trim(substr($line,strlen($arMatches[0])));\n if (!preg_match($this->macreg, $line, $arMatches))\n print \"mac not found\";\n\n $temp['mac']=$arMatches[0];\n\n $line = trim(substr($line,strlen($arMatches[0])));\n if (!preg_match($this->securityreg, $line, $arMatches))\n print \"security not found\";\n\n $temp['security']=$arMatches[0];\n\n $line = trim(substr($line,strlen($arMatches[0])));\n\n if (!preg_match($this->signalreg, $line, $arMatches))\n print \"signal not found\";\n\n $temp['signal']=$arMatches[0];\n\n array_push($result, $temp);\n\n print(\"\\n\");\n\n }\n return $result;\n }", "private function set_serial($serial) {\n\t\t$this->set_region(substr($serial, 0, 2));\n\t\t$this->serial = $serial;\n\t}", "public function getPort();", "public function getPort();", "public function getPort();", "public function getPort();", "function abrirPorta($strPorta=\"LPT1:\") {\n\n $fp = fopen($strPorta,\"w\");\n\n return $fp;\n }", "function updateSerial($serial) {\n\t$viererString = str_split($serial,4);\n\t$zweierString = str_split($viererString[1],2);\n\t// SerialCut ist Jahr,Monat,Tag,Nummer\n\t$serialCut = array(\"Y\" => $viererString[0], \"m\" => $zweierString[0], \"d\" => $zweierString[1], \"n\" => $viererString[2]);\n\tforeach($serialCut as $type => $value) {\n\t\tif($type!=\"n\") {\n\t\t\tif($value!=strftime(\"%\".$type)) {\n\t\t\t\t$serialCut[$type]=strftime(\"%\".$type);\n\t\t\t\t$serialCut[\"n\"]=\"01\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$value++;\n\t\t\t$serialCut[\"n\"]=str_pad($value,2,0,STR_PAD_LEFT);\n\t\t}\n\t}\n\treturn $serialCut[\"Y\"].$serialCut[\"m\"].$serialCut[\"d\"].$serialCut[\"n\"];\t\n}", "function common_device_init(){\r\n\t//Get perangkat mekanik yang terhubung\r\n\t//Get query dan pass\r\n\t$query = \"SELECT * FROM tbl_konfigurasi\";\r\n\t$conf = mysql_fetch_assoc(mysql_query($query));\r\n\t//Reset FIFO Camera\r\n\t$file = $_SERVER['DOCUMENT_ROOT'] . '/FIFO';\r\n\tfile_put_contents($file, '');\r\n\t//Get parameter mekanik yang diambil dari database\r\n\t$query = $conf['konfigurasi_query'];\r\n\t$pass = $conf['konfigurasi_pass'];\r\n\t$pwm = $conf['konfigurasi_pwm'];\r\n\t$servoX = $conf['konfigurasi_servoX'];\r\n\t$servoY = $conf['konfigurasi_servoY'];\r\n\t$laser = $conf['konfigurasi_laser'];\r\n\t$flash = $conf['konfigurasi_flash'];\r\n\t\r\n\t$dev = common_serial_get_connected_device($query, $pass);\r\n\t//Set variabel dev menjadi variabel sesi agar mudah diakses\r\n\tif(empty($dev) || !isset($dev)){\r\n \t\t$dev = '/dev/null';\r\n\t}\r\n\t$_SESSION['dev'] = $dev;\r\n\t//Simpan alamat perangkat terhubung\r\n\t$query = sprintf(\"UPDATE tbl_konfigurasi SET konfigurasi_dev = '%s'\", mysql_real_escape_string($dev));\r\n\t//Eksekusi query\r\n\tmysql_query($query);\r\n\t//Inisialisasi perangkat agar bisa digunakan\r\n\tcommon_init_serial($dev);\r\n\t//Set parameter mekanik sebelumnya\r\n\tcommon_serial_write('m'.$servoX.'o'.$servoY.'o',$dev);\r\n\tcommon_serial_write('p'.$pwm.'o',$dev);\r\n}", "public function get_data($serial = '')\n {\n\n $out = array();\n $temp = array();\n if (! $this->authorized()) {\n $out['error'] = 'Not authorized';\n } else {\n $bluetooth = new bluetooth_model;\n foreach ($bluetooth->retrieve_records($serial) as $prefs) {\n $temp[] = $prefs->rs;\n }\n foreach ($temp as $value) {\n $out[$value['device_type']] = $value['battery_percent'];\n }\n }\n\n $obj = new View();\n $obj->view('json', array('msg' => $out));\n }", "public function get_device_registered($id, $port)\n {\n if(empty($port))\n {\n $ont_port = '';\n }\n else\n {\n $ont_port = '.'.$port;\n }\n $if_aliases = $this->device_model->get_device_interfaces_alias_sql($id);\n // get ONT Registered\n $oid = '1.3.6.1.4.1.2011.6.128.1.1.2.43.1.3'.$ont_port;\n $registered = $this->snmp_model->get_snmp_indexed_oid($id, $oid);\n // get ONT descs\n $oid = '1.3.6.1.4.1.2011.6.128.1.1.2.43.1.9'.$ont_port;\n $ont_desc = $this->snmp_model->get_snmp_indexed_oid($id, $oid);\n if(!empty($port))\n {\n // get ONT online\n $oid = '1.3.6.1.4.1.2011.6.128.1.1.2.62.1.21'.$ont_port;\n $ont_status = $this->snmp_model->get_snmp_indexed_oid($id, $oid);\n // get ONT signal\n $oid = '1.3.6.1.4.1.2011.6.128.1.1.2.51.1.4'.$ont_port;\n $ont_signal = $this->snmp_model->get_snmp_indexed_oid($id, $oid);\n }\n\n // set Desc by SNMP results\n foreach ($registered as $key => $item) {\n $registered[$key]['desc'] = $ont_desc[$key]['value'];\n $registered[$key]['signal'] = $ont_signal[$key]['value']/100;\n $registered[$key]['status'] = $ont_status[$key]['value'];\n $registered[$key]['if_alias'] = $if_aliases[$item['if_index']];\n }\n return $registered;\n }", "public function handleStopScanRFXCode() // vytvorit fci vypne odchytavaci priznak pro funkci serveRFXsignal\n\t{\n\t\tDebugger::barDump($this->config->scanCodes, 'this->config->scanCodes');\n\t\t$selectCode='';\n\t\t$maxCount=0;\n\t\tforeach($this->config->scanCodes as $code)\n\t\t{\n\t\t\t$count=0;\n\t\t\tforeach($this->config->scanCodes as $item)\n\t\t\t{\n\t\t\t\tif ($item==$code) $count=$count+1;\n\t\t\t}\n\t\t\tif ($count>$maxCount) \n\t\t\t{\n\t\t\t\t$selectCode=$code;\n\t\t\t\t$maxCount=$count;\n\t\t\t}\n\t\t}\n\t\tDebugger::barDump($selectCode, 'selectCode');\n\t\tif ($selectCode!='')\n\t\t{\n\t\t\tif ($this->config->scanning==\"RUN\") $this->config->code=$selectCode;\n\t\t}\n\t\tDebugger::barDump($this->config, 'this->config');\n\t\t$this->config->scanning=\"\";\n\t\t$this->config->scanCodes=array();\n\t\t$this->saveConfig(); \n\t}", "public function getPort() {}", "function get_port(){\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('port');\n\t\t\treturn $this->db->get();\n\t\t}", "function getRssi()\n {\n \t$sh_args = 'getcellrssi'; \t//admin client comand for getting cellular signal strength (rssi)\n $sh_out = atsexec(escapeshellcmd($sh_args));\t//socket call\n debug('(cell_controller.inc|getRssi()) admin client api command \"getcellrssi\" output: $sh_out', $sh_out); \t\t//DEBUG\n\n if($sh_out != 'phpcmd: fail' && $sh_out != 'phpcmd: invalid command' && $sh_out != 99)\n {\n \tdebug('(cell_controller.inc|getRssi()) getcellrssi command completed.'); \t//DEBUG\n \treturn $sh_out;\n }\n else\n {\n \tdebug('(cell_controller.inc|getRssi()) getcellrssi command failed.'); \t\t//DEBUG\n \treturn false;\n \t//return 'Failed to detect cellular signal';\n }\n }", "function do_read_data()\r\n{\r\n\tglobal\t$TABLE_PDU_LOG;\r\n\tglobal\t$FIELD_UNIT, $FIELD_KWH_TOTAL, $FIELD_KWH_DISPLAY, $FIELD_CURRENT, $FIELD_TEMPERATURE;\r\n\tglobal\t$a_unit, $a_temp, $a_kwhtotal, $a_kwhdisplay, $a_current;\r\n\r\n//\tprint(\"Reading...\\n\\n\");\r\n\r\n\t$db = connect_to_database();\r\n\r\n\t$serial = new phpSerial;\r\n\t$serial->deviceSet(SERIAL_PORT);\r\n\t$serial->configure();\r\n\t$serial->deviceOpen();\r\n\r\n\t// get all data from the units\r\n//\tprint(\"kWh total\\n\");\r\n\t$result = send_message($serial, 56, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read kWh total\r\n\tread_all_units($db, $serial, 56);\t\t\t\t\t\t\t\t\t\t\t\t\t// read kWh total from all units\r\n\r\n//\tprint(\"kWh display\\n\");\r\n\t$result = send_message($serial, 143, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read kWh display\r\n\tread_all_units($db, $serial, 143);\t\t\t\t\t\t\t\t\t\t\t\t\t// read kWh display from all units\r\n\r\n//\tprint(\"Current\\n\");\r\n\t$result = send_message($serial, 68, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read current\r\n\tread_all_units($db, $serial, 68);\t\t\t\t\t\t\t\t\t\t\t\t\t// read current from all units\r\n\r\n//\tprint(\"Temperature\\n\");\r\n\t$result = send_message($serial, 90, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read temperature\r\n\tread_all_units($db, $serial, 90);\t\t\t\t\t\t\t\t\t\t\t\t\t// read temperature from all units\r\n\r\n\t// store the data in the database\r\n\tfor ($i = 0; $i < count($a_unit); $i++)\r\n\t{\r\n\t\tif ($a_unit[$i] > 0)\r\n\t\t{\r\n\t\t\t$sql = \"INSERT INTO $TABLE_PDU_LOG ($FIELD_UNIT, $FIELD_KWH_TOTAL, $FIELD_KWH_DISPLAY, $FIELD_CURRENT, $FIELD_TEMPERATURE) \".\r\n\t\t\t \"VALUES ($a_unit[$i],$a_kwhtotal[$i],$a_kwhdisplay[$i],$a_current[$i],$a_temp[$i])\";\r\n\t\t\tif (!($mysql_result = mysql_query($sql))) print(mysql_error($db) .\"\\n\");\r\n\t\t}\r\n\t}\r\n\r\n\t$serial->deviceClose();\r\n\tmysql_close($db);\r\n}", "public function is_scanning() {\r\n\t\t$this->refresh_status();\r\n\t\treturn $this->is_scanning;\r\n\t}", "function ghbt_scanner() {\n $this->name=\"ghbt_scanner\";\n $this->title=\"GoogleHome BT Scanner\";\n $this->module_category=\"<#LANG_SECTION_DEVICES#>\";\n $this->checkInstalled();\n}", "public function read_patron_barcode($barcode) {\n $search = '{\"schemas\": [\"urn:ietf:params:scim:api:messages:2.0:SearchRequest\"], '.\n ' \"filter\": \"External_ID eq \\\"'.$barcode.'\\\"\"}';\n $result = $this->search_patron($search);\n if ($result) {\n //search has an answer\n if ($this->search[\"totalResults\"] > 0) {\n $this->patron = $this->search[\"Resources\"][0];\n $this->search[\"Resources\"] = [];\n }\n }\n return $result;\n }", "public function verDVDGrabEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"DVDGRAB\");\n\n }", "function read_all_units($db, $serial, $instruction)\r\n{\r\n\tglobal\t$TABLE_M_UNITS;\r\n\tglobal\t$FIELD_UNIT, $FIELD_UNIT_VERSION, $FIELD_ONLINE;\r\n\tglobal\t$a_unit, $a_temp, $a_kwhtotal, $a_kwhdisplay, $a_current;\r\n\r\n\t$sql = \"SELECT $FIELD_UNIT,$FIELD_UNIT_VERSION FROM $TABLE_M_UNITS\";\r\n\tif (!($mysql_result = mysql_query($sql))) { print(mysql_error($db) .\"\\n\"); return; }\r\n\r\n\t$i = 0;\r\n\twhile ($row = mysql_fetch_array($mysql_result))\r\n\t{\r\n\t\t$unit = $row[0];\r\n\t\t$a_unit[$i] = $unit;\r\n\r\n//\t\tprint \"$unit\\t\";\r\n\t\t\r\n\t\t$addrh = ($unit >> 8) & 255;\r\n\t\t$addrl = $unit & 255;\r\n\r\n\t\t$result = send_message($serial, 93, $addrh, $addrl, 0, 0, \"\");\t\t\t\t\t// read databuffer\r\n\t\t\r\n\t\tif ($result >= 0)\r\n\t\t{\r\n\t\t\tif ($instruction == 90)\t\t\t\t\t\t\t\t\t\t\t\t\t\t// temperature\r\n\t\t\t{\r\n\t\t\t\t$a_temp[$i] = ($result & 255);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$number = 0;\r\n\t\t\t\tfor ($j = 5; $j >= 0; $j--)\r\n\t\t\t\t\t$number = ($number * 10) + (($result >> (4 * $j)) & 15);\r\n\t\t\t\t\t\r\n\t\t\t\tswitch ($instruction)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase 56:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// KWh total\r\n\t\t\t\t\t\t$a_kwhtotal[$i] = $number;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 143:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// KWh display\r\n\t\t\t\t\t\t$a_kwhdisplay[$i] = $number;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 68:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\r\n\t\t\t\t\t\t$a_current[$i] = $number / 10000;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$online = \"Y\";\r\n\t\t\t//print \"ok\\n\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tswitch ($instruction)\r\n\t\t\t{\r\n\t\t\t\tcase 90:\t$a_temp[$i] = 0;\t\tbreak;\r\n\t\t\t\tcase 56:\t$a_kwhtotal[$i] = 0;\tbreak;\r\n\t\t\t\tcase 143:\t$a_kwhdisplay[$i] = 0;\tbreak;\r\n\t\t\t\tcase 68:\t$a_current[$i] = 0;\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$online = \"N\";\r\n\t\t\t//print \"missing\\n\";\r\n\t\t}\r\n\r\n\t\t// update online status of this unit\r\n\t\t$sql = \"UPDATE $TABLE_M_UNITS SET $FIELD_ONLINE='$online' WHERE $FIELD_UNIT=$unit\";\r\n\t\tif (!mysql_query($sql)) print(mysql_error($db) .\"\\n\");\r\n\t\t\r\n\t\t$i++;\r\n\t}\r\n\tmysql_free_result($mysql_result);\r\n\t\r\n\t//print(\"\\n\");\r\n}", "function porte1() {\n\t\tsystem (\"gpio write 21 off\");\n\t\tsleep ( 1 );\n\t\tsystem (\"gpio write 21 on\");\n\t\t}", "function caricastatorelays()\n {\n global $arrRelays;\n $statorele = shell_exec( '/usr/sbin/i2cget -y 1 0x23' );\n if (empty($statorele)) {\n\n die(\"<h1>La multipresa sembra scollegata!</h1>\");\n }\n $relays = zerificabinario( base_convert( $statorele, 16, 2 ) );\n $arrRelays = str_split( $relays );\n return ( $arrRelays );\n }", "public function read(){\n \treturn ser_read();\n }", "public function readMsg()\n\t{\n\t\tglobal $_THRESH, $_LOCKTHRESH;\n\t\t\n\t\tif($this->_SERIAL->_ckOpened() == false) { return \"fail\";}\n\t\t$this->_SERIAL->serialflush();\n\t\t\n\t\t$result = -5;\n\t\t$data = \"\";\n\t\t$i = 0;\n\t\t\n\t\t//This regex looks for any whitespace characters (\\n, char(10), etc.)\n\t\twhile (!preg_match(\"/[\\s,]+/\", $data))\n\t\t{\n\t\t\tif($i >=75000) {\n\t\t\t\treturn \"failed to read data. Value of loop: \".$i;\n\t\t\t}\n\t\t\n\t\t\t$i++;\n\t\t\t$data .= $this->_SERIAL->readPort();\n\t\t}\n\n\t\t$arr = str_split($data);\n\n\t\t// First byte of incoming message determines what type it is.\n\t\t$resultID = $arr[0];\n\n\t\t// after type is determined these statements extract relevant data from rest of the message.\n\t\tif ($resultID == \"s\")\n\t\t{\n\t\t\t$value = (ord($arr[3])*256)+ord($arr[4]);\n\n\t\t\tif($value > $_THRESH)\n\t\t\t\t$result = 1; // Filled\n\t\t\telse \n\t\t\t\t$result = 0; // UnFilled\n\t\t}\n\t\telseif ($resultID == \"l\")\n\t\t{\n\t\t\t$value = (ord($arr[3])*256)+ord($arr[4]);\n\n\t\t\tif($value < $_LOCKTHRESH) \n\t\t\t\t$result = 1; // UnLocked\n\t\t\telse \n\t\t\t\t$result = 0; // locked\n\t\t}\n\t\telseif ($resultID == \"a\")\n\t\t{\n\t\t\t$result = 1; // message was confirmed\n\t\t}\n\t\telseif ($resultID == \"n\")\n\t\t{\n\t\t\t$iDplusCol = Array(0 => ord($arr[1]), 1 => ord($arr[2]));\n\t\t\treturn $iDplusCol; // new column was found return the number of boxes\n\t\t}\n\t\telseif ($resultID == \"t\")\n\t\t{\n\t\t\t$result= ord($arr[3]); // returns the size of queried box\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function scanRfxCode($signalCode)\n\t{\n\t\tif ($this->config->scanning!=\"\")\n\t\t{\n\t\t\t$this->config->scanCodes[]=$signalCode;\n\t\t\t$this->saveConfig();\n\t\t}\n\t}", "function connect($ip_address, $port)\n {\n //$this->connector = new FilePrintConnector(\"/dev/usb/lp0\");\n //$this->connector = new WindowsPrintConnector(\"smb://192.168.0.6/POS-80\");\n //$this->connector = new CupsPrintConnector(\"POS-80\");\n //$this->printer = new Printer($this->connector);\n /* Close printer */\n\n /*$this->connector = new FilePrintConnector(\"php://stdout\");\n $this->printer = new Printer($this->connector);\n */\n\n try {\n //$this->connector = new CupsPrintConnector(\"POS-80C\");\n $this->connector = new WindowsPrintConnector(\"POSS-80\");\n \n /* Print a \"Hello world\" receipt\" */\n $this->printer = new Printer($this->connector);\n //$this->printer -> text(\"TE AMO MCUHO MI VIDA..!\\n\");\n //$this->printer -> cut();\n \n /* Close printer */\n //$this->printer -> close();\n } catch (Exception $e) {\n echo \"Couldn't print to this printer: \" . $e -> getMessage() . \"\\n\";\n }\n }", "function control_gpio()\n{\n $data = read_file();\n // fetch data from object\n foreach ($data->equipment as $value) {\n if ($value->status == 1) {\n //execute command line using exec function\n exec(\"gpio -g mode {$value->port} out\");\n exec(\"gpio -g write {$value->port} 1\");\n } else {\n exec(\"gpio -g write {$value->port} 0\"); \n }\n }\n \n}", "public function renderScanRFXCode() // prepsat redka v nem vypiseaaktualni kod a vytvorit tlacitko scan a na nej vytvorit funkci pro hnadle a tlacitko stop ktere vypne priznak a zobrazi aktulani stav komonenty\n\t{\n\t\t//prirada sablonu ve ktere je tlacitko odkazujici na handle StartScanRFXCode a handleStopScanRFXCode\n\t\t$this->template->setFile(__DIR__.'/deviceCompomemnt_scanRFXcode.latte');\n\t\t//naplnit data pro rendrovani\n\t\t$this->template->name=$this->getName();\n\t\t$this->template->config=$this->config;\n\t\t//Debugger::barDump($this->template, 'this->template');\t\n\t}", "public function verAtrilEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"ATRIL\");\n\n }", "function statut() {\n\tfor ( $i = 25 ; $i <= 28 ; $i++ ) {\n\t\t$porte = system ( \"gpio read \".$i);\n\t\tif ($porte == \"0\") {\n\t\t\t?> <img src=\"Images/red.jpg\" width=15%>\n\t\t\t<?php } else {\n\t\t\t?> <img src=\"Images/green.jpg\" width=15%>\n\t\t\t<?php\n\t\t}\n\t}\n\t\t$porte = system ( \"gpio read 0\");\n\t\t\tif ($porte == \"0\") {\n\t\t\t\t?><br /><img src=\"Images/red.jpg\" width=10%>\n\t\t\t\t<?php } else {\n\t\t\t\t?> <br /><img src=\"Images/green.jpg\" width=10%>\n\t\t\t\t<?php\n\t\t\t\t}\n\t}", "public function onRead();", "protected function getDeviceSwitchPortsRequest($serial)\n {\n // verify the required parameter 'serial' is set\n if ($serial === null || (is_array($serial) && count($serial) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $serial when calling getDeviceSwitchPorts'\n );\n }\n\n $resourcePath = '/devices/{serial}/switch/ports';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($serial !== null) {\n $resourcePath = str_replace(\n '{' . 'serial' . '}',\n ObjectSerializer::toPathValue($serial),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "function enumerate(){\n $res=array();\n // lista de los macs del laboratorio\n for($i=134;$i<=148;$i++) array_push($res,sprintf(\"l%03d\",$i));\n $this->myLogger->trace(\"mac list: \".json_encode($res));\n return $res;\n }", "function read()\n {\n }", "private function returnEnabledRegisterToReceiveData(Microinstruction $micro) {\r\n \r\n }", "public function serial() : string;", "public function get_data($serial_number = '')\n {\n $findmymac = new Findmymac_model($serial_number);\n jsonView($findmymac->rs);\n }", "function readChar();", "function calc_time_elapsed_and_barcode_command_type($scanner){\n\t$last_barcode_history_processed = css_get_last_barcode_time_elapsed_for_scanner($scanner);\n\t\n\t// Get some uncalculated data for this scanner.\n\t$barcode_data = css_get_new_barcode_history_for_scanner($scanner);\n\t\n\t// No calculated elapsed times yet, first call to function \n\tif(empty($last_barcode_history_processed)){\n\t\t//echo(\"First barcode skipped\");\n\t\t$elapsed_time = '-2'; //very first barcode data..\n\t\t$command_type_id = '-1'; //will get updated on the next function call\n\t\tcss_update_barcode_history_elapsed_time_command_type($barcode_data[0]['id'], $elapsed_time, $command_type_id);\n\t\tcalc_time_elapsed_and_barcode_command_type($scanner); // Call self, start the function over.\n\t}\n\t//print_r($last_barcode_history_processed);\n\t\n\t$barcode_commands = css_get_barcode_commands();\n\t//print_r($barcode_commands);\n\t\n\t$last_time = \"\";\n\t$command_type_id = \"\";\n\tforeach($barcode_data as $k => $v)\n\t{\n\t\t// Time Elapsed\n\t\tif($last_time == \"\"){\n\t\t\t$elapsed_time = strtotime($v['time_scanned']) - strtotime($last_barcode_history_processed[0]['time_scanned']);\n\t\t}else{\n\t\t\t$elapsed_time = strtotime($v['time_scanned']) - strtotime($last_time);\n\t\t}\n\t\t//echo(\"v\");\n\t\t//print_r($v);\n\t\t\n\t\t//$command_id = array_search($v['barcode'], array_column($barcode_commands,'barcode'));\n\t\t$command_id = searchForId(str_replace(\"\\n\",'',$v['barcode']), $barcode_commands, 'barcode');\n\t\t//echo(\"barcode:\");\n\t\t//echo($v['barcode']);\n\t\t//echo(\"Command_id:\");\n\t\t//echo($command_id);\n\t\t//echo(\"OK\");\n\t\t\t\n\t\t// Barcode Command Type\n\t\t//echo(\"<br>\");\n\t\t//echo($v['barcode'].\" \".$v['barcode'][0].\"<br>\");\n\t\t\n\t\tif($v['barcode'][0] == \"T\")\n\t\t{\n\t\t\t$command_type_id = \"2\";\n\t\t}else{\n\t\t\t//$command_id = array_search($v['barcode'], array_column($barcode_commands,'barcode'));\n\t\t\t//echo($command_id);\n\t\t\t//echo(\"<br>\");\n\t\t\tif($command_id == FALSE){\n\t\t\t\t$command_type_id = \"9\"; //unknown type of barcode\n\t\t\t}else{\n\t\t\t\t$command_type_id = $barcode_commands[$command_id]['command_type_id'];\n\t\t\t\t//echo($command_type_id);\n\t\t\t\t//echo(\"<br>\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tcss_update_barcode_history_elapsed_time_command_type($v['id'], $elapsed_time, $command_type_id);\n\t\t$last_time = $v['time_scanned'];\t\n\t}\n\n\n}", "public function getPort(): int;", "function GenerarSerial()\n\t{\n\t\t$this->Serial = CifradorCodigo::generarNumero(\n\t\tCifradorCodigo::LongitudBitsSerialMaximo\n\t\t);\n\t}", "private function getPort ()\n\t\t{\n\t\t\t$server_config = $this->config['server'];\n\t\t\t$config_data = file( $this->config['server'] );\n\t\t\t$i=0;\n\t\t\twhile ( $i < count ( $config_data ) ) {\n\t\t\t\tif(strstr ( $config_data [$i] , \"port\" ) ) { /* line of port in server.conf */\n\t\t\t\t\t$buffer = explode (\" \" , $config_data[$i] ) ;\n\t\t\t\t\tif ( count ( $buffer ) == 2 ) \n\t\t\t\t\t\t$this->result['data']['port'] = trim($buffer[1]);\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn;\n\t\t}", "public function encenderPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"ON\");\n $this->setEncendidoPizarra(1);\n\n }", "public function verPortatilEnPizarra( $portatil ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"PORTATIL_\".$portatil);\n\n }", "private function readTo($prompt){\r\n\t\r\n\t\tif (!$this->socket){\r\n\t\t\tthrow new Exception(\"Telnet connection closed\"); \r\n\t\t}\r\n\t\t\r\n\t\t// clear the buffer \r\n\t\t$this->clearBuffer();\r\n\t\t\r\n\t\tdo{\r\n\t\t\t\r\n\t\t$c = $this->getc();\r\n\t\t\t\r\n\t\t\tif ($c === false){\r\n\t\t\t\tthrow new Exception(\"Couldn't find the requested : '\" . $prompt . \"', it was not in the data returned from server : '\" . $this->buffer . \"'\"); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Interpreted As Command\r\n\t\t\tif ($c == $this->IAC){\r\n\t\t\t\tif ($this->negotiateTelnetOptions()){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// append current char to global buffer \r\n\t\t\t$this->buffer .= $c;\r\n\t\t\t\r\n\t\t\t// we've encountered the prompt. Break out of the loop\r\n\t\t\tif ((substr($this->buffer, strlen($this->buffer) - strlen($prompt))) == $prompt){\r\n\t\t\t\treturn self::TELNET_OK;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while($c != $this->NULL || $c != $this->DC1);\r\n\t}", "public function vector_scan()\n\t{\n\t\t\n\t\t// Hostnames\n\t\t$vectors = $this->Vector->typeList('hostname', false, true);\n\t\t$this->out($this->Vector->shellOut());\n\t\t\n\t\t// add the new records\n\t\t$results = $this->Hostname->checkAddBlank(array_keys($vectors));\n\t\t$this->out($this->Hostname->shellOut());\n\t\t\n\t\t// Ip Addresses\n\t\t$vectors = $this->Vector->typeList('ipaddress', false, true);\n\t\t$this->out($this->Vector->shellOut());\n\t\t\n\t\t// add the new records\n\t\t$results = $this->Ipaddress->checkAddBlank(array_keys($vectors));\n\t\t$this->out($this->Ipaddress->shellOut());\n\t}", "public function verPCSalaEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"PC_SUELO\");\n\n }", "public function hasPort(){\n return $this->_has(12);\n }", "function pci () {\n $results = array();\n $s = $this->grab_ioreg('IOPCIDevice');\n\n $lines = preg_split(\"/\\n/\", $s);\n for ($i = 0, $max = sizeof($lines); $i < $max; $i++) {\n $ar_buf = preg_split(\"/\\s+/\", $lines[$i], 19);\n $results[$i] = $ar_buf[0];\n } \n asort($results);\n return array_values(array_unique($results));\n }", "abstract public function listDevices();", "public function get_drive_info($drive)\n {\n clearos_profile(__METHOD__, __LINE__);\n \n try {\n $shell = new Shell();\n $args = '-i ' . $drive;\n $options['validate_exit_code'] = FALSE;\n $options['env'] = 'LANG=en_US';\n $shell->execute(self::CMD_SMARTCTL, $args, TRUE, $options);\n $retval = $shell->get_output();\n } catch (Exception $e) {\n //do nothing\n }\n\n foreach ($retval as $line) {\n if (preg_match('/SMART support is/', $line)) {\n $line2 = \" \".$line;\n $pieces = explode(\":\", $line2);\n $support = trim($pieces[1]);\n if(preg_match('/Available/', $support))\n $output['available'] = TRUE;\n if(preg_match('/Enabled/', $support))\n $output['enabled'] = TRUE;\n }\n if (preg_match('/Device supports SMART/', $line)) {\n $output['available'] = TRUE;\n if (preg_match('/and is Enabled/', $line))\n $output['enabled'] = TRUE;\n }\n if (preg_match('/Model Family/', $line)) {\n $line2 = \" \".$line;\n $pieces = explode(\":\", $line2);\n $value = trim($pieces[1]);\n $output['model'] = $value;\n }\n if (preg_match('/Device Model/', $line)) {\n $line2 = \" \".$line;\n $pieces = explode(\":\", $line2);\n $value = trim($pieces[1]);\n $output['device'] = $value;\n } \n if (preg_match('/Serial Number/', $line)) {\n $line2 = \" \".$line;\n $pieces = explode(\":\", $line2);\n $value = trim($pieces[1]);\n $output['serial'] = $value;\n }\n if (preg_match('/User Capacity/', $line)) {\n $line2 = \" \".$line;\n $line2 = preg_replace('/\\s+/m', \"|\", $line);\n $pieces = explode(\"|\", $line2);\n $value = preg_replace('/,/', '', $pieces[2]);\n $output['capacity'] = round($value/(1000*1000*1000));\n }\n }\n return $output;\n }", "abstract protected function getTCPDFBarcode();", "function MonitorListe_weiterenParameterHolen($ETA_ComID)\r\n {\r\n $MonitorListeWeiter =\"{MA\";\r\n \r\n If (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 0) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(02) . chr(01) . chr(01); //Standard\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 1) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(03) . chr(01) . chr(02); //Service\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 2) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(04) . chr(01) . chr(03); //Profi\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 3) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(05) . chr(01) . chr(04); //Expert\r\n\t\t}\r\n\t\t$MonitorListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n\t\t$Daten = $MonitorListeWeiter . $MonitorListeWeiterBytes . $MonitorListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "function SetPort($namePort = \"\") {\n $archivo = 'C:\\IntTFHKA\\Puerto.dat';\n $fp = fopen($archivo, \"w\");\n $string = \"\";\n $write = fputs($fp, $string);\n $string = $namePort;\n $write = fputs($fp, $string);\n fclose($fp);\n\n $this->NamePort = $namePort;\n }", "function getSerialSteps($pdo) {\n\t\t\t$query = 'SELECT HANDLEETAPAATUAL, HANDLEPROXIMAETAPA FROM K_SGQD_PROXIMA_ETAPA WHERE NUMEROSERIE = :numeroserie';\n\n\t\t\t$queryData = json_decode('{\n\t\t\t\t\":numeroserie\":\"' . $this->scanNumeroSerie . '\"\n\t\t\t}');\n\n\t\t\t$this->kSgqdProximaEtapa = $this->selectRow($pdo, $query, $queryData);\n\n\t\t\treturn isset($this->kSgqdProximaEtapa);\n\t\t}", "function getDevicesResult() {\n\treturn db_query(\"SELECT name as Name, lpad(hex(serial),16,'0') as Serial, type as Type, active as Active FROM Devices\");\n}", "function IMuPort()\n {\n\n return 40082;\n }", "public function scanPort($protocol, $port, $ip, $timeout = null)\n {\n // Check if we need to override the default timeout\n $useTimeout = (empty($timeout))? $this->portscan_timeout : $timeout ;\n\n $start = microtime(true);\n try {\n $client = stream_socket_client(\"$protocol://$ip:$port\", $errno, $errorMessage, $useTimeout);\n\n $end = microtime(true);\n if ($client === false) {\n $status = 'off';\n } else {\n $status = 'on';\n }\n } catch (\\Exception $ex) {\n $end = microtime(true);\n $status = 'off';\n }\n\n return array(\n 'status' => $status,\n 'time' => ($end-$start)\n );\n }", "public function get_data($serial = '')\n {\n $out = array();\n if (! $this->authorized()) {\n $out['error'] = 'Not authorized';\n } else {\n $prm = new Mdm_status_model;\n foreach ($prm->retrieve_records($serial) as $mdm_status) {\n $out[] = $mdm_status->rs;\n }\n }\n \n $obj = new View();\n $obj->view('json', array('msg' => $out));\n }", "public function search_dispositivo($codigo) {\n\t\tif($codigo != FALSE) {\n\t\t\t$query = $this->db->select('devices_almacen.*')\n\t\t\t//->where('devices_almacen.status','En stock')\n\t\t\t->where(\"(devices_almacen.IMEI LIKE '$codigo' OR devices_almacen.mac LIKE '$codigo' \n\t\t\tOR devices_almacen.serial LIKE '$codigo' OR devices_almacen.barcode LIKE '$codigo')\")\n\t\t\t->get('devices_almacen');\n\t\n\t\t\treturn $query->result();\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function scan()\n {\n $id = $this->input->post('id');\n\n // data scan\n $data_scan = array(\n 'kode_baterai' => $id, \n );\n\n $insert = $this->M_codeigniter->insert('tbl_scan',$data_scan);\n //jika berhasil insert data scan\n if ($insert > 0) {\n\n //set output\n $output = array(\n 'status' => true,\n 'pesan' => 'sukses'\n );\n } else {\n $output = array(\n 'status' => false,\n 'pesan' => \"<div class='col-lg-12'><center><h4>Gagal</h4></center></div></div>\"\n );\n }\n\n echo json_encode($output);\n }", "function PrinterLog_logArduino($command, $output = '') {\r\n\treturn PrinterLog__logToFile('log_arduino', $command, $output); \r\n}", "public function hdmi()\n {\n }", "public function apagarPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"OFF\");\n $this->setEncendidoPizarra(0);\n\n }", "public static function identification_data($text)\n {\n $values = [];\n $values = unpack(\"v1ddc/a10imo_nr/C1serial_count\", $text);\n $values = unpack(\"v1ddc/a10imo_nr/C1serial_count/a\" . $values['serial_count'] . \"cds_serial/C1ship_name_count\", $text);\n $values = unpack(\"v1ddc/a10imo_nr/C1serial_count/a\" . $values['serial_count'] . \"cds_serial/C1ship_name_count/a\" . $values['ship_name_count'] . \"ship_name/C1hull_no_count\", $text);\n $values = unpack(\"v1ddc/a10imo_nr/C1serial_count/a\" . $values['serial_count'] . \"cds_serial/C1ship_name_count/a\" . $values['ship_name_count'] . \"ship_name/C1hull_no_count/a\" . $values['hull_no_count'] . \"hull_no/C1engine_name_count\", $text);\n $values = unpack(\"v1ddc/a10imo_nr/C1serial_count/a\" . $values['serial_count'] . \"cds_serial/C1ship_name_count/a\" . $values['ship_name_count'] . \"ship_name/C1hull_no_count/a\" . $values['hull_no_count'] . \"hull_no/C1engine_name_count/a\" . $values['engine_name_count'] . \"engine_name/V1daily_file_date/V1last_config_changed\", $text);\n // hatte bei einigen Schiffen ein ^@ bzw. \\0 am Stringende\n $values['cds_serial'] = trim($values['cds_serial']);\n\n if (\"02080531\" == $values['cds_serial']) {\n $values['cds_serial'] = '02080572';\n }\n\n /*\n $this->arrSession['CDS_Serial'] = $values['cds_serial'];\n echo \"Last config changed: \" . date(\"Y-m-d H:i:s\", $values['last_config_changed']) . \"\\n\";\n if (\"-\" == $values['imo_nr']) {\n $this->arrSession['IMO_No'] = $values['cds_serial'];\n } else {\n $this->arrSession['IMO_No'] = $values['imo_nr'];\n }\n\n $this->arrSession['ref_meas_time'] = $values['daily_file_date'];\n $sql_string = \"SELECT * FROM ship_table WHERE CDS_SerialNo ='\" . trim($values['cds_serial']) . \"' LIMIT 1\";\n // mysql_select_db($this->arrSession['DB2']);\n $result = mysql_query($sql_string, $this->arrSession['DB_CONNECTION']['usr_web7_1']);\n unset($this->arrSession['error_code']);\n if (!$result) {\n $this->arrSession['error_code'] = \"Unbekannte CDS-Seriennummer!\";\n } else {\n while ($row = mysql_fetch_object($result)) {\n $this->arrSession['ship_data'] = $row;\n }\n\n }\n */\n return $values;\n }", "function motor_status() {\n // Read pin values.\n $leftPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . LEFT_PIN));\n $rightPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . RIGHT_PIN));\n $forwardPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . FORWARD_PIN));\n $backwardPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . BACKWARD_PIN));\n\n $status = array();\n\n // Get status of front motor.\n if (($leftPinVal == 0 && $rightPinVal == 0) || ($leftPinVal == 1 && $rightPinVal == 1)) {\n $status['front'] = 'neutral';\n }\n else if ($leftPinVal == 1 && $rightPinVal == 0) {\n $status['front'] = 'left';\n }\n else {\n $status['front'] = 'right';\n }\n\n // Get status of back motor.\n if (($forwardPinVal == 0 && $backwardPinVal == 0) || ($forwardPinVal == 1 && $backwardPinVal == 1)) {\n $status['back'] = 'neutral';\n }\n else if ($forwardPinVal == 1 && $backwardPinVal == 0) {\n $status['back'] = 'forward';\n }\n else {\n $status['back'] = 'backward';\n }\n\n return $status;\n}", "function playerStatus()\n\t\t{\n\t\t\t$request = $_SESSION['mac'].\" status 0 100 \\n \";\n\t\t\t$mySqueezeCLI = new SqueezeCLI($request);\n\t\t\t$response = $mySqueezeCLI->receiveCLI();\n\t\t\t//echo \"la réponse non traité : $response \\n\";\n\t\t\t//parfois le retour CLI change attention\n\t\t\t//$response = get_string_between($response,\" mode:\",\"rate:\");\n\t\t\t$response = substr($response, strpos($response, \"mode:\"));\n\t\t\t$response = substr($response, 0, strpos($response, \" \"));\n\t\t\t$response = substr($response, 5);\n\n\t\t\treturn $response;\n\t\t}", "public function enviarNumero( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\", \"MARCADO\",$this->getNumeroIP());\n $this->enviarPeticion($cmd->getComando());\n\n }", "function get_inverter_data() {\n\t$context = stream_context_create(array(\n\t\t\t'http' => array(\n\t\t\t\t\t'header' => \"Authorization: Basic \" . base64_encode(\"pvserver:pvwr\"))));\n\t$data = file_get_contents('http://inverter.fritz.box', false, $context);\n\n\t$search_string = '<td width=\"70\" align=\"right\" bgcolor=\"#FFFFFF\">';\n\t$sl = strlen($search_string);\n\n\t/* Locate fields in order current, total, totalDaily */\n\t$cur_pos = strpos($data, $search_string, 0) + $sl;\n\t$total_pos = strpos($data, $search_string, $cur_pos+1) + $sl;\n\t$total_daily_pos = strpos($data, $search_string, $total_pos+1) + $sl;\n\n\t/* echo \"${cur_pos}, ${total_pos}, ${total_daily_pos}\"; */\n\n\t$cur = get_field($data, $cur_pos);\n\tif (strpos($cur, ' x x') != FALSE)\n\t\t$cur = 0;\n\t$total = get_field($data, $total_pos);\n\t$total_daily = get_field($data, $total_daily_pos);\n\t\n\t/* Next are: string voltage 1(V), L1(V), string 1 current (A), L1 power(W), string 2 voltage (V), L2(V), string 2 current (A) */\n\t/* Aim is to calculate DC input and thereby efficiency */\n\t$s1_v_pos = strpos($data, $search_string, $total_daily_pos+1) + $sl;\n\t$l1_v_pos = strpos($data, $search_string, $s1_v_pos+1) + $sl;\n\t$s1_a_pos = strpos($data, $search_string, $l1_v_pos+1) + $sl;\n\t$l1_w_pos = strpos($data, $search_string, $s1_a_pos+1) + $sl;\n\t$s2_v_pos = strpos($data, $search_string, $l1_w_pos+1) + $sl;\n\t$l2_v_pos = strpos($data, $search_string, $s2_v_pos+1) + $sl;\n\t$s2_a_pos = strpos($data, $search_string, $l2_v_pos+1) + $sl;\n\t\n\t$s1_v = get_field($data, $s1_v_pos);\n\t$s1_a = get_field($data, $s1_a_pos);\n\t$s2_v = get_field($data, $s2_v_pos);\n\t$s2_a = get_field($data, $s2_a_pos);\n\t\n\tif ($cur == 0) {\n\t\t$dc = 0;\n\t\t$eff = 0;\n\t} else {\n\t\t$dc = $s1_v * $s1_a + $s2_v * $s2_a;\n\t\t$eff = round (100.0 * $cur / $dc, 1);\n\t}\n\t\n\t/* echo \"${s1_v} ${s1_a} ${s2_v} ${s2_a} .. ${dc} .. ${eff}\\n\"; */\n\t\n\n\treturn join(\",\", array($cur, $total_daily, $total, $eff));\n}", "function download_rcpt()\n\t{\n\n\t\t$root = $_SERVER['DOCUMENT_ROOT'];\n\t\t$nmfile = glob($root.'/qrcode/download/ebs/unprocess/*7167STOCKRECEIPT*.csv', GLOB_BRACE);\n\n\t\t$sql\t=\" select count(1) ADA_DATA \n\t\t\t\t\t from STOCK_ISSUE_INBOUND\n\t\t\t\t\t where file_name = $nmfile\n\t\t\t\t\t and STATUS not in ('DRAFT')\n\t\t\t\t\t \";\t\t\n\n\t\t$qReqID = $this->db->query($sql);\n\t\t$row = $qReqID->row(); \t\n\t\t$isAdaData = $row->ADA_DATA; \n\n\t\t// end validasi\n\t\tset_time_limit(0);\n\t\t\n\t\tif ($isAdaData == 1)\n\t\t{\n\t\t\techo '2';\t\n\t\t} else \n\t\t{\n\t\t\t$data\t= $this->Sync_Ebis_mdl->get_download_rcpt();\n\t\t\t\n\t\t\tif($data){\n\t\t\t\techo '1';\n\t\t\t} else {\n\t\t\t\techo '0';\n\t\t\t}\n\t\t}\n\t}", "private function getNewPort(){\r\n // donner le plus petit au dessus de 50505\r\n /*\r\n $requete=\"select port from users order by port\";\r\n $lastPort = intval(\"50505\");\r\n $listPort = $this->getRequeteList($requete);\r\n print_r($listPort);\r\n if ($listPort){\r\n foreach ($listPort as $item){\r\n $portItem=intval($item);\r\n if ($lastPort = 0){\r\n $lastPort = $portItem;\r\n }\r\n $newport=$lastPort + 1;\r\n if ($portItem > $newport){\r\n return $newPort;\r\n }\r\n }\r\n }\r\n */\r\n $newPort = 50507;\r\n return $newPort;\r\n }", "function setDeviceState($dserial, $state) {\n\t#$non_num_pattern = \"/[^0-9A-Z]/\";\n\t\n\t#if(preg_match($non_num_pattern, $dserial) || preg_match($non_num_pattern, $state)) {\n\t#\tdie('Non decimal character detected');\n\t#}\n\t\n\t$state = intval($state, 10);\n\t\n\tif($state == DeviceState::Off) $msg = 'off';\n\telse if($state == DeviceState::On) $msg = 'on';\n\telse die('Invalid state' . $state);\n\t\n\t$msg .= '/pi/' . $dserial;\n\t\n\t$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\tif(!$sock) die('PHP cannot create socket');\n\t\n\tif(!socket_connect($sock, SCRIPT_IP, SCRIPT_PORT)) {\n\t\tsocket_close($sock);\n\t\tdie('Cannot connect to PiHome.py ip and port at ' . SCRIPT_IP . ', ' . SCRIPT_PORT);\n\t}\n\t\n\tsocket_send($sock, $msg, strlen($msg), 0);\n\t\n\tsocket_close($sock);\n}", "public function get_smart_data($drive)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $shell = new Shell();\n $args = '-A ' . $drive;\n $options['env'] = 'LANG=en_US';\n $shell->execute(self::CMD_SMARTCTL, $args, TRUE, $options);\n $retval = $shell->get_output();\n } catch (Exception $e) {\n //do nothing\n }\n\n foreach ($retval as $line) {\n $line2 = \" \".$line;\n $line2 = preg_replace('/\\s+/m', '|', $line2);\n $pieces = explode(\"|\", $line2);\n\n if ($pieces[1]=='194') {\n $field = 'Temp';\n // fudge for odd raw values which contain hours and minutes\n $output[$field]['Raw'] = $pieces[10].$pieces[11].$pieces[12].$pieces[13].$pieces[14];\n $output[$field]['T'] = $pieces[6];\n $output[$field]['W'] = $pieces[5];\n $output[$field]['V'] = $pieces[4];\n }\n if ($pieces[1]=='1') {\n $field = 'RawReadErrorRate';\n $output[$field]['Raw'] = $pieces[10];\n $output[$field]['T'] = $pieces[6];\n $output[$field]['W'] = $pieces[5];\n $output[$field]['V'] = $pieces[4];\n }\n if ($pieces[1]=='12') {\n $field ='PowerCycle';\n $output[$field]['Raw'] = $pieces[10];\n $output[$field]['T'] = $pieces[6];\n $output[$field]['W'] = $pieces[5];\n $output[$field]['V'] = $pieces[4];\n } \n if ($pieces[1]=='9') {\n $field = 'PowerOnHours';\n $output[$field]['Raw'] = $pieces[10];\n $output[$field]['T'] = $pieces[6];\n $output[$field]['W'] = $pieces[5];\n $output[$field]['V'] = $pieces[4];\n }\n if ($pieces[1]=='7') {\n $field = 'SeekErrorRate';\n $output[$field]['Raw'] = $pieces[10];\n $output[$field]['T'] = $pieces[6];\n $output[$field]['W'] = $pieces[5];\n $output[$field]['V'] = $pieces[4];\n }\n if ($pieces[1]=='5') {\n $field = 'ReAllocSector';\n $output[$field]['Raw'] = $pieces[10];\n $output[$field]['T'] = $pieces[6];\n $output[$field]['W'] = $pieces[5];\n $output[$field]['V'] = $pieces[4];\n }\n if ($pieces[1]=='10') {\n $field = 'SpinRetryCnt';\n $output[$field]['Raw'] = $pieces[10];\n $output[$field]['T'] = $pieces[6];\n $output[$field]['W'] = $pieces[5];\n $output[$field]['V'] = $pieces[4];\n }\n if ($pieces[1]=='3') {\n $field = 'SpinUpTime';\n $output[$field]['Raw'] = $pieces[10];\n $output[$field]['T'] = $pieces[6];\n $output[$field]['W'] = $pieces[5];\n $output[$field]['V'] = $pieces[4];\n } \n }\n return $output;\n }", "private function readDigits()\n {\n }", "public function vga_input($cikkszam = ''){\n if (bothAdminSeller($_SESSION['jog'])) {\n $pciSlots = [\n 'PCI-E 16x 2.0',\n 'PCI-E 16x 3.0',\n 'PCI-E 16x 4.0'\n ];\n $vramCap = [\n 1,2,3,4,5,6,8,11,24\n ];\n $warranity = $this->adminModel->getWarranity();\n $manufacturers = $this->vgaModel->getVgaManufacturers();\n $data = [\n 'main_title' => 'VGA bevitele',\n 'cikkszam' => $cikkszam,\n 'manufacturers' => $manufacturers,\n 'selected_man' => '',\n 'warranity' => $warranity,\n 'vramCap' => $vramCap,\n 'pciSlots' => $pciSlots,\n 'selected_warr' =>'',\n 'price' => '',\n 'vga_stock' => '',\n 'picUrl' => '',\n 'man_url' => '',\n 'type' => '',\n 'typeCode' => '',\n 'vga_man' =>'',\n 'pci_type' => '',\n 'gpu_clock' => '',\n 'gpu_peak' => '',\n 'vram_capacity' => '',\n 'vram_clock' => '',\n 'vram_type' => '',\n 'vram_bandwidth' => '',\n 'power_consumption' => '',\n 'power_pin' => '',\n 'directX' => '',\n 'displayPort' => '',\n 'DVI' => '',\n 'HDMI' => '',\n 'disabledIn' => '',\n 'disabledModify' => 'disabled'\n ];\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n if (isset($_POST['vgaInput'])) {\n $data = [\n 'main_title' => 'VGA bevitele',\n 'cikkszam' => trim($_POST['cikkszam']),\n 'manufacturers' => $manufacturers,\n 'selected_man' => trim($_POST['selected_man']),\n 'warranity' => $warranity,\n 'vramCap' => $vramCap,\n 'pciSlots' => $pciSlots,\n 'selected_warr' => trim($_POST['selected_warr']),\n 'price' => trim($_POST['price']),\n 'vga_stock' => trim($_POST['vga_stock']),\n 'picUrl' => trim($_POST['picUrl']),\n 'man_url' => trim($_POST['man_url']),\n 'type' => trim($_POST['type']),\n 'typeCode' => trim($_POST['typeCode']),\n 'vga_man' => trim($_POST['vga_man']),\n 'pci_type' => trim($_POST['pci_type']),\n 'gpu_clock' => trim($_POST['gpu_clock']),\n 'gpu_peak' => trim($_POST['gpu_peak']),\n 'vram_capacity' => trim($_POST['vram_capacity']),\n 'vram_clock' => trim($_POST['vram_clock']),\n 'vram_type' => trim($_POST['vram_type']),\n 'vram_bandwidth' => trim($_POST['vram_bandwidth']),\n 'power_consumption' => trim($_POST['power_consumption']),\n 'power_pin' => trim($_POST['power_pin']),\n 'directX' => trim($_POST['directX']),\n 'displayPort' => trim($_POST['displayPort']),\n 'DVI' => trim($_POST['DVI']),\n 'HDMI' => trim($_POST['HDMI']),\n 'disabledIn' => '',\n 'disabledModify' => 'disabled'\n ];\n try{\n if ($this->adminModel->VGAInput($data) && $this->adminModel->VGAManUrlInput($data['cikkszam'],$data['man_url']) && $this->adminModel->VGAPicUrlInput($data['cikkszam'],$data['picUrl']) && $this->adminModel->VGAPriceInput($data['cikkszam'],$data['price']) && $this->adminModel->VGAStockInput($data['cikkszam'],$data['vga_stock'])) {\n flash('input_success','A '.$data['type'].' Termék bevitele sikeres volt');\n redirect('admins/vga_input');\n }else {\n flash('input_fail','A '.$data['type'].' Termék bevitele sikertelen volt!!', 'alert alert-danger');\n redirect('admins/vga_input');\n }\n }catch(PDOException $ex){\n flash('input_fail',$ex->getMessage(), 'alert alert-danger');\n redirect('admins/vga_input');\n }\n } elseif(isset($_POST['editVGA'])){\n $vgaByCikk = $this->vgaModel->getVgaByCikkszam($cikkszam);\n $data = [\n 'main_title' => 'VGA bevitele',\n 'cikkszam' => $cikkszam,\n 'manufacturers' => $manufacturers,\n 'vramCap' => $vramCap,\n 'pciSlots' => $pciSlots,\n 'selected_man' => $vgaByCikk->manufacturer_id,\n 'warranity' => $warranity,\n 'selected_warr' => $vgaByCikk->warr_id,\n 'price' => $vgaByCikk->price,\n 'vga_stock' => $vgaByCikk->vga_stock,\n 'picUrl' => $vgaByCikk->picUrl,\n 'man_url' => $vgaByCikk->Url,\n 'type' => $vgaByCikk->type,\n 'typeCode' => $vgaByCikk->typeCode,\n 'vga_man' => $vgaByCikk->vga_man,\n 'pci_type' => $vgaByCikk->pci_type,\n 'gpu_clock' => $vgaByCikk->gpu_clock,\n 'gpu_peak' => $vgaByCikk->gpu_peak,\n 'vram_capacity' => $vgaByCikk->vram_capacity,\n 'vram_clock' => $vgaByCikk->vram_clock,\n 'vram_type' => $vgaByCikk->vram_type,\n 'vram_bandwidth' => $vgaByCikk->vram_bandwidth,\n 'power_consumption' => $vgaByCikk->power_consumption,\n 'power_pin' => $vgaByCikk->power_pin,\n 'directX' => $vgaByCikk->directX,\n 'displayPort' => $vgaByCikk->displayPort,\n 'DVI' => $vgaByCikk->DVI,\n 'HDMI' => $vgaByCikk->HDMI,\n 'disabledIn' => 'disabled',\n 'disabledModify' => ''\n ];\n }elseif(isset($_POST['vgaModify'])){\n $data = [\n 'cikkszam' => $cikkszam,\n 'selected_man' => trim($_POST['selected_man']),\n 'selected_warr' => trim($_POST['selected_warr']),\n 'price' => trim($_POST['price']),\n 'vga_stock' => trim($_POST['vga_stock']),\n 'picUrl' => trim($_POST['picUrl']),\n 'man_url' => trim($_POST['man_url']),\n 'type' => trim($_POST['type']),\n 'typeCode' => trim($_POST['typeCode']),\n 'vga_man' => trim($_POST['vga_man']),\n 'pci_type' => trim($_POST['pci_type']),\n 'gpu_clock' => trim($_POST['gpu_clock']),\n 'gpu_peak' => trim($_POST['gpu_peak']),\n 'vram_capacity' => trim($_POST['vram_capacity']),\n 'vram_clock' => trim($_POST['vram_clock']),\n 'vram_type' => trim($_POST['vram_type']),\n 'vram_bandwidth' => trim($_POST['vram_bandwidth']),\n 'power_consumption' => trim($_POST['power_consumption']),\n 'power_pin' => trim($_POST['power_pin']),\n 'directX' => trim($_POST['directX']),\n 'displayPort' => trim($_POST['displayPort']),\n 'DVI' => trim($_POST['DVI']),\n 'HDMI' => trim($_POST['HDMI']),\n ];\n if ($this->vgaModel->updateVgaProduct($data) && $this->vgaModel->updateVgaManUrl($data['cikkszam'], $data['man_url']) && $this->vgaModel->updateVgaPicUrl($data['cikkszam'], $data['picUrl']) && $this->vgaModel->updateVgaPrice($data['cikkszam'], $data['price']) && $this->vgaModel->updateVgaStockpile($data['cikkszam'], $data['vga_stock'])) {\n flash('modify_success','A '.$data['type'].' Termék módosítása sikeres volt');\n redirect('admins/vga_input');\n }else {\n flash('modify_fail','A '.$data['type'].' Termék módosítása sikertelen volt!!', 'alert alert-danger');\n redirect('admins/vga_input');\n }\n /**\n * TEENDŐK:\n * -ellenőrizni, hogy készleten vannak-e atermékek, illteve csőkkenteni a termék \n * számát\n * - MEGOLDANI, hogy a vásárlásaim tábla reponsive legyen\n * - ESETLEG betteni a pdf-et mediumBLOB-ba a DB-be NEM!!!\n * - AZ ADMINBÓL áttenni az input/modify/delete functionokat a hozzá tartozó\n * termék model-jébe\n */\n }\n }\n $this->view('admin/vga_input',$data);\n }else{\n redirect('index');\n }\n }", "public function productScanning(){\n $user = $this->auth();\n if(empty($this->auth())){\n Utils::response(['status'=>false,'message'=>'Forbidden access.'],403);\n }\n $data = $this->getInput();\n if(($this->input->method() != 'post') || empty($data)){ \n Utils::response(['status'=>false,'message'=>'Bad request.'],400);\n }\n $validate = [\n ['field' =>'bar_code','label'=>'Barcode','rules' => 'required' ],\n\t\t\t['field' =>'scan_city','label'=>'Scan City','rules' => 'trim' ],\n\t\t\t['field' =>'pin_code','label'=>'Scan PIN Code','rules' => 'trim' ],\n ['field' =>'latitude','label'=>'Latitude','rules' => 'trim'],\n ['field' =>'longitude','label'=>'Longitude','rules' => 'trim' ],\n\t\t\t//['field' =>'registration_address','label'=>'Registration Address','rules' => 'trim|required' ],\n ];\n $errors = $this->ScannedproductsModel->validate($data,$validate);\n if(is_array($errors)){\n Utils::response(['status'=>false,'message'=>'Validation errorss.','errors'=>$errors]);\n }\n $result = $this->ScannedproductsModel->findProduct($data['bar_code']);\n $bar_code_data = $data['bar_code'];\n\t\t$bar_code2_data = $data['bar_code'];\n\t\t$product_id = $result->id;\n\t\t$consumerId = $user['id'];\n\t\t$data['ps_ip_address'] = $this->input->ip_address();\n\t\t\n\t\t// function to get product registration status\n $isRegistered = $this->ScannedproductsModel->isProductRegistered($bar_code_data, $bar_code2_data); \n\t\n $isLoyaltyForVideoFBQuesGiven = $this->ScannedproductsModel->isLoyaltyForVideoFBQuesGiven($consumerId,$product_id);\n $isLoyaltyForAudioFBQuesGiven = $this->ScannedproductsModel->isLoyaltyForAudioFBQuesGiven($consumerId,$product_id);\n $isLoyaltyForImageFBQuesGiven = $this->ScannedproductsModel->isLoyaltyForImageFBQuesGiven($consumerId,$product_id);\n $isLoyaltyForPDFFBQuesGiven = $this->ScannedproductsModel->isLoyaltyForPDFFBQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductPushedAdVideoFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductPushedAdVideoFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductPushedAdAudioFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductPushedAdAudioFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductPushedAdPDFFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductPushedAdPDFFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductPushedAdImageFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductPushedAdImageFeedbackQuesGiven($consumerId,$product_id);\n\t\t\n\t\t$isLoyaltyForProductSurveyVideoFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductSurveyVideoFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductSurveyAudioFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductSurveyAudioFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductSurveyPDFFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductSurveyPDFFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductSurveyImageFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductSurveyImageFeedbackQuesGiven($consumerId,$product_id);\n\t\t\n\t\t$isLoyaltyForProductDemoVideoFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductDemoVideoFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductDemoAudioFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductDemoAudioFeedbackQuesGiven($consumerId,$product_id);\n\t\t\n\t\t$mnv25_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 25)->get()->row();\n\t\t$mnvtext25 = $mnv25_result->message_notification_value;\n\t\t$mnv26_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 26)->get()->row();\n\t\t$mnvtext26 = $mnv26_result->message_notification_value;\n\t\t$mnv27_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 27)->get()->row();\n\t\t$mnvtext27 = $mnv27_result->message_notification_value;\n\t\t$mnv28_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 28)->get()->row();\n\t\t$mnvtext28 = $mnv28_result->message_notification_value;\n\t\t$mnv29_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 29)->get()->row();\n\t\t$mnvtext29 = $mnv29_result->message_notification_value;\n\t\t$mnv30_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 30)->get()->row();\n\t\t$mnvtext30 = $mnv30_result->message_notification_value;\n \n if(empty($result)){\n $data['user_id'] = $user['id'];\n $data['created'] = date('Y-m-d H:i:s');\n $this->db->insert('scanned_product_logs', $data);\n\t\t$mnv24_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 24)->get()->row();\n\t\t$mnvtext24 = $mnv24_result->message_notification_value;\n //$this->response(['status'=>false,'message'=>'This product and barcode is not supported by TRUSTAT.'],200);\n\t\t\t$this->response(['status'=>false,'message'=>$mnvtext24],200);\n }\n\t\tif(!empty($result->product_thumb_images)){\n $result->product_thumb_images = Utils::setFileUrl($result->product_thumb_images);\n }\n\t\t\n if(!empty($result->product_image)){\n $result->product_image = Utils::setFileUrl($result->product_image);\n }\n\t\tif(!empty($result->product_code_print_bg_images)){\n $result->product_code_print_bg_images = Utils::setFileUrl($result->product_code_print_bg_images);\n }\n if(!empty($result->product_video)){\n $result->product_video = Utils::setFileUrl($result->product_video);\n }\n if(!empty($result->product_audio)){\n $result->product_audio = Utils::setFileUrl($result->product_audio);\n }\n if(!empty($result->product_pdf)){\n $result->product_pdf = Utils::setFileUrl($result->product_pdf);\n }\n\t\tif(!empty($result->product_demo_video)){\n $result->product_demo_video = Utils::setFileUrl($result->product_demo_video);\n }\n\t\tif(!empty($result->product_demo_audio)){\n $result->product_demo_audio = Utils::setFileUrl($result->product_demo_audio);\n }\n\t\tif(!empty($result->product_user_manual)){\n $result->product_user_manual = Utils::setFileUrl($result->product_user_manual);\n }\n\t\t$result->product_registration_status = $isRegistered;\n\n\t\t$result->isLoyaltyForVideoFBQuesGiven = $isLoyaltyForVideoFBQuesGiven;\n\t\t$result->isLoyaltyForAudioFBQuesGiven = $isLoyaltyForAudioFBQuesGiven;\n\t\t$result->isLoyaltyForImageFBQuesGiven = $isLoyaltyForImageFBQuesGiven;\n\t\t$result->isLoyaltyForPDFFBQuesGiven = $isLoyaltyForPDFFBQuesGiven;\n\t\t$result->isLoyaltyForProductPushedAdVideoFeedbackQuesGiven = $isLoyaltyForProductPushedAdVideoFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductPushedAdAudioFeedbackQuesGiven = $isLoyaltyForProductPushedAdAudioFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductPushedAdPDFFeedbackQuesGiven = $isLoyaltyForProductPushedAdPDFFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductPushedAdImageFeedbackQuesGiven = $isLoyaltyForProductPushedAdImageFeedbackQuesGiven;\n\t\t\n\t\t$result->isLoyaltyForProductSurveyVideoFeedbackQuesGiven = $isLoyaltyForProductSurveyVideoFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductSurveyAudioFeedbackQuesGiven = $isLoyaltyForProductSurveyAudioFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductSurveyPDFFeedbackQuesGiven = $isLoyaltyForProductSurveyPDFFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductSurveyImageFeedbackQuesGiven = $isLoyaltyForProductSurveyImageFeedbackQuesGiven;\n\t\t\n\t\t$result->isLoyaltyForProductDemoVideoFeedbackQuesGiven = $isLoyaltyForProductDemoVideoFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductDemoAudioFeedbackQuesGiven = $isLoyaltyForProductDemoAudioFeedbackQuesGiven;\n\t\t\n\t\t\n\n\t\t$result->scanned_code = $data['bar_code']; \n\t\tif($data['bar_code'] == ($result->barcode_qr_code_no)) {\n\t\t\t\n\t\t$result->activation_level = $result->pack_level; \n\t\t\n\t\t$activation_packaging_level = $result->pack_level; \n\t\t\n\t\t\n\t\t} else {\n\t\t\t\n\t\t$result->activation_level = $result->pack_level2; \n\t\t$activation_packaging_level = $result->pack_level2;\n\t\t\t\n\t\t} \n $data['consumer_id'] = $user['id'];\n\t\t\n $data['product_id'] = $result->id;\n\t\t$data['customer_id'] = $result->created_by;\n $data['code_scan_date'] = date(\"Y-m-d H:i:s\");\n\t\t$data['del_by_cs'] = 0;\n //$result->pack_level = $result->pack_level; registration_status\n\t\t\n\t\t$consumer_id = $data['consumer_id'];\n\t\t$customer_id = $data['customer_id'];\n\t\t$product_id = $data['product_id'];\n\t\t\n\t\t$isConsAlreadyLinkedtoCust = $this->ScannedproductsModel->isConsAlreadyLinkedtoCust($consumer_id, $customer_id);\t\t\n\t\t\n\t\t$mnv1_result62 = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 62)->get()->row();\n\t\t$message_notification_value62 = $mnv1_result62->message_notification_value;\n\t\t\n if($this->db->insert($this->ScannedproductsModel->table, $data)){\t\n\t\t\n\t\tif($isConsAlreadyLinkedtoCust==false){\n\t\t$data['registration_status'] = \"Registered\";\n\t\t$this->db->insert('consumer_customer_link', $data);\n\t\t}\n\t\t\n\t\t\tif($activation_packaging_level==1){\n\t\t\t// Consumer Activity Log Data insert start\n\t\t\t$CALdata['date_time'] = date('Y-m-d H:i:s'); \n\t\t\t$CALdata['consumer_name'] = get_consumer_name_by_consumer_id($consumerId);\n\t\t\t$CALdata['consumer_id'] = $consumerId; \n\t\t\t$CALdata['consumer_mobile'] = getConsumerMobileNumberById($consumerId); \n\t\t\t$CALdata['customer_name'] = getUserNameById($customer_id); \n\t\t\t$CALdata['customer_id'] = $customer_id; \n\t\t\t$CALdata['unique_customer_code'] = getCustomerCodeById($customer_id); \n\t\t\t$CALdata['product_name'] = get_products_name_by_id($product_id); \n\t\t\t$CALdata['product_id'] = $product_id; \n\t\t\t$CALdata['product_sku'] = get_product_sku_by_id($product_id); \n\t\t\t$CALdata['product_code'] = $data['bar_code']; \n\t\t\t$CALdata['gloc_latitude'] = $data['latitude'];\n\t\t\t$CALdata['gloc_longitude'] = $data['longitude'];\n\t\t\t$CALdata['gloc_city'] = $data['scan_city'];\n\t\t\t$CALdata['gloc_pin_code'] = $data['pin_code'];\n\t\t\t$CALdata['consumer_activity_type'] = $message_notification_value62;\n\t\t\t$CALdata['loyalty_rewards_points'] = 0;\n\t\t\t$CALdata['loyalty_rewards_type'] = getCustomerLoyaltyTypeById($customer_id);\n\t\t\t\n\t\t\t$this->db->insert('consumer_activity_log_table', $CALdata);\n\t\t\t// Consumer Log Data insert end\n\t\t\t}\n\t\t\t$updateDataCityScan = array(\n\t\t\t\t\t 'city_last_scan' => $data['scan_city']\n\t\t\t\t\t\t);\n\t\t\t\t\t$this->db->update('consumers', $updateDataCityScan, array('id' => $consumerId));\n\t\t\t\t\t\n\t\t\t//$this->db->insert('consumer_customer_link', $data);\n\t\t\t\n\t\t\t\n\t\t\t// Super Loyalty start\t\t\n\t\t\t// Insert number if Scans \n\t\t\t//check if the product code is already registerd\n\t\t\tif($activation_packaging_level==1){\n\t\t$ifSuperLoyaltyAlreadyGivenConsumerProduct = $this->ScannedproductsModel->ifSuperLoyaltyAlreadyGivenConsumerProduct($product_id, $consumerId); \n\t\t\t}else{\n\t\t$ifSuperLoyaltyAlreadyGivenConsumerProduct = \"NotGiven\";\n\t\t\t}\n\t\t$isSuperLoyaltyYes\t= SuperLoyaltyStatusonProductByProductID($product_id);\n\t\tif($isSuperLoyaltyYes==\"Yes\"){\n\t\t\tif($isRegistered==false){\n\t\t\t\tif($ifSuperLoyaltyAlreadyGivenConsumerProduct==\"NotGiven\"){\n\t\t$resultC = $this->db->select('number_of_scans')->from('consumers')->where('id', $consumerId)->get()->row();\n\t\t$number_of_scansBD = $resultC->number_of_scans;\n\t\t$number_of_scansAD = $number_of_scansBD + 1;\n\t\t$updateData = array(\n\t\t\t\t\t 'number_of_scans' => $number_of_scansAD\n\t\t\t\t\t\t);\n\t\t\t\t\t$this->db->update('consumers', $updateData, array('id' => $consumerId));\n\t\t\t\t\t\n\t\t$resultP = $this->db->select('*')->from('products')->where('id', $product_id)->get()->row();\n\t\t$include_the_product_in_super_loyalty = $resultP->include_the_product_in_super_loyalty;\n\t\t$number_of_scans_for_super_loyalty = $resultP->number_of_scans_for_super_loyalty;\n\t\t$number_of_loyalty_points_for_super_loyalty = $resultP->number_of_loyalty_points_for_super_loyalty;\t\n\t\t$number_of_scans_for_productBD = $resultP->number_of_scans_for_product;\n\t\t\n\t\t$number_of_scans_for_productAD = $number_of_scans_for_productBD + 1;\n\t\t$updateDataP = array(\n\t\t\t\t\t 'number_of_scans_for_product' => $number_of_scans_for_productAD\n\t\t\t\t\t\t);\n\t\t\t\t\t$this->db->update('products', $updateDataP, array('id' => $product_id));\n\t\t\n\t$remainder = $number_of_scans_for_productAD%$number_of_scans_for_super_loyalty;\n\t\tif(($remainder ==0)&&($number_of_loyalty_points_for_super_loyalty!=0)) {\t\t\n\t\t//$Product_id = getProductIDbyProductCode($data['bar_code']);\n\t\t\t$customerId = get_customer_id_by_product_id($product_id);\t\t\t\n\t\t\t\t$purchased_points = total_approved_points2($customerId);\n\t\t\t\t$consumed_points = get_total_consumed_points($customerId);\n\t\t\t\t$customer_loyalty_type = get_customer_loyalty_type_by_customer_id($customerId);\n\t\t\t\t$product_name = get_products_name_by_id($product_id);\n\t\t\t\t$consumer_name = getConsumerNameById($consumerId);\t\n\t\t\t\t$product_brand_name = get_products_brand_name_by_id($product_id);\n\t\t\t\t$customer_id = get_customer_id_by_product_id($product_id);\n\t\t\t\t\n\t\t\t\t$customer_name = getUserFullNameById($customerId);\t\t\n\t\t\t\t$product_name = get_products_name_by_id($product_id);\n\t\t\t\t$consumer_name = getConsumerNameById($consumerId);\n\t\t\n\t\t\t\t\n\t\t\t\t$LPconsumed_points = $consumed_points+$number_of_loyalty_points_for_super_loyalty;\n\t\t\t\t//echo \"<pre>\";print_r($LPconsumed_points); die;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($purchased_points > ($consumed_points+$number_of_loyalty_points_for_super_loyalty)){\n $message = 'Thank You for Product Registration. '. $number_of_loyalty_points_for_super_loyalty .' loyalty points will be added to your TRUSTAT loyalty account';\n\t\t\t\t//echo \"<pre>Jyada\";print_r($LPconsumed_points); die;\n\t\t\t\t}else{\n\t\t\t\t\t$message = 'Thank You for Scan!';\n\t\t\t\t\t//echo \"<pre>kam\";print_r($LPconsumed_points); die;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t // $transactionType = 'product-registration-without-warranty'; \n\t\t\t\t$transactionType = \"Super Loyalty\";\n\t\t\t\t//$mnv61_result = $this->db->select('message_notification_value,message_notification_value_part2')->from('message_notification_master')->where('id', 61)->get()->row();\n\t\t\t\t//$mnvtext61 = $mnv61_result->message_notification_value;\n\t\t\t\t$mnvtext61 = getAPPPassbookOnScreenDisplayMessageSLByProductId($product_id);\n\t\t\t\t//$mnvtext61_p2 = $mnv61_result->message_notification_value_part2;\n\t\t\t //$transactionTypeName = $mnvtext61 . $number_of_scans_for_productAD . $mnvtext52_p2;\n\t\t\t $transactionTypeName = $mnvtext61;\n\t\t\t\t//$userId = $user['id'];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($purchased_points > ($consumed_points+$number_of_loyalty_points_for_super_loyalty)){\n\t\t\t\t$this->Productmodel->saveSuperLoylty($transactionType, $consumerId, $product_id, ['verification_date' => date(\"Y-m-d H:i:s\"), 'consumer_id' =>$consumerId, 'consumer_name' => $consumer_name, 'brand_name' => $product_brand_name, 'customer_name' => $customer_name, 'product_name' => $product_name, 'product_id' => $product_id, 'product_code' => $data['bar_code'],'customer_loyalty_type' => $customer_loyalty_type], $customer_id, $customer_loyalty_type, $number_of_loyalty_points_for_super_loyalty);\n\t\t\t\n\t\t\t\t$this->Productmodel->saveConsumerPassbookSuperLoyalty($transactionType, ['verification_date' => date(\"Y-m-d H:i:s\"), 'brand_name' => $product_brand_name, 'customer_name' => $customer_name, 'product_name' => $product_name, 'product_id' => $product_id, 'product_code' => $data['bar_code'],'customer_loyalty_type' => $customer_loyalty_type], $customer_id, $product_id, $consumerId, $transactionTypeName, 'Loyalty', $customer_loyalty_type, $number_of_loyalty_points_for_super_loyalty);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$fb_token = getConsumerFb_TokenById($consumerId);\n // $this->ConsumerModel->sendFCM('Thank you for Product Registration, Please check the details in \"my purchase list\" in TRUSTAT App.', $fb_token);\n\t\t\t //$mnv52_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 52)->get()->row();\n\t\t\t //$mnvtext52 = $mnv52_result->message_notification_value;\n\t\t\t $mnvtext52 = getAPPNotificationMessageforSuperLoyaltyByProductId($product_id);\n\t\t\t $this->ConsumerModel->sendFCM($mnvtext52, $fb_token);\n\t\t\t\t$NTFdata['consumer_id'] = $consumerId; \n\t\t\t\t$NTFdata['title'] = \"TRUSTAT Super Loyalty\";\n\t\t\t\t$NTFdata['body'] = $mnvtext52; \n\t\t\t\t$NTFdata['timestamp'] = date(\"Y-m-d H:i:s\",time()); \n\t\t\t\t$NTFdata['status'] = 0; \n\t\t\t\n\t\t\t$this->db->insert('list_notifications_table', $NTFdata);\n\t\t\t\n\t\t\t$TRNNC_result = $this->db->select('billin_particular_name, billin_particular_slug')->from('customer_billing_particular_master')->where('cbpm_id', 10)->get()->row();\n\t\t\t$TRNNC_billin_particular_name = $TRNNC_result->billin_particular_name;\n\t\t\t$TRNNC_billin_particular_slug = $TRNNC_result->billin_particular_slug;\n\t\t\t\n\t\t\t$TRNNCData['customer_id'] = $customer_id;\n\t\t\t$TRNNCData['consumer_id'] = $consumerId;\n\t\t\t$TRNNCData['billing_particular_name'] = $TRNNC_billin_particular_name.' TRUSTAT Super Loyalty';\t\t\n\t\t\t$TRNNCData['billing_particular_slug'] = $TRNNC_billin_particular_slug.'_TRUSTAT_Super_Loyalty';\n\t\t\t$TRNNCData['trans_quantity'] = 1; \n\t\t\t$TRNNCData['trans_date_time'] = date(\"Y-m-d H:i:s\",time()); \n\t\t\t$TRNNCData['trans_status'] = 1; \t\t\t\n\t\t\t$this->db->insert('tr_customer_bill_book', $TRNNCData);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Super Loyalty end\t\n\t\t\n\t\t\t\n\t\t\tif($result->barcode_qr_code_no == $data['bar_code']) {\n if( $result->pack_level == 0 ){\n if( $isRegistered ){\n\t\t\t\t\t\n\t\t\t\t\tif( $isRegistered == completed ){\n\t\t\t\t\t\n //$result->message1 = 'This product is already registered, please contact your retailer/manufacturer for further details.';\n\t\t\t\t\t$result->message1 = $mnvtext25;\n }else {\n\t\t\t\t\t//$result->message1 = 'This product registration is already under process. Outcome of product registration will be notified to TRUSTAT member, who had initiated the registration process.';\n\t\t\t\t\t$result->message1 = $mnvtext26;\n\t\t\t\t}\n\t\t\t\t}else{\n //$result->message1 = 'Thank You for initiating Product Registration, Click Ok to scan and upload valid invoice for this product purchase and activate the warranty.';\n\t\t\t\t\t$result->message1 = $mnvtext27;\n }\n }elseif( $result->pack_level == 1 ){\n //$result->message1 = 'Scanned product details for lavel '.$result->pack_level.'.';\n\t\t\t\t//$result->message1 = 'The barcode you have scanned is on the product packing, please scan the barcode on the product for registration.';\n\t\t\t\t$result->message1 = $mnvtext29;\n }elseif($result->pack_level > 1){\n //$result->message1 = 'This is not a product barcode for consumer, Please scan barcode placed on consumer pack';\n\t\t\t\t$result->message1 = $mnvtext30;\n }\n\t\t\t} else {\n\t\t\t\t\n\t\t\tif( $result->pack_level2 == 0 ){\n if( $isRegistered ){\n\t\t\t\t\t\n\t\t\t\t\tif( $isRegistered == completed ){\n\t\t\t\t\t\n //$result->message1 = 'This product is already registered, please contact your retailer/manufacturer for further details';\n\t\t\t\t\t$result->message1 = $mnvtext25;\n }else {\n\t\t\t\t\t//$result->message1 = 'This product registration is already under process. Outcome of product registration will be notified to TRUSTAT member, who had initiated the registration process';\n\t\t\t\t\t$result->message1 = $mnvtext26;\n\t\t\t\t}\n\t\t\t\t}else{\n // $result->message1 = 'Thank You for initiating Product Registration, Click Ok to scan and upload valid invoice for this product purchase and activate the warranty';\n\t\t\t\t\t $result->message1 = $mnvtext27;\n }\n }elseif( $result->pack_level2 == 1 ){\n //$result->message1 = 'Scanned product details for lavel '.$result->pack_level.'.';\n\t\t\t\t//$result->message1 = 'The barcode you have scanned is on the product packing, please scan the barcode on the product for registration.';\n\t\t\t\t$result->message1 = $mnvtext29;\n }elseif($result->pack_level2 > 1){\n //$result->message1 = 'This is not a product barcode for consumer, Please scan barcode placed on consumer pack';\n\t\t\t\t$result->message1 = $mnvtext30;\n }\t\n\t\t\t}\n\t\t\t\n //$this->response(['status'=>true,'message'=>'Scanned product details for lavel '.$result->pack_level.'.','data'=>$result]);\n\t\t$mnv31_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 31)->get()->row();\n\t\t$mnvtext31 = $mnv31_result->message_notification_value;\n\t\t\t//$this->response(['status'=>true,'message'=>'Thanks for scanning the product.','data'=>$result]);\n\t\t\t$this->response(['status'=>true,'message'=>$mnvtext31,'data'=>$result]);\n\t\t\t\n }else{\n\t\t$mnv32_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 32)->get()->row();\n\t\t$mnvtext32 = $mnv32_result->message_notification_value;\t\n // $this->response(['status'=>false,'message'=>'System failed to scan the record.'],200); \n\t\t\t$this->response(['status'=>false,'message'=>$mnvtext32],200); \n }\n }", "public function serial() {\n\t\tif(is_null($this->serial))\n\t\t\tthrow new DataAuthenticatorException('Unable to find a valid serial');\n\t\treturn $this->serial;\n\t}", "function Parameter_Liste_weiterenParameterHolen($ETA_ComID)\r\n {\r\n $ParameterListeStart =\"{MF\";\r\n\r\n\t\t\tIf (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 0) {\r\n \t$ParameterListeStartBytes = chr(02) . chr(02) . chr(01) . chr(01); //Standard\r\n\t } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 1) {\r\n \t$ParameterListeStartBytes = chr(02) . chr(03) . chr(01) . chr(02); //Service\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 2) {\r\n\t\t\t \t$ParameterListeStartBytes = chr(02) . chr(04) . chr(01) . chr(03); //Profi\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 3) {\r\n \t\t\t \t$ParameterListeStartBytes = chr(02) . chr(05) . chr(01) . chr(04); //Expert\r\n\t\t\t}\r\n $ParameterListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n $Daten = $ParameterListeStart . $ParameterListeStartBytes . $ParameterListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "public function checkBarcode(Request $request) //Cek barcode melaui scan hp || Jangan lupa database tes dan erasystem_2012 || Cari bercode berdasarkan data pengirim || Tambahkan parameter ID SO\n {\n $pt = $request->input('PT_ID'); // yg kirim\n $gudang = $request->input('GUDANG'); // yg kirim\n $barcode = $request->input('BARCODE');\n $kode = substr($barcode, 0, 13);\n $newpt = $pt == '1' ? 'ERA' : ( $pt == '2' ? 'ERI' : 'EPI'); \n\n //Jika pilih PT & gudang penerima\n //$id_so = $request->input('ID_SO');\n //$soi = DB::table('erasystem_2012.soi_pellet')->selectRaw('DARI_PT_ID, DARI_GUDANG')->where('ID_SO', $id_so)->first();\n //$newpt = $soi->DARI_PT_ID; // check barcode dari PT pengirim\n //$gudang = $soi->DARI_GUDANG; // cek barcode dari gudang pengirim\n \n $dept = 'PPC';\n $area = 'Plastics Pellet Warehouse';\n $newstatus = 'TERIMA';\n\n $soi_item = DB::table('erasystem_2012.soi_pellet_item')\n ->whereRaw('soi_pellet_item.KODE_PELLET = ?', [$kode])->select('*')->first();\n\n $result = DB::table('erasystem_2012.barcode_pellet')\n ->join('erasystem_2012.barcode_pellet_det', function ($join) {\n $join->on('barcode_pellet.BARCODE', '=', 'barcode_pellet_det.BARCODE')->on('barcode_pellet.LAST_UPDATE', '=', 'barcode_pellet_det.TANGGAL');\n })\n ->whereRaw('barcode_pellet_det.BARCODE = ? AND barcode_pellet_det.PT_ID = ? AND barcode_pellet_det.GUDANG = ? AND barcode_pellet_det.DEPT_ID = ? AND barcode_pellet_det.DEPT_AREA = ? AND barcode_pellet_det.STATUS = ? AND barcode_pellet.AKTIF = ?', [$barcode, $newpt, $gudang, $dept, $area, $newstatus, '1'])\n ->selectRaw(\"barcode_pellet_det.*\")\n ->first();\n\n if($soi_item){\n if ($result) {\n $out = [\n 'message' => 'success',\n 'data' => $barcode,\n 'code' => 200\n ];\n } else {\n $out = [\n 'message' => 'empty',\n 'data' => $barcode,\n 'code' => 404\n ];\n }\n } else {\n $out = [\n 'message' => 'empty',\n 'data' => $barcode,\n 'code' => 404\n ];\n }\n\n return response()->json($out, $out['code']);\n }", "final public function getPort(): int {}", "public function getPort():? int;", "public function statut()\n {\n $username = 'admin';\n $password = '3d2R';\n $ip = '10.1.1.200';\n $port = '22';\n\n\n $connection = ssh2_connect( $ip, $port);\n ssh2_auth_password($connection, $username, $password);\n $cisco = \"show interface status\";\n $stream = ssh2_exec($connection, $cisco);\n $errorStream = ssh2_fetch_stream($stream, SSH2_STREAM_STDERR);\n stream_set_blocking($errorStream, true);\n stream_set_blocking($stream, true);\n $output = stream_get_contents($stream);\n $json = [];\n $lignes = explode(\"\\n\", $output);\n\n foreach ( $lignes as $key => $ligne ){\n if ($key < 1) continue;\n\n $champ1 = substr($ligne,0,9);\n if ( trim(preg_replace('/\\s\\s+/', ' ',$champ1)) == '\"\"\"' || trim(preg_replace('/\\s\\s+/', ' ',$champ1)) == 'Port') continue;\n $champ1 = trim($champ1);\n\n $champ2 = substr($ligne,10,18);\n if ( $champ2 == false) continue;\n $champ2 = trim($champ2);\n\n $champ3 = trim( substr($ligne,29,12));\n $champ4 = trim(preg_replace('/\\s\\s+/', ' ',substr($ligne,42,10) ));\n $champ5 = trim(preg_replace('/\\s\\s+/', ' ',substr($ligne,53,7) ));\n $champ6 = trim(preg_replace('/\\s\\s+/', ' ',substr($ligne,61,5) ));\n $champ7 = trim(preg_replace('/\\s\\s+/', ' ',substr($ligne,67,17) ));\n $json[] = [\n 'port' => $champ1,\n 'name' => $champ2,\n 'status' => $champ3,\n 'vlan' => $champ4,\n 'duplex' => $champ5,\n 'speed' => $champ6,\n 'type' => $champ7,\n ];\n }\n return response()->json([\n 'data' => $json\n ]);\n }", "function dvr_ans( $stream, &$data, &$databuf )\n{\n\t$ans = dvr_read( $stream, 12 );\n\tif( strlen($ans) != 12 ) return -1 ;\n\t$ans = unpack(\"Vcode/Vdata/Vsize\", $ans ) ;\n\t\n\t$data = $ans['data'] ;\n\t$databuf = dvr_read( $stream, $ans['size'] ) ;\n\treturn $ans['code'] ;\n}", "function getDeviceEntries($serialNum) {\n\t\ttry {\n\t\t\t$query = \"SELECT c.cycleID, c.startSalinity, c.startTempIn, c.startTempOut, c.powerSupply AS 'startPowerSupply', c.startCell1,\n\t\t\t\t\t\t\tc.startCell2, c.startCell3, c.startCell4, c.totalCurrent AS 'startTotalCurrent', c.startDateTime,\n\t\t\t\t\t e.entryID, TIME_TO_SEC(e.seconds) AS 'seconds', e.salinity, e.flowrate, e.dutyCycle,\n\t\t\t\t\t e.tempIn, e.tempOut, e.powerSupply, e.cell1, e.cell2, e.cell3, e.cell4, e.totalCurrent\n\t\t\t\t\t\tFROM CYCLE c\n\t\t\t\t\t\tJOIN DEVICE\td ON d.deviceID = c.deviceID\n\t\t\t\t\t LEFT OUTER JOIN ENTRY e ON e.cycleID = c.cycleID\n\t\t\t\t\t WHERE d.serialNum = :serialNum\n\t\t\t\t\t ORDER BY c.startDateTime\n\t\t\t\t\t LIMIT 2000;\";\n\t\t\t$sth = database()->prepare($query);\n\t\t\t$sth->bindValue(':serialNum', $serialNum, PDO::PARAM_INT);\n\t\t\t$sth->execute();\n\n\t\t\treturn $sth->fetchall();\n\t\t} catch (Exception $e) {\n\t\t\treturn errorMessage($e->getMessage());\n\t\t}\n\t}" ]
[ "0.70161384", "0.68082714", "0.6307919", "0.6255208", "0.61339116", "0.60585296", "0.5529847", "0.5389085", "0.5266545", "0.5170861", "0.51296955", "0.5121013", "0.50775725", "0.50622296", "0.50037354", "0.48806307", "0.48428887", "0.4833092", "0.4833092", "0.4833092", "0.4833092", "0.48202652", "0.47533178", "0.46974584", "0.46738568", "0.4667163", "0.46570677", "0.4655291", "0.4638703", "0.46359128", "0.4593879", "0.45851952", "0.45782486", "0.4560486", "0.45299238", "0.4516668", "0.44910502", "0.44588196", "0.44399548", "0.4435075", "0.44130462", "0.44120663", "0.43864644", "0.43669286", "0.43661585", "0.4359147", "0.4347213", "0.43467098", "0.43417022", "0.4340056", "0.43294805", "0.43055713", "0.43043473", "0.43031734", "0.4297539", "0.42910355", "0.4252627", "0.425043", "0.42442337", "0.42173424", "0.42063692", "0.4206358", "0.41769752", "0.41701034", "0.41676402", "0.41663525", "0.41635245", "0.41609275", "0.41480175", "0.4143064", "0.414185", "0.41390055", "0.41353044", "0.41342205", "0.41226593", "0.41210678", "0.4118188", "0.4118039", "0.4116877", "0.41161376", "0.41071516", "0.41063568", "0.41062182", "0.40904653", "0.40870717", "0.4080235", "0.40771717", "0.40738976", "0.40684956", "0.40629646", "0.40600875", "0.4052219", "0.40412846", "0.40356207", "0.40311602", "0.40101582", "0.4007188", "0.4006337", "0.39997047", "0.39989403" ]
0.71984565
0
Fungsi untuk mengecek perangkat serial yang merupakan perangkat mekanik robot
function common_serial_get_connected_device($query,$pass){ //Inisialisasi serial port //Sertakan library php serial untuk menggunakan fungsi //php yang mendukung komunikasi serial require_once("php_serial.class.php"); //Inisialisasi parameter serial $serial = new phpSerial(); //baud rate $serial->confBaudRate(9600); $devList = common_serial_scan(); foreach($devList as $dev){ //Siapkan port arduino untuk bisa digunakan common_init_serial($dev); //Alamat perangkat $serial->deviceSet($dev); //Buka koneksi (tulis) $serial->deviceOpen('w+'); //kirim query (delay 1 detik) $serial->sendMessage($query,1); //baca balasan $mp = $serial->readPort(); //tutup koneksi $serial->deviceClose(); //cek hasil query if($mp == $pass){ //Jika respon sama dengan query //kembalikan alamat perangkat terkoneksi return $dev; } else{ return false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function common_init_serial($dev){\r\n\t//Set permission ke 777 (Read, Write, Execute) Untuk semua orang\r\n\tshell_exec('sudo chmod 777 ' . $dev);\r\n\t//Siapkan parameter komunikasi serial\r\n\tshell_exec('sudo /bin/stty -F ' . $dev . ' cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts');\t\r\n}", "function common_serial_scan() {\r\n\t//Daftar perangkat serial, untuk Linux akan dimulai dengan ttyACMx atau ttyUSBx\r\n\t$acm = \"ttyACM\";\r\n\t$usb = \"ttyUSB\";\r\n\t//Dapatkan daftar perangkat yang terhubung ke komputer\r\n\t$cmd = shell_exec('ls /dev/');\r\n\t//Cari perangkat serial yang tersedia\r\n\t//cari ACM\r\n\t$flagACM = strpos($cmd, $acm);\r\n\t//cari USB\r\n\t$flagUSB = strpos($cmd, $usb);\r\n\t\r\n\t//Buat array untuk menyimpan daftar perangkat dengan alamat serial\r\n\t//yang tersedia\r\n\t$devList = array();\r\n\t\r\n\t//Query perangkat\r\n\tif($flagACM == true){\r\n\t\t//Pisahkan nilai raw berdasarkan string acm\r\n\t\t$rawACM = explode($acm, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer ACM\r\n\t\tforeach($rawACM as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer ACM yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyACM' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif($flagUSB == true) {\r\n\t\t//Pisahkan nilai raw berdasarkan string usb\r\n\t\t$rawUSB = explode($usb, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer USB\r\n\t\tforeach($rawUSB as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer USB yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyUSB' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//Kembalikan daftar perangkat serial yang terdeteksi\r\n\treturn $devList;\r\n}", "function common_serial_write($query, $dev){\r\n\t//Inisialisasi serial port\r\n\t//Siapkan port arduino untuk bisa digunakan\r\n\t//common_init_serial($dev);\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//Alamat perangkat\r\n\t$serial->deviceSet($dev);\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t//Buka koneksi (tulis)\r\n\t$serial->deviceOpen('w+');\r\n\t//kirim query (delay 1 detik)\r\n\t$serial->sendMessage($query,0);\r\n\t//baca balasan\r\n\t$mp = $serial->readPort();\r\n\t//tutup koneksi\r\n\t$serial->deviceClose();\r\n\t//kembalikan hasil\r\n\treturn null;\r\n}", "function common_serial_read($query, $dev){\r\n\t//Inisialisasi serial port\r\n\t//Siapkan port arduino untuk bisa digunakan\r\n\t//common_init_serial($dev);\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//Alamat perangkat\r\n\t$serial->deviceSet($dev);\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t//Buka koneksi (tulis)\r\n\t$serial->deviceOpen('w+');\r\n\t//kirim query (delay 1 detik)\r\n\t$serial->sendMessage($query,1);\r\n\t//baca balasan\r\n\t$mp = $serial->readPort();\r\n\t//tutup koneksi\r\n\t$serial->deviceClose();\r\n\t//kembalikan hasil\r\n\treturn $mp;\r\n}", "function GenerarSerial()\n\t{\n\t\t$this->Serial = CifradorCodigo::generarNumero(\n\t\tCifradorCodigo::LongitudBitsSerialMaximo\n\t\t);\n\t}", "private function set_serial($serial) {\n\t\t$this->set_region(substr($serial, 0, 2));\n\t\t$this->serial = $serial;\n\t}", "function common_device_init(){\r\n\t//Get perangkat mekanik yang terhubung\r\n\t//Get query dan pass\r\n\t$query = \"SELECT * FROM tbl_konfigurasi\";\r\n\t$conf = mysql_fetch_assoc(mysql_query($query));\r\n\t//Reset FIFO Camera\r\n\t$file = $_SERVER['DOCUMENT_ROOT'] . '/FIFO';\r\n\tfile_put_contents($file, '');\r\n\t//Get parameter mekanik yang diambil dari database\r\n\t$query = $conf['konfigurasi_query'];\r\n\t$pass = $conf['konfigurasi_pass'];\r\n\t$pwm = $conf['konfigurasi_pwm'];\r\n\t$servoX = $conf['konfigurasi_servoX'];\r\n\t$servoY = $conf['konfigurasi_servoY'];\r\n\t$laser = $conf['konfigurasi_laser'];\r\n\t$flash = $conf['konfigurasi_flash'];\r\n\t\r\n\t$dev = common_serial_get_connected_device($query, $pass);\r\n\t//Set variabel dev menjadi variabel sesi agar mudah diakses\r\n\tif(empty($dev) || !isset($dev)){\r\n \t\t$dev = '/dev/null';\r\n\t}\r\n\t$_SESSION['dev'] = $dev;\r\n\t//Simpan alamat perangkat terhubung\r\n\t$query = sprintf(\"UPDATE tbl_konfigurasi SET konfigurasi_dev = '%s'\", mysql_real_escape_string($dev));\r\n\t//Eksekusi query\r\n\tmysql_query($query);\r\n\t//Inisialisasi perangkat agar bisa digunakan\r\n\tcommon_init_serial($dev);\r\n\t//Set parameter mekanik sebelumnya\r\n\tcommon_serial_write('m'.$servoX.'o'.$servoY.'o',$dev);\r\n\tcommon_serial_write('p'.$pwm.'o',$dev);\r\n}", "function teleinfor ($port = \"/dev/ttyAMA0\") {\n // Resultat : liste etiquette=>valeur\n $trame_array = array();\n \n // Ouvrir le port en lecture\n $handle = fopen ($port, \"r\");\n $char = \"\";\n $contents = \"\";\n while (fread($handle, 1) != chr(2));\n do {\n $char = fread($handle, 1);\n if ($char != chr(2)) $contents .= $char;\n } while ($char != chr(2));\n\n // Fermer le port\n fclose ($handle);\n\n // Supprimer les caracteres debut/fin de trame\n $trame = substr($contents,1,-1);\n\n // Separer les messages\n $trame = explode(chr(10).chr(10), $trame);\n\n // Verifier les checksum et supprimer les trames incorrectes\n foreach ($trame as $key=>$message) {\n \n // Separer l'etiquette, la valeur et le checksum\n $message = explode (chr(32), $message, 3);\n list ($etiquette, $valeur, $checksum) = $message;\n \n // Supprimer le message si incomplet ou incorrect (checksum invalide) \n if (count($message)<3 || \n checksum($etiquette, $valeur) != $checksum \n\t\t \n\t//\t|| \n // messize($etiquette) != strlen($valeur) \n ) { \n unset($trame[$key]); \n \n } else {\n // Enregistrer le message dans la liste trame_array\n $trame_array[$etiquette] = $valeur;\n\t\t\t \n }\n }\n \n return $trame_array;\n }", "function gettemp(){\nglobal $serial;\nwhile( empty($read)){\n$serial->deviceOpen();\n$serial->sendMessage(\"4\");\n//usleep(200000);\n$read = $serial->readPort();\n$serial->deviceClose();\n}\n$read2= trim($read);\nreturn $read2;\n\n}", "public function serial() : string;", "function send_message($serial, $instruction, $addrh, $addrl, $data1, $data2, $text)\r\n{\r\n\tusleep(COMM_WAIT_BETWEEN_MESSAGES);\r\n\r\n\t$sum = ($instruction + $addrh + $addrl + $data1 + $data2) & 255;\r\n\t$message = pack(\"CCCCCCC\", $instruction, $addrh, $addrl, $data1, $data2, $sum, 13);\r\n\t$try = 0;\r\n\t$result = -1;\r\n\tdo\r\n\t{\r\n\t//\tprint($text);\r\n\t\t\r\n\t\t$serial->sendMessage($message);\r\n\t\t\r\n\t\tusleep(COMM_WAIT_RESPONSE_DELAY);\r\n\t\t\r\n\t\t$read = $serial->readPort(7);\r\n\t\t\r\n\t\tif (strlen($read) == 7)\r\n\t\t{\r\n\t\t\t$data = unpack(\"C*\", $read);\t// first item has index 1 !!!\r\n\t\t\t\r\n\t\t\tif ($data[3] == 0x99 and $data[4] == 0x99 and $data[5] == 0x99)\r\n\t\t\t{\r\n//\t\t\t\tprint(\"No data available\");\r\n\t\t\t\t$result = -2;\r\n\t\t\t}\r\n\t\t\telse if ($data[1] == 0x00 and $data[2] == 0x00 and $data[3] == 0x00 and $data[4] == 0x00 and $data[5] == 0x00)\r\n\t\t\t{\r\n//\t\t\t\tprint(\"Unit busy\");\r\n\t\t\t\t$result = -3;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$result = ($data[3] << 16) + ($data[4] << 8) + $data[5];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($result < 0 and ++$try < COMM_NR_OF_RETRIES)\r\n\t\t{\t// retry\r\n\t\t\tusleep(COMM_RETRY_DELAY);\r\n\t\t}\r\n\t} while ($result < 0 and $try < COMM_NR_OF_RETRIES);\r\n\t\r\n\treturn $result;\r\n}", "function updateSerial($serial) {\n\t$viererString = str_split($serial,4);\n\t$zweierString = str_split($viererString[1],2);\n\t// SerialCut ist Jahr,Monat,Tag,Nummer\n\t$serialCut = array(\"Y\" => $viererString[0], \"m\" => $zweierString[0], \"d\" => $zweierString[1], \"n\" => $viererString[2]);\n\tforeach($serialCut as $type => $value) {\n\t\tif($type!=\"n\") {\n\t\t\tif($value!=strftime(\"%\".$type)) {\n\t\t\t\t$serialCut[$type]=strftime(\"%\".$type);\n\t\t\t\t$serialCut[\"n\"]=\"01\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$value++;\n\t\t\t$serialCut[\"n\"]=str_pad($value,2,0,STR_PAD_LEFT);\n\t\t}\n\t}\n\treturn $serialCut[\"Y\"].$serialCut[\"m\"].$serialCut[\"d\"].$serialCut[\"n\"];\t\n}", "public function enviarNumero( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\", \"MARCADO\",$this->getNumeroIP());\n $this->enviarPeticion($cmd->getComando());\n\n }", "public function __toString() : string\n {\n return 'Serial';\n }", "function control_gpio()\n{\n $data = read_file();\n // fetch data from object\n foreach ($data->equipment as $value) {\n if ($value->status == 1) {\n //execute command line using exec function\n exec(\"gpio -g mode {$value->port} out\");\n exec(\"gpio -g write {$value->port} 1\");\n } else {\n exec(\"gpio -g write {$value->port} 0\"); \n }\n }\n \n}", "function ncurses_baudrate()\n{\n}", "function setDeviceState($dserial, $state) {\n\t#$non_num_pattern = \"/[^0-9A-Z]/\";\n\t\n\t#if(preg_match($non_num_pattern, $dserial) || preg_match($non_num_pattern, $state)) {\n\t#\tdie('Non decimal character detected');\n\t#}\n\t\n\t$state = intval($state, 10);\n\t\n\tif($state == DeviceState::Off) $msg = 'off';\n\telse if($state == DeviceState::On) $msg = 'on';\n\telse die('Invalid state' . $state);\n\t\n\t$msg .= '/pi/' . $dserial;\n\t\n\t$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\tif(!$sock) die('PHP cannot create socket');\n\t\n\tif(!socket_connect($sock, SCRIPT_IP, SCRIPT_PORT)) {\n\t\tsocket_close($sock);\n\t\tdie('Cannot connect to PiHome.py ip and port at ' . SCRIPT_IP . ', ' . SCRIPT_PORT);\n\t}\n\t\n\tsocket_send($sock, $msg, strlen($msg), 0);\n\t\n\tsocket_close($sock);\n}", "function porte1() {\n\t\tsystem (\"gpio write 21 off\");\n\t\tsleep ( 1 );\n\t\tsystem (\"gpio write 21 on\");\n\t\t}", "public function __construct($serial)\n {\n parent::__construct($serial);\n\n $this->sound = 'Baa!';\n }", "public function encenderPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"ON\");\n $this->setEncendidoPizarra(1);\n\n }", "public function vga_input($cikkszam = ''){\n if (bothAdminSeller($_SESSION['jog'])) {\n $pciSlots = [\n 'PCI-E 16x 2.0',\n 'PCI-E 16x 3.0',\n 'PCI-E 16x 4.0'\n ];\n $vramCap = [\n 1,2,3,4,5,6,8,11,24\n ];\n $warranity = $this->adminModel->getWarranity();\n $manufacturers = $this->vgaModel->getVgaManufacturers();\n $data = [\n 'main_title' => 'VGA bevitele',\n 'cikkszam' => $cikkszam,\n 'manufacturers' => $manufacturers,\n 'selected_man' => '',\n 'warranity' => $warranity,\n 'vramCap' => $vramCap,\n 'pciSlots' => $pciSlots,\n 'selected_warr' =>'',\n 'price' => '',\n 'vga_stock' => '',\n 'picUrl' => '',\n 'man_url' => '',\n 'type' => '',\n 'typeCode' => '',\n 'vga_man' =>'',\n 'pci_type' => '',\n 'gpu_clock' => '',\n 'gpu_peak' => '',\n 'vram_capacity' => '',\n 'vram_clock' => '',\n 'vram_type' => '',\n 'vram_bandwidth' => '',\n 'power_consumption' => '',\n 'power_pin' => '',\n 'directX' => '',\n 'displayPort' => '',\n 'DVI' => '',\n 'HDMI' => '',\n 'disabledIn' => '',\n 'disabledModify' => 'disabled'\n ];\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n if (isset($_POST['vgaInput'])) {\n $data = [\n 'main_title' => 'VGA bevitele',\n 'cikkszam' => trim($_POST['cikkszam']),\n 'manufacturers' => $manufacturers,\n 'selected_man' => trim($_POST['selected_man']),\n 'warranity' => $warranity,\n 'vramCap' => $vramCap,\n 'pciSlots' => $pciSlots,\n 'selected_warr' => trim($_POST['selected_warr']),\n 'price' => trim($_POST['price']),\n 'vga_stock' => trim($_POST['vga_stock']),\n 'picUrl' => trim($_POST['picUrl']),\n 'man_url' => trim($_POST['man_url']),\n 'type' => trim($_POST['type']),\n 'typeCode' => trim($_POST['typeCode']),\n 'vga_man' => trim($_POST['vga_man']),\n 'pci_type' => trim($_POST['pci_type']),\n 'gpu_clock' => trim($_POST['gpu_clock']),\n 'gpu_peak' => trim($_POST['gpu_peak']),\n 'vram_capacity' => trim($_POST['vram_capacity']),\n 'vram_clock' => trim($_POST['vram_clock']),\n 'vram_type' => trim($_POST['vram_type']),\n 'vram_bandwidth' => trim($_POST['vram_bandwidth']),\n 'power_consumption' => trim($_POST['power_consumption']),\n 'power_pin' => trim($_POST['power_pin']),\n 'directX' => trim($_POST['directX']),\n 'displayPort' => trim($_POST['displayPort']),\n 'DVI' => trim($_POST['DVI']),\n 'HDMI' => trim($_POST['HDMI']),\n 'disabledIn' => '',\n 'disabledModify' => 'disabled'\n ];\n try{\n if ($this->adminModel->VGAInput($data) && $this->adminModel->VGAManUrlInput($data['cikkszam'],$data['man_url']) && $this->adminModel->VGAPicUrlInput($data['cikkszam'],$data['picUrl']) && $this->adminModel->VGAPriceInput($data['cikkszam'],$data['price']) && $this->adminModel->VGAStockInput($data['cikkszam'],$data['vga_stock'])) {\n flash('input_success','A '.$data['type'].' Termék bevitele sikeres volt');\n redirect('admins/vga_input');\n }else {\n flash('input_fail','A '.$data['type'].' Termék bevitele sikertelen volt!!', 'alert alert-danger');\n redirect('admins/vga_input');\n }\n }catch(PDOException $ex){\n flash('input_fail',$ex->getMessage(), 'alert alert-danger');\n redirect('admins/vga_input');\n }\n } elseif(isset($_POST['editVGA'])){\n $vgaByCikk = $this->vgaModel->getVgaByCikkszam($cikkszam);\n $data = [\n 'main_title' => 'VGA bevitele',\n 'cikkszam' => $cikkszam,\n 'manufacturers' => $manufacturers,\n 'vramCap' => $vramCap,\n 'pciSlots' => $pciSlots,\n 'selected_man' => $vgaByCikk->manufacturer_id,\n 'warranity' => $warranity,\n 'selected_warr' => $vgaByCikk->warr_id,\n 'price' => $vgaByCikk->price,\n 'vga_stock' => $vgaByCikk->vga_stock,\n 'picUrl' => $vgaByCikk->picUrl,\n 'man_url' => $vgaByCikk->Url,\n 'type' => $vgaByCikk->type,\n 'typeCode' => $vgaByCikk->typeCode,\n 'vga_man' => $vgaByCikk->vga_man,\n 'pci_type' => $vgaByCikk->pci_type,\n 'gpu_clock' => $vgaByCikk->gpu_clock,\n 'gpu_peak' => $vgaByCikk->gpu_peak,\n 'vram_capacity' => $vgaByCikk->vram_capacity,\n 'vram_clock' => $vgaByCikk->vram_clock,\n 'vram_type' => $vgaByCikk->vram_type,\n 'vram_bandwidth' => $vgaByCikk->vram_bandwidth,\n 'power_consumption' => $vgaByCikk->power_consumption,\n 'power_pin' => $vgaByCikk->power_pin,\n 'directX' => $vgaByCikk->directX,\n 'displayPort' => $vgaByCikk->displayPort,\n 'DVI' => $vgaByCikk->DVI,\n 'HDMI' => $vgaByCikk->HDMI,\n 'disabledIn' => 'disabled',\n 'disabledModify' => ''\n ];\n }elseif(isset($_POST['vgaModify'])){\n $data = [\n 'cikkszam' => $cikkszam,\n 'selected_man' => trim($_POST['selected_man']),\n 'selected_warr' => trim($_POST['selected_warr']),\n 'price' => trim($_POST['price']),\n 'vga_stock' => trim($_POST['vga_stock']),\n 'picUrl' => trim($_POST['picUrl']),\n 'man_url' => trim($_POST['man_url']),\n 'type' => trim($_POST['type']),\n 'typeCode' => trim($_POST['typeCode']),\n 'vga_man' => trim($_POST['vga_man']),\n 'pci_type' => trim($_POST['pci_type']),\n 'gpu_clock' => trim($_POST['gpu_clock']),\n 'gpu_peak' => trim($_POST['gpu_peak']),\n 'vram_capacity' => trim($_POST['vram_capacity']),\n 'vram_clock' => trim($_POST['vram_clock']),\n 'vram_type' => trim($_POST['vram_type']),\n 'vram_bandwidth' => trim($_POST['vram_bandwidth']),\n 'power_consumption' => trim($_POST['power_consumption']),\n 'power_pin' => trim($_POST['power_pin']),\n 'directX' => trim($_POST['directX']),\n 'displayPort' => trim($_POST['displayPort']),\n 'DVI' => trim($_POST['DVI']),\n 'HDMI' => trim($_POST['HDMI']),\n ];\n if ($this->vgaModel->updateVgaProduct($data) && $this->vgaModel->updateVgaManUrl($data['cikkszam'], $data['man_url']) && $this->vgaModel->updateVgaPicUrl($data['cikkszam'], $data['picUrl']) && $this->vgaModel->updateVgaPrice($data['cikkszam'], $data['price']) && $this->vgaModel->updateVgaStockpile($data['cikkszam'], $data['vga_stock'])) {\n flash('modify_success','A '.$data['type'].' Termék módosítása sikeres volt');\n redirect('admins/vga_input');\n }else {\n flash('modify_fail','A '.$data['type'].' Termék módosítása sikertelen volt!!', 'alert alert-danger');\n redirect('admins/vga_input');\n }\n /**\n * TEENDŐK:\n * -ellenőrizni, hogy készleten vannak-e atermékek, illteve csőkkenteni a termék \n * számát\n * - MEGOLDANI, hogy a vásárlásaim tábla reponsive legyen\n * - ESETLEG betteni a pdf-et mediumBLOB-ba a DB-be NEM!!!\n * - AZ ADMINBÓL áttenni az input/modify/delete functionokat a hozzá tartozó\n * termék model-jébe\n */\n }\n }\n $this->view('admin/vga_input',$data);\n }else{\n redirect('index');\n }\n }", "function fermerToutesPortes(){\n\t\tfor ( $i = 25 ; $i <= 28 ; $i++ ) {\n\t\t$gpio=$i-4;\n\t\t$porte = system ( \"gpio read \".$i);\n\t\tif ($porte == \"0\"){\n\t\t\t\tsystem (\"gpio write \". $gpio .\" off\");\n\t\t\t\tsleep ( 1 );\n\t\t\t\tsystem (\"gpio write \". $gpio .\" on\");\n\t\t\t}\n\n\t\t}\n\t}", "private function set_device(){\n\t\n\t}", "public function get_data($serial = '')\n {\n\n $out = array();\n $temp = array();\n if (! $this->authorized()) {\n $out['error'] = 'Not authorized';\n } else {\n $bluetooth = new bluetooth_model;\n foreach ($bluetooth->retrieve_records($serial) as $prefs) {\n $temp[] = $prefs->rs;\n }\n foreach ($temp as $value) {\n $out[$value['device_type']] = $value['battery_percent'];\n }\n }\n\n $obj = new View();\n $obj->view('json', array('msg' => $out));\n }", "protected function readDevice()\n {\n $trame = '';\n $i=0;\n while (strlen($trame)==0 && $i < 3) {\n $trame = $this->readTrame();\n $i++;\n }\n\n echo date('Y-m-d H:i:s T').\" Read attempt : \".$i.\" for \".strlen($trame).\" octet(s)\\n\";\n\n $trame = chop(substr($trame, 1, -1)); // on supprime les caracteres de debut et fin de trame\n\n $messages = explode(chr(10), $trame); // on separe les messages de la trame\n $new = [];\n foreach ($messages as $msg) {\n $ligne = explode(' ', $msg, 3);\n if (count($ligne)<2) {\n continue;\n }\n $new[$ligne[0]] = $ligne[1];\n }\n return $new;\n }", "public function validacionserial($serial)\n {\n $query = \"select id_equipo, COUNT(*) as canti FROM `equipo` WHERE estado =1 and serial_equipo ='\" . $serial . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "function MonitorListe_weiterenParameterHolen($ETA_ComID)\r\n {\r\n $MonitorListeWeiter =\"{MA\";\r\n \r\n If (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 0) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(02) . chr(01) . chr(01); //Standard\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 1) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(03) . chr(01) . chr(02); //Service\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 2) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(04) . chr(01) . chr(03); //Profi\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 3) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(05) . chr(01) . chr(04); //Expert\r\n\t\t}\r\n\t\t$MonitorListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n\t\t$Daten = $MonitorListeWeiter . $MonitorListeWeiterBytes . $MonitorListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "function do_read_data()\r\n{\r\n\tglobal\t$TABLE_PDU_LOG;\r\n\tglobal\t$FIELD_UNIT, $FIELD_KWH_TOTAL, $FIELD_KWH_DISPLAY, $FIELD_CURRENT, $FIELD_TEMPERATURE;\r\n\tglobal\t$a_unit, $a_temp, $a_kwhtotal, $a_kwhdisplay, $a_current;\r\n\r\n//\tprint(\"Reading...\\n\\n\");\r\n\r\n\t$db = connect_to_database();\r\n\r\n\t$serial = new phpSerial;\r\n\t$serial->deviceSet(SERIAL_PORT);\r\n\t$serial->configure();\r\n\t$serial->deviceOpen();\r\n\r\n\t// get all data from the units\r\n//\tprint(\"kWh total\\n\");\r\n\t$result = send_message($serial, 56, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read kWh total\r\n\tread_all_units($db, $serial, 56);\t\t\t\t\t\t\t\t\t\t\t\t\t// read kWh total from all units\r\n\r\n//\tprint(\"kWh display\\n\");\r\n\t$result = send_message($serial, 143, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read kWh display\r\n\tread_all_units($db, $serial, 143);\t\t\t\t\t\t\t\t\t\t\t\t\t// read kWh display from all units\r\n\r\n//\tprint(\"Current\\n\");\r\n\t$result = send_message($serial, 68, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read current\r\n\tread_all_units($db, $serial, 68);\t\t\t\t\t\t\t\t\t\t\t\t\t// read current from all units\r\n\r\n//\tprint(\"Temperature\\n\");\r\n\t$result = send_message($serial, 90, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read temperature\r\n\tread_all_units($db, $serial, 90);\t\t\t\t\t\t\t\t\t\t\t\t\t// read temperature from all units\r\n\r\n\t// store the data in the database\r\n\tfor ($i = 0; $i < count($a_unit); $i++)\r\n\t{\r\n\t\tif ($a_unit[$i] > 0)\r\n\t\t{\r\n\t\t\t$sql = \"INSERT INTO $TABLE_PDU_LOG ($FIELD_UNIT, $FIELD_KWH_TOTAL, $FIELD_KWH_DISPLAY, $FIELD_CURRENT, $FIELD_TEMPERATURE) \".\r\n\t\t\t \"VALUES ($a_unit[$i],$a_kwhtotal[$i],$a_kwhdisplay[$i],$a_current[$i],$a_temp[$i])\";\r\n\t\t\tif (!($mysql_result = mysql_query($sql))) print(mysql_error($db) .\"\\n\");\r\n\t\t}\r\n\t}\r\n\r\n\t$serial->deviceClose();\r\n\tmysql_close($db);\r\n}", "public function validacionserialasignado($serial)\n {\n $query = \"select COUNT(*) as cantidad FROM `equipo`\n INNER JOIN asignacion_equipo on fkID_equipo=id_equipo\n WHERE asignacion_equipo.estado =1 and fkID_equipo='\" . $serial . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "public function apagarPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"OFF\");\n $this->setEncendidoPizarra(0);\n\n }", "function Parameter_Liste_weiterenParameterHolen($ETA_ComID)\r\n {\r\n $ParameterListeStart =\"{MF\";\r\n\r\n\t\t\tIf (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 0) {\r\n \t$ParameterListeStartBytes = chr(02) . chr(02) . chr(01) . chr(01); //Standard\r\n\t } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 1) {\r\n \t$ParameterListeStartBytes = chr(02) . chr(03) . chr(01) . chr(02); //Service\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 2) {\r\n\t\t\t \t$ParameterListeStartBytes = chr(02) . chr(04) . chr(01) . chr(03); //Profi\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 3) {\r\n \t\t\t \t$ParameterListeStartBytes = chr(02) . chr(05) . chr(01) . chr(04); //Expert\r\n\t\t\t}\r\n $ParameterListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n $Daten = $ParameterListeStart . $ParameterListeStartBytes . $ParameterListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "function Parameter_Index_Liste_weiterenParameterHolen($ETA_ComID)\r\n {\r\n $ParameterListeIndexStart =\"{MH\";\r\n \t\t\t$ParameterListeIndexStartBytes = chr(01) . chr(01) . chr(01);\r\n $ParameterListeIndexEndZeichen = \"}\";\r\n //Zusammensetzen\r\n $Daten = $ParameterListeIndexStart . $ParameterListeIndexStartBytes . $ParameterListeIndexEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "public function get_data($serial_number = '')\n {\n $obj = new View();\n if (! $this->authorized()) {\n $obj->view('json', array('msg' => 'Not authorized'));\n return;\n }\n $power = new Power_model($serial_number);\n $temp_format = conf('temperature_unit');\n $power->rs['temp_format'] = $temp_format; // Add the temp format for use in the client tab's JavaScript \n $obj->view('json', array('msg' => $power->rs));\n }", "public function setSerial($v)\n\t{\n\n\n\t\tif ($v === null) {\n\t\t\t$this->setSerialId(NULL);\n\t\t} else {\n\t\t\t$this->setSerialId($v->getId());\n\t\t}\n\n\n\t\t$this->aSerial = $v;\n\t}", "function connect($ip_address, $port)\n {\n //$this->connector = new FilePrintConnector(\"/dev/usb/lp0\");\n //$this->connector = new WindowsPrintConnector(\"smb://192.168.0.6/POS-80\");\n //$this->connector = new CupsPrintConnector(\"POS-80\");\n //$this->printer = new Printer($this->connector);\n /* Close printer */\n\n /*$this->connector = new FilePrintConnector(\"php://stdout\");\n $this->printer = new Printer($this->connector);\n */\n\n try {\n //$this->connector = new CupsPrintConnector(\"POS-80C\");\n $this->connector = new WindowsPrintConnector(\"POSS-80\");\n \n /* Print a \"Hello world\" receipt\" */\n $this->printer = new Printer($this->connector);\n //$this->printer -> text(\"TE AMO MCUHO MI VIDA..!\\n\");\n //$this->printer -> cut();\n \n /* Close printer */\n //$this->printer -> close();\n } catch (Exception $e) {\n echo \"Couldn't print to this printer: \" . $e -> getMessage() . \"\\n\";\n }\n }", "public function K990()\n {\n $this->Sped->criarEncerramentoBloco('0', 'K990', \"K990\");\n }", "public static function identification_data($text)\n {\n $values = [];\n $values = unpack(\"v1ddc/a10imo_nr/C1serial_count\", $text);\n $values = unpack(\"v1ddc/a10imo_nr/C1serial_count/a\" . $values['serial_count'] . \"cds_serial/C1ship_name_count\", $text);\n $values = unpack(\"v1ddc/a10imo_nr/C1serial_count/a\" . $values['serial_count'] . \"cds_serial/C1ship_name_count/a\" . $values['ship_name_count'] . \"ship_name/C1hull_no_count\", $text);\n $values = unpack(\"v1ddc/a10imo_nr/C1serial_count/a\" . $values['serial_count'] . \"cds_serial/C1ship_name_count/a\" . $values['ship_name_count'] . \"ship_name/C1hull_no_count/a\" . $values['hull_no_count'] . \"hull_no/C1engine_name_count\", $text);\n $values = unpack(\"v1ddc/a10imo_nr/C1serial_count/a\" . $values['serial_count'] . \"cds_serial/C1ship_name_count/a\" . $values['ship_name_count'] . \"ship_name/C1hull_no_count/a\" . $values['hull_no_count'] . \"hull_no/C1engine_name_count/a\" . $values['engine_name_count'] . \"engine_name/V1daily_file_date/V1last_config_changed\", $text);\n // hatte bei einigen Schiffen ein ^@ bzw. \\0 am Stringende\n $values['cds_serial'] = trim($values['cds_serial']);\n\n if (\"02080531\" == $values['cds_serial']) {\n $values['cds_serial'] = '02080572';\n }\n\n /*\n $this->arrSession['CDS_Serial'] = $values['cds_serial'];\n echo \"Last config changed: \" . date(\"Y-m-d H:i:s\", $values['last_config_changed']) . \"\\n\";\n if (\"-\" == $values['imo_nr']) {\n $this->arrSession['IMO_No'] = $values['cds_serial'];\n } else {\n $this->arrSession['IMO_No'] = $values['imo_nr'];\n }\n\n $this->arrSession['ref_meas_time'] = $values['daily_file_date'];\n $sql_string = \"SELECT * FROM ship_table WHERE CDS_SerialNo ='\" . trim($values['cds_serial']) . \"' LIMIT 1\";\n // mysql_select_db($this->arrSession['DB2']);\n $result = mysql_query($sql_string, $this->arrSession['DB_CONNECTION']['usr_web7_1']);\n unset($this->arrSession['error_code']);\n if (!$result) {\n $this->arrSession['error_code'] = \"Unbekannte CDS-Seriennummer!\";\n } else {\n while ($row = mysql_fetch_object($result)) {\n $this->arrSession['ship_data'] = $row;\n }\n\n }\n */\n return $values;\n }", "public function ram_input($cikk =''){\n if (bothAdminSeller($_SESSION[\"jog\"])) {\n $warranity = $this->adminModel->getWarranity();\n $data = [\n 'main_title' => 'RAM-ok bevitele',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => '',\n 'socets' => $this->ramModel->ramSocets(),\n 'warr' => $warranity,\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' => '',\n 'warranity' => '',\n 'price' => '',\n 'type' => '',\n 'man_type' => '',\n 'capacity' => '',\n 'timing' => '',\n 'voltage' => '',\n 'clock' => '',\n 'kit' => '',\n 'xmp' => 0,\n 'man_url' => '',\n 'picUrl' => '',\n 'disabledIn' => '',\n 'disabledMod' => 'disabled'\n ];\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n if (isset($_POST['ram_input'])) {\n $data = [\n 'main_title' => 'RAM-ok bevitele',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => trim($_POST[\"ram_cikkszam\"]),\n 'socets' => $this->ramModel->ramSocets(),\n 'selected_socket' => trim($_POST[\"foglalat\"]),\n 'warr' => $warranity,\n 'warranity' => trim($_POST[\"warranity\"]),\n 'price' => trim($_POST[\"price\"]),\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' =>trim($_POST[\"manufacturer\"]),\n 'type' => trim($_POST[\"type\"]),\n 'man_type' => trim($_POST[\"man_type\"]),\n 'capacity' => trim($_POST[\"capacity\"]),\n 'timing' => trim($_POST[\"timing\"]),\n 'voltage' => trim($_POST[\"voltage\"]),\n 'clock' => trim($_POST[\"clock\"]),\n 'kit' => trim($_POST[\"kit\"]),\n 'xmp' => trim($_POST[\"xmp\"]),\n 'man_url' => trim($_POST[\"man_url\"]),\n 'picUrl' => trim($_POST[\"picUrl\"]),\n 'disabledIn' => '',\n 'disabledMod' => 'disabled'\n ];\n if ($this->ramModel->ramProductInput($data) && $this->ramModel->manUrl($data[\"ram_cikkszam\"],$data[\"man_url\"]) && $this->ramModel->picUrl($data[\"ram_cikkszam\"],$data[\"picUrl\"]) && $this->ramModel->priceInput($data[\"ram_cikkszam\"],$data[\"price\"])) {\n flash(\"ramInputSuccess\",\"A (\".$data[\"type\"].\") típusú RAM bevitele sikeres volt\");\n redirect(\"admins/ram_input\");\n }else{\n flash(\"ramInputFail\",\"A (\".$data[\"type\"].\") típusú RAM bevitele sikertelen volt\", \"alert alert-danger\");\n redirect(\"admins/ram_input\");\n }\n }elseif(isset($_POST[\"editRAM\"])){\n $item = $this->ramModel->ramByCikkszam($cikk);\n $data = [\n 'main_title' => $cikk.' Módosítása',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => $item->cikkszam,\n 'socets' => $this->ramModel->ramSocets(),\n 'selected_socket' => $item->tipus,\n 'warr' => $warranity,\n 'warranity' => $item->WMonth,\n 'price' => $item->ramPrice,\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' => $item->manufacturer,\n 'type' => $item->type,\n 'man_type' => $item->typeCode,\n 'capacity' => $item->capacity,\n 'timing' => $item->timing,\n 'voltage' => $item->voltage,\n 'clock' => $item->clock,\n 'kit' => $item->kit,\n 'xmp' => $item->is_xmp,\n 'man_url' => $item->Url,\n 'picUrl' => $item->picUrl,\n 'disabledIn' => 'disabled',\n 'disabledMod' => ''\n ];\n }\n elseif (isset($_POST[\"ram_modify\"])) {\n $data = [\n 'cikkszam' => $cikk,\n 'selected_socket' => trim($_POST[\"foglalat\"]),\n 'warranity' => trim($_POST[\"warranity\"]),\n 'price' => trim($_POST[\"price\"]),\n 'manufacturer' =>trim($_POST[\"manufacturer\"]),\n 'type' => trim($_POST[\"type\"]),\n 'man_type' => trim($_POST[\"man_type\"]),\n 'capacity' => trim($_POST[\"capacity\"]),\n 'timing' => trim($_POST[\"timing\"]),\n 'voltage' => trim($_POST[\"voltage\"]),\n 'clock' => trim($_POST[\"clock\"]),\n 'kit' => trim($_POST[\"kit\"]),\n 'xmp' => trim($_POST[\"xmp\"]),\n 'man_url' => trim($_POST[\"man_url\"]),\n 'picUrl' => trim($_POST[\"picUrl\"]),\n ];\n if ($this->ramModel->ramProductModify($data) &&$this->ramModel->picUrlModify($data[\"cikkszam\"], $data[\"picUrl\"]) && $this->ramModel->manUrlModify($data[\"cikkszam\"],$data[\"man_url\"]) && $this->ramModel->ramPriceModify($data[\"cikkszam\"], $data[\"price\"]))\n {\n flash('ramModifySuccess','A ('.$data[\"type\"].' '.$data[\"typeCode\"].') Módosítása sikeres volt!');\n redirect(\"admins/ram_input\");\n }else{\n flash(\"ramModifyFail\", 'A ('.$data[\"type\"].' '.$data[\"typeCode\"].') Módosítása sikertelen volt!', 'alert alert-danger');\n redirect(\"admins/ram_input\");\n }\n } \n \n }\n $this->view('admin/ram_input',$data);\n }else{\n redirect('index');\n }\n \n }", "public function getTxSerialHardware()\n\t{\n\t\treturn $this->tx_serial_hardware;\n\t}", "public function verRedThinkClientEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"THINK_CLIENT\");\n\n }", "function DENON_InputSource($id, $value) // Input Source\n{\n CSCK_SendText($id, \"SI\".$value.chr(13));\n}", "public function get_data($serial_number = '')\n {\n // Remove non-serial number characters\n $serial_number = preg_replace(\"/[^A-Za-z0-9_\\-]]/\", '', $serial_number);\n\n $sql = \"SELECT name, vendor, current_speed, device_serial_number\n FROM thunderbolt \n WHERE serial_number = '$serial_number'\";\n \n $obj = new View(); \n $queryobj = new Thunderbolt_model();\n $thunderbolt_tab = $queryobj->query($sql);\n $obj->view('json', array('msg' => current(array('msg' => $thunderbolt_tab)))); \n }", "function wtsCtrlSaisieForfaits($ar){\n\n $p = new XParam($ar, array('mode'=>'a'));\n $mode = $p->get('mode');\n $r = array('ok'=>1, 'errors'=>array(), 'message'=>'');\n $cards = $p->get('card');\n $chips = $p->get('CHIPID');\n $accs = $p->get('ACCNO');\n $crcs = $p->get('CRC');\n $cardlabels = $p->get('NEWCARDLabel');\n $usedcards = array();\n // lecture de l'offre\n $offresoid = $p->get('offreoid');\n $productsoid = $p->get('productoid');\n $validfroms = $p->get('validfrom');\n $validtills = $p->get('validtill');\n \n $justgrps = $p->get('justgrp');\n\n // parcours des lignes et controles\n foreach($cards as $lineid => $card){\n $card2 = substr($card, 0, 7);\n /*\n\t$card = \n\tNEWCARD_'oidproduit' = achat nouvelle carte\n\tNEWCARD'uniqid' = carte en commande issue du panier\n\tWTPCARD strictement = saisie du numéro ou copie choix depuis les cartes du compte\n\tWTPCARD'unidiq'= carte saisie sélectionnée dans le panier\n\tdonc si substr(card, 0, 7) == NEWCARD : controles sur cartes en achat \n si substr(card, 0, 7) == WTPCARD : controles sur cartes en rechargement\n */\n if ($card2 == 'WTPCARD'){\n //$wtp = sprintf(\"%s-%s-%s\", $chips[$lineid], $crcs[$lineid], $accs[$lineid]);\n $wtp = $this->modresort->formatWTPParts(array($chips[$lineid], $crcs[$lineid], $accs[$lineid]));\n // TA, SKD 01- ou 1- le reste est fait dans le module\n if (strlen($wtp) != 16 && strlen($wtp) != 25 && strlen($wtp) != 24){\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_remplirwtp');\n break;\n } else if (!isset($usedcards[$wtp])){\n $usedcards[$wtp] = 1;\n // verification du WTP\n $r2 = $this->wtsCheckWTP(array('mode'=>'r', 'b'=>0, 'chipid'=>$chips[$lineid], 'accno'=>$accs[$lineid], 'crc'=>$crcs[$lineid]));\n if ($r2['ok'] != 1){\n $r['ok'] = 0; \n\t if (isset($r2['errormess'])){\n\t $r['message'] = $r2['errormess'];\n\t } else {\n\t $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_wtpinvalide');\n\t }\n\t array_push($r['errors'], \n\t\t array(\"CHIPDID[$lineid]\", '', $lineid), \n\t\t array(\"ACCNO[$lineid]\", '', $lineid), \n\t\t array(\"CRC[$lineid]\", '', $lineid),\n\t\t array(\"WTPMASK[$lineid]\", '', $lineid)\n\t\t );\n }\n // autres controles :\n $productoid = $productsoid[$lineid];\n $offreoid = $productsoid[$lineid];\n $validfrom = $validfroms[$lineid];\n $validtill = $validtills[$lineid];\n $justgrp = $justgrps[$lineid];\n if ($r['ok'] == 1){\n $r3 = $this->localWTPCheck($wtp, $offreoid, $productoid, $justgrp, false, $validfrom, $validtill, $lineid);\n if ($r3['ok'] != 1){\n $r['ok'] = 0;\n $r['message'] = $r3['message'];\n }\n }\n if (($r['ok'] == 1 || $r['ok'] == 0 && $r['iswarn'])){\n $r41 = $this->checkProductInCaddie($wtp, $offreoid, $productoid, $validfrom, $validtill);\n if ($r41['ok'] != 1){\n $r['ok'] = 0;\n $r['iswarn'] = $r41['iswarn'];\n if ($r['iswarn']){\n if ($r['message'] == '')\n $r['message'] = $r41['message'];\n else\n $r['message'] .= \"\\n\".$r41['message'];\n } else {\n $r['message'] = $r41['message'];\n }\n }\n }\n if (($r['ok'] == 1 || $r['ok'] == 0 && $r['iswarn'])){\n\t $r4 = $this->checkProductInOrder($wtp, $offreoid, $productoid, $validfrom, $validtill);\n if ($r4['ok'] != 1){\n $r['ok'] = 0;\n $r['iswarn'] = $r4['iswarn'];\n if ($r['iswarn']){\n if ($r['message'] == '')\n $r['message'] = $r4['message'];\n else\n $r['message'] .= \"\\n\".$r4['message'];\n } else {\n $r['message'] = $r4['message'];\n }\n }\n }\n // verifier que la carte n'est pas déjà dans le panier\n // si oui que ces forfaits sont compatibles ... avec le validfrom\n }else{\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_cartesuniques');\n break;\n }\n } else if ($card2 == 'NEWCARD'){\n $wtp = $cardlabels[$lineid];\n $justgrp = $justgrps[$lineid];\n $productoid = $productsoid[$lineid];\n $validfrom = $validfroms[$lineid];\n $validtill = $validtills[$lineid];\n $r31 = $this->localWTPCheck($wtp, $offreoid, $productoid, $justgrp, true, $validfrom, $validtill, $lineid);\n if ($r31['ok'] != 1){\n $r['ok'] = 0;\n $r['message'] = $r31['message'];\n break;\n }\n if (!isset($usedcards[$wtp])){\n $usedcards[$wtp] = 1;\n }else{\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_cartesuniques');\n break;\n }\n }\n }\n // sleep(10);\n\n // si ok vérification des dates (on prend le premier produit, tous devant avoir les même caractériqiques)\n if ($r['ok'] == 1){\n $this->checkDelais($r, $productsoid, $validfroms);\n }\n\n // if ($r['ok'] == 1){\n // $r['ok'] = 0; $r['message']='tests '.$r['message'];\n // $r['iswarn'] = 1;\n // }\n\n\n // TESTS PENDNT AJOUT PANIER\n // $r = array('ok'=>1,'iswarn'=>1, 'errors'=>array('kk'), 'message'=>'PAS DE CONTROLES');\n\n\n if (count($r['errors'])>0)\n $r['ok'] = 0;\n if ($mode == 'a'){\n header('Content-Type:application/json; charset=UTF-8');\n die(json_encode($r));\n }\n return $r;\n }", "function ParameterHolenSTOPP($ETA_ComID)\r\n {\r\n $ParameterListeEnde = \"{MO\";\r\n $ParameterListeEndeBytes = chr(01) . chr(01);\r\n $ParameterListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n $Daten = $ParameterListeEnde . $ParameterListeEndeBytes . $ParameterListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "function Nabaztag($serial, $token, $lang='fr')\n {\n $this->lang = $lang;\n $this->serial = $serial;\n $this->token = $token;\n $this->url .= '?sn='.$this->serial.'&token='.$this->token;\n }", "public function setSerialNumber($value) {\n\t\tself::$_serialNumber = $value;\n\t}", "function getPorts($pDB)\n {\n $pconfEcho = new paloSantoConfEcho($pDB);\n $pconfEcho->deleteEchoCanceller();\n $pconfEcho->deleteCardParameter();\n //$this->deleteCardManufacturer($pDB);\n //$data = array();\n global $arrLang;\n $tarjetas = array(); \n $data = array();\n $data2 = array();\n $data3 = array();\n $exist_data = \"no\";\n unset($respuesta);\n exec('/usr/sbin/lsdahdi',$respuesta,$retorno);\n\n if($retorno==0 && $respuesta!=null && count($respuesta) > 0 && is_array($respuesta)){\n $idTarjeta = 0;\n $count = 0; \n foreach($respuesta as $key => $linea){\n $estado_asterisk = _tr('Unknown');\n $estado_asterisk_color = \"gray\";\n $estado_dahdi_image = \"conn_unkown.png\";\n if(preg_match(\"/^### Span[[:space:]]+([[:digit:]]{1,}): ([[:alnum:]| |-|\\/]+)(.*)$/\",$linea,$regs)){\n $idTarjeta = $regs[1];\n $dataCardParam = $this->getCardManufacturerById($pDB, $idTarjeta);\n if(empty($dataCardParam)){\n $dataCardParam['manufacturer'] = \" \";\n $dataCardParam['num_serie'] = \" \";\n $dataCardParam['id_card'] = \" \";\n }else $dataCardParam['id_card']=$idTarjeta;\n if($dataCardParam['manufacturer']!=\" \"){ \n $exist_data=\"yes\";\n $data3['manufacturer'] = $pDB->DBCAMPO($dataCardParam['manufacturer']); \n }else{ $data3['manufacturer'] = $pDB->DBCAMPO(\" \");\n $exist_data = \"no\";\n }\n\n if($dataCardParam['num_serie']!=\" \"){ \n $exist_data=\"yes\";\n $data3['num_serie'] = $pDB->DBCAMPO($dataCardParam['num_serie']);\n }else{ $data3['num_serie'] = $pDB->DBCAMPO(\" \");\n $exist_data = \"no\";\n }\n if($dataCardParam['manufacturer']==\" \" && $dataCardParam['num_serie']==\" \" && $dataCardParam['id_card']==\" \"){\n $data3['id_card'] = $pDB->DBCAMPO($regs[1]); \n $this->addCardManufacturer($pDB, $data3);\n }else $this->updateCardParameter($pDB, $data3, array(\"id_card\"=>$regs[1]));\n $tarjetas[\"TARJETA$idTarjeta\"]['DESC'] = array(\n 'ID' => $regs[1],\n 'TIPO' => $regs[2],\n 'ADICIONAL' => $regs[3],\n 'MANUFACTURER' => $exist_data,\n 'MEDIA' => NULL,\n 'MEDIA_SWITCHABLE' => file_exists(\"/etc/wanpipe/wanpipe{$idTarjeta}.conf\"));\n $count++;\n $data2['id_card'] = $pDB->DBCAMPO($regs[1]);\n $data2['type'] = $pDB->DBCAMPO($regs[2]);\n $data2['additonal'] = $pDB->DBCAMPO($regs[3]);\n\n $pconfEcho->addCardParameter($data2);\n }\n else if(preg_match(\"/[[:space:]]*([[:digit:]]+) ([[:alnum:]_]+)[[:space:]]+([[:alnum:]-]+)[[:space:]]*(.*)/\",$linea,$regs1)){\n //Estados de las lineas\n if(preg_match(\"/Hardware-assisted/i\",$regs1[3].$regs1[4]) || preg_match(\"/HDLC(FCS)?/i\",$regs1[3])){\n if(preg_match(\"/In use.*RED/i\",$regs1[4])){\n $estado_asterisk = _tr('Detected by Asterisk');\n $estado_asterisk_color = \"green\";\n $estado_dahdi_image = \"conn_alarm_HC.png\";\n }\n else if(preg_match(\"/In use/i\",$regs1[4])){\n $estado_asterisk = _tr('Detected by Asterisk');\n $estado_asterisk_color = \"green\";\n $estado_dahdi_image = \"conn_ok_HC.png\";\n }\n else if(preg_match(\"/RED/i\",$regs1[4])){\n $estado_asterisk = _tr('Not detected by Asterisk');\n $estado_asterisk_color = \"#FF7D7D\";\n $estado_dahdi_image = \"conn_alarm_HC.png\";\n }\n else{\n $estado_asterisk = _tr('Not detected by Asterisk');\n $estado_asterisk_color = \"#FF7D7D\";\n $estado_dahdi_image = \"conn_ok_HC.png\";\n }\n }\n else if(preg_match(\"/In use.*RED/i\",$regs1[4])){\n $estado_asterisk = _tr('Detected by Asterisk');\n $estado_asterisk_color = \"green\";\n $estado_dahdi_image = \"conn_alarm.png\";\n }\n else if(preg_match(\"/In use/i\",$regs1[4])){\n $estado_asterisk = _tr('Detected by Asterisk');\n $estado_asterisk_color = \"green\";\n $estado_dahdi_image = \"conn_ok.png\";\n }\n else if(preg_match(\"/RED/i\",$regs1[4])){\n $estado_asterisk = _tr('Not detected by Asterisk');\n $estado_asterisk_color = \"#FF7D7D\";\n $estado_dahdi_image = \"conn_alarm.png\";\n }\n else{\n $estado_asterisk = _tr('Not detected by Asterisk');\n $estado_asterisk_color = \"#FF7D7D\";\n $estado_dahdi_image = \"conn_ok.png\";\n }\n\n //Tipo de las lineas\n $tipo = $regs1[2];\n $tarjetas[\"TARJETA$idTarjeta\"]['DESC']['MEDIA'] = $tipo;\n \n $dataType=preg_split('/[:]/',$regs1[4],2);\n if(count($dataType)>1){\n $arrEcho=preg_split('/[)]/',$dataType[1],2);\n $data['num_port'] = $pDB->DBCAMPO($regs1[1]);\n $data['name_port'] = $pDB->DBCAMPO($regs1[2]);\n $data['echocanceller'] = $pDB->DBCAMPO(trim($arrEcho[0]));\n $data['id_card'] = $pDB->DBCAMPO($count);\n $pconfEcho->addEchoCanceller($data);\n }else if($regs1[3]!=\"HDLCFCS\" && $regs1[3] != 'Hardware-assisted'){\n $data['num_port'] = $pDB->DBCAMPO($regs1[1]);\n $data['name_port'] = $pDB->DBCAMPO($regs1[2]);\n $data['echocanceller'] = $pDB->DBCAMPO(\"none\");\n $data['id_card'] = $pDB->DBCAMPO($count);\n $pconfEcho->addEchoCanceller($data);\n }\n $tarjetas[\"TARJETA$idTarjeta\"]['PUERTOS'][\"PUERTO$regs1[1]\"] = array('LOCALIDAD' =>$regs1[1],'TIPO' => $tipo, 'ADICIONAL' => \"$regs1[2] - $regs1[3]\", 'ESTADO_ASTERISK' => $estado_asterisk,'ESTADO_ASTERISK_COLOR' => $estado_asterisk_color,'ESTADO_DAHDI' => $estado_dahdi_image);\n\n }\n else if(preg_match(\"/[[:space:]]*([[:digit:]]+) ([[:alnum:]]+)/\",$linea,$regs1)){\n if($regs1[2] == 'unknown'){\n $estado_asterisk = _tr('Unknown');\n $estado_asterisk_color = 'gray';\n $estado_dahdi_image = 'conn_unkown.png';\n }else if(preg_match(\"/EMPTY/i\",$regs1[2])){\n $estado_asterisk = _tr('Channel Empty');\n $estado_asterisk_color = 'gray';\n $estado_dahdi_image = 'conn_empty.png';\n }\n $tarjetas[\"TARJETA$idTarjeta\"]['PUERTOS'][\"PUERTO$regs1[1]\"] = array('LOCALIDAD' =>$regs1[1],'TIPO' => \"&nbsp;\", 'ADICIONAL' => $regs1[2], 'ESTADO_ASTERISK' => $estado_asterisk,'ESTADO_ASTERISK_COLOR' => $estado_asterisk_color,'ESTADO_DAHDI' => $estado_dahdi_image);\n }\n }\n }\n\n if(count($tarjetas)<=0){ //si no hay tarjetas instaladas\n $this->errMsg = _tr(\"Cards undetected on your system, press for detecting hardware detection.\");\n $tarjetas = array();\n }\n if(count($tarjetas)==1){ //si aparace la tarjeta por default ZTDUMMY\n $valor = $tarjetas[\"TARJETA1\"]['DESC']['TIPO'];\n if(preg_match(\"/^DAHDI_DUMMY\\/1/i\", $valor))\n {\n $this->errMsg = _tr(\"Cards undetected on your system, press for detecting hardware detection.\");\n $tarjetas = array();\n }\n }\n return($tarjetas);\n }", "function SetPort($namePort = \"\") {\n $archivo = 'C:\\IntTFHKA\\Puerto.dat';\n $fp = fopen($archivo, \"w\");\n $string = \"\";\n $write = fputs($fp, $string);\n $string = $namePort;\n $write = fputs($fp, $string);\n fclose($fp);\n\n $this->NamePort = $namePort;\n }", "function cortDrive(){\n \n // an o xrhsths einai guest (mh syndedemenos): vale sth $_SESSION['cortTable'] ena keno pinaka\n // kai kane return\n if (UserType::$userType != UserType::notAdmin && UserType::$userType != UserType::admin){\n \n $_SESSION['cortTable']=[];\n \n return;\n }\n \n // an den einai orismenh h $_SESSION['cortTable'], arxikopoihsete thn me keno pinaka\n if (! isset($_SESSION['cortTable'])){\n \n $_SESSION['cortTable']=[];\n }\n \n // ta koumpia kalathiou exoyn html name btnPr_i,opou i anhkei [0,1,2,3]. h arithmish\n // mpainei apo aristera pros deksia. Antistoixa einai ta name twn allwn elements\n // ths kathe formas\n // etsi diatrexontai ola ta parathira proiontwn - tsekarete an to post aforouse auta\n // kai sth synexeia diatrexontai ola ta elements ths formas kai kataxwroyntai \n // ston pinaka me onoma $product\n // Se kathe anoigma selidas me koumpi submit kalathiou, mono ena apo ta $_POST['btnPr_' . $i]\n // tha einai orismeno\n // Opote se kathe anoigma ths selidas, an den einai guest o xrhsths\n // tha dhmiourghthei 0 h 1 $product\n \n $products =[];\n \n for ($i=0;$i<6;$i++){\n \n// if (isset($_POST['btnPr_' . $i])){\n if (isset($_POST['prodCode_' . $i])){\n \n $product = [\"prodCode\"=>$_POST['prodCode_' . $i],\n \"quantity\"=>$_POST['quantity_' . $i],\n \"prodValue\"=>$_POST['prodValue_' . $i],\n \"deleted\" => false, // auto exei mpei gia thn periptwsh pou kapoio proion\n // pou exei mpei sto kalathi, mhdenistei h posothta toy\n \"prodName\" => $_POST['prodName_' . $i],\n \"prodStock\" => $_POST['prodStock_' . $i]\n ];\n \n $products [] = $product;\n }\n }\n\n //print_r($products);\n \n \n \n// if (isset($product)){\n// //echo \"yes \";\n// }\n// else{\n// //echo \"no\";\n// }\n\n // an dhmiourghthike ena proion\n foreach ($products as $product){\n \n // arxika tha psaksei an o sugkekrimenos kwdikos proiontos\n // uparxei ston pinaka $_SESSION['cortTable']\n \n // an yparxei, \n // tote an to $product['quantity'] einai 0, tha kanei to deleted bit true, enw\n // an to $product['quantity'] einai <> tou 0, tha kanei to deleted bit false kai tha \n // thesei to $_SESSION['cortTable'][$i]['quantity'] = $product['quantity']\n \n $found=false;\n $nextIndex = count($_SESSION['cortTable']);\n \n for($i=0;$i<$nextIndex;$i++){\n \n if ($_SESSION['cortTable'][$i]['prodCode'] == $product['prodCode']){\n \n if ($product['quantity'] != 0){\n \n $_SESSION['cortTable'][$i]['quantity'] = $product['quantity'];\n $_SESSION['cortTable'][$i]['deleted'] = false;\n }\n \n else {\n \n //unset($_SESSION['cortTable'][$i]);\n //$_SESSION['cortTable'] = array_values($_SESSION['cortTable']);\n \n $_SESSION['cortTable'][$i]['deleted'] = true;\n }\n \n $found=true;\n }\n }\n \n // an den yparxei o sugkekrimenos kwdikos proiontos\n // ston pinaka $_SESSION['cortTable'] kai to $product['quantity']!=0\n // tote vale ston pinaka $_SESSION['cortTable'], ws epomeno element\n // ton pinaka $product\n \n if ($found==false && ($product['quantity']!=0)){\n \n $_SESSION['cortTable'][$nextIndex]=$product;\n } \n }\n }", "public function get_data($serial_number = '')\n {\n $obj = new View();\n\n if (! $this->authorized()) {\n $obj->view('json', array('msg' => 'Not authorized'));\n return;\n }\n\n $firmware_escrow = new Firmware_escrow_model($serial_number);\n $obj->view('json', array('msg' => $firmware_escrow->rs));\n }", "public function submit() {\n if(isset($this->request->post['serial'])) {\n $this->load->model('catalog/serial');\n $validSerials = trim($this->model_catalog_serial->validSerialNOJSON($this->request->post['serial']));\n if($validSerials != 'true') {\n $errors = $validSerials;\n }\n else { \n $errors = '';\n }\n }\n else {\n $errors = 'The serial number was empty. Please submit a valid serial number.';\n } \n\n // Need to check the database for a valid serial entry.\n\n $featurecodes = substr($this->request->post['serial'],-3,3);\n $serialcode = substr($this->request->post['serial'],0,5);\n \n // Need to check to make sure that the serial has not yet been registered\n $this->load->model('account/softwareregistration');\n $exists = $this->model_account_softwareregistration->serialPurchased($serialcode, $featurecodes);\n if(!$exists) {\n if(strlen($this->request->post['serial']) != 8) {\n $errors = 'The serial number you submitted was incorrect. Please submit a valid 8 character serial number.';\n }\n else {\n $errors = 'The serial you have entered has not been purchased.';\n }\n } \n\n $registered = $this->model_account_softwareregistration->isRegistered($serialcode, $featurecodes);\n if($registered) {\n $errors = 'The serial you entered is already registered.';\n }\n\n // Compile the states listing.\n if(isset($this->request->post['states'])) {\n foreach($this->request->post['states'] as $state) {\n $states[] = $state;\n }\n\n $customer_id = $this->model_account_softwareregistration->getCustomerIDfromSerial($serialcode, $featurecodes);\n if(isset($this->request->post['states'])) { $this->model_account_softwareregistration->editCustomerPayrollStates($customer_id, $this->request->post['states']); }\n\n }\n else {\n $states = array();\n }\n \n if(isset($this->request->post['comments'])) {\n $comments = $this->request->post['comments'];\n }\n else {\n $comments = '';\n }\n\n // Serial was valid and we should be good to go.\n if($errors == '') {\n $this->model_account_softwareregistration->addRegistration($serialcode, $featurecodes, $states, $comments);\n\n if($comments != '' && isset($comments)) {\n $from = \"Software Registration <no-reply@1099-etc.com>\";\n $subject = \"Software Registration for Serial Number \" . $serialcode . $featurecodes;\n $message = \"Serial - \" . $serialcode . $featurecodes . \"\\n\\n\";\n $message .= \"Payroll States - \\n\" . implode(\", \",$states) . \"\";\n $message .= \"\\n\\nComments - \\n\" . $comments . \"\\n\";\n mail(\"registration@1099-etc.com\", $subject, $message, \"From: \" . $from . \"\\n\");\n }\n\n $this->showPage(\"Thank you for registering.\");\n// $this->redirect($this->url->link('account/account', '', 'SSL')); \n\n/*\n $getRegistration = $this->model_account_softwareregistration->showRegistration($serialcode, $featurecodes);\n $g = implode('<br />',$getRegistration);\n $this->showPage($g ,$serialcode, $states, $comments);\n*/ }\n else {\n $this->showPage($errors,$this->request->post['serial'], $states, $comments);\n }\n }", "public function Registro_0990()\n {\n $this->Sped->criarEncerramentoBloco('0', '0990', \"0990\");\n }", "function product_barcode($param1 = '', $serial_number = '')\n\t{\n\t\tif ($this->session->userdata('admin_login') != 1)\n\t\t\tredirect(base_url() . 'index.php?login');\n\t\tif ($param1 == 'create_barcode') {\n\t\t\t$this->barcode_model->create_barcode($serial_number);\n\t\t}\n\t\t$page_data['page_name'] = 'product_barcode';\n\t\t$page_data['page_title'] = translate('product_barcodes');\n\t\t$page_data['products'] = $this->db->get('product')->result_array();\n\t\t$this->load->view('backend/index', $page_data);\n\t}", "function PrinterLog_logArduino($command, $output = '') {\r\n\treturn PrinterLog__logToFile('log_arduino', $command, $output); \r\n}", "private function initialize() {\n\t\t$f_code = chr(1);\n\t\t$this->region();\n\t\t$enc_key = $this->create_key(37);\n\t\t$model = str_pad('PHP_BMA', 16, chr(0), STR_PAD_RIGHT);\n\n\t\t$data = $f_code.$enc_key.$this->region().$model;\n\t\t$response = $this->send(self::$initialize_uri, self::GENERATE_SIZE, $this->encrypt($data));\n\t\t$data = $this->decrypt(substr($response, 8), $enc_key);\n\n\t\t$this->_set_sync(substr($response, 0, 8));\n\t\t$this->_set_secret(substr($data, 0, 20));\n\t\t$this->set_serial(substr($data, 20));\n\t}", "private function generateSerialNumbers()\n {\n foreach ($this->order_configurations as $config) {\n $config->generateSerialNumbers();\n }\n }", "public function getReceiptSerialNumber()\n\t{\n\t\t$stock_receipt_product_id = $this->input->post('stock_receipt_product_id');\n\t\t$divNumber = $this->input->post('divNumber');\n\t\t$rangeDivNumber = $this->input->post('rangeDivNumber');\n\t\t$office_id = $this->session->userdata('office_id');\n\t\t$office_operation_type = $this->session->userdata('office_operation_type');\n\t\t\n\t\t$table_name = \"inventory_\".$office_operation_type.\"_stock_receipt_product_serial_number_\".$office_id;\n\t\t$serialMaster = $this->db->select('serial_number')->get_where($table_name,array('stock_receipt_product_id'=>$stock_receipt_product_id,'stock_receipt_product_serial_number_status'=>'3'))->result();\n\t\t\n\t\t$divToAppend = '';\n\t\t$i=0;\n\t\tforeach($serialMaster as $key=>$serialNumber){\n\t\t\t$divToAppend .= '<div class=\"my_id-'.$i.'\"><div class=\"form-group col-lg-3\"><input type=\"text\" class=\"form-control\" id=\"initial_stock_starting_serial_popup'.$i.'\" readonly name=\"serial_number_'.$divNumber.'[]\" value=\"'.$serialNumber->serial_number.'\" /><a onclick=\"removeAddSrNoReceiptForm('.$divNumber.','.$rangeDivNumber.','.$i.')\" href=\"javascript:void(0);\" class=\"btn btn-round btn-default my-btn-round\"><i class=\"glyphicon glyphicon-remove\"></i></a></div></div>';\n\t\t\t$i++;\n\t\t}\n\t\t$lastValue = count($serialMaster)-1;\n\t\t$firstSerialNumber = $serialMaster[0]->serial_number;\n\t\t$lastSerialNumber = $serialMaster[$lastValue]->serial_number;\n\t\t\n\t\techo json_encode(array('firstSerialNumber'=>$firstSerialNumber,'lastSerialNumber'=>$lastSerialNumber,'msg'=>$divToAppend));\n\t\t\n\t}", "public function get_hardwareId(): string\n {\n // $serial is a str;\n\n $serial = $this->get_serialNumber();\n return $serial . '.module';\n }", "public function serial() {\n\t\tif(is_null($this->serial))\n\t\t\tthrow new DataAuthenticatorException('Unable to find a valid serial');\n\t\treturn $this->serial;\n\t}", "function save_hcid($hci_config,$save_file='')\n{\n global $base_plugin;\n \n if ($save_file=='')\n {\n $save_file=$base_plugin.'data/hcid.conf';\n }\n $fp=fopen($save_file,'w');\n fwrite($fp,\"options {\\n\");\n if($hci_config['autoinit'] == 'on')\n {\n fwrite($fp,\"\\tautoinit yes;\\n\");\n }\n if(!empty($hci_config['security']))\n {\n fwrite($fp,\"\\tsecurity \".$hci_config['security'].\";\\n\");\n }\n if(!empty($hci_config['pairing']))\n {\n fwrite($fp,\"\\tpairing \".$hci_config['pairing'].\";\\n\");\n }\n if(!empty($hci_config['passkey']))\n {\n fwrite($fp,\"\\tpasskey \".$hci_config['passkey'].\";\\n\");\n }\n fwrite($fp,\"}\\n\");\n fwrite($fp,\"device {\\n\");\n if(!empty($hci_config['name']))\n {\n fwrite($fp,\"\\tname \".$hci_config['name'].\";\\n\");\n }\n\n fwrite($fp,\"\\tclass 0x000100;\\n\");\n \n if($hci_config['iscan'] == 'on')\n {\n fwrite($fp,\"\\tiscan enable;\\n\");\n }\n if($hci_config['pscan'] == 'on')\n {\n fwrite($fp,\"\\tpscan enable;\\n\");\n }\n\n if(!empty($hci_config['lm']))\n {\n fwrite($fp,\"\\tlm \".$hci_config['lm'].\";\\n\");\n }\n\n $lp='';\n\n if($hci_config['rswitch'] == 'on')\n {\n $lp.='rswitch';\n }\n if($hci_config['hold'] == 'on')\n {\n if ($lp!='')\n {\n $lp.=',hold';\n }\n else\n {\n $lp.='hold';\n }\n\n }\n if($hci_config['sniff'] == 'on')\n {\n if ($lp!='')\n {\n $lp.=',sniff';\n }\n else\n {\n $lp.='sniff';\n }\n }\n if($hci_config['park'] == 'on')\n {\n if ($lp!='')\n {\n $lp.=',park';\n }\n else\n {\n $lp.='park';\n }\n }\n if ($lp=='')\n {\n $lp='none';\n }\n fwrite($fp,\"\\tlp \".$lp.\";\\n\");\n fwrite($fp,\"}\\n\");\n fclose($fp);\n}", "public function serch()\n {\n }", "public function get_data($serial_number = '')\n {\n $findmymac = new Findmymac_model($serial_number);\n jsonView($findmymac->rs);\n }", "function generateSerials ($numberOfChars,$lengthOfSerial) {\n\n\n$tokens = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWZY\";\n$serial = \"\";\n\nfor ($i = 0; $i < $lengthOfSerial; $i++) { \n \n for ($j = 0; $j < $numberOfChars; $j++) { \n \n $serial .= $tokens[rand(0,10)];\n \n }\n\n// append dash\n if ($i < $lengthOfSerial - 1) { \n $serial .= \"-\"; \n }\n \n}\n\n//let's return the value\n return $serial;\n\n}", "public function verAtrilEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"ATRIL\");\n\n }", "function sendFaildVer(){\n\n}", "function cambioFomrulario500(){\n\t\t$this->procedimiento='adq.f_cotizacion_ime';\n\t\t$this->transaccion='ADQ_CBFRM500_IME';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function get_seq_account_saving_no()\n\t{\n\t\t$product_code=$this->input->post('product_code');\n\t\t$cif_no=$this->input->post('cif_no');\n\t\t$data=$this->model_transaction->get_seq_account_saving_no($product_code,$cif_no);\n\t\t$jumlah=(int)$data['jumlah'];\n\t\tif(count($data)>0){\n\t\t\t$newseq=$jumlah+1;\n\t\t\tif($jumlah<10){\n\t\t\t\t$newseq='0'.$newseq;\n\t\t\t}\n\t\t}else{\n\t\t\t$newseq='01';\n\t\t}\n\t\t$return=array('newseq'=>$newseq);\n\t\techo json_encode($return);\n\t}", "function abrirPorta($strPorta=\"LPT1:\") {\n\n $fp = fopen($strPorta,\"w\");\n\n return $fp;\n }", "function common_wlan_scan(){\r\n\tglobal $text;\r\n\t//get output dari iwlist\r\n\t$iw_ssid = shell_exec('sudo /sbin/iwlist wlan0 scan');\r\n\t$iw_mac = $iw_ssid;\r\n\t$iw_quality = $iw_ssid;\r\n\t\r\n\t$iw_ssid = explode('ESSID:\"', $iw_ssid);\r\n\t$iw_mac = explode('Address:', $iw_mac);\r\n\t$iw_quality = explode('Quality=', $iw_quality);\r\n\t\r\n\t//get sssid\r\n\t$data_ssid = array();\r\n\t$counter = 0;\r\n\tforeach($iw_ssid as $ssid){\r\n\t\t$tmp = explode('\"',$ssid);\r\n\t\tif(!empty($tmp[0]) && $counter != 0){\r\n\t\t\t$data_ssid[] = $tmp[0];\r\n\t\t}\r\n\t\t$counter++;\r\n\t}\r\n\t\r\n\t//get mac address\r\n\t$data_mac = array();\r\n\t$counter = 0;\r\n\tforeach($iw_mac as $mac){\r\n\t\t$tmp = explode(' ',$mac);\r\n\t\tif(!empty($tmp[1]) && $counter != 0){\r\n\t\t\t$data_mac[] = $tmp[1];\r\n\t\t}\r\n\t\t$counter++;\r\n\t}\r\n\t\r\n\t//get kekuatan sinyal\r\n\t$data_quality = array();\r\n\t$counter = 0;\r\n\tforeach($iw_quality as $signal){\r\n\t\t$tmp = explode(' ',$signal);\r\n\t\tif(!empty($tmp[0]) && $counter != 0){\r\n\t\t\t$tmpb = explode('/',$tmp[0]);\r\n\t\t\t$a = $tmpb[0];\r\n\t\t\t$b = $tmpb[1];\r\n\t\t\t$c = number_format(($a/$b) * 100,0,',','.');\r\n\t\t\t$data_quality[] = $c;\r\n\t\t}\r\n\t\t$counter++;\r\n\t}\r\n\t\r\n\t$result = array(\r\n\t\t'ssid' \t\t=> $data_ssid,\r\n\t\t'mac' \t\t=> $data_mac,\r\n\t\t'signal'\t=> $data_quality\r\n\t);\t\r\n\treturn $result;\r\n}", "function imprimir_voucher_estacionamiento($numero,$chofer,$patente,$horainicio,$horatermino,$montototal,$comentario,$correlativopapel,$cliente,$fecha_termino,$fecha_inicio_2){\ntry {\n // Enter the share name for your USB printer here\n //$connector = null; \n //$connector = new WindowsPrintConnector(\"EPSON TM-T81 Receipt\");\n $connector = new WindowsPrintConnector(\"EPSON TM-T20 Receipt\");\n // $connector = new WindowsPrintConnector(\"doPDF 8\");\n /* Print a \"Hello world\" receipt\" */\n $printer = new Printer($connector);\n\n \n $date=new DateTime();\n $fecha = $date->format('d-m-Y');\n\n\n $Chofer = $chofer;\n $Patente = $patente;\n $serie = $numero;\n $img = EscposImage::load(\"logo1.png\");\n $printer -> graphics($img);\n \n \n $printer -> text(\"Numero : $serie\\n\");\n $printer -> text(\"Chofer : $Chofer\\n\");\n $printer -> text(\"Patente: $Patente\\n\");\n\n if ($cliente != 0) {\n include_once(\"conexion.php\");\n $con = new DB;\n $buscarpersona = $con->conectar();\n $strConsulta = \"select * from cliente where rut_cliente ='$cliente'\";\n $buscarpersona = mysql_query($strConsulta);\n $numfilas = mysql_num_rows($buscarpersona);\n $row = mysql_fetch_assoc($buscarpersona);\n $nombre_cliente = $row['nombre_cliente'];\n //var_dump($numfilas);\n if($numfilas >= 1){\n $printer -> text(\"Cliente: $nombre_cliente\\n\");\n }\n \n }\n \n if ($correlativopapel != 0) {\n $printer -> text(\"\\nCorrelativo : $correlativopapel\\n\");\n }\n $printer -> text(\"Fecha Inicio : $fecha_inicio_2\\n\");\n $printer -> text(\"Hora de inicio : $horainicio\\n\");\n\n\n\n if ($horatermino != 0) {\n $printer -> text(\"Fecha de Termino: $fecha_termino\\n\");\n $printer -> text(\"Hora de Termino : $horatermino\\n\"); \n }\n \n \n if ($montototal != 0) {\n $printer -> text('Monto total : $'.$montototal);\n }\n \n if ($horatermino != 0) {\n $printer -> text(\"\\n\");\n $printer -> text(\"\\n\\n\");\n $printer -> text(\"Firma: _________________\\n\");\n \n }\n $printer -> text(\"$comentario\\n\");\n $printer -> cut();\n /* Close printer */\n $printer -> close();\n\n echo \"<div class='alert alert-success'><strong>Impresion Correcta $comentario</strong></div>\";\n} catch (Exception $e) {\n echo \"No se pudo imprimir \" . $e -> getMessage() . \"\\n\";\n}\n}", "public function pelicula( ) {\n\n\n AccesoGui::$guiSistema->esperarInicioSistema();\n\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_PELICULA);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n ConexionServidorCliente::$ctrlGuiPantallas->bajarPantallaElectrica();\n usleep(500000);\n AccesoControladoresDispositivos::$ctrlAutomata->encenderLuzSala(Automata::$intensidades[\"minima\"]);\n if(!AccesoControladoresDispositivos::$ctrlPantallas->isEncendidaPresidencia()) {\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaEncender();\n }\n else {\n AccesoControladoresDispositivos::$ctrlPantallas->quitarPIPPresidencia();\n }\n usleep(3000000);\n AccesoControladoresDispositivos::$ctrlFoco->apagar();\n ConexionServidorCliente::$ctrlGuiPlasmas->apagar();\n ConexionServidorCliente::$ctrlGuiProyectores->apagarPizarra();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\n\tAccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaDVD();\n usleep(100000);\n AccesoControladoresDispositivos::$ctrlPantallas->verEntradaPresidenciaAV1();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->activarCentral();\n AccesoGui::$guiSistema->esperarInicioSistema();\n usleep(5000000);\n ConexionServidorCliente::$ctrlGuiProyectores->verDVDEnCentral();\n ConexionServidorCliente::$ctrlGuiDvd->onOffDVD();\n //Comentado mientras se repara la visor de opacos\n\t//ConexionServidorCliente::$ctrlGuiCamaraDocumentos->camaraDocumentosApagar();//apagarDoc\n usleep(100000);\n AccesoGui::$guiSistema->esperarInicioSistema();\n AccesoGui::$guiEscenarios->escenarioPelicula();\n AccesoGui::$guiMenus->menuPrincipal(true);\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n usleep(3000000);\n ConexionServidorCliente::$ctrlGuiDvd->playDVD();\n AccesoGui::$guiDispositivos->seleccionarDvd();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n\n }", "function ghbt_scanner() {\n $this->name=\"ghbt_scanner\";\n $this->title=\"GoogleHome BT Scanner\";\n $this->module_category=\"<#LANG_SECTION_DEVICES#>\";\n $this->checkInstalled();\n}", "public function getSerialId()\n\t{\n\n\t\treturn $this->serial_id;\n\t}", "protected function getDeviceSwitchPortsRequest($serial)\n {\n // verify the required parameter 'serial' is set\n if ($serial === null || (is_array($serial) && count($serial) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $serial when calling getDeviceSwitchPorts'\n );\n }\n\n $resourcePath = '/devices/{serial}/switch/ports';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($serial !== null) {\n $resourcePath = str_replace(\n '{' . 'serial' . '}',\n ObjectSerializer::toPathValue($serial),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function setTxSerialHardware($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->tx_serial_hardware !== $v) {\n\t\t\t$this->tx_serial_hardware = $v;\n\t\t\t$this->modifiedColumns[] = C060InventarioPeer::TX_SERIAL_HARDWARE;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function recivirClases( ) {\n AccesoGui::$guiSistema->esperarInicioSistema();\n\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_RECIBIR_CLASE);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n ConexionServidorCliente::$ctrlGuiPantallas->bajarPantallaElectrica();\n AccesoControladoresDispositivos::$ctrlAutomata->encenderLuzSala(Automata::$intensidades[\"media\"]);//intensidad media\n AccesoControladoresDispositivos::$ctrlLuz->encenderLucesSuelo();\n if(!AccesoControladoresDispositivos::$ctrlPantallas->isEncendidaPresidencia()) {\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaEncender();\n usleep(5000000);\n AccesoControladoresDispositivos::$ctrlPantallas->verEntradaPresidenciaAV1();\n }else {\n AccesoControladoresDispositivos::$ctrlPantallas->quitarPIPPresidencia();\n }\n usleep(1000000);\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaVideoConferencia();\n ConexionServidorCliente::$ctrlGuiPlasmas->encender();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderPizarra();\n AccesoControladoresDispositivos::$ctrlFoco->encender();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\nAccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n ConexionServidorCliente::$ctrlGuiPlasmas->verVideoSalaEnPlasma();\n ConexionServidorCliente::$ctrlGuiProyectores->activarCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->activarPizarra();\n ConexionServidorCliente::$ctrlGuiProyectores->verPCSalaEnCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->verVideoconferenciaEnPizarra();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->activarNuestroSonido();\n AccesoControladoresDispositivos::$ctrlVideoconferencia->conectar();\n AccesoGui::$guiEscenarios->escenarioRecivirClase();\n AccesoGui::$guiMenus->menuPrincipal(true);\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n\n\n }", "public function enviarComando( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\", $this->getComando(),\n $this->getAtributo());\nprint_r($cmd);\n $this->enviarPeticion($cmd->getComando());\n\n }", "public function usb()\n {\n }", "public function H990()\n {\n $this->Sped->criarEncerramentoBloco('0', 'H990', \"H990\");\n }", "public function claseLocal( ) {\n\n\n AccesoGui::$guiSistema->esperarInicioSistema();\n\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_CLASE_LOCAL);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n ConexionServidorCliente::$ctrlGuiPantallas->bajarPantallaElectrica();\n usleep(500000);\n AccesoControladoresDispositivos::$ctrlAutomata->encenderLuzSala(Automata::$intensidades[\"media\"]);\n AccesoControladoresDispositivos::$ctrlFoco->apagar();\n ConexionServidorCliente::$ctrlGuiPantallas->pipEnPantallaPresi();//control_pantallas.pipEnPantallaPresi()\n ConexionServidorCliente::$ctrlGuiPlasmas->encender();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\n//AccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n ConexionServidorCliente::$ctrlGuiProyectores->encenderCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderPizarra();\n //ConexionServidorCliente::$ctrlGuiProyectores->activarCentral();\n //ConexionServidorCliente::$ctrlGuiProyectores->activarPizarra();\n //usleep(3000000);\n ConexionServidorCliente::$ctrlGuiProyectores->verPCSalaEnPizarra();\n ConexionServidorCliente::$ctrlGuiProyectores->verPCSalaEnCentral();\n //usleep(3000000);\n AccesoControladoresDispositivos::$ctrlProyectores->forzarEstadoOnCentral();\n AccesoControladoresDispositivos::$ctrlProyectores->forzarEstadoOnPizarra();\n\tAccesoGui::$guiSistema->esperarInicioSistema();\n AccesoControladoresDispositivos::$ctrlPlasma->verVideoSalaEnPlasma();\n AccesoGui::$guiEscenarios->escenarioClaseLocal();\n AccesoGui::$guiMenus->menuPrincipal(true);\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n\t#AccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\t#AccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n }", "public function uploadTarifTunjangan($params = array())\n {\n $data = array();\n $total_rec = $ins_rec = $lastBaCode = $update_rec = 0;\n \n \n if ($_FILES[file][size] > 0) {\n //********************************* VALIDASI SEQUENCE UPLOAD DATA BUDGET ***************************************\n //1. ****************** Check BA dari CSV FILE\n $file = $_FILES[file][tmp_name];\n $handle = fopen($file,\"r\");\n $arrba = array();\n do {\n if (($datachk[0])&&($total_rec > 1)) {\n array_push($arrba,$datachk[1]);\n }\n $total_rec++;\n } while($datachk = fgetcsv($handle,1000,\";\",\"'\"));\n $arrbadis = array_values(array_unique($arrba, SORT_REGULAR)); //variabel array list BA pada CSV\n \n //2. ****************** Baca Urutan Upload dari T_SEQ\n $sqlCurTask=\"SELECT SEQ_NUM FROM T_SEQ WHERE TABLE_NAME='TM_TARIF_TUNJANGAN'\";\n $seqNum = $this->_db->fetchOne($sqlCurTask);\n $sqlSeq=\"SELECT * FROM T_SEQ WHERE SEQ_NUM < ($seqNum) ORDER BY SEQ_NUM, TASK_NAME\";\n $rows = $this->_db->fetchAll($sqlSeq);\n if (!empty($rows)) {\n foreach ($rows as $idx => $row) { \n $tablechk = $row['REMARKS'];\n //2.1 ****************** get BA CODE yang sudah dimasukan pada table di awal sequence\n $sqlba = \"SELECT DISTINCT BA_CODE FROM \".$row['TABLE_NAME'];\n $arrnormaba = array();\n $arrlockba = array();\n $rowsba = $this->_db->fetchAll($sqlba);\n foreach ($rowsba as $idxba => $rowba) {\n array_push($arrnormaba,$rowba['BA_CODE']); //variabel array list BA pada masing2 norma\n //2.2 ****************** get STATUS LOCK masing2 BA CODE di T_SEQ\n $sqlba1 = \"SELECT STATUS FROM T_SEQ_CHECK WHERE BA_CODE='\".$rowba['BA_CODE'].\"' AND TASK_NAME='\".$row['TABLE_NAME'].\"'\";\n \n $arrlockba[$rowba['BA_CODE']] = $this->_db->fetchOne($sqlba1);\n } \n $arrNotFound=array();\n for($x=0;$x<count($arrbadis);$x++){\n if(!in_array($arrbadis[$x],$arrnormaba)){ //check apakah data ba csv ada di data ba norma?\n $arrNotFound[]=$arrbadis[$x];\n }elseif($arrlockba[$arrbadis[$x]]==\"LOCKED\"){\n $arrNotFound[]=$arrbadis[$x];\n }\n }\n if($arrNotFound) break;\n }\n }\n $arrNotFound =array();\n if($arrNotFound){\n $return = array(\n 'status' => 'failed',\n 'total' => $total_rec - 2,\n 'ba_notfound' => implode(\",\",$arrNotFound),\n 'task_err' => $tablechk\n );\n return $return;\n }\n //********************************* VALIDASI SEQUENCE UPLOAD DATA BUDGET ***************************************//\n //get the csv file\n $file = $_FILES[file][tmp_name];\n $handle = fopen($file,\"r\");\n \n $total_rec = 0;\n \n //loop through the csv file and insert into database\n do {\n if (($data[0])&&($total_rec > 1)) {\n /*\n if ($lastBaCode <> addslashes($data[0])){\n try {\n //remove data\n $sqlDelete = \"\n DELETE FROM TM_TARIF_TUNJANGAN \n WHERE BA_CODE = TRIM('\".addslashes($data[0]).\"')\n AND to_char(PERIOD_BUDGET,'DD-MM-RRRR') = '{$this->_period}'\n \";\n //log file penghapusan data\n $this->_global->deleteDataLogFile($sqlDelete);\n \n $this->_db->query($sqlDelete); \n } catch (Exception $e) {\n \n }\n }\n */\n //cek data\n $sql = \"\n SELECT COUNT(*) \n FROM TM_TARIF_TUNJANGAN\n WHERE BA_CODE = TRIM('\".addslashes($data[0]).\"')\n AND to_char(PERIOD_BUDGET,'DD-MM-RRRR') = '{$this->_period}'\n AND JOB_CODE = TRIM('\".addslashes($data[1]).\"')\n AND EMPLOYEE_STATUS = TRIM('\".addslashes($data[2]).\"')\n AND TUNJANGAN_TYPE = TRIM('\".addslashes($data[3]).\"')\n \";\n $count = $this->_db->fetchOne($sql);\n if ($count == 0) {\n try {\n //insert data\n $sql = \"\n INSERT INTO TM_TARIF_TUNJANGAN \n (PERIOD_BUDGET, BA_CODE, JOB_CODE, EMPLOYEE_STATUS, TUNJANGAN_TYPE, VALUE, INSERT_USER, INSERT_TIME)\n VALUES (\n TO_DATE('{$this->_period}','DD-MM-RRRR'),\n TRIM('\".addslashes($data[0]).\"'),\n TRIM('\".addslashes($data[1]).\"'),\n TRIM('\".addslashes($data[2]).\"'),\n TRIM('\".addslashes($data[3]).\"'),\n REPLACE('\".addslashes($data[4]).\"', ',', ''),\n '{$this->_userName}',\n SYSDATE\n )\n \";\n $this->_db->query($sql);\n $this->_db->commit();\n $ins_rec++;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA SUCCESS', 'MASTER TARIF TUNJANGAN', '', '');\n } catch (Exception $e) {\n //menampilkan data yang tidak ditambahkan\n $data_error[] = $total_rec;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA FAILED', 'MASTER TARIF TUNJANGAN', '', $e->getCode());\n \n //error log file\n $this->_global->errorLogFile($e->getMessage());\n }\n }else{\n // cek apakah data non-aktif\n $sql = \"\n SELECT COUNT(*) \n FROM TM_TARIF_TUNJANGAN\n WHERE BA_CODE = TRIM('\".addslashes($data[0]).\"')\n AND to_char(PERIOD_BUDGET,'DD-MM-RRRR') = '{$this->_period}'\n AND JOB_CODE = TRIM('\".addslashes($data[1]).\"')\n AND EMPLOYEE_STATUS = TRIM('\".addslashes($data[2]).\"')\n AND TUNJANGAN_TYPE = TRIM('\".addslashes($data[3]).\"')\n AND DELETE_USER IS NULL\n \";\n $count = $this->_db->fetchOne($sql);\n \n if ($count == 0) {\n // update data menjadi aktif jika sebelumnya telah dinon-aktifkan\n try {\n $sql = \"\n UPDATE TM_TARIF_TUNJANGAN\n SET VALUE = REPLACE('\".addslashes($data[4]).\"', ',', ''),\n UPDATE_USER = '{$this->_userName}',\n UPDATE_TIME = SYSDATE,\n DELETE_USER = NULL,\n DELETE_TIME = NULL\n WHERE BA_CODE = TRIM('\".addslashes($data[0]).\"')\n AND to_char(PERIOD_BUDGET,'DD-MM-RRRR') = '{$this->_period}'\n AND JOB_CODE = TRIM('\".addslashes($data[1]).\"')\n AND EMPLOYEE_STATUS = TRIM('\".addslashes($data[2]).\"')\n AND TUNJANGAN_TYPE = TRIM('\".addslashes($data[3]).\"')\n \";\n $this->_db->query($sql);\n $this->_db->commit();\n $update_rec++;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA SUCCESS', 'MASTER TARIF TUNJANGAN', '', '');\n } catch (Exception $e) {\n //menampilkan data yang tidak ditambahkan\n $data_error[] = $total_rec;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA FAILED', 'MASTER TARIF TUNJANGAN', '', $e->getCode());\n \n //error log file\n $this->_global->errorLogFile($e->getMessage());\n }\n }else{\n //menampilkan data yang tidak ditambahkan\n $data_error[] = $total_rec;\n }\n }\n $lastBaCode = addslashes($data[0]);\n }\n $total_rec++;\n } while ($data = fgetcsv($handle,1000,\",\",\"'\"));\n //\n $return = array(\n 'status' => 'done',\n 'total' => $total_rec - 2,\n 'inserted' => $ins_rec,\n 'updated' => $update_rec,\n 'data_failed' => $data_error\n );\n }else{\n $return = array(\n 'status' => 'failed',\n 'total' => $total_rec - 2,\n 'inserted' => $ins_rec,\n 'updated' => $update_rec,\n 'data_failed' => $data_error\n );\n }\n \n return $return;\n }", "public function print_suratKeterangan() {\n $status = FALSE;\n $msg = 'Proses buka hasil...';\n\n $noSurat = $this->input->post('no_surat');\n\n $getPrint = $this->data_pengajuan->get_print($noSurat);\n foreach($getPrint as $p) {\n $formPengajuan = $p->form_pengajuan;\n }\n\n if (empty($noSurat)) {\n $status = FALSE;\n $msg = 'Nomor surat tidak ada!';\n } else if(empty($formPengajuan)) {\n $status = FALSE;\n $msg = 'Data surat error!';\n } else {\n if($this->session->userdata('logged_in') == false) {\n $status = FALSE;\n $msg = 'Anda belum masuk akun!';\n } else {\n $status = TRUE;\n $msg = 'Proses lihat surat berhasil buka';\n }\n\n if ($this->session->userdata('staff_desa_in')){\n $status = TRUE;\n $msg = 'Proses lihat surat berhasil buka';\n }\n \n }\n\n echo json_encode(array('dataForm' => $formPengajuan, 'status' => $status, 'message' => $msg));\n\n // $enc = json_encode($formPengajuan);\n // $rjson = str_replace(array(\"\\t\",\"\\n\"), \"\", $enc);\n // $xjson = json_decode($rjson); \n }", "public function encender() {\n $respuesta=self::$plasma->estadoPlasma();\n\tif ( $respuesta == 'OFF' ){\n\t $respuesta=self::$plasma->encender();\n\t}\n\n }", "function cmbEqOt($ot,$par) {\n $this->db->where('ot', $ot); \n $this->db->like('serial', $par);\n \n\n $query = $this->db->select('cons as id,CONCAT(\"Cliente\",id_cliente,\" S/N: \",serial)as text')\n ->get(\"veqot\");\n $json = $query->result();\n return $json;\n }", "function actualizarHijosPadre($serial_pad,$tipoPadre,$direccionpad,$telefonopad){\n\t\tinclude \"bdd.inc\";\n\t\t$sql = \"select alu.serial_alu as serial_alu\n\t\t\t\tfrom alumno as alu,padres_alumno as padalu,parentesco as paren\n\t\t\t\twhere padalu.serial_pad=$serial_pad and alu.serial_alu=padalu.serial_alu and paren.serial_par=padalu.serial_par and conQuienVive_alu='$tipoPadre' and codigo_par='$tipoPadre'\";\n\t\t$rs=$db->Execute($sql);\n\t\t$nr=$rs->RecordCount();\n\t\tif ($nr>0){\n\t\t\twhile(!$rs->EOF){\n\t\t\t $serialalu=$rs->fields['serial_alu'];\n\t\t\t $query = \"update alumno set direcc_alu=\\\"$direccionpad\\\",telefo_alu=\\\"$telefonopad\\\" where serial_alu=$serialalu\";\n\t\t\t $db->Execute($query);\n\t\t\t $rs->MoveNext();\n\t\t\t}\n\t\t} \n\t}", "public function activarPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"NO_MUTE\");\n $this->setPizarraMuteado(0);\n }", "public function simpan_spk($antarDealer=null){\n $nomorspk=($this->input->post('nospk'))?$this->input->post(\"nospk\"):$this->nomor_spk();\n $param=array(\n 'no_spk' => $nomorspk,\n 'kd_maindealer' =>$this->session->userdata(\"kd_maindealer\"),\n 'kd_dealer' => $this->session->userdata(\"kd_dealer\"),'kd_customer' => $this->input->post(\"kd_customer\"),\n 'type_penjualan'=> $this->input->post(\"type_penjualan\"),\n 'jenis_penjualan'=> $this->input->post(\"jenis_penjualan\"),\n 'jenis_p_antardealer'=> $this->input->post(\"jp_antardealer\"),\n 'kd_typecustomer' => $this->input->post(\"kd_typecustomer\"),\n 'penjualan_via' => $this->input->post(\"kd_groupsales\"),\n 'jenis_harga' => $this->input->post(\"jenis_harga\"),\n 'kd_sales' =>($this->input->post(\"kd_groupsales\")==\"TP\")?$this->input->post('kd_salesman_tp'): $this->input->post(\"kd_salesman\"),\n 'kd_saleshonda' => $this->input->post(\"kd_saleshonda\"),\n 'created_by' => $this->session->userdata(\"user_id\"),\n 'tgl_spk' => $this->input->post(\"tgl_spk\"),\n 'guest_no' => $this->input->post(\"guest_no\"),\n 'chanel' =>($this->input->post(\"jp_antardealer\"))?$this->input->post(\"kd_dealer\"):\"\"\n );\n $spkid=0;$spkcs=0;$spkgb=0;$hasil=array();\n $hasil = json_decode($this->curl->simple_post(API_URL.\"/api/spk/spk\", $param, array(CURLOPT_BUFFERSIZE => 100))); \n if($hasil->recordexists==TRUE){\n $param[\"lastmodified_by\"] = $this->session->userdata(\"user_id\");\n $hasil = json_decode($this->curl->simple_put(API_URL.\"/api/spk/spk\", $param, array(CURLOPT_BUFFERSIZE => 100))); \n }\n $spkid =($this->input->post('spkid'))?($this->input->post('spkid')):$hasil->message;\n //var_dump($hasil);var_dump($antarDealer);var_dump($spkid);\n if($antarDealer==\"1\"){\n //echo $spkid;\n return $spkid;\n }else{\n if($hasil){\n if((int)$hasil->message>0){\n $spkcs =$this->simpancs_spk($spkid);\n $spkcs +=$this->simpansurat_spk($spkid);\n if($spkcs >0){\n $this->guestbook_upd_status($nomorspk);\n }\n //updata data customer\n $spkgb=$this->update_customer($param[\"kd_customer\"]);\n }\n }\n echo $param[\"no_spk\"].\":\".$spkid.\":\".$hasil->status.\":\".$hasil->message;\n }\n }", "function xml_hardware( &$arrHddtempdevices ) {\n\tglobal $sysinfo;\n\tglobal $text;\n\t\n\t$strPcidevices = \"\"; $strIdedevices = \"\"; $strUsbdevices = \"\"; $strScsidevices = \"\";\n\t\n\t$arrSys = $sysinfo->cpu_info();\n\t\n\t$arrBuf = finddups( $sysinfo->pci() );\n\tif( count( $arrBuf ) ) {\n\t\tfor( $i = 0, $max = sizeof($arrBuf); $i < $max; $i++ ) {\n\t\t\tif( $arrBuf[$i] ) {\n\t\t\t\t$strPcidevices .= \" <Device><Name>\" . htmlspecialchars( chop( $arrBuf[$i] ), ENT_QUOTES ) . \"</Name></Device>\\n\";\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$arrBuf = $sysinfo->ide();\n\tif( count( $arrBuf ) ) {\n\t\tforeach( $arrBuf as $strKey => $arrValue ) {\n\t\t\t$strIdedevices .= \" <Device>\\n<Name>\" . htmlspecialchars( $strKey . ': ' . $arrValue['model'], ENT_QUOTES ) . \"</Name>\\n\";\n\t\t\tif( isset( $arrValue['capacity'] ) ) {\n\t\t\t\t$strIdedevices .= '<Capacity>' . htmlspecialchars( $arrValue['capacity'], ENT_QUOTES ) . '</Capacity>';\n\t\t\t}\n\t\t$arrHddtempdevices[] = $strKey;\n\t\t$strIdedevices .= \"</Device>\\n\";\n\t\t} \n\t} \n\t\n\t$arrBuf = $sysinfo->scsi();\n\tif( count( $arrBuf ) ) {\n\t\tforeach( $arrBuf as $strKey => $arrValue ) {\n\t\t\t$strScsidevices .= \"<Device>\\n\";\n\t\t\tif( $strKey >= '0' && $strKey <= '9' ) {\n\t\t\t\t$strScsidevices .= \" <Name>\" . htmlspecialchars( $arrValue['model'], ENT_QUOTES ) . \"</Name>\\n\";\n\t\t\t} else {\n\t\t\t\t$strScsidevices .= \" <Name>\" . htmlspecialchars( $strKey . ': ' . $arrValue['model'], ENT_QUOTES ) . \"</Name>\\n\";\n\t\t\t}\n\t\t\tif( isset( $arrrValue['capacity'])) {\n\t\t\t\t$strScsidevices .= '<Capacity>' . htmlspecialchars( $arrValue['capacity'], ENT_QUOTES ) . '</Capacity>';\n\t\t\t}\n\t\t\t$strScsidevices .= \"</Device>\\n\";\n\t\t}\n\t}\n\t\n\t$arrBuf = finddups( $sysinfo->usb() );\n\tif( count( $arrBuf ) ) {\n\t\tfor( $i = 0, $max = sizeof( $arrBuf ); $i < $max; $i++ ) {\n\t\t\tif( $arrBuf[$i] ) {\n\t\t\t\t$strUsbdevices .= \" <Device><Name>\" . htmlspecialchars( chop( $arrBuf[$i] ), ENT_QUOTES ) . \"</Name></Device>\\n\";\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$_text = \" <Hardware>\\n\";\n\t$_text .= \" <CPU>\\n\";\n\tif( isset( $arrSys['cpus'] ) ) {\n\t\t$_text .= \" <Number>\" . htmlspecialchars( $arrSys['cpus'], ENT_QUOTES ) . \"</Number>\\n\";\n\t}\n\tif( isset( $arrSys['model'] ) ) {\n\t\t$_text .= \" <Model>\" . htmlspecialchars( $arrSys['model'], ENT_QUOTES ) . \"</Model>\\n\";\n\t}\n\tif( isset( $arrSys['temp'] ) ) {\n\t\t$_text .= \" <Cputemp>\" . htmlspecialchars( $arrSys['temp'], ENT_QUOTES ) . \"</Cputemp>\\n\";\n\t}\n\tif( isset( $arrSys['cpuspeed'] ) ) {\n\t\t$_text .= \" <Cpuspeed>\" . htmlspecialchars( $arrSys['cpuspeed'], ENT_QUOTES ) . \"</Cpuspeed>\\n\";\n\t}\n\tif( isset( $arrSys['busspeed'] ) ) {\n\t\t$_text .= \" <Busspeed>\" . htmlspecialchars( $arrSys['busspeed'], ENT_QUOTES ) . \"</Busspeed>\\n\";\n\t}\n\tif( isset( $arrSys['cache'] ) ) {\n\t\t$_text .= \" <Cache>\" . htmlspecialchars( $arrSys['cache'], ENT_QUOTES ) . \"</Cache>\\n\";\n\t}\n\tif( isset( $arrSys['bogomips'] ) ) {\n\t\t$_text .= \" <Bogomips>\" . htmlspecialchars( $arrSys['bogomips'], ENT_QUOTES ) . \"</Bogomips>\\n\";\n\t}\n\t$_text .= \" </CPU>\\n\";\n\t$_text .= \" <PCI>\\n\";\n\tif( $strPcidevices) {\n\t\t$_text .= $strPcidevices;\n\t}\n\t$_text .= \" </PCI>\\n\";\n\t$_text .= \" <IDE>\\n\";\n\tif( $strIdedevices) {\n\t\t$_text .= $strIdedevices;\n\t}\n\t$_text .= \" </IDE>\\n\";\n\t$_text .= \" <SCSI>\\n\";\n\tif( $strScsidevices) {\n\t\t$_text .= $strScsidevices;\n\t}\n\t$_text .= \" </SCSI>\\n\";\n\t$_text .= \" <USB>\\n\";\n\tif($strUsbdevices) {\n\t\t$_text .= $strUsbdevices;\n\t}\n\t$_text .= \" </USB>\\n\";\n\t$_text .= \" </Hardware>\\n\";\n\n return $_text;\n}", "private function __construct($serial, $secret = null) {\n\t\tif(is_null($secret)) {\n\t\t\t$this->set_region($serial);\n\t\t} else {\n\t\t\t$this->set_serial($serial);\n\t\t\t$this->set_secret($secret);\n\t\t}\n\t}", "function enumerate(){\n $res=array();\n // lista de los macs del laboratorio\n for($i=134;$i<=148;$i++) array_push($res,sprintf(\"l%03d\",$i));\n $this->myLogger->trace(\"mac list: \".json_encode($res));\n return $res;\n }", "public function MyExecute()\r\n\t{\r\n Utility::turnDebugOn();\r\n //config switch\r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",1);\r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",2); \r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",3); \r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",4); \r\n// \r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",1);\r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",2); \r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",3);\r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",4); \r\n \r\n// $this->apRadioControl($this->scenario->GetDevice('AP2'),\"Disabled\");\r\n// \r\n// Utility::insertBreakPoint(); \r\n// \r\n// $this->apRadioControl($this->scenario->GetDevice('AP2'),\"Enabled\");\r\n// \r\n// $this->syncAPs();\r\n \r\n// if($this->checkPage()==TRUE)\r\n// {\r\n// Utility::insertBreakPoint(\"hahahahaha\"); \r\n// }\r\n// else\r\n// {\r\n// system(\"banner baga\");\r\n// }\r\n \r\n\r\n $MYVSC=new VSC(\"V2\",\"V2\",\"WPA2(AES/CCMP)\",\"802.1X\");\r\n $MYVSC->commit();\r\n \r\n// $MYVSC=new VSC(\"V3\",\"V3\",\"WEP\",\"HTML\");\r\n// $my_wireless=new WirelessProtection();\r\n// $my_wireless->setWirelessProtectionType(\"WEP\");\r\n// $my_wireless->setKeySource(\"STATIC\");\r\n// $my_wireless->setKey(array( \"c67347dd12a787b7a132f690d0\", \"c67347dd12a797b7a132f690d1\", \"c673a7dd12a787b7a132f690d2\", \"c67347dd16a787b7a132f690d3\", \"2\", \"HEX\"));\r\n// $MYVSC->configureWirelessProtection($my_wireless); \r\n// $MYVSC->commit();\r\n \r\n $MYVSC=new VSC(\"V3\",\"V3\",\"WPA(TKIP)\",\"HTML\");\r\n $my_wireless=new WirelessProtection();\r\n $my_wireless->setWirelessProtectionType(\"WPA(TKIP)\");\r\n $my_wireless->setKeySource(\"STATIC\");\r\n $my_wireless->setKey(\"26d4a5f7cf549710a7aae2db4e712027\");\r\n $MYVSC->configureWirelessProtection($my_wireless); \r\n $MYVSC->commit();\r\n \r\n \r\n \r\n// $MYVSC=new VSC(\"V4\",\"V4\",\"None\",\"MAC\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V5\",\"V5\",\"None\",\"HTML_MAC\");\r\n// $MYVSC->commit();\r\n// \r\n // $MYVSC=new VSC(\"V6\",\"V6\",\"WEP\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V7\",\"V7\",\"WPA2(AES/CCMP)\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V8\",\"V8\",\"WPA/WPA2\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// $MYVSC=new VSC(\"V2\",\"V2\",\"WEP\");\r\n// $MYVSC->commit(); \r\n// \r\n// $MYVSC=new VSC(\"V3\",\"V3\",\"WEP\",\"HTML\"); \r\n// $MYVSC->commit(); \r\n// \r\n \r\n Utility::insertBreakPoint(); \r\n return \"passed\";\r\n \r\n\t}", "public function getSerialNumber() {\n if ($this->serial) {\n return $this->serial;\n }\n if (is_array($this->rawData)) {\n $this->serial = $this->rawData[\"serial number\"];\n if (!$this->serial) { \n $this->serial = $this->rawData[\"серийный номер\"];\n }\n if (!$this->serial) { \n $this->serial = $this->rawData[12]; // CP-3911\n }\n }\n return $this->serial;\n }", "public function enviarNuestroSonido( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\",\"NUESTRO_SONIDO\",$this->getNuestroSonido());\n $this->enviarPeticion($cmd->getComando());\n\n }", "public function cetakOrdernya()\n\t{\n\t\t\t// --------------------------------------\n\t\t$result = array(); \n\t\t$key1 = \"c67536e59042f4f7049d441a3a5f71e1\";\n\t\t$key2 = \"cd187b9bff4a84415908698f9793098d\";\n\t\t$tgl=date('Ymd') ;\n\t\t$password=\"05144f4e12aaa402aeb51ef2c7dde527\";//MD5($key1 + $tgl + \"201\" + \"3171030101710005\" + $key2);\n\t\t$username=\"ecom\";\n\t\t$gab=base64_encode($username.$password);\n\t\t//-----------------------------------------------------------------------------------\t\n\t\t//$kodepossip=$_POST['kodepossip'];\n\t\t$messtype=\"301\";//\"201\";\t\n\t\t$userid=\"dede123\";\n\t\t//$param1=$_POST['IdOrder'];//\"3171030101710005\";\n\t\t$param1=$idordernya;//\"3171030101710005\";\n\t\t//$param1=$_POST['idorder'];//\"3171030101710005\";\n\t\t\n\t\t//$param1=\"3171030101710005\";\n\t\t$param2=\"\";\n\t\t$param3=\"\";\n\t\t$param4=\"\";\n\t\t$param5=\"\";\n\t\t//------------------------------------------------------------------------------------\n\t\t\n\t\t// $messtype=\"202\";\t\n\t\t// $userid=\"dede123\";\n\t\t// $param1=\"0000000158\";\n\t\t// $param2=\"\";\n\t\t// $param3=\"\";\n\t\t// $param4=\"\";\n\t\t// $param5=\"\";\n\t\t//------------------------------------------------------------------------------------\n\t\t\n\t\t$hash=strtolower (MD5($key1.$tgl.$messtype.$param1.$key2));\n\t\t\t$data_string = '{\n\t\t\t\t\"messtype\":\"'.$messtype.'\",\n\t\t\t\t\"param1\":\"'.$param1.'\",\n\t\t\t\t\"userid\":\"'.$userid.'\",\n\t\t\t\t\"param2\":\"'.$param2.'\",\n\t\t\t\t\"param3\":\"'.$param3.'\",\n\t\t\t\t\"param4\":\"'.$param4.'\",\n\t\t\t\t\"param5\":\"'.$param5.'\",\n\t\t\t\t\"hashing\":\"'.$hash.'\"}';\n\t\t\t\n\t\n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://magenpos.posindonesia.co.id:6466/a767e8eec95442bda80c4e35e0660dbb\"); \n\t\t\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);\n\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\"); \n\t\t\t\tcurl_setopt($ch, CURLOPT_POST, true); \n\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); \n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true); \n\t\t\t\tcurl_setopt($ch, CURLOPT_USERPWD, $username.':'.$password);\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); \n\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array( \n\t\t\t\t\t'Accept: application/json',\n\t\t\t\t\t'Content-Type: application/x-www-form-urlencoded') \n\t\t\t\t);\n\t\n\t\t\n\t\t$response1 = curl_exec($ch);\n\t\t$err1 = curl_error($ch);\n\t\t//print_r(\"<br>\".$response1.\"<br>\");\n\t\t\n\t\t\n\t\tcurl_close($ch);\n\t\t//$response1=htmlspecialchars($response1,ENT_QUOTES);\n\t\t$response = json_decode($response1, true);\n\t\t//print_r($response);\n\t\t$code = $response['rc_mess']; \n//\t\t$code =$response['rc_mess'];\n\t\t//print_r(\"<br>Hasil\".$code);\n//\t\tprint_r(\"<br>\".$hash);\n\t\t//print_r(\"<br>\".$data_string);\n\t\t\n\t\tif ($response =='') {\n\t\t\t$result[\"success\"] = false;\n\t\t\t$result[\"errors\"][\"iderror\"] = \"801\";\n\t\t\t$result[\"errors\"][\"error\"] = \"Data tidak ditemukan\";\n\t\t} \n\t\telse{\n\t\t\t\n\t\t\tif($code<>'00') {\n\t\t\t\t$result[\"success\"] = false;\n\t\t\t\t// $result[\"errors\"][\"iderror\"] = $code;\n\t\t\t\t// $result[\"errors\"][\"error\"] = $response['desk_mess'] ; \n\t\t\t\t\n\t\t\t\t$result = array('rc_mess'=> $response['rc_mess'],'desk_mess'=>$response['desk_mess']\n\t\t\t\t);\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\t$result[\"success\"] = true;\n\t\t\t\t//240|QOB1221717741|-|200|16831.68|1090.91|168.32|109.09|-|500000|-|-\n\t\t\t\t$par2= $response['response_data2'];\n\t\t\t\t$par3= $response['response_data3'];\n\t\t\t\t$par4= $response['response_data4'];\n\t\t\t\t//response_data2\":\"447|QOB1405072375|-|3400|71287.13|2000.0|712.87|200.0|-|900000|-|-\n\t\t\t\t$datakiriman=explode(\"|\",$response['response_data2']);\n\t\t\t\t$produk=$datakiriman[0].\"-\".\"QCOMM\";\n\t\t\t\t$pelanggan=$datakiriman[1];\n\t\t\t\t$backsheet=$datakiriman[2];\n\t\t\t\t$berat=$datakiriman[3];\n\t\t\t\t$beadasar=$datakiriman[4];\n\t\t\t\t$htnb=$datakiriman[5];\n\t\t\t\t\n\t\t\t\t$ppn=$datakiriman[6];\n\t\t\t\t$ppnhtnb=$datakiriman[7];\n\t\t\t\t$isikiriman=$datakiriman[8];\n\t\t\t\t$nilaibarang=$datakiriman[9];\n\t\t\t\t$total=number_format($beadasar+$htnb+$ppn+$ppnhtnb,0, ',', '.');\n\t\t\t\t//kurniawan|rt 03 rw 04 rt 03 rw 04 - Kel. Kebagusan Kec. Pasar Minggu KOTA ADM. JAKARTA SELATAN DKI JAKARTA 12520|-|-|-|-|-|12520|081231214|iwan@mail.com\n\t\t\t\t\n\t\t\t\t$datasip=explode(\"|\",$response['response_data3']);\n\t\t\t\t$nmsip=$datasip[0];\n\t\t\t\t$almsip=$datasip[1];\n\t\t\t\t$kdposip=$datasip[7];\n\t\t\t\t$tlpsip=$datasip[8];\n\t\t\t\t// $nmsip=$datasip[0];\n\t\t\t\t// $nmsip=$datasip[0];\n\t\t\t\t// $nmsip=$datasip[0];\n\t\t\t\t//-||rw 04 rt 01 rw 04 rt 01 - Kel. Pulau Harapan Kec. Kepulauan Seribu Utara KAB. ADM. KEP. SERIBU DKI JAKARTA 14550|-|-|-|-|-|14550|\n\t\t\t\t\n\t\t\t\t$datasial=explode(\"|\",$response['response_data4']);\n\t\t\t\t$nmsial=$datasial[1];\n\t\t\t\t$almsial=$datasial[2];\n\t\t\t\t$kdposial=$datasial[8];\n\t\t\t\t$tlpsial=$datasial[9];\n\t\t\t\t\n\t\t\t\t$datalain=explode(\"|\",$response['response_data5']);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//number_format(round($ppnhtnb), 0, ',', '.')\n\t\t\t\t$datatarif=\"Bea Dasar :\".number_format($beadasar,0, ',', '.').\"\\n\".\n\t\t\t\t\t \"htnb : \".number_format($htnb,0, ',', '.').\"\\n\".\n\t\t\t\t\t\t \"ppn :\".number_format($ppn,0, ',', '.').\"\\n\".\t\n\t\t\t\t\t\t \"ppnhtnb :\".number_format($ppnhtnb,0, ',', '.');\n\t\t\t\t\n\t\t\t\t$datapengirim=\"Nama :\".$nmsip.\"\\n\".\n\t\t\t\t\t \"Alamat : \".$almsip.\"\\n\".\n\t\t\t\t\t\t \"Tlp :\".$tlpsip.\"\\n\".\t\n\t\t\t\t\t\t \"Kodepos :\".$kdposip;\n\t\t\t\t$datapenerima=\"Nama :\".$nmsial.\"\\n\".\n\t\t\t\t\t \"Alamat : \".$almsial.\"\\n\".\n\t\t\t\t\t\t \"Tlp :\".$tlpsial.\"\\n\".\t\n\t\t\t\t\t\t \"Kodepos :\".$kdposial;\n\t\t\t\t\n\t\t\t\n\t\t\t\t$result = array('rc_mess'=> $response['rc_mess'],'desk_mess'=>$response['desk_mess'],\n\t\t\t\t 'userid'=> $response['userid'],'response_data1'=>$response['response_data1'],\n\t\t\t\t\t\t\t\t'response_data2'=> $response['response_data2'],'response_data3'=> $response['response_data3'],\n\t\t\t\t\t\t\t\t'response_data4'=> $response['response_data4']);\n\t\t\t\t\t\t\t\t\n\n\t\t\t}\n\t\t}\n\t\t//echo json_encode($result);\n\t\treturn json_encode($result);\n\t\t//echo json_encode($response);\n\t\t//return $response1;\n\t}", "function addDevice($dserial, $dname) {\n\t$query = sprintf(\"INSERT INTO Devices VALUES(%s, 5, '%s', 0, 0,'New')\",\n\t\tmysql_real_escape_string($dserial),\n\t\tmysql_real_escape_string($dname)\n\t);\n\t\n\tdb_query($query);\n}", "function printJSSerialNumberAutoDeduce() {\n\n\tglobal $langs;\n\t?>\n\t<script>\n\n\t\tfunction setSerialNumbers(fkProduct, TMatches) {\n\n\t\t\tvar prefix = TMatches[1] ? TMatches[1] : ''; // Si undefined car nombre pur => chaine vide\n\t\t\tvar currentNum = TMatches[2];\n\t\t\tvar i = 1;\n\t\t\tvar numSize = currentNum.length;\n\t\t\tvar count = parseInt(currentNum);\n\n\t\t\t$('table#dispatchAsset tr[data-fk-product='+fkProduct+']').not(':first').each(function() {\n\t\t\t\tvar lineID = $(this).attr('id').replace('dispatchAssetLine', '');\n\t\t\t\tvar elem = $(this).find('input#TLine\\\\['+lineID+'\\\\]\\\\[numserie\\\\]');\n\t\t\t\tvar suffixCount = count + i;\n\t\t\t\tvar suffix = (new String(suffixCount)).padStart(numSize, '0');\n\t\t\t\tvar newVal = prefix + suffix;\n\n\t\t\t\telem.val(newVal);\n\n\t\t\t\ti++;\n\t\t\t});\n\t\t}\n\n\t\tfunction setSerialNumberListener(fkProduct, TElemTR) {\n\t\t\tvar lineID = TElemTR.first().attr('id').replace('dispatchAssetLine', '');\n\t\t\tvar inputElem = $('input#TLine\\\\['+lineID+'\\\\]\\\\[numserie\\\\]'); // Doublement échapper les crochets faisant partie d'un ID ou d'une classe et non du sélecteur\n\n\t\t\tinputElem.on('change', function() {\n\n\t\t\t\t$('span#setSerialNumbers'+fkProduct).remove(); // On supprime le lien même s'il existe pour éventuellement le recréer avec un nouveau listener\n\n\t\t\t\tvar TMatches = $(this).val().match(/^(.*[^0-9])?([0-9]+)$/); // On détermine si le numéro de série finit par un nombre\n\n\t\t\t\tif(TMatches instanceof Array && TMatches.length > 0) { // String.match() retourne un tableau si des correspondances sont trouvées\n\n\t\t\t\t\t$('<span id=\"setSerialNumbers'+fkProduct+'\"> <a href=\"javascript:;\"><?php print dol_escape_js($langs->trans('CalculateFollowingSerialNumbers')); ?></a></span>')\n\t\t\t\t\t\t.insertAfter('input#TLine\\\\['+lineID+'\\\\]\\\\[commande_fournisseurdet_asset\\\\]')\n\t\t\t\t\t\t.on('click', function() {\n\t\t\t\t\t\t\tsetSerialNumbers(fkProduct, TMatches);\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t$(document).ready(function() {\n\n\t\t\tvar TProducts = [];\n\n\t\t\t$('table#dispatchAsset tr.dispatchAssetLine').each(function() {\n\t\t\t\tvar fkProduct = parseInt($(this).data('fk-product'));\n\n\t\t\t\tif(! TProducts.includes(fkProduct)) {\n\t\t\t\t\tTProducts.push(fkProduct);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tfor(var fkProduct of TProducts) { // Equivalent JS de foreach($TProducts as $fkProduct) en PHP\n\n\t\t\t\tvar TElemTR = $('table#dispatchAsset tr[data-fk-product='+fkProduct+']');\n\n\t\t\t\tif(TElemTR.length > 1) { // Si au moins 2 équipements à dispatcher issus du même produit\n\t\t\t\t\tsetSerialNumberListener(fkProduct, TElemTR);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t</script>\n\n\t<?php\n}", "function getSerialSteps($pdo) {\n\t\t\t$query = 'SELECT HANDLEETAPAATUAL, HANDLEPROXIMAETAPA FROM K_SGQD_PROXIMA_ETAPA WHERE NUMEROSERIE = :numeroserie';\n\n\t\t\t$queryData = json_decode('{\n\t\t\t\t\":numeroserie\":\"' . $this->scanNumeroSerie . '\"\n\t\t\t}');\n\n\t\t\t$this->kSgqdProximaEtapa = $this->selectRow($pdo, $query, $queryData);\n\n\t\t\treturn isset($this->kSgqdProximaEtapa);\n\t\t}", "public function setupHardware(): void\n {\n echo 'Setup laptop hardware...<br/>';\n }", "public function c_getProductByOtp() {\r\n $idOtp = $this->input->post('id_otp');\r\n $numServicio = $this->input->post('num_servicio');\r\n $res = $this->Dao_ot_padre_model->getProductByOtp($idOtp, $numServicio);\r\n echo json_encode($res);\r\n }", "public function ObtenerPaciente() {\n $sql= $this->config_mdl->_get_data_condition('os_rx',array(\n 'triage_id'=> $this->input->post('triage_id')\n ));\n $info= $this->config_mdl->_get_data_condition('os_triage',array(\n 'triage_id'=> $this->input->post('triage_id')\n ));\n if(!empty($sql)){\n $this->setOutput(array('accion'=>'1','rx'=>$sql[0],'paciente'=>$info[0]));\n }else{\n $this->setOutput(array('accion'=>'2'));\n }\n }" ]
[ "0.75502133", "0.7420395", "0.7199957", "0.71278507", "0.6582914", "0.65532506", "0.63760287", "0.6322944", "0.60339767", "0.58124524", "0.58074486", "0.57070845", "0.5581097", "0.5562886", "0.5559505", "0.5503034", "0.54867214", "0.54569626", "0.5442481", "0.5433405", "0.5378679", "0.5343929", "0.53298616", "0.5324405", "0.52578986", "0.52494884", "0.522201", "0.5218496", "0.52009976", "0.5166851", "0.5163807", "0.5153111", "0.5142755", "0.5142106", "0.5135652", "0.5123423", "0.51062953", "0.50502175", "0.50426024", "0.5023913", "0.50207907", "0.500339", "0.5002887", "0.49849862", "0.49769443", "0.4963726", "0.49635154", "0.49115533", "0.49098006", "0.49067423", "0.49056327", "0.49042228", "0.48934302", "0.48899773", "0.4885954", "0.48849872", "0.48849627", "0.48847565", "0.48842996", "0.48782116", "0.48758027", "0.48578393", "0.48520592", "0.48493075", "0.4841629", "0.483279", "0.4824527", "0.48160806", "0.4815769", "0.4813486", "0.48129907", "0.48118535", "0.47960946", "0.4785494", "0.47827655", "0.4775269", "0.47690013", "0.47669652", "0.47661388", "0.47655463", "0.47644153", "0.4758164", "0.47573504", "0.47570962", "0.47533375", "0.47523245", "0.47412172", "0.4737295", "0.47360516", "0.47094056", "0.47069082", "0.47054252", "0.47053796", "0.46862337", "0.4681932", "0.467844", "0.46748954", "0.46604788", "0.46584126", "0.46519643" ]
0.6748628
4
Fungsi untuk mengirim perintah ke serial tampa memperdulikan feedbacknya
function common_serial_write($query, $dev){ //Inisialisasi serial port //Siapkan port arduino untuk bisa digunakan //common_init_serial($dev); //Sertakan library php serial untuk menggunakan fungsi //php yang mendukung komunikasi serial require_once("php_serial.class.php"); //Inisialisasi parameter serial $serial = new phpSerial(); //Alamat perangkat $serial->deviceSet($dev); //baud rate $serial->confBaudRate(9600); //Buka koneksi (tulis) $serial->deviceOpen('w+'); //kirim query (delay 1 detik) $serial->sendMessage($query,0); //baca balasan $mp = $serial->readPort(); //tutup koneksi $serial->deviceClose(); //kembalikan hasil return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gettemp(){\nglobal $serial;\nwhile( empty($read)){\n$serial->deviceOpen();\n$serial->sendMessage(\"4\");\n//usleep(200000);\n$read = $serial->readPort();\n$serial->deviceClose();\n}\n$read2= trim($read);\nreturn $read2;\n\n}", "function send_message($serial, $instruction, $addrh, $addrl, $data1, $data2, $text)\r\n{\r\n\tusleep(COMM_WAIT_BETWEEN_MESSAGES);\r\n\r\n\t$sum = ($instruction + $addrh + $addrl + $data1 + $data2) & 255;\r\n\t$message = pack(\"CCCCCCC\", $instruction, $addrh, $addrl, $data1, $data2, $sum, 13);\r\n\t$try = 0;\r\n\t$result = -1;\r\n\tdo\r\n\t{\r\n\t//\tprint($text);\r\n\t\t\r\n\t\t$serial->sendMessage($message);\r\n\t\t\r\n\t\tusleep(COMM_WAIT_RESPONSE_DELAY);\r\n\t\t\r\n\t\t$read = $serial->readPort(7);\r\n\t\t\r\n\t\tif (strlen($read) == 7)\r\n\t\t{\r\n\t\t\t$data = unpack(\"C*\", $read);\t// first item has index 1 !!!\r\n\t\t\t\r\n\t\t\tif ($data[3] == 0x99 and $data[4] == 0x99 and $data[5] == 0x99)\r\n\t\t\t{\r\n//\t\t\t\tprint(\"No data available\");\r\n\t\t\t\t$result = -2;\r\n\t\t\t}\r\n\t\t\telse if ($data[1] == 0x00 and $data[2] == 0x00 and $data[3] == 0x00 and $data[4] == 0x00 and $data[5] == 0x00)\r\n\t\t\t{\r\n//\t\t\t\tprint(\"Unit busy\");\r\n\t\t\t\t$result = -3;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$result = ($data[3] << 16) + ($data[4] << 8) + $data[5];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($result < 0 and ++$try < COMM_NR_OF_RETRIES)\r\n\t\t{\t// retry\r\n\t\t\tusleep(COMM_RETRY_DELAY);\r\n\t\t}\r\n\t} while ($result < 0 and $try < COMM_NR_OF_RETRIES);\r\n\t\r\n\treturn $result;\r\n}", "function common_init_serial($dev){\r\n\t//Set permission ke 777 (Read, Write, Execute) Untuk semua orang\r\n\tshell_exec('sudo chmod 777 ' . $dev);\r\n\t//Siapkan parameter komunikasi serial\r\n\tshell_exec('sudo /bin/stty -F ' . $dev . ' cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts');\t\r\n}", "function common_serial_read($query, $dev){\r\n\t//Inisialisasi serial port\r\n\t//Siapkan port arduino untuk bisa digunakan\r\n\t//common_init_serial($dev);\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//Alamat perangkat\r\n\t$serial->deviceSet($dev);\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t//Buka koneksi (tulis)\r\n\t$serial->deviceOpen('w+');\r\n\t//kirim query (delay 1 detik)\r\n\t$serial->sendMessage($query,1);\r\n\t//baca balasan\r\n\t$mp = $serial->readPort();\r\n\t//tutup koneksi\r\n\t$serial->deviceClose();\r\n\t//kembalikan hasil\r\n\treturn $mp;\r\n}", "function common_serial_scan() {\r\n\t//Daftar perangkat serial, untuk Linux akan dimulai dengan ttyACMx atau ttyUSBx\r\n\t$acm = \"ttyACM\";\r\n\t$usb = \"ttyUSB\";\r\n\t//Dapatkan daftar perangkat yang terhubung ke komputer\r\n\t$cmd = shell_exec('ls /dev/');\r\n\t//Cari perangkat serial yang tersedia\r\n\t//cari ACM\r\n\t$flagACM = strpos($cmd, $acm);\r\n\t//cari USB\r\n\t$flagUSB = strpos($cmd, $usb);\r\n\t\r\n\t//Buat array untuk menyimpan daftar perangkat dengan alamat serial\r\n\t//yang tersedia\r\n\t$devList = array();\r\n\t\r\n\t//Query perangkat\r\n\tif($flagACM == true){\r\n\t\t//Pisahkan nilai raw berdasarkan string acm\r\n\t\t$rawACM = explode($acm, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer ACM\r\n\t\tforeach($rawACM as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer ACM yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyACM' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif($flagUSB == true) {\r\n\t\t//Pisahkan nilai raw berdasarkan string usb\r\n\t\t$rawUSB = explode($usb, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer USB\r\n\t\tforeach($rawUSB as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer USB yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyUSB' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//Kembalikan daftar perangkat serial yang terdeteksi\r\n\treturn $devList;\r\n}", "function common_serial_get_connected_device($query,$pass){\r\n//Inisialisasi serial port\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t$devList = common_serial_scan();\r\n\tforeach($devList as $dev){\r\n\t\t//Siapkan port arduino untuk bisa digunakan\r\n\t\tcommon_init_serial($dev);\t\r\n\t\t//Alamat perangkat\r\n\t\t$serial->deviceSet($dev);\r\n\t\t//Buka koneksi (tulis)\r\n\t\t$serial->deviceOpen('w+');\r\n\t\t//kirim query (delay 1 detik)\r\n\t\t$serial->sendMessage($query,1);\r\n\t\t//baca balasan\r\n\t\t$mp = $serial->readPort();\r\n\t\t//tutup koneksi\r\n\t\t$serial->deviceClose();\t\r\n\r\n\t\t//cek hasil query\r\n\t\tif($mp == $pass){\r\n\t\t\t//Jika respon sama dengan query\r\n\t\t\t//kembalikan alamat perangkat terkoneksi\r\n\t\t\treturn $dev;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}", "function teleinfor ($port = \"/dev/ttyAMA0\") {\n // Resultat : liste etiquette=>valeur\n $trame_array = array();\n \n // Ouvrir le port en lecture\n $handle = fopen ($port, \"r\");\n $char = \"\";\n $contents = \"\";\n while (fread($handle, 1) != chr(2));\n do {\n $char = fread($handle, 1);\n if ($char != chr(2)) $contents .= $char;\n } while ($char != chr(2));\n\n // Fermer le port\n fclose ($handle);\n\n // Supprimer les caracteres debut/fin de trame\n $trame = substr($contents,1,-1);\n\n // Separer les messages\n $trame = explode(chr(10).chr(10), $trame);\n\n // Verifier les checksum et supprimer les trames incorrectes\n foreach ($trame as $key=>$message) {\n \n // Separer l'etiquette, la valeur et le checksum\n $message = explode (chr(32), $message, 3);\n list ($etiquette, $valeur, $checksum) = $message;\n \n // Supprimer le message si incomplet ou incorrect (checksum invalide) \n if (count($message)<3 || \n checksum($etiquette, $valeur) != $checksum \n\t\t \n\t//\t|| \n // messize($etiquette) != strlen($valeur) \n ) { \n unset($trame[$key]); \n \n } else {\n // Enregistrer le message dans la liste trame_array\n $trame_array[$etiquette] = $valeur;\n\t\t\t \n }\n }\n \n return $trame_array;\n }", "function do_read_data()\r\n{\r\n\tglobal\t$TABLE_PDU_LOG;\r\n\tglobal\t$FIELD_UNIT, $FIELD_KWH_TOTAL, $FIELD_KWH_DISPLAY, $FIELD_CURRENT, $FIELD_TEMPERATURE;\r\n\tglobal\t$a_unit, $a_temp, $a_kwhtotal, $a_kwhdisplay, $a_current;\r\n\r\n//\tprint(\"Reading...\\n\\n\");\r\n\r\n\t$db = connect_to_database();\r\n\r\n\t$serial = new phpSerial;\r\n\t$serial->deviceSet(SERIAL_PORT);\r\n\t$serial->configure();\r\n\t$serial->deviceOpen();\r\n\r\n\t// get all data from the units\r\n//\tprint(\"kWh total\\n\");\r\n\t$result = send_message($serial, 56, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read kWh total\r\n\tread_all_units($db, $serial, 56);\t\t\t\t\t\t\t\t\t\t\t\t\t// read kWh total from all units\r\n\r\n//\tprint(\"kWh display\\n\");\r\n\t$result = send_message($serial, 143, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read kWh display\r\n\tread_all_units($db, $serial, 143);\t\t\t\t\t\t\t\t\t\t\t\t\t// read kWh display from all units\r\n\r\n//\tprint(\"Current\\n\");\r\n\t$result = send_message($serial, 68, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read current\r\n\tread_all_units($db, $serial, 68);\t\t\t\t\t\t\t\t\t\t\t\t\t// read current from all units\r\n\r\n//\tprint(\"Temperature\\n\");\r\n\t$result = send_message($serial, 90, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read temperature\r\n\tread_all_units($db, $serial, 90);\t\t\t\t\t\t\t\t\t\t\t\t\t// read temperature from all units\r\n\r\n\t// store the data in the database\r\n\tfor ($i = 0; $i < count($a_unit); $i++)\r\n\t{\r\n\t\tif ($a_unit[$i] > 0)\r\n\t\t{\r\n\t\t\t$sql = \"INSERT INTO $TABLE_PDU_LOG ($FIELD_UNIT, $FIELD_KWH_TOTAL, $FIELD_KWH_DISPLAY, $FIELD_CURRENT, $FIELD_TEMPERATURE) \".\r\n\t\t\t \"VALUES ($a_unit[$i],$a_kwhtotal[$i],$a_kwhdisplay[$i],$a_current[$i],$a_temp[$i])\";\r\n\t\t\tif (!($mysql_result = mysql_query($sql))) print(mysql_error($db) .\"\\n\");\r\n\t\t}\r\n\t}\r\n\r\n\t$serial->deviceClose();\r\n\tmysql_close($db);\r\n}", "function common_device_init(){\r\n\t//Get perangkat mekanik yang terhubung\r\n\t//Get query dan pass\r\n\t$query = \"SELECT * FROM tbl_konfigurasi\";\r\n\t$conf = mysql_fetch_assoc(mysql_query($query));\r\n\t//Reset FIFO Camera\r\n\t$file = $_SERVER['DOCUMENT_ROOT'] . '/FIFO';\r\n\tfile_put_contents($file, '');\r\n\t//Get parameter mekanik yang diambil dari database\r\n\t$query = $conf['konfigurasi_query'];\r\n\t$pass = $conf['konfigurasi_pass'];\r\n\t$pwm = $conf['konfigurasi_pwm'];\r\n\t$servoX = $conf['konfigurasi_servoX'];\r\n\t$servoY = $conf['konfigurasi_servoY'];\r\n\t$laser = $conf['konfigurasi_laser'];\r\n\t$flash = $conf['konfigurasi_flash'];\r\n\t\r\n\t$dev = common_serial_get_connected_device($query, $pass);\r\n\t//Set variabel dev menjadi variabel sesi agar mudah diakses\r\n\tif(empty($dev) || !isset($dev)){\r\n \t\t$dev = '/dev/null';\r\n\t}\r\n\t$_SESSION['dev'] = $dev;\r\n\t//Simpan alamat perangkat terhubung\r\n\t$query = sprintf(\"UPDATE tbl_konfigurasi SET konfigurasi_dev = '%s'\", mysql_real_escape_string($dev));\r\n\t//Eksekusi query\r\n\tmysql_query($query);\r\n\t//Inisialisasi perangkat agar bisa digunakan\r\n\tcommon_init_serial($dev);\r\n\t//Set parameter mekanik sebelumnya\r\n\tcommon_serial_write('m'.$servoX.'o'.$servoY.'o',$dev);\r\n\tcommon_serial_write('p'.$pwm.'o',$dev);\r\n}", "function ncurses_baudrate()\n{\n}", "function GenerarSerial()\n\t{\n\t\t$this->Serial = CifradorCodigo::generarNumero(\n\t\tCifradorCodigo::LongitudBitsSerialMaximo\n\t\t);\n\t}", "public function serial() : string;", "function porte1() {\n\t\tsystem (\"gpio write 21 off\");\n\t\tsleep ( 1 );\n\t\tsystem (\"gpio write 21 on\");\n\t\t}", "function sendFaildVer(){\n\n}", "function updateSerial($serial) {\n\t$viererString = str_split($serial,4);\n\t$zweierString = str_split($viererString[1],2);\n\t// SerialCut ist Jahr,Monat,Tag,Nummer\n\t$serialCut = array(\"Y\" => $viererString[0], \"m\" => $zweierString[0], \"d\" => $zweierString[1], \"n\" => $viererString[2]);\n\tforeach($serialCut as $type => $value) {\n\t\tif($type!=\"n\") {\n\t\t\tif($value!=strftime(\"%\".$type)) {\n\t\t\t\t$serialCut[$type]=strftime(\"%\".$type);\n\t\t\t\t$serialCut[\"n\"]=\"01\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$value++;\n\t\t\t$serialCut[\"n\"]=str_pad($value,2,0,STR_PAD_LEFT);\n\t\t}\n\t}\n\treturn $serialCut[\"Y\"].$serialCut[\"m\"].$serialCut[\"d\"].$serialCut[\"n\"];\t\n}", "function ParameterHolenSTOPP($ETA_ComID)\r\n {\r\n $ParameterListeEnde = \"{MO\";\r\n $ParameterListeEndeBytes = chr(01) . chr(01);\r\n $ParameterListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n $Daten = $ParameterListeEnde . $ParameterListeEndeBytes . $ParameterListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "function DENON_InputSource($id, $value) // Input Source\n{\n CSCK_SendText($id, \"SI\".$value.chr(13));\n}", "function fermerToutesPortes(){\n\t\tfor ( $i = 25 ; $i <= 28 ; $i++ ) {\n\t\t$gpio=$i-4;\n\t\t$porte = system ( \"gpio read \".$i);\n\t\tif ($porte == \"0\"){\n\t\t\t\tsystem (\"gpio write \". $gpio .\" off\");\n\t\t\t\tsleep ( 1 );\n\t\t\t\tsystem (\"gpio write \". $gpio .\" on\");\n\t\t\t}\n\n\t\t}\n\t}", "protected function readDevice()\n {\n $trame = '';\n $i=0;\n while (strlen($trame)==0 && $i < 3) {\n $trame = $this->readTrame();\n $i++;\n }\n\n echo date('Y-m-d H:i:s T').\" Read attempt : \".$i.\" for \".strlen($trame).\" octet(s)\\n\";\n\n $trame = chop(substr($trame, 1, -1)); // on supprime les caracteres de debut et fin de trame\n\n $messages = explode(chr(10), $trame); // on separe les messages de la trame\n $new = [];\n foreach ($messages as $msg) {\n $ligne = explode(' ', $msg, 3);\n if (count($ligne)<2) {\n continue;\n }\n $new[$ligne[0]] = $ligne[1];\n }\n return $new;\n }", "function feedbackAvaliador() {\n echo '<p class=\"feedback success\"><b>Revisor adicionado com sucesso.</b></p>';\n }", "function wtsCtrlSaisieForfaits($ar){\n\n $p = new XParam($ar, array('mode'=>'a'));\n $mode = $p->get('mode');\n $r = array('ok'=>1, 'errors'=>array(), 'message'=>'');\n $cards = $p->get('card');\n $chips = $p->get('CHIPID');\n $accs = $p->get('ACCNO');\n $crcs = $p->get('CRC');\n $cardlabels = $p->get('NEWCARDLabel');\n $usedcards = array();\n // lecture de l'offre\n $offresoid = $p->get('offreoid');\n $productsoid = $p->get('productoid');\n $validfroms = $p->get('validfrom');\n $validtills = $p->get('validtill');\n \n $justgrps = $p->get('justgrp');\n\n // parcours des lignes et controles\n foreach($cards as $lineid => $card){\n $card2 = substr($card, 0, 7);\n /*\n\t$card = \n\tNEWCARD_'oidproduit' = achat nouvelle carte\n\tNEWCARD'uniqid' = carte en commande issue du panier\n\tWTPCARD strictement = saisie du numéro ou copie choix depuis les cartes du compte\n\tWTPCARD'unidiq'= carte saisie sélectionnée dans le panier\n\tdonc si substr(card, 0, 7) == NEWCARD : controles sur cartes en achat \n si substr(card, 0, 7) == WTPCARD : controles sur cartes en rechargement\n */\n if ($card2 == 'WTPCARD'){\n //$wtp = sprintf(\"%s-%s-%s\", $chips[$lineid], $crcs[$lineid], $accs[$lineid]);\n $wtp = $this->modresort->formatWTPParts(array($chips[$lineid], $crcs[$lineid], $accs[$lineid]));\n // TA, SKD 01- ou 1- le reste est fait dans le module\n if (strlen($wtp) != 16 && strlen($wtp) != 25 && strlen($wtp) != 24){\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_remplirwtp');\n break;\n } else if (!isset($usedcards[$wtp])){\n $usedcards[$wtp] = 1;\n // verification du WTP\n $r2 = $this->wtsCheckWTP(array('mode'=>'r', 'b'=>0, 'chipid'=>$chips[$lineid], 'accno'=>$accs[$lineid], 'crc'=>$crcs[$lineid]));\n if ($r2['ok'] != 1){\n $r['ok'] = 0; \n\t if (isset($r2['errormess'])){\n\t $r['message'] = $r2['errormess'];\n\t } else {\n\t $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_wtpinvalide');\n\t }\n\t array_push($r['errors'], \n\t\t array(\"CHIPDID[$lineid]\", '', $lineid), \n\t\t array(\"ACCNO[$lineid]\", '', $lineid), \n\t\t array(\"CRC[$lineid]\", '', $lineid),\n\t\t array(\"WTPMASK[$lineid]\", '', $lineid)\n\t\t );\n }\n // autres controles :\n $productoid = $productsoid[$lineid];\n $offreoid = $productsoid[$lineid];\n $validfrom = $validfroms[$lineid];\n $validtill = $validtills[$lineid];\n $justgrp = $justgrps[$lineid];\n if ($r['ok'] == 1){\n $r3 = $this->localWTPCheck($wtp, $offreoid, $productoid, $justgrp, false, $validfrom, $validtill, $lineid);\n if ($r3['ok'] != 1){\n $r['ok'] = 0;\n $r['message'] = $r3['message'];\n }\n }\n if (($r['ok'] == 1 || $r['ok'] == 0 && $r['iswarn'])){\n $r41 = $this->checkProductInCaddie($wtp, $offreoid, $productoid, $validfrom, $validtill);\n if ($r41['ok'] != 1){\n $r['ok'] = 0;\n $r['iswarn'] = $r41['iswarn'];\n if ($r['iswarn']){\n if ($r['message'] == '')\n $r['message'] = $r41['message'];\n else\n $r['message'] .= \"\\n\".$r41['message'];\n } else {\n $r['message'] = $r41['message'];\n }\n }\n }\n if (($r['ok'] == 1 || $r['ok'] == 0 && $r['iswarn'])){\n\t $r4 = $this->checkProductInOrder($wtp, $offreoid, $productoid, $validfrom, $validtill);\n if ($r4['ok'] != 1){\n $r['ok'] = 0;\n $r['iswarn'] = $r4['iswarn'];\n if ($r['iswarn']){\n if ($r['message'] == '')\n $r['message'] = $r4['message'];\n else\n $r['message'] .= \"\\n\".$r4['message'];\n } else {\n $r['message'] = $r4['message'];\n }\n }\n }\n // verifier que la carte n'est pas déjà dans le panier\n // si oui que ces forfaits sont compatibles ... avec le validfrom\n }else{\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_cartesuniques');\n break;\n }\n } else if ($card2 == 'NEWCARD'){\n $wtp = $cardlabels[$lineid];\n $justgrp = $justgrps[$lineid];\n $productoid = $productsoid[$lineid];\n $validfrom = $validfroms[$lineid];\n $validtill = $validtills[$lineid];\n $r31 = $this->localWTPCheck($wtp, $offreoid, $productoid, $justgrp, true, $validfrom, $validtill, $lineid);\n if ($r31['ok'] != 1){\n $r['ok'] = 0;\n $r['message'] = $r31['message'];\n break;\n }\n if (!isset($usedcards[$wtp])){\n $usedcards[$wtp] = 1;\n }else{\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_cartesuniques');\n break;\n }\n }\n }\n // sleep(10);\n\n // si ok vérification des dates (on prend le premier produit, tous devant avoir les même caractériqiques)\n if ($r['ok'] == 1){\n $this->checkDelais($r, $productsoid, $validfroms);\n }\n\n // if ($r['ok'] == 1){\n // $r['ok'] = 0; $r['message']='tests '.$r['message'];\n // $r['iswarn'] = 1;\n // }\n\n\n // TESTS PENDNT AJOUT PANIER\n // $r = array('ok'=>1,'iswarn'=>1, 'errors'=>array('kk'), 'message'=>'PAS DE CONTROLES');\n\n\n if (count($r['errors'])>0)\n $r['ok'] = 0;\n if ($mode == 'a'){\n header('Content-Type:application/json; charset=UTF-8');\n die(json_encode($r));\n }\n return $r;\n }", "function MonitorListe_weiterenParameterHolen($ETA_ComID)\r\n {\r\n $MonitorListeWeiter =\"{MA\";\r\n \r\n If (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 0) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(02) . chr(01) . chr(01); //Standard\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 1) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(03) . chr(01) . chr(02); //Service\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 2) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(04) . chr(01) . chr(03); //Profi\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 3) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(05) . chr(01) . chr(04); //Expert\r\n\t\t}\r\n\t\t$MonitorListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n\t\t$Daten = $MonitorListeWeiter . $MonitorListeWeiterBytes . $MonitorListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "public function validacionserial($serial)\n {\n $query = \"select id_equipo, COUNT(*) as canti FROM `equipo` WHERE estado =1 and serial_equipo ='\" . $serial . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "function imprimir_voucher_estacionamiento($numero,$chofer,$patente,$horainicio,$horatermino,$montototal,$comentario,$correlativopapel,$cliente,$fecha_termino,$fecha_inicio_2){\ntry {\n // Enter the share name for your USB printer here\n //$connector = null; \n //$connector = new WindowsPrintConnector(\"EPSON TM-T81 Receipt\");\n $connector = new WindowsPrintConnector(\"EPSON TM-T20 Receipt\");\n // $connector = new WindowsPrintConnector(\"doPDF 8\");\n /* Print a \"Hello world\" receipt\" */\n $printer = new Printer($connector);\n\n \n $date=new DateTime();\n $fecha = $date->format('d-m-Y');\n\n\n $Chofer = $chofer;\n $Patente = $patente;\n $serie = $numero;\n $img = EscposImage::load(\"logo1.png\");\n $printer -> graphics($img);\n \n \n $printer -> text(\"Numero : $serie\\n\");\n $printer -> text(\"Chofer : $Chofer\\n\");\n $printer -> text(\"Patente: $Patente\\n\");\n\n if ($cliente != 0) {\n include_once(\"conexion.php\");\n $con = new DB;\n $buscarpersona = $con->conectar();\n $strConsulta = \"select * from cliente where rut_cliente ='$cliente'\";\n $buscarpersona = mysql_query($strConsulta);\n $numfilas = mysql_num_rows($buscarpersona);\n $row = mysql_fetch_assoc($buscarpersona);\n $nombre_cliente = $row['nombre_cliente'];\n //var_dump($numfilas);\n if($numfilas >= 1){\n $printer -> text(\"Cliente: $nombre_cliente\\n\");\n }\n \n }\n \n if ($correlativopapel != 0) {\n $printer -> text(\"\\nCorrelativo : $correlativopapel\\n\");\n }\n $printer -> text(\"Fecha Inicio : $fecha_inicio_2\\n\");\n $printer -> text(\"Hora de inicio : $horainicio\\n\");\n\n\n\n if ($horatermino != 0) {\n $printer -> text(\"Fecha de Termino: $fecha_termino\\n\");\n $printer -> text(\"Hora de Termino : $horatermino\\n\"); \n }\n \n \n if ($montototal != 0) {\n $printer -> text('Monto total : $'.$montototal);\n }\n \n if ($horatermino != 0) {\n $printer -> text(\"\\n\");\n $printer -> text(\"\\n\\n\");\n $printer -> text(\"Firma: _________________\\n\");\n \n }\n $printer -> text(\"$comentario\\n\");\n $printer -> cut();\n /* Close printer */\n $printer -> close();\n\n echo \"<div class='alert alert-success'><strong>Impresion Correcta $comentario</strong></div>\";\n} catch (Exception $e) {\n echo \"No se pudo imprimir \" . $e -> getMessage() . \"\\n\";\n}\n}", "function setDeviceState($dserial, $state) {\n\t#$non_num_pattern = \"/[^0-9A-Z]/\";\n\t\n\t#if(preg_match($non_num_pattern, $dserial) || preg_match($non_num_pattern, $state)) {\n\t#\tdie('Non decimal character detected');\n\t#}\n\t\n\t$state = intval($state, 10);\n\t\n\tif($state == DeviceState::Off) $msg = 'off';\n\telse if($state == DeviceState::On) $msg = 'on';\n\telse die('Invalid state' . $state);\n\t\n\t$msg .= '/pi/' . $dserial;\n\t\n\t$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\tif(!$sock) die('PHP cannot create socket');\n\t\n\tif(!socket_connect($sock, SCRIPT_IP, SCRIPT_PORT)) {\n\t\tsocket_close($sock);\n\t\tdie('Cannot connect to PiHome.py ip and port at ' . SCRIPT_IP . ', ' . SCRIPT_PORT);\n\t}\n\t\n\tsocket_send($sock, $msg, strlen($msg), 0);\n\t\n\tsocket_close($sock);\n}", "public function apagarPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"OFF\");\n $this->setEncendidoPizarra(0);\n\n }", "function com_message_pump($timeoutms = 0) {}", "function do_button_out($rbuf)\r\n{\r\n\techo \"cmd: $rbuf\\r\\n\";\r\n\t$cmd = array();\r\n\t$cmd = explode(\" \", $rbuf, 2);\r\n\r\n\tif($cmd[0] == \"pwr\")\r\n\t{\r\n\t\tif($cmd[1] == \"1\")\r\n\t\t{\r\n\t\t\techo \"POWER button pressed\\r\\n\";\r\n\t\t\tuio_out(0, PC_PWR_BTN, HIGH);\r\n\t\t\tuio_out(0, MB_PWR_BTN_LED, LOW);\r\n\t\t}\r\n\t\telse if($cmd[1] == \"0\")\r\n\t\t{\r\n\t\t\techo \"POWER button released\\r\\n\";\r\n\t\t\tuio_out(0, PC_PWR_BTN, LOW);\r\n\t\t\tuio_out(0, MB_PWR_BTN_LED, HIGH);\r\n\t\t}\r\n\t}\r\n\telse if($cmd[0] == \"rst\")\r\n\t{\r\n\t\tif($cmd[1] == \"1\")\r\n\t\t{\r\n\t\t\techo \"RESET button pressed\\r\\n\";\r\n\t\t\tuio_out(0, PC_RST_BTN, HIGH);\r\n\t\t\tuio_out(0, MB_RST_BTN_LED, LOW);\r\n\t\t}\r\n\t\telse if($cmd[1] == \"0\")\r\n\t\t{\r\n\t\t\techo \"RESET button released\\r\\n\";\r\n\t\t\tuio_out(0, PC_RST_BTN, LOW);\r\n\t\t\tuio_out(0, MB_RST_BTN_LED, HIGH);\r\n\t\t}\r\n\t}\r\n}", "function request_feedback(){\n\t\t$response = $this->InteractModal->get_task();\n\t\tif(!empty($response)){\n\t\t\tforeach($response as $response_data){\n\t\t\t\t$task_id = $response_data['task_id'];\t\t\t\t\t\n\t\t\t\t$schedule_date = $response_data['schedule_date'];\n\t\t\t\t$listingdate = date_create($schedule_date);\n\t\t\t\t$time= date_format($listingdate,\"l d - M, Y h:i A\");\n\t\t\t\t$_details = $response_data['details'];\n\t\t\t\t$details = unserialize( $_details );\n\t\t\t\t$username = $details['user_name'];\n\t\t\t\t$contact = $details['contact_number'];\n\t\t\t\t$email_id = $details['showing_email'];\n\t\t\t\t$upcoming_all_showings = $this->InteractModal->get_fedback_links( $task_id );\n\t\t\t$config = array(\n\t\t\t\t'smtp_user' => 'info@interactre.com',\n\t\t\t\t'mailtype' => 'html',\n\t\t\t\t'charset' => 'utf-8',\n\t\t\t\t'starttls' => true,\n\t\t\t\t'newline' => \"\\r\\n\",\n\t\t\t\t\n\t\t\t);\n\t\t\t\tif(!empty($upcoming_all_showings)){\n\t\t\t\tforeach($upcoming_all_showings as $upcoming_showing){\n\t\t\t\t\t$feedback_link= $upcoming_showing['link'];\n\t\t\t\t\t$address= $upcoming_showing['property_address'];\n\t\t\t\t\t$broker_id= $upcoming_showing['broker_id'];\n\t\t\t\t\t$response = $this->InteractModal->signature_user_email($broker_id);\n\t\t\t\t\t$email_broker = $response[0]['user_email'];\n\t\t\t\t\t$concerned_person = $this->InteractModal->get_user_meta($broker_id,'concerned_person'); \n\t\t\t\t\n\t\t\t$subject = 'Please provide feedback for our recent showing';\n\t\t\t$msg = 'Hi,<br /><br />We would really appreciate your feedback, please tell us what you thought about your recent showing at \"'. $address .'\" on \"'. $time .'\". <br /><a href=\"'. $feedback_link .'\">Please click here to submit your feedback </a> <br /><br /> Thank you,<br /> <br /> '. $concerned_person .' <br /> '. $contact .' <br /> '. $email_broker .'';\n\t\t\t$this->load->library('email', $config);\n\t\t\t$this->email->from('info@interactacm.com', 'InteractRE');\n\t\t\t$this->email->set_header('InteractACM', 'InteractACM Notifications');\n\t\t\t$this->email->to( $email_id );\n\t\t\t$this->email->subject( $subject );\n\t\t\t$this->email->message( $msg ); \n\t\t\n\t\t\tif( $this->email->send() ){\n\t\t\t\t$data= array(\n\t\t\t'request_feedback' => 0,\n\t\t\t);\n\t\t\t$response = $this->InteractModal->update_task_details($data,$task_id);\n\t\t\t}else{\n\t\t\techo'Unable to send feedback link at this time. Please try again';\n\t\t} \n\t\t\t}}\n\t\t\t}\n\t\t}\n }", "private function send_msg() {\r\n }", "public function send_registration_feedback()\n {\n // Get parameters.\n $admin_account = $this->GABIA_SMS_API->getAdminAccount();\n\n // From contact form.\n $email = $_POST['email'];\n $tel = $_POST['tel'];\n $course_title = $_POST['course_title'];\n $name = $_POST['name'];\n $amount = $_POST['amount'];\n\n wp_mail($email, '[어벤져스쿨] 성공적으로 강연 등록이 완료되었습니다.',\n '강의 제목: ' . $course_title . \"\\n\" .\n '수강자 이름: ' . $name . \"\\n\" .\n '결제 금액: ' . $amount . \"\\n\" .\n $admin_account . \"\\n\" .\n '입급 전 정원 초과시 자동 취소되오니 빠른 결제 부탁드립니다.' . \"\\n\" .\n '- 어벤져스쿨.');\n $message = '<' . $course_title . '> 강연 등록이 완료되었습니다. 입급 전 정원 초과시 자동 취소되오니 빠른 결제 부탁드립니다. - 어벤져스쿨';\n $this->sendSms($tel, $message, '무통장입금');\n }", "function SendDataToBankForCharging() {\n\t\n\t$c = $_POST[\"chckbx_succeed_with_payment\"];\n\t$success = $c == \"on\";\n\treturn $success;\t\n\t\n}", "function my_hook_monitor_function($keyword, $params)\n{\n global $app_name, $app_version, $nama_modem;\n global $my_kembali_sms_format, $my_kembali_sms_sample;\n // Sometime, you don't need to reply SMS from non-user number,\n // such as SMS from Service Center, message center, \n // or promotional SMS:\n $valid_param_count = 5;\n // pre( $params);\n // return true;\n if (strlen($params['sender'])<=6) {\n return true;\n }\n else\n {\n if (count($params['params'])!=$valid_param_count){\n sms_send($params['sender'], '1/2. SMS tidak valid. Jumlah parameter data harus '.$valid_param_count.'.', $nama_modem);\n sms_send($params['sender'], '2/2. Format SMS: '.$my_monitor_sms_format, $nama_modem);\n sms_send($params['sender'], '3/2. Contoh SMS: '.$my_monitor_sms_sample, $nama_modem);\n }\n else\n {\n $kode_pinjam = strtoupper($params['params'][1]);\n // cek kode pinjam, jika ID = 0, berarti kode pinjam tidak valid:\n $id_pinjam = fetch_one_value(\"select coalesce( (\n select UUID_SHORT() id from inkubator_pinjam p where upper(p.kode_pinjam) = '$kode_pinjam'\n and p.status_pinjam = 'Disetujui' \n ),0) as id\");\n if ($id_pinjam == 0)\n {\n sms_send($params['sender'], 'Kode Pinjam tidak ditemukan: '.$kode_pinjam.'.', $nama_modem); \n } \n else\n { \n // proses SMS dan insert ke table `inkubator_kembali`:\n // Sample: KEMBALI*323431-353131-35*30*3.60*SEHAT;\n $p_pjg = trim($params['params'][ 2]);\n $p_berat = trim($params['params'][ 3]);\n $p_kondisi = strtoupper(trim($params['params'][ 4])); \n // cek tangal, panjang dan berat apakah formatnya sesuai atau tidak.\n // $p_validate_tgl = '/^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4}$/'; // dd/mm/yyyy\n $p_validate_pjg = '/^[0-9]{1,2}+([\\,\\.][0-9]{1,2})?$/'; // max2digits[.,]max2digits\n if (!preg_match($p_validate_pjg, $p_pjg))\n {\n sms_send($params['sender'], 'Maaf. Panjang bayi saat kembali salah. Contoh panjang bayi: 31.5', $nama_modem);\n }\n else\n if (!preg_match($p_validate_pjg, $p_berat))\n {\n sms_send($params['sender'], 'Maaf. Berat bayi saat kembali salah. Contoh berat bayi: 3,12', $nama_modem);\n }\n else\n if (($p_kondisi!='SEHAT') && ($p_kondisi!='SAKIT'))\n {\n sms_send($params['sender'], 'Maaf. Kondisi bayi salah. Harus SEHAT atau SAKIT.', $nama_modem);\n }\n else\n {\n // process tgl, berat & panjang:\n // xx/yy/xxxx\n $p_skor = ($p_kondisi=='SEHAT'?1:0);\n $p_berat = str_replace(',','.', $p_berat);\n $p_pjg = str_replace(',','.', $p_pjg);\n // all set! save it to database.\n $sub_mon_sql = \"insert into inkubator_monitoring \n \t\t(id, kode_pinjam, tgl_input, panjang_bayi, berat_bayi, kondisi, skor, keterangan)\n \t values\n \t\t(UUID_SHORT(), '$kode_pinjam', CURRENT_TIMESTAMP(), $p_pjg, $p_berat, '$p_kondisi', $p_skor,\n \t\tconcat('Data monitoring ', (select p.nama_bayi from inkubator_pinjam p where p.kode_pinjam = '$kode_pinjam'))\n \t );\";\n /*\n $f = fopen('d:/test-.txt','w');\n fputs($f, $save_sql);\n fputs($f, $sub_mon_sql);\n fclose($f);\n */ \n if (exec_query($sub_mon_sql))\n {\n sms_send($params['sender'], 'Data monitoring telah diterima.', $nama_modem);\n }\n else\n {\n sms_send($params['sender'], 'Maaf, server sedang sibuk. Cobalah beberapa saat lagi.', $nama_modem);\n } \n } \n }\n }\n return true;\n } \n}", "function getDatatoSend($type, $ext, $metering_ID, $time_interval, $unit, $factor, $timelastsend, $DeviceID){\n\t\n\t$timestamp_now = time();\n\t//echo $timestamp_now.\"<br>\";\n\t$diff_time = $timestamp_now - $timelastsend;\n\t$time_interval_seconds = $time_interval * 60;\n\t//echo $diff_time.\"<br>\";\n\tif ($diff_time >= $time_interval_seconds)\n\t{\n\t\t$type_split = explode(\"_\",$type);\n\t\n\t\t$PT1000 = new PT1000();\n\t\t$AIN = new AIN();\n\t\t$GPIO = new GPIO();\n\t\t$AOUT = new AOUT();\n\t\t$HUMIDITY = new HUMIDITY();\n\n\t\tswitch (trim($type_split[0])){\n\t\tcase \"DigiOUT\":\n\t\t\t$value_metering = $GPIO->getOutSingle($type_split[1]);\n\t\t\tbreak;\n\t\tcase \"DigiIN\":\n\t\t\t$value_metering = $GPIO->getInSingle($type_split[1]);\n\t\t\tbreak;\n\t\tcase \"AIN\":\n\t\t\t$value_metering = $AIN->getAIN($type_split[1], $ext);\n\t\t\t$value_metering = $value_metering * $factor;\n\t\t\tbreak;\n\t\tcase \"AOUT\":\n\t\t\t$value_metering = $AOUT->getAOUT($type_split[1], $ext);\n\t\t\t$value_metering = $value_metering * $factor;\n\t\t\tbreak;\n\t\tcase \"PT1000\":\n\t\t\t$value_metering = $PT1000->getPT1000($type_split[1], $ext);\n\t\t\t$value_metering = $value_metering * $factor;\n\t\t\tbreak;\n\t\tcase \"HUMIDITY\":\n\t\t\tif($type_split[1] == 0){ \n\t\t\t\t$value_metering = $HUMIDITY->getHUMIDITY($ext);\n\t\t\t\t$value_metering = $value_metering * $factor;\n\t\t\t}\n\t\t\telse if ($type_split[1] == 1){\n\t\t\t\t$value_metering = $HUMIDITY->getTemperature_C($ext);\n\t\t\t\t$value_metering = $value_metering * $factor;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\t$timestamp = time();\n\n\t\t$metering_array = array($DeviceID, $metering_ID, trim($value_metering), $timestamp, $unit);\n\t} else {\n\t\t$metering_array = null;\n\t}\n\n\treturn $metering_array;\n}", "public function verRedThinkClientEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"THINK_CLIENT\");\n\n }", "function refus($msg) {\n echo \"<b><font color=red>$msg</font></b><br>\";\n echo \"Action non commenc�e; rectifier les conditions initiales avant de reprendre<br>\";\n}", "function send_complaint()\n\t{\n\t\t\t//?=usercode=12&complaint_code=1&description=hello sir\n\t\t \t$user_dt = $this->ObjM->get_user_by_usercode($_REQUEST['usercode']);\n\t\t\t\n\t\t\t$data['send_status'] \t\t= \t($user_dt[0]['user_type_id']=='2')? \"1\" : \"0\";\n\t\t\t$data['complaint_code']\t\t=\t$_REQUEST['complaint_code'];\n\t\t\t$data['description']\t\t=\t$_REQUEST['description'];\n\t\t\t$data['timedt']\t\t\t\t=\ttime();\n\t\t\t$id\t\t=\t$this->ObjM->addItem($data,'complaint_detail');\n\t\t\t$res\t=\tarray();\n\t\t\t$result[0]['validation']='true';\n\t\t\techo json_encode($result);\n\t}", "public function confirmation(): void {\n $this->writeData($this->token);\n }", "public function encenderPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"ON\");\n $this->setEncendidoPizarra(1);\n\n }", "function eis_device_signal($calldata) {\n\tglobal $eis_conf,$eis_dev_conf,$eis_dev_status;\n\t$callparam=$calldata[\"param\"];\n\tswitch ($calldata[\"cmd\"]) {\n\n\t\tdefault:\n\t\t\t// manage unknown command\n\t\t\teis_log(1,\"system:unknownSignal --> \".$calldata[\"cmd\"]);\n\t}\n}", "function ajaxMotDePasse($ar){\n $p = new XParam($ar, array());\n $message = $this->modcustomer->sendNewPassword($ar);\n die($message);\n }", "public function submit() {\n if(isset($this->request->post['serial'])) {\n $this->load->model('catalog/serial');\n $validSerials = trim($this->model_catalog_serial->validSerialNOJSON($this->request->post['serial']));\n if($validSerials != 'true') {\n $errors = $validSerials;\n }\n else { \n $errors = '';\n }\n }\n else {\n $errors = 'The serial number was empty. Please submit a valid serial number.';\n } \n\n // Need to check the database for a valid serial entry.\n\n $featurecodes = substr($this->request->post['serial'],-3,3);\n $serialcode = substr($this->request->post['serial'],0,5);\n \n // Need to check to make sure that the serial has not yet been registered\n $this->load->model('account/softwareregistration');\n $exists = $this->model_account_softwareregistration->serialPurchased($serialcode, $featurecodes);\n if(!$exists) {\n if(strlen($this->request->post['serial']) != 8) {\n $errors = 'The serial number you submitted was incorrect. Please submit a valid 8 character serial number.';\n }\n else {\n $errors = 'The serial you have entered has not been purchased.';\n }\n } \n\n $registered = $this->model_account_softwareregistration->isRegistered($serialcode, $featurecodes);\n if($registered) {\n $errors = 'The serial you entered is already registered.';\n }\n\n // Compile the states listing.\n if(isset($this->request->post['states'])) {\n foreach($this->request->post['states'] as $state) {\n $states[] = $state;\n }\n\n $customer_id = $this->model_account_softwareregistration->getCustomerIDfromSerial($serialcode, $featurecodes);\n if(isset($this->request->post['states'])) { $this->model_account_softwareregistration->editCustomerPayrollStates($customer_id, $this->request->post['states']); }\n\n }\n else {\n $states = array();\n }\n \n if(isset($this->request->post['comments'])) {\n $comments = $this->request->post['comments'];\n }\n else {\n $comments = '';\n }\n\n // Serial was valid and we should be good to go.\n if($errors == '') {\n $this->model_account_softwareregistration->addRegistration($serialcode, $featurecodes, $states, $comments);\n\n if($comments != '' && isset($comments)) {\n $from = \"Software Registration <no-reply@1099-etc.com>\";\n $subject = \"Software Registration for Serial Number \" . $serialcode . $featurecodes;\n $message = \"Serial - \" . $serialcode . $featurecodes . \"\\n\\n\";\n $message .= \"Payroll States - \\n\" . implode(\", \",$states) . \"\";\n $message .= \"\\n\\nComments - \\n\" . $comments . \"\\n\";\n mail(\"registration@1099-etc.com\", $subject, $message, \"From: \" . $from . \"\\n\");\n }\n\n $this->showPage(\"Thank you for registering.\");\n// $this->redirect($this->url->link('account/account', '', 'SSL')); \n\n/*\n $getRegistration = $this->model_account_softwareregistration->showRegistration($serialcode, $featurecodes);\n $g = implode('<br />',$getRegistration);\n $this->showPage($g ,$serialcode, $states, $comments);\n*/ }\n else {\n $this->showPage($errors,$this->request->post['serial'], $states, $comments);\n }\n }", "function playerStatus()\n\t\t{\n\t\t\t$request = $_SESSION['mac'].\" status 0 100 \\n \";\n\t\t\t$mySqueezeCLI = new SqueezeCLI($request);\n\t\t\t$response = $mySqueezeCLI->receiveCLI();\n\t\t\t//echo \"la réponse non traité : $response \\n\";\n\t\t\t//parfois le retour CLI change attention\n\t\t\t//$response = get_string_between($response,\" mode:\",\"rate:\");\n\t\t\t$response = substr($response, strpos($response, \"mode:\"));\n\t\t\t$response = substr($response, 0, strpos($response, \" \"));\n\t\t\t$response = substr($response, 5);\n\n\t\t\treturn $response;\n\t\t}", "private function set_serial($serial) {\n\t\t$this->set_region(substr($serial, 0, 2));\n\t\t$this->serial = $serial;\n\t}", "public function sendFeedback($mercaOrderId)\n\t{\n\t $this->getAccess();\n\t \n\t if(!$mercaOrderId) return false;\n\t \n\t if($this->config->get('mercadolivre_feedback') && $this->config->get('mercadolivre_feedback_message')){\n\t \n\t $merca_order=$this->db->query(\"SELECT * FROM `\".DB_PREFIX.\"mercadolivre_order` WHERE `mercaOrderId` = '\" . $mercaOrderId . \"'\")->row;\n\t if($merca_order && !$merca_order['feedback']){\n\t\t\n\t\t\t\t $order_id=$merca_order['order_id'];\n\t\t\t\t \n\t\t\t\t $param=array();\n\t \t\t $param['rating']=$this->config->get('mercadolivre_feedback_rating');\n\t \t $param['fulfilled']=true;\n\t \t $param['message']=$this->config->get('mercadolivre_feedback_message');\n\t \n\t \t $param = json_encode($param); \n\t\t \t $header= array( \n\t\t 'Content-Type: application/json', \n\t\t 'Content-Length: ' . strlen($param) \n\t\t ); \n\t \n\t\t\t $url=self::$API_DOMAIN.'/orders/'.$mercaOrderId.'/feedback/?access_token='.$this->accessToken; \n\t\t\t $feedback_data=$this->callAPI($url,'POST',$param,$header);\n\t\t\t\n\t\t\t if($this->error=='')\n\t\t {\n\t\t $this->db->query(\"UPDATE `\" . DB_PREFIX . \"mercadolivre_order` SET `feedback` = '1' WHERE `order_id` = '\" . (int)$order_id. \"'\");\n\t\t }\n\t\t else{\n\t\t $this->log->write('MERCADOLIVRE Feedback API Error: '.$this->error);\n\t\t return false;\n\t\t }\n\t\t } \n\t }\n\t\t\n\t}", "function Parameter_Liste_weiterenParameterHolen($ETA_ComID)\r\n {\r\n $ParameterListeStart =\"{MF\";\r\n\r\n\t\t\tIf (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 0) {\r\n \t$ParameterListeStartBytes = chr(02) . chr(02) . chr(01) . chr(01); //Standard\r\n\t } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 1) {\r\n \t$ParameterListeStartBytes = chr(02) . chr(03) . chr(01) . chr(02); //Service\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 2) {\r\n\t\t\t \t$ParameterListeStartBytes = chr(02) . chr(04) . chr(01) . chr(03); //Profi\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 3) {\r\n \t\t\t \t$ParameterListeStartBytes = chr(02) . chr(05) . chr(01) . chr(04); //Expert\r\n\t\t\t}\r\n $ParameterListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n $Daten = $ParameterListeStart . $ParameterListeStartBytes . $ParameterListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "public function checkSlotWriting() {\n $writeSlot = 1;\n foreach($this->decission as $item) {\n if($item === 0) {\n $writeSlot = 0;\n }\n }\n if($writeSlot == 1 AND $this->nextStation->sendToAllAtOnce == 0) {\n $this->checkForNewSlot($this->nextStation->workflow_slot_id);\n }\n else {\n $this->nextStation->checkSendToAllAtOnce();\n }\n }", "public function enviarNoInterrumpir( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\", \"NO_INTERRUMPIR\",\n $this->getNoInterrumpir());\n usleep(1000000);\n $this->enviarPeticion($cmd->getComando());\n\n }", "public function encender() {\n $respuesta=self::$plasma->estadoPlasma();\n\tif ( $respuesta == 'OFF' ){\n\t $respuesta=self::$plasma->encender();\n\t}\n\n }", "public function vendorNotesSuccess($form){ \n $session = $this->hlp->sess(\"listing\");\n $date_ordered = date(\"j. n. Y\"); \n $buyer = $this->hlp->logn();\n $status = \"pending\";\n $buyer_notes = $form->getValues(TRUE)['notes'];\n $final_price = $session->finalPriceBTC;\n $czk_price = $session->finalPriceCZK;\n $quantity = $session->postageDetails['quantity'];\n $postage = $session->postageDetails['postage']; \n $product_name = $session->listingDetails['product_name'];\n $listing_id = $session->listingDetails->id;\n $author = $this->listings->getAuthor($listing_id);\n $FE = \"no\"; //$this->listings->isListingFE($listingID) ? \"yes\" : \"no\";\n \n //save order to DB and do BTC transactions\n //only if balance is sufficient\n // if ($this->wallet->balanceCheck($buyer, $price)){\n \n //unset unneccessary vars and assemble arg array\n //from these that remains\n unset($form, $session);\n $arguments = $this->orders->asArg(get_defined_vars());\n \n //and write new order to database\n $order_id = $this->orders->saveToDB($arguments);\n \n $con = $this->converter;\n\n //value that seller will receive and market profit\n $commisioned = $con->getCommisioned($final_price);\n $marketProfit = $con->getMarketProfit($final_price);\n $wallet = $this->wallet;\n \n //save and transact market profit\n $wallet->moveAndStore(\"saveprofit\", $buyer, \"profit\", $marketProfit, $order_id);\n \n //move funds and store trasactions into db\n if($FE == \"no\"){ \n //escrow branch\n $wallet->moveAndStore(\"pay\", $buyer, \"escrow\", $commisioned, $order_id, \"yes\");\n $this->flashMessage(\"Operace proběhla úspěšně. Platba je bezpečně uložena v Escrow.\"); \n // $this->redirect('Orders:in');\n }\n \n if ($FE == \"yes\"){ \n //FE - immediately transfer funds and redirect user to feedback\n $this->orders->finalize($order_id);\n $wallet->moveAndStore(\"pay\", $buyer, $author, $commisioned, $order_id, \"no\");\n $this->flashMessage(\"Finalize Early - Platba převedena na vendorův účet.\");\n $this->flashMessage(\"Zanechte feedback - Můžete později změnit ve Vašich objednávkách.\");\n $this->redirect(\"Orders:Feedback\", $order_id);\n }\n /* \n } else {\n $this->flashMessage(\"Něco se pokazilo. Prosím kontaktujte administrátora.\");\n $this->redirect(\"Orders:in\");\n } */\n }", "public function ram_input($cikk =''){\n if (bothAdminSeller($_SESSION[\"jog\"])) {\n $warranity = $this->adminModel->getWarranity();\n $data = [\n 'main_title' => 'RAM-ok bevitele',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => '',\n 'socets' => $this->ramModel->ramSocets(),\n 'warr' => $warranity,\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' => '',\n 'warranity' => '',\n 'price' => '',\n 'type' => '',\n 'man_type' => '',\n 'capacity' => '',\n 'timing' => '',\n 'voltage' => '',\n 'clock' => '',\n 'kit' => '',\n 'xmp' => 0,\n 'man_url' => '',\n 'picUrl' => '',\n 'disabledIn' => '',\n 'disabledMod' => 'disabled'\n ];\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n if (isset($_POST['ram_input'])) {\n $data = [\n 'main_title' => 'RAM-ok bevitele',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => trim($_POST[\"ram_cikkszam\"]),\n 'socets' => $this->ramModel->ramSocets(),\n 'selected_socket' => trim($_POST[\"foglalat\"]),\n 'warr' => $warranity,\n 'warranity' => trim($_POST[\"warranity\"]),\n 'price' => trim($_POST[\"price\"]),\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' =>trim($_POST[\"manufacturer\"]),\n 'type' => trim($_POST[\"type\"]),\n 'man_type' => trim($_POST[\"man_type\"]),\n 'capacity' => trim($_POST[\"capacity\"]),\n 'timing' => trim($_POST[\"timing\"]),\n 'voltage' => trim($_POST[\"voltage\"]),\n 'clock' => trim($_POST[\"clock\"]),\n 'kit' => trim($_POST[\"kit\"]),\n 'xmp' => trim($_POST[\"xmp\"]),\n 'man_url' => trim($_POST[\"man_url\"]),\n 'picUrl' => trim($_POST[\"picUrl\"]),\n 'disabledIn' => '',\n 'disabledMod' => 'disabled'\n ];\n if ($this->ramModel->ramProductInput($data) && $this->ramModel->manUrl($data[\"ram_cikkszam\"],$data[\"man_url\"]) && $this->ramModel->picUrl($data[\"ram_cikkszam\"],$data[\"picUrl\"]) && $this->ramModel->priceInput($data[\"ram_cikkszam\"],$data[\"price\"])) {\n flash(\"ramInputSuccess\",\"A (\".$data[\"type\"].\") típusú RAM bevitele sikeres volt\");\n redirect(\"admins/ram_input\");\n }else{\n flash(\"ramInputFail\",\"A (\".$data[\"type\"].\") típusú RAM bevitele sikertelen volt\", \"alert alert-danger\");\n redirect(\"admins/ram_input\");\n }\n }elseif(isset($_POST[\"editRAM\"])){\n $item = $this->ramModel->ramByCikkszam($cikk);\n $data = [\n 'main_title' => $cikk.' Módosítása',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => $item->cikkszam,\n 'socets' => $this->ramModel->ramSocets(),\n 'selected_socket' => $item->tipus,\n 'warr' => $warranity,\n 'warranity' => $item->WMonth,\n 'price' => $item->ramPrice,\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' => $item->manufacturer,\n 'type' => $item->type,\n 'man_type' => $item->typeCode,\n 'capacity' => $item->capacity,\n 'timing' => $item->timing,\n 'voltage' => $item->voltage,\n 'clock' => $item->clock,\n 'kit' => $item->kit,\n 'xmp' => $item->is_xmp,\n 'man_url' => $item->Url,\n 'picUrl' => $item->picUrl,\n 'disabledIn' => 'disabled',\n 'disabledMod' => ''\n ];\n }\n elseif (isset($_POST[\"ram_modify\"])) {\n $data = [\n 'cikkszam' => $cikk,\n 'selected_socket' => trim($_POST[\"foglalat\"]),\n 'warranity' => trim($_POST[\"warranity\"]),\n 'price' => trim($_POST[\"price\"]),\n 'manufacturer' =>trim($_POST[\"manufacturer\"]),\n 'type' => trim($_POST[\"type\"]),\n 'man_type' => trim($_POST[\"man_type\"]),\n 'capacity' => trim($_POST[\"capacity\"]),\n 'timing' => trim($_POST[\"timing\"]),\n 'voltage' => trim($_POST[\"voltage\"]),\n 'clock' => trim($_POST[\"clock\"]),\n 'kit' => trim($_POST[\"kit\"]),\n 'xmp' => trim($_POST[\"xmp\"]),\n 'man_url' => trim($_POST[\"man_url\"]),\n 'picUrl' => trim($_POST[\"picUrl\"]),\n ];\n if ($this->ramModel->ramProductModify($data) &&$this->ramModel->picUrlModify($data[\"cikkszam\"], $data[\"picUrl\"]) && $this->ramModel->manUrlModify($data[\"cikkszam\"],$data[\"man_url\"]) && $this->ramModel->ramPriceModify($data[\"cikkszam\"], $data[\"price\"]))\n {\n flash('ramModifySuccess','A ('.$data[\"type\"].' '.$data[\"typeCode\"].') Módosítása sikeres volt!');\n redirect(\"admins/ram_input\");\n }else{\n flash(\"ramModifyFail\", 'A ('.$data[\"type\"].' '.$data[\"typeCode\"].') Módosítása sikertelen volt!', 'alert alert-danger');\n redirect(\"admins/ram_input\");\n }\n } \n \n }\n $this->view('admin/ram_input',$data);\n }else{\n redirect('index');\n }\n \n }", "function user_feedback() {\n\t\t$user_email = $_POST['user_email'];\n\t\t$user_name = $_POST['user_name'];\n\t\t$user_msg = $_POST['user_msg'];\n\t\tif (!empty($user_email) && !empty($user_msg) && !empty($user_name)) {\n\t\t\t$insert = $this -> conn -> insertnewrecords('user_feedbacks', 'user_email, user_name,user_msg', '\"' . $user_email . '\",\"' . $user_name . '\",\"' . $user_msg . '\"');\n\t\t\tif (!empty($insert)) {\n\t\t\t\t$post = array('status' => \"true\", \"message\" => \"Thanks for your feedback\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"Missing parameter\", 'user_email' => $user_email, 'user_name' => $user_name, 'user_msg' => $user_msg);\n\t\t}\n\t\techo $this -> json($post);\n\t}", "public function resend_otp()\n\t{\n // $_SESSION['mobile_no']\n // $_SESSION['vno'] (--- this is the OTP ---)\n sleep(1);\n echo true;\n }", "public function sendTest()\n\t{\n\t\t$id = Input::get('device');\n\t\t$device = Device::find($id);\n\t\t$lock = cURL::post('http://localhost:3000/send',['name' => $device->tcpName,'data' => '**,imei:'.$device->imei.',L']);\n if($lock->statusCode != 200){\n return json_encode(array('text' => 'Error','msg' => 'Hubo un Error de Comunicacion con el Dispositivo, Porvafor Comuniquese con el Servicio Tecnico (Error Code #03)','type' => 'status'));\n }\n sleep(10);\n $data = Data::join('datatypes','datatypes.id','=','data.datatypes_id')->where('datatypes.name','lt')->orderBy('data.id', 'DESC')->take(1)->select('data.created_at')->get()->first();\n if((time()-strtotime($data->created_at)) <10){\n $unlock = cURL::post('http://localhost:3000/send',['name' => $device->tcpName,'data' => '**,imei:'.$device->imei.',M']);\n if($unlock->statusCode != 200){\n return json_encode(array('text' => 'Error','msg' => 'Hubo un Error de Comunicacion con el Dispositivo, Porvafor Comuniquese con el Servicio Tecnico (Error Code #03)','status' => 'error'));\n }\n sleep(10);\n $data = Data::join('datatypes','datatypes.id','=','data.datatypes_id')->where('datatypes.name','mt')->orderBy('data.id', 'DESC')->take(1)->select('data.created_at')->get()->first();\n if((time()-strtotime($data->created_at)) <10) {\n return json_encode(array('text' => 'Exitosa','msg' => 'Prueba Ejecutada Correctamente','status' => 'success'));\n }\n else{\n return json_encode(array('text' => 'Error','msg' => 'Hubo un Error al Consultar por el Estado del dispositivo, Porvafor Comuniquese con el Servicio Tecnico (Error Code #02)','status' => 'error'));\n }\n }\n else{\n return json_encode(array('text' => 'Error','msg' => 'Hubo un Error al Consultar por el Estado del dispositivo, Porvafor Comuniquese con el Servicio Tecnico (Error Code #01)','status' => 'error'));\n }\n\t}", "private function emailSerialNumbers()\n {\n if (!$this->individual_purchase) {\n $subject = $this->upgrade_purchase ? \"Upgrade Confirmation\" : \"New \"\n . $this->user->getCurrentRoleName() . \" \"\n . $this->payment_method->name . \" order\";\n\n $template = $this->upgrade_purchase ? \"upgrade-confirmation.phtml\" : \"serial-numbers-multiple.phtml\";\n\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo($this->user->email)\n ->setSubject($subject)\n ->setViewParam('order', $this)\n ->setViewParam('salesEmail', false)\n ->sendHtmlTemplate($template);\n\n //Send email to fisdap-sales@fisdap.net\n if (APPLICATION_ENV != \"production\") {\n $subject = ucfirst(APPLICATION_ENV) . \" - \" . $subject;\n }\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo(\"fisdap-sales@fisdap.net\")\n ->setSubject($subject)\n ->setViewParam('order', $this)\n ->setViewParam('salesEmail', true)\n ->sendHtmlTemplate($template);\n\n // send out a seperate email to those who have accounts that are being upgraded\n if ($this->upgrade_purchase) {\n foreach ($this->order_configurations as $config) {\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo($config->upgraded_user->email)\n ->setSubject(\"Your Fisdap account has been upgraded\")\n ->setViewParam('config', $config)\n ->setViewParam('orderer', $this->user->first_name . \" \" . $this->user->last_name)\n ->sendHtmlTemplate('account-upgrade.phtml');\n }\n }\n } elseif ($this->individual_purchase) {\n $subject = $this->upgrade_purchase ? \"Upgrades to your Fisdap account\" : \"Your new Fisdap account\";\n\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo($this->email)\n ->setSubject($subject)\n ->setViewParam('order', $this)\n ->setViewParam('urlRoot', \\Util_HandyServerUtils::getCurrentServerRoot())\n ->setViewParam('salesEmail', false)\n ->sendHtmlTemplate('individual-purchase-order.phtml');\n\n //Send email to fisdap-sales@fisdap.net\n if (APPLICATION_ENV != \"production\") {\n $subject = ucfirst(APPLICATION_ENV) . \" - \" . $subject;\n }\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo(\"fisdap-sales@fisdap.net\")\n ->setSubject($subject)\n ->setViewParam('order', $this)\n ->setViewParam('urlRoot', \\Util_HandyServerUtils::getCurrentServerRoot())\n ->setViewParam('salesEmail', true)\n ->sendHtmlTemplate('individual-purchase-order.phtml');\n }\n }", "function setFeedback($mode){\n\n\t\tif( @in_array($mode, array(\"line\",\"box\",\"both\")) ){\n\t\t\t$this->feedback = $mode;\n\t\t\treturn true;\n\t\t} else return false;\n\n\t}", "function statement($details,$phone){\n\t$ussd_text=\"CON <br/> Enter your PIN\"; \n ussd_proceed($ussd_text); \n}", "public function feedback()\n {\n $feedback_positive = Session::get('feedback_positive');\n $feedback_negative = Session::get('feedback_negative');\n Session::set('feedback_positive',null); \n Session::set('feedback_negative',null); \n \n //echo 'hi';\n // echo out positive messages\n if (isset($feedback_positive)) {\n foreach ($feedback_positive as $feedback) {\n echo '<div class=\"feedback success\">'.$feedback.'</div>';\n }\n }\n \n // echo out negative messages\n if (isset($feedback_negative)) {\n foreach ($feedback_negative as $feedback) {\n echo '<div class=\"feedback error\">'.$feedback.'</div>';\n }\n }\n }", "function connect($ip_address, $port)\n {\n //$this->connector = new FilePrintConnector(\"/dev/usb/lp0\");\n //$this->connector = new WindowsPrintConnector(\"smb://192.168.0.6/POS-80\");\n //$this->connector = new CupsPrintConnector(\"POS-80\");\n //$this->printer = new Printer($this->connector);\n /* Close printer */\n\n /*$this->connector = new FilePrintConnector(\"php://stdout\");\n $this->printer = new Printer($this->connector);\n */\n\n try {\n //$this->connector = new CupsPrintConnector(\"POS-80C\");\n $this->connector = new WindowsPrintConnector(\"POSS-80\");\n \n /* Print a \"Hello world\" receipt\" */\n $this->printer = new Printer($this->connector);\n //$this->printer -> text(\"TE AMO MCUHO MI VIDA..!\\n\");\n //$this->printer -> cut();\n \n /* Close printer */\n //$this->printer -> close();\n } catch (Exception $e) {\n echo \"Couldn't print to this printer: \" . $e -> getMessage() . \"\\n\";\n }\n }", "public function startBlinkSeq(): int\n {\n return $this->sendCommand('S');\n }", "public function activarPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"NO_MUTE\");\n $this->setPizarraMuteado(0);\n }", "function send_read($data){\n\t\n\t\t$address = gethostbyname($this->vars['host']);\n\t\t$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\t\t$result = socket_connect($socket, $address, $this->vars['port']);\n\n\t\t$transfer = json_encode($this->vars[function_list]);\n\t\t\n\t\t$count = strlen($transfer);\n\t\tprint \"abc\";\n\t\tsocket_send($socket,$count,strlen($count),MSG_DONTROUTE); #send length data to server\n\n\t\tsocket_recv($socket , $buf , 2 , MSG_WAITALL ); #become ack\n\n\t\tsocket_send($socket,$transfer,$count,MSG_DONTROUTE); #send data to server\n\t\t\n\t\tsocket_recv($socket , $count , 30 , MSG_WAITALL ); #income char lentgh\n\t\t\n\t\tsocket_send($socket,'ok',2,MSG_DONTROUTE); #send ack\n\t\t\n\t\tsocket_recv($socket , $buf , $count , MSG_WAITALL ); #income new data\n\n\t\t$returner = json_decode($buf,true);\n\t\tsocket_close($socket);\n\t\treturn($returner);\n\t\t\n\t}", "public function __construct($serial)\n {\n parent::__construct($serial);\n\n $this->sound = 'Baa!';\n }", "function Parameter_Index_Liste_weiterenParameterHolen($ETA_ComID)\r\n {\r\n $ParameterListeIndexStart =\"{MH\";\r\n \t\t\t$ParameterListeIndexStartBytes = chr(01) . chr(01) . chr(01);\r\n $ParameterListeIndexEndZeichen = \"}\";\r\n //Zusammensetzen\r\n $Daten = $ParameterListeIndexStart . $ParameterListeIndexStartBytes . $ParameterListeIndexEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "public function serch()\n {\n }", "public function enviarNumero( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\", \"MARCADO\",$this->getNumeroIP());\n $this->enviarPeticion($cmd->getComando());\n\n }", "function send_cntdwn_msg()\n{\n $current = new DateTime();\n $current->Sub(new Dateinterval(\"PT1H\"));\n\t$sqldate = $current->format(\"Y-m-d H:i:s\");\n $ipAddress = false;\n $stopparam = new TempPredictionStopParam($this->connector);\n $stopparam->build_id = $this->stopBuild->build_id;\n $send_count = 0;\n\n\n // Get IP to send message to - either last GPRS address in last hour or hard coded UDP receiver\n if ( $this->display_type == \"B\" )\n {\n $gprsStatus = new UnitStatus($this->connector);\n $gprsStatus->build_id = $this->stopBuild->build_id;\n $status = $gprsStatus->load(false, \" and message_time > '$sqldate'\");\n $status = $gprsStatus->load();\n if ( $status )\n {\n $ipAddress = $gprsStatus->ip_address;\n $connectTime = $gprsStatus->message_time;\n }\n }\n else\n {\n $stopparam->param_desc = \"ipAddress\";\n $status = $stopparam->load();\n if ( $status )\n {\n $ipAddress = $stopparam->ipAddress;\n $connectTime = $current->format(\"Y-m-d H:i:s\");\n }\n }\n\n if ( !$ipAddress )\n {\n $this->text .= \" - no current ip address for \".$this->stopBuild->build_code.\"\\n\";\n\t return false;\n }\n\n // Dont send if ip address has been assigned to unit more recently\n\tif ( $this->display_type == \"B\" ) \n {\n $gprsStatusDup = new UnitStatus($this->connector);\n $gprsStatusDup->ip_address = $ipAddress;\n $status = $gprsStatusDup->count(array(\"ip_address\"), \" and build_id != \".$this->stopBuild->build_id.\" AND message_time > '\".$connectTime.\"'\");\n //echo \" build_id != \".$this->stopBuild->build_id.\" AND message_time > '\".$connectTime.\"'\\n\";\n if ( $gprsStatusDup->selectCount > 0 )\n {\n $this->text .= \" sedncntdown: \".$this->stopBuild->build_code.\" ip $ipAddress / $connectTime is in use by another unit\";\n return false;\n }\n }\n\n\t$delivery = new PredictionDelivery($this->connector);\n\t$delivery->messageType = 0;\n\t$delivery->addressId = $this->stopBuild->build_code;\n\t$delivery->serviceCode = $this->service_code;\n\t$delivery->bay_no = $this->bay_no;\n\n\t$l_vehicle_code = $this->vehicle->vehicle_code;\n\t$l_build_code = $this->vehicleBuild->build_code;\n\t$l_build_id = $this->vehicleBuild->build_id;\n\n \n\n // Send unitId of 0 if ( $this is an autoroute\n\t// || $if ( $this is a CONT && $the vehicle is already expected at the stop for a REAL route.\n if ( $l_vehicle_code == \"AUT\" || $this->sch_rtpi_last_sent == \"P\" ) \n\t\t\t$delivery->unitId = 0;\n\telse\n {\n if ( !$this->vehicleBuild->build_code )\n {\n\t\t $this->text .= \"\tsend_cntdwn_msg: Failed to get build_code for vehicle_id \". $this->vehicle->vehice_code;\n\t\t\treturn false;\n }\n\t\telse \n {\n $delivery->unitId = $this->vehicleBuild->build_code;\n\t\t}\n\t}\n\n\t$delivery->journeyId = $this->pub_ttb_id;\n\n if ( $this->predictionParameters->countdown_dep_arr == \"A\" ) \n $time_string = $this->eta_last_sent;\n else\n $time_string = $this->etd_last_sent;\n\n $countdown_time_dt = DateTime::createFromFormat(\"Y-m-d H:i:s\", $time_string);\n\t$delivery->countdownTime = $countdown_time_dt->getTimestamp();\n\n\n $stopparam->param_desc = \"countdownMsgType\";\n\t$countdownType = 470;\n if ( $stopparam->load() && $stopparam->param_value )\n $countdownType = $stopparam->param_value;\n\n $stopparam->param_desc = \"destinationType\";\n\t$destinationColumn = \"dest_short1\";\n if ( $stopparam->load() && $stopparam->param_value )\n {\n if ( $stopparam->param_value == \"DEST50\" )\n $destinationColumn = \"dest_long\";\n }\n\n $destination = new Destination($this->connector);\n $destination->dest_id = $this->dest_id;\n if ( !$destination->load() )\n {\n $this->text .= \" Unable to fetch destination for id $this->dest_id\";\n }\n if ( !$destination->dest_short1 && $destination->dest_long ) $destination->dest_short1 = $destination->dest_long;\n if ( !$destination->dest_short1 && $destination->terminal_text ) $destination->dest_short1 = $destination->terminal_text;\n if ( !$destination->dest_long && $destination->dest_short1 ) $destination->dest_long = $destination->dest_short1;\n \n $destinationText = $destination->$destinationColumn;\n if ( $countdownType == 450 )\n $destinationText = substr($destinationText, 0, 15);\n\n $delivery->cntdwn_msg_ver = $countdownType;\n\n // Get vehicle and operator details\n $delivery->wheelchairAccess = 0;\n $delivery->operatorId = 0;\n if ( $this->vehicle->vehicle_id != 0 && $this->vehicle->vehicle_code != \"AUT\" )\n {\n // We have a rela vehicle tracking the prediction trip, get missing vehicle and operator details\n // so we can get operator loc_prefix - not sure why?\n if ( !$this->vehicle->load() )\n {\n $this->text .= \" Cant load vehicle for prediction\";\n return false;\n }\n\n $operator = new Operator($this->connector);\n $operator->operator_id = $this->vehicle->operator_id;\n if ( !$operator->load() )\n {\n $this->text .= \" Cant load operator for prediction\";\n return false;\n }\n $delivery->wheelchairAccess = $this->vehicle->wheelchair_access;\n $delivery->operatorId = $operator->loc_prefix;\n }\n\n\t// Get whether || $not an acknowledgment is currently required for\n\t// countdown messages.\n //echo \"TODO ackreqd\\n\";\n\t//$l_ack_reqd = $get_ack_reqd(450);\n\n $now = new DateTime();\n $delivery->id = 0;\n $delivery->messageType = $countdownType;\n $delivery->journey_fact_id = $this->journey_fact_id;\n $delivery->sequence = $this->sequencsequence;\n $delivery->send_time = $now->format(\"Y-m-d H:i:s\"); \n $delivery->pred_type = \"C\";\n $delivery->display_mode = $this->predictionParameters->countdown_dep_arr;\n $delivery->rtpi_eta_sent = $this->rtpi_eta_sent;\n $delivery->rtpi_etd_sent = $this->rtpi_etd_sent;\n $delivery->pub_eta_sent = $this->pub_eta_sent;\n $delivery->pub_eta_sent = $this->pub_etd_sent;\n $delivery->prediction = $time_string;\n\n \t$this->setOutboundQueue();\n\n\t$this->text = $this->text. \": >>> \".\n\t\t\t$ipAddress. \" \". \n\t\t\t\t$this->sch_rtpi_last_sent. \" \". \n\t\t\t\t$delivery->serviceCode. \" \". \n\t\t\t\tsubstr($destinationText, 0, 15). \" \".\n\t\t\t\tsubstr($time_string,11,8);\n\n\t//$m_status = $set_c_countdown_message();\n\tif ( true )\n {\n\t\t\tswitch($this->display_type)\n {\n\t\t\t\tcase \"U\" :\n\t\t\t\t\t//$m_status = $message_to_queue(m_external_sys_id,w_ip_address,LENGTH(w_ip_address),0,w_stop_build,l_ack_reqd)\n break;\n \t \tcase \"B\" :\n $junk1 = 0;\n $terminatingZero = 0;\n $send_count++;\n $destlen=strlen($destinationText);\n // I RL T\n if ( $delivery->messageType == 518 )\n {\n $msg = pack(\"A3Sa18SSSSSIA6SIIiCa10A${destlen}I\",\n \"PHP \",\n 3, // message type\n\n $ipAddress, // destination\n 1, // repeats\n $destlen + 48, // message length\n 0, // portNumber\n\n $delivery->messageType,\n $junk1,\n $delivery->addressId,\n substr($delivery->serviceCode, 0, 6),\n $delivery->operatorId,\n $delivery->unitId,\n $delivery->journeyId,\n $delivery->countdownTime,\n $delivery->wheelchairAccess,\n $delivery->bay_no,\n $destinationText,\n $terminatingZero\n );\n }\n else\n $msg = pack(\"A3Sa18SSSSSIA6SIIiCA${destlen}I\",\n \"PHP \",\n 3, // message type\n\n $ipAddress, // destination\n 1, // repeats\n $destlen + 38, // message length\n 0, // portNumber\n\n $delivery->messageType,\n $junk1,\n $delivery->addressId,\n substr($delivery->serviceCode, 0, 6),\n $delivery->operatorId,\n $delivery->unitId,\n $delivery->journeyId,\n $delivery->countdownTime,\n $delivery->wheelchairAccess,\n $destinationText,\n $terminatingZero\n );\necho \" Tid $delivery->bay_no, $delivery->messageType, $delivery->addressId, $delivery->serviceCode, $delivery->operatorId, $delivery->unitId, $delivery->journeyId, $delivery->countdownTime, $delivery->wheelchairAccess, $destinationText\\n\";\n if ( $this->outboundQueue )\n {\n if (!msg_send ($this->outboundQueue, 1, $msg ) )\n {\n $this->text .= \"Failed to send event to route tracker message queue\";\n echo $this->text.\"\\n\";\n }\n }\n\t\t\t}\n\t}\n\n if ( $send_count == 0 ) \n {\n $this->text = $this->text. \" UNSENT OUT OF DATE\";\n }\n\n //echo \"sent $send_count <BR>\";\n\treturn $send_count;\n\n}", "public function vga_input($cikkszam = ''){\n if (bothAdminSeller($_SESSION['jog'])) {\n $pciSlots = [\n 'PCI-E 16x 2.0',\n 'PCI-E 16x 3.0',\n 'PCI-E 16x 4.0'\n ];\n $vramCap = [\n 1,2,3,4,5,6,8,11,24\n ];\n $warranity = $this->adminModel->getWarranity();\n $manufacturers = $this->vgaModel->getVgaManufacturers();\n $data = [\n 'main_title' => 'VGA bevitele',\n 'cikkszam' => $cikkszam,\n 'manufacturers' => $manufacturers,\n 'selected_man' => '',\n 'warranity' => $warranity,\n 'vramCap' => $vramCap,\n 'pciSlots' => $pciSlots,\n 'selected_warr' =>'',\n 'price' => '',\n 'vga_stock' => '',\n 'picUrl' => '',\n 'man_url' => '',\n 'type' => '',\n 'typeCode' => '',\n 'vga_man' =>'',\n 'pci_type' => '',\n 'gpu_clock' => '',\n 'gpu_peak' => '',\n 'vram_capacity' => '',\n 'vram_clock' => '',\n 'vram_type' => '',\n 'vram_bandwidth' => '',\n 'power_consumption' => '',\n 'power_pin' => '',\n 'directX' => '',\n 'displayPort' => '',\n 'DVI' => '',\n 'HDMI' => '',\n 'disabledIn' => '',\n 'disabledModify' => 'disabled'\n ];\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n if (isset($_POST['vgaInput'])) {\n $data = [\n 'main_title' => 'VGA bevitele',\n 'cikkszam' => trim($_POST['cikkszam']),\n 'manufacturers' => $manufacturers,\n 'selected_man' => trim($_POST['selected_man']),\n 'warranity' => $warranity,\n 'vramCap' => $vramCap,\n 'pciSlots' => $pciSlots,\n 'selected_warr' => trim($_POST['selected_warr']),\n 'price' => trim($_POST['price']),\n 'vga_stock' => trim($_POST['vga_stock']),\n 'picUrl' => trim($_POST['picUrl']),\n 'man_url' => trim($_POST['man_url']),\n 'type' => trim($_POST['type']),\n 'typeCode' => trim($_POST['typeCode']),\n 'vga_man' => trim($_POST['vga_man']),\n 'pci_type' => trim($_POST['pci_type']),\n 'gpu_clock' => trim($_POST['gpu_clock']),\n 'gpu_peak' => trim($_POST['gpu_peak']),\n 'vram_capacity' => trim($_POST['vram_capacity']),\n 'vram_clock' => trim($_POST['vram_clock']),\n 'vram_type' => trim($_POST['vram_type']),\n 'vram_bandwidth' => trim($_POST['vram_bandwidth']),\n 'power_consumption' => trim($_POST['power_consumption']),\n 'power_pin' => trim($_POST['power_pin']),\n 'directX' => trim($_POST['directX']),\n 'displayPort' => trim($_POST['displayPort']),\n 'DVI' => trim($_POST['DVI']),\n 'HDMI' => trim($_POST['HDMI']),\n 'disabledIn' => '',\n 'disabledModify' => 'disabled'\n ];\n try{\n if ($this->adminModel->VGAInput($data) && $this->adminModel->VGAManUrlInput($data['cikkszam'],$data['man_url']) && $this->adminModel->VGAPicUrlInput($data['cikkszam'],$data['picUrl']) && $this->adminModel->VGAPriceInput($data['cikkszam'],$data['price']) && $this->adminModel->VGAStockInput($data['cikkszam'],$data['vga_stock'])) {\n flash('input_success','A '.$data['type'].' Termék bevitele sikeres volt');\n redirect('admins/vga_input');\n }else {\n flash('input_fail','A '.$data['type'].' Termék bevitele sikertelen volt!!', 'alert alert-danger');\n redirect('admins/vga_input');\n }\n }catch(PDOException $ex){\n flash('input_fail',$ex->getMessage(), 'alert alert-danger');\n redirect('admins/vga_input');\n }\n } elseif(isset($_POST['editVGA'])){\n $vgaByCikk = $this->vgaModel->getVgaByCikkszam($cikkszam);\n $data = [\n 'main_title' => 'VGA bevitele',\n 'cikkszam' => $cikkszam,\n 'manufacturers' => $manufacturers,\n 'vramCap' => $vramCap,\n 'pciSlots' => $pciSlots,\n 'selected_man' => $vgaByCikk->manufacturer_id,\n 'warranity' => $warranity,\n 'selected_warr' => $vgaByCikk->warr_id,\n 'price' => $vgaByCikk->price,\n 'vga_stock' => $vgaByCikk->vga_stock,\n 'picUrl' => $vgaByCikk->picUrl,\n 'man_url' => $vgaByCikk->Url,\n 'type' => $vgaByCikk->type,\n 'typeCode' => $vgaByCikk->typeCode,\n 'vga_man' => $vgaByCikk->vga_man,\n 'pci_type' => $vgaByCikk->pci_type,\n 'gpu_clock' => $vgaByCikk->gpu_clock,\n 'gpu_peak' => $vgaByCikk->gpu_peak,\n 'vram_capacity' => $vgaByCikk->vram_capacity,\n 'vram_clock' => $vgaByCikk->vram_clock,\n 'vram_type' => $vgaByCikk->vram_type,\n 'vram_bandwidth' => $vgaByCikk->vram_bandwidth,\n 'power_consumption' => $vgaByCikk->power_consumption,\n 'power_pin' => $vgaByCikk->power_pin,\n 'directX' => $vgaByCikk->directX,\n 'displayPort' => $vgaByCikk->displayPort,\n 'DVI' => $vgaByCikk->DVI,\n 'HDMI' => $vgaByCikk->HDMI,\n 'disabledIn' => 'disabled',\n 'disabledModify' => ''\n ];\n }elseif(isset($_POST['vgaModify'])){\n $data = [\n 'cikkszam' => $cikkszam,\n 'selected_man' => trim($_POST['selected_man']),\n 'selected_warr' => trim($_POST['selected_warr']),\n 'price' => trim($_POST['price']),\n 'vga_stock' => trim($_POST['vga_stock']),\n 'picUrl' => trim($_POST['picUrl']),\n 'man_url' => trim($_POST['man_url']),\n 'type' => trim($_POST['type']),\n 'typeCode' => trim($_POST['typeCode']),\n 'vga_man' => trim($_POST['vga_man']),\n 'pci_type' => trim($_POST['pci_type']),\n 'gpu_clock' => trim($_POST['gpu_clock']),\n 'gpu_peak' => trim($_POST['gpu_peak']),\n 'vram_capacity' => trim($_POST['vram_capacity']),\n 'vram_clock' => trim($_POST['vram_clock']),\n 'vram_type' => trim($_POST['vram_type']),\n 'vram_bandwidth' => trim($_POST['vram_bandwidth']),\n 'power_consumption' => trim($_POST['power_consumption']),\n 'power_pin' => trim($_POST['power_pin']),\n 'directX' => trim($_POST['directX']),\n 'displayPort' => trim($_POST['displayPort']),\n 'DVI' => trim($_POST['DVI']),\n 'HDMI' => trim($_POST['HDMI']),\n ];\n if ($this->vgaModel->updateVgaProduct($data) && $this->vgaModel->updateVgaManUrl($data['cikkszam'], $data['man_url']) && $this->vgaModel->updateVgaPicUrl($data['cikkszam'], $data['picUrl']) && $this->vgaModel->updateVgaPrice($data['cikkszam'], $data['price']) && $this->vgaModel->updateVgaStockpile($data['cikkszam'], $data['vga_stock'])) {\n flash('modify_success','A '.$data['type'].' Termék módosítása sikeres volt');\n redirect('admins/vga_input');\n }else {\n flash('modify_fail','A '.$data['type'].' Termék módosítása sikertelen volt!!', 'alert alert-danger');\n redirect('admins/vga_input');\n }\n /**\n * TEENDŐK:\n * -ellenőrizni, hogy készleten vannak-e atermékek, illteve csőkkenteni a termék \n * számát\n * - MEGOLDANI, hogy a vásárlásaim tábla reponsive legyen\n * - ESETLEG betteni a pdf-et mediumBLOB-ba a DB-be NEM!!!\n * - AZ ADMINBÓL áttenni az input/modify/delete functionokat a hozzá tartozó\n * termék model-jébe\n */\n }\n }\n $this->view('admin/vga_input',$data);\n }else{\n redirect('index');\n }\n }", "function feedback($is_input_correct)\n\t{\n\t\t$this->_post_data(\"http://bypasscaptcha.com/check_value.php\", array(\n\t\t\t\t\t\t\t\"key\" \t\t=> $this->_get_key(),\n\t\t\t\t\t\t\t\"task_id\" \t=> $this->task_id,\n\t\t\t\t\t\t\t\"cv\" \t\t=> ($is_input_correct ? 1 : 0),\n\t\t\t\t\t\t\t\"submit\" \t=> \"Submit\",\n\t\t));\n\t}", "function wtsProPaiement($ar){\n $p = new XParam($ar, array());\n $orderoid = $p->get('orderoid');\n // verification du client de la commande et du compte connecte\n list($okPaiement, $mess) = $this->paiementEnCompte($orderoid);\n if (!$okPaiement){\n XLogs::critical(get_class($this), 'paiement pro refusé '.$orderoid.' '.$mess);\n XShell::setNext($GLOBALS['TZR_SESSION_MANAGER']::complete_self(true, true).'&alias='.$this->aliasvente.'&moid='.$this->_moid.'&function=wtsLireOffres');\n return;\n }\n // traitement post commande std\n clearSessionVar('caddie');\n XLogs::critical(get_class($this), 'enregistrement paiement en compte '.$orderoid);\n // traitement standards après validation\n $this->postOrderActions($orderoid, true);\n\n // traitement post order - devrait être dans postOrderActions\n $this->proPostOrderActions($orderoid);\n\n // retour \n if (defined('EPL_ALIAS_PAIEMENT_ENCOMPTE')){\n XShell::setNext($GLOBALS['TZR_SESSION_MANAGER']::complete_self().'alias='.EPL_ALIAS_PAIEMENT_ENCOMPTE);} else {\n XShell::setNext($GLOBALS['TZR_SESSION_MANAGER']::complete_self(true, true).'&alias='.$this->aliasvente.'&moid='.$this->_moid.'&function=wtsLireOffres');\n }\n }", "public function userAskToBeNotified(){\n// $message = new Message();\n// $message->setHeure(\"19h50\");\n// $message->setVille(\"TO\");\n// $message->setStatue(\"Retart\");\n// $message->setPhoneNumber(\"+15143468023\");\n// $message->setMessage(\"Salut je fait un test\");\n// $messagemodel->sendSMS($message);\n $arryNotif [0]= $_POST[\"vol\"];\n $arryNotif[1] = $_POST[\"phone\"];\n $arryNotif[2] = $_POST[\"date\"];\n $arryNotif[3] = $_POST[\"status\"];\n $notifDAO = new NotifyDAO();\n $notifDAO->create($arryNotif);\n\n }", "public function videoconferenciaNoInterrumpir( ) {\n $this->setNoInterrumpir(\"OFF\");\n //$this->setNoInterrumpir(\"ALLOCATED\");\n }", "public function readMsg()\n\t{\n\t\tglobal $_THRESH, $_LOCKTHRESH;\n\t\t\n\t\tif($this->_SERIAL->_ckOpened() == false) { return \"fail\";}\n\t\t$this->_SERIAL->serialflush();\n\t\t\n\t\t$result = -5;\n\t\t$data = \"\";\n\t\t$i = 0;\n\t\t\n\t\t//This regex looks for any whitespace characters (\\n, char(10), etc.)\n\t\twhile (!preg_match(\"/[\\s,]+/\", $data))\n\t\t{\n\t\t\tif($i >=75000) {\n\t\t\t\treturn \"failed to read data. Value of loop: \".$i;\n\t\t\t}\n\t\t\n\t\t\t$i++;\n\t\t\t$data .= $this->_SERIAL->readPort();\n\t\t}\n\n\t\t$arr = str_split($data);\n\n\t\t// First byte of incoming message determines what type it is.\n\t\t$resultID = $arr[0];\n\n\t\t// after type is determined these statements extract relevant data from rest of the message.\n\t\tif ($resultID == \"s\")\n\t\t{\n\t\t\t$value = (ord($arr[3])*256)+ord($arr[4]);\n\n\t\t\tif($value > $_THRESH)\n\t\t\t\t$result = 1; // Filled\n\t\t\telse \n\t\t\t\t$result = 0; // UnFilled\n\t\t}\n\t\telseif ($resultID == \"l\")\n\t\t{\n\t\t\t$value = (ord($arr[3])*256)+ord($arr[4]);\n\n\t\t\tif($value < $_LOCKTHRESH) \n\t\t\t\t$result = 1; // UnLocked\n\t\t\telse \n\t\t\t\t$result = 0; // locked\n\t\t}\n\t\telseif ($resultID == \"a\")\n\t\t{\n\t\t\t$result = 1; // message was confirmed\n\t\t}\n\t\telseif ($resultID == \"n\")\n\t\t{\n\t\t\t$iDplusCol = Array(0 => ord($arr[1]), 1 => ord($arr[2]));\n\t\t\treturn $iDplusCol; // new column was found return the number of boxes\n\t\t}\n\t\telseif ($resultID == \"t\")\n\t\t{\n\t\t\t$result= ord($arr[3]); // returns the size of queried box\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function askQuestion($b) //ask user the chosen question LEVEL = question_asked\n{\n global $user_id;\n global $db;\n global $message_id;\n global $locale;\n $string = returnQuestion($b);\n if ($locale == \"farsi\")\n makeCurl(\"editMessageText\", [\"chat_id\" => $user_id, \"message_id\" => $message_id, \"text\" => $string, \"reply_markup\" => json_encode([\n \"inline_keyboard\" => [\n [\n [\"text\" => '💤 نمیدونم', \"callback_data\" => \"Ca_nC_31\"]\n ]\n ]\n ])]);\n elseif ($locale == \"english\")\n makeCurl(\"editMessageText\", [\"chat_id\" => $user_id, \"message_id\" => $message_id, \"text\" => $string, \"reply_markup\" => json_encode([\n \"inline_keyboard\" => [\n [\n [\"text\" => \"Cancel\", \"callback_data\" => \"Ca_nC_31\"]\n ]\n ]\n ])]);\n\n mysqli_query($db, \"UPDATE padporsc_bot4.users SET current_level = 'question_asked' WHERE user_id = {$user_id}\");\n\n}", "public static function channelling(): void\n {\n self::$isChannel = true;\n }", "function user_feedback(){\n\t\t\t$user_email=$_POST['user_email'];\n\t\t\t$user_name=$_POST['user_name'];\n\t\t\t$user_msg=$_POST['user_msg'];\n\t\t\tif(!empty($user_email) && !empty($user_msg) && !empty($user_name))\n\t\t\t{\n\t\t\t\t$insert = $this -> conn -> insertnewrecords('user_feedbacks','user_email, user_name,user_msg', '\"' . $user_email . '\",\"' . $user_name . '\",\"' . $user_msg . '\"');\n\t\t\t\tif(!empty($insert)){\n\t\t\t\t\t$post = array('status' => \"true\",\"message\" => \"Thanks for your feedback\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$post = array('status' => \"false\",\"message\" => \"Missing parameter\",'user_email'=>$user_email,'user_name'=>$user_name,'user_msg'=>$user_msg);\n\t\t}\n\t\t\techo $this -> json($post);\n\t\t}", "public function transferencia($row){\n\n // Data de Saida\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Data Saída: \"), 'LTB', 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->data_saida), 'TBR', 0, '');\n // Origem\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Origem: \"), 'LTB', 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(40, 6, utf8_decode($row->origem_nome), 'TBR', 0, '');\n\n $this->Ln();\n\n // Data de Entrada\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Data Entrada: \"), 'LTB', 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->data_saida), 'TBR', 0, '');\n // Destino\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Destino: \"), 'LTB', 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(40, 6, utf8_decode($row->destino_nome), 'TBR', 0, '');\n\n $this->Ln(10);\n\n\n // Status\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Status: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(30, 6, utf8_decode($row->status_nome), 'TBR', 0, '');\n\n // Peso Total\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Peso Total: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->saida_peso_total), 'TBR', 0, '');\n\n // Permanencia\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Perm. Média: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->permanencia_media), 'TBR', 0, '');\n\n // Machos\n $this->Ln();\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Machos: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(30, 6, utf8_decode($row->machos), 'TBR', 0, '');\n\n // Peso Medio\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Peso Médio: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->saida_peso_medio), 'TBR', 0, '');\n\n // Ganho Dia Medio\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Ganho/Dia: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->ganho_medio_media), 'TBR', 0, '');\n\n // Femeas\n $this->Ln();\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Femeas:\"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(30, 6, utf8_decode($row->femeas), 'TBR', 0, '');\n\n // Ganho Total\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Ganho Total: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->ganho_total), 'TBR', 0, '');\n\n // Maior Peso \n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Maior Peso: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->saida_maior_peso), 'TBR', 0, '');\n\n // Total\n $this->Ln();\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Total:\"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(30, 6, utf8_decode($row->quantidade), 'TBR', 0, '');\n\n // Ganho Total Medio\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Ganho Médio: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->ganho_total_media), 'TBR', 0, '');\n \n // Menor Peso\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Menor Peso: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->saida_menor_peso), 'TBR', 0, '');\n\n $this->Ln(6);\n }", "function printJSSerialNumberAutoDeduce() {\n\n\tglobal $langs;\n\t?>\n\t<script>\n\n\t\tfunction setSerialNumbers(fkProduct, TMatches) {\n\n\t\t\tvar prefix = TMatches[1] ? TMatches[1] : ''; // Si undefined car nombre pur => chaine vide\n\t\t\tvar currentNum = TMatches[2];\n\t\t\tvar i = 1;\n\t\t\tvar numSize = currentNum.length;\n\t\t\tvar count = parseInt(currentNum);\n\n\t\t\t$('table#dispatchAsset tr[data-fk-product='+fkProduct+']').not(':first').each(function() {\n\t\t\t\tvar lineID = $(this).attr('id').replace('dispatchAssetLine', '');\n\t\t\t\tvar elem = $(this).find('input#TLine\\\\['+lineID+'\\\\]\\\\[numserie\\\\]');\n\t\t\t\tvar suffixCount = count + i;\n\t\t\t\tvar suffix = (new String(suffixCount)).padStart(numSize, '0');\n\t\t\t\tvar newVal = prefix + suffix;\n\n\t\t\t\telem.val(newVal);\n\n\t\t\t\ti++;\n\t\t\t});\n\t\t}\n\n\t\tfunction setSerialNumberListener(fkProduct, TElemTR) {\n\t\t\tvar lineID = TElemTR.first().attr('id').replace('dispatchAssetLine', '');\n\t\t\tvar inputElem = $('input#TLine\\\\['+lineID+'\\\\]\\\\[numserie\\\\]'); // Doublement échapper les crochets faisant partie d'un ID ou d'une classe et non du sélecteur\n\n\t\t\tinputElem.on('change', function() {\n\n\t\t\t\t$('span#setSerialNumbers'+fkProduct).remove(); // On supprime le lien même s'il existe pour éventuellement le recréer avec un nouveau listener\n\n\t\t\t\tvar TMatches = $(this).val().match(/^(.*[^0-9])?([0-9]+)$/); // On détermine si le numéro de série finit par un nombre\n\n\t\t\t\tif(TMatches instanceof Array && TMatches.length > 0) { // String.match() retourne un tableau si des correspondances sont trouvées\n\n\t\t\t\t\t$('<span id=\"setSerialNumbers'+fkProduct+'\"> <a href=\"javascript:;\"><?php print dol_escape_js($langs->trans('CalculateFollowingSerialNumbers')); ?></a></span>')\n\t\t\t\t\t\t.insertAfter('input#TLine\\\\['+lineID+'\\\\]\\\\[commande_fournisseurdet_asset\\\\]')\n\t\t\t\t\t\t.on('click', function() {\n\t\t\t\t\t\t\tsetSerialNumbers(fkProduct, TMatches);\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t$(document).ready(function() {\n\n\t\t\tvar TProducts = [];\n\n\t\t\t$('table#dispatchAsset tr.dispatchAssetLine').each(function() {\n\t\t\t\tvar fkProduct = parseInt($(this).data('fk-product'));\n\n\t\t\t\tif(! TProducts.includes(fkProduct)) {\n\t\t\t\t\tTProducts.push(fkProduct);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tfor(var fkProduct of TProducts) { // Equivalent JS de foreach($TProducts as $fkProduct) en PHP\n\n\t\t\t\tvar TElemTR = $('table#dispatchAsset tr[data-fk-product='+fkProduct+']');\n\n\t\t\t\tif(TElemTR.length > 1) { // Si au moins 2 équipements à dispatcher issus du même produit\n\t\t\t\t\tsetSerialNumberListener(fkProduct, TElemTR);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t</script>\n\n\t<?php\n}", "function read_all_units($db, $serial, $instruction)\r\n{\r\n\tglobal\t$TABLE_M_UNITS;\r\n\tglobal\t$FIELD_UNIT, $FIELD_UNIT_VERSION, $FIELD_ONLINE;\r\n\tglobal\t$a_unit, $a_temp, $a_kwhtotal, $a_kwhdisplay, $a_current;\r\n\r\n\t$sql = \"SELECT $FIELD_UNIT,$FIELD_UNIT_VERSION FROM $TABLE_M_UNITS\";\r\n\tif (!($mysql_result = mysql_query($sql))) { print(mysql_error($db) .\"\\n\"); return; }\r\n\r\n\t$i = 0;\r\n\twhile ($row = mysql_fetch_array($mysql_result))\r\n\t{\r\n\t\t$unit = $row[0];\r\n\t\t$a_unit[$i] = $unit;\r\n\r\n//\t\tprint \"$unit\\t\";\r\n\t\t\r\n\t\t$addrh = ($unit >> 8) & 255;\r\n\t\t$addrl = $unit & 255;\r\n\r\n\t\t$result = send_message($serial, 93, $addrh, $addrl, 0, 0, \"\");\t\t\t\t\t// read databuffer\r\n\t\t\r\n\t\tif ($result >= 0)\r\n\t\t{\r\n\t\t\tif ($instruction == 90)\t\t\t\t\t\t\t\t\t\t\t\t\t\t// temperature\r\n\t\t\t{\r\n\t\t\t\t$a_temp[$i] = ($result & 255);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$number = 0;\r\n\t\t\t\tfor ($j = 5; $j >= 0; $j--)\r\n\t\t\t\t\t$number = ($number * 10) + (($result >> (4 * $j)) & 15);\r\n\t\t\t\t\t\r\n\t\t\t\tswitch ($instruction)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase 56:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// KWh total\r\n\t\t\t\t\t\t$a_kwhtotal[$i] = $number;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 143:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// KWh display\r\n\t\t\t\t\t\t$a_kwhdisplay[$i] = $number;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 68:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\r\n\t\t\t\t\t\t$a_current[$i] = $number / 10000;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$online = \"Y\";\r\n\t\t\t//print \"ok\\n\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tswitch ($instruction)\r\n\t\t\t{\r\n\t\t\t\tcase 90:\t$a_temp[$i] = 0;\t\tbreak;\r\n\t\t\t\tcase 56:\t$a_kwhtotal[$i] = 0;\tbreak;\r\n\t\t\t\tcase 143:\t$a_kwhdisplay[$i] = 0;\tbreak;\r\n\t\t\t\tcase 68:\t$a_current[$i] = 0;\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$online = \"N\";\r\n\t\t\t//print \"missing\\n\";\r\n\t\t}\r\n\r\n\t\t// update online status of this unit\r\n\t\t$sql = \"UPDATE $TABLE_M_UNITS SET $FIELD_ONLINE='$online' WHERE $FIELD_UNIT=$unit\";\r\n\t\tif (!mysql_query($sql)) print(mysql_error($db) .\"\\n\");\r\n\t\t\r\n\t\t$i++;\r\n\t}\r\n\tmysql_free_result($mysql_result);\r\n\t\r\n\t//print(\"\\n\");\r\n}", "function control_gpio()\n{\n $data = read_file();\n // fetch data from object\n foreach ($data->equipment as $value) {\n if ($value->status == 1) {\n //execute command line using exec function\n exec(\"gpio -g mode {$value->port} out\");\n exec(\"gpio -g write {$value->port} 1\");\n } else {\n exec(\"gpio -g write {$value->port} 0\"); \n }\n }\n \n}", "public function recivirClases( ) {\n AccesoGui::$guiSistema->esperarInicioSistema();\n\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_RECIBIR_CLASE);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n ConexionServidorCliente::$ctrlGuiPantallas->bajarPantallaElectrica();\n AccesoControladoresDispositivos::$ctrlAutomata->encenderLuzSala(Automata::$intensidades[\"media\"]);//intensidad media\n AccesoControladoresDispositivos::$ctrlLuz->encenderLucesSuelo();\n if(!AccesoControladoresDispositivos::$ctrlPantallas->isEncendidaPresidencia()) {\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaEncender();\n usleep(5000000);\n AccesoControladoresDispositivos::$ctrlPantallas->verEntradaPresidenciaAV1();\n }else {\n AccesoControladoresDispositivos::$ctrlPantallas->quitarPIPPresidencia();\n }\n usleep(1000000);\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaVideoConferencia();\n ConexionServidorCliente::$ctrlGuiPlasmas->encender();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderPizarra();\n AccesoControladoresDispositivos::$ctrlFoco->encender();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\nAccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n ConexionServidorCliente::$ctrlGuiPlasmas->verVideoSalaEnPlasma();\n ConexionServidorCliente::$ctrlGuiProyectores->activarCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->activarPizarra();\n ConexionServidorCliente::$ctrlGuiProyectores->verPCSalaEnCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->verVideoconferenciaEnPizarra();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->activarNuestroSonido();\n AccesoControladoresDispositivos::$ctrlVideoconferencia->conectar();\n AccesoGui::$guiEscenarios->escenarioRecivirClase();\n AccesoGui::$guiMenus->menuPrincipal(true);\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n\n\n }", "function PrinterLog_logArduino($command, $output = '') {\r\n\treturn PrinterLog__logToFile('log_arduino', $command, $output); \r\n}", "public function sendActivation()\n\t{\n\t}", "function sendfeedback($title, $message, $uname, $phone) {\r\n $sql_ins = \"INSERT INTO feedback( title, message, username, phone) VALUES ('{$title}','{$message}', '{$uname}','{$phone}')\";\r\n if(mysql_query($sql_ins))\r\n {\r\n echo 'FEEDBACK SENT SUCCESSFULLY';\r\n echo '<br>';\r\n echo '<br>';\r\n echo '<a href=\"authorized.php\">BACK TO AUTHORIZED HOME</a>';\r\n }\r\n else {\r\n die(mysql_error());\r\n }\r\n }", "public function get_data($serial = '')\n {\n\n $out = array();\n $temp = array();\n if (! $this->authorized()) {\n $out['error'] = 'Not authorized';\n } else {\n $bluetooth = new bluetooth_model;\n foreach ($bluetooth->retrieve_records($serial) as $prefs) {\n $temp[] = $prefs->rs;\n }\n foreach ($temp as $value) {\n $out[$value['device_type']] = $value['battery_percent'];\n }\n }\n\n $obj = new View();\n $obj->view('json', array('msg' => $out));\n }", "public function print_ack() {\n $userid = $this->input->post('userId');\n $data = $this->get_pdf_data($userid);\n //modified on 27/11/2014\n $data['meta_data'] = $this->meta_data;\n return generate_acknowledgment($data);\n }", "public function validacionserialasignado($serial)\n {\n $query = \"select COUNT(*) as cantidad FROM `equipo`\n INNER JOIN asignacion_equipo on fkID_equipo=id_equipo\n WHERE asignacion_equipo.estado =1 and fkID_equipo='\" . $serial . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "public function poll() { //validate request from interkassa\n\t\t$this->wrlog(\"====================START=========================\");\n\t\t$this->wrlog(\"Payment for order: \".getRequest(\"ik_pm_no\").\" Time: \".date(\"Y-m-d H:i:s\"));\n\t\t$buffer = outputBuffer::current();\n\t\t$buffer->clear();\n\t\t$buffer->contentType(\"text/plain\");\n\t\t$this->wrlog($_REQUEST);\n\t\tif (!$this->checkIP()) {\n\t\t\t$this->order->setOrderStatus('canceled');\n\t\t\t$buffer->push(\"failed\");\n\t\t\t$this->wrlog(\"Invalid IP reply address\");\n\t\t}\n\t\telseif($this->hash_validation()) {\n\t\t\t$status = getRequest(\"ik_inv_st\");\n\t\t\tswitch($status) {\n\t\t\t\tcase interkassaPayment::STATUS_FAIL : {\t//fail order\n\t\t\t\t\t$this->order->setPaymentStatus('declined');\n\t\t\t\t\t$this->order->setOrderStatus('canceled');\n\t\t\t\t\t$buffer->push(\"failed\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase interkassaPayment::STATUS_SUCCESS : { //success order, create payment\n\t\t\t\t\t$this->order->setPaymentStatus('accepted');\n\t\t\t\t\t$this->order->payment_document_num = getRequest('ik_inv_id');\n\t\t\t\t\t$buffer->push(\"OK\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase interkassaPayment::STATUS_PENDING : { //pedning payment, wait for payment\n\t\t\t\t\t$this->order->setPaymentStatus('initialized');\n\t\t\t\t\t$this->order->payment_document_num = getRequest('ik_inv_id');\n\t\t\t\t\t$buffer->push(\"waitAccept\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\t$this->order->setPaymentStatus('initialized');\n\t\t\t\t\t$this->order->payment_document_num = getRequest('ik_inv_id');\n\t\t\t\t\t$buffer->push(\"waitAccept\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else {\n\t\t\t$buffer->push(\"failed\");\n\t\t}\n\t\t$this->wrlog(\"=====================END=========================\");\n\t\t$buffer->end();\n\t}", "private function setPreviouslyTweetedSerialNumbers() {\n\t\t$usedSerialNumbers = [];\n\t\t$usedSerialNumbersFileName = \"\";\n\t\tif($this->qType === \"PO\") {\n\t\t\t$usedSerialNumbersFileName = ($this->realTweets ? \"tweeted_po_sns.txt\" : \"tweeted_po_sns_debug.txt\");\n\t\t} else if($this->qType === \"FD\") {\n\t\t\t$usedSerialNumbersFileName = ($this->realTweets ? \"tweeted_fd_sns.txt\" : \"tweeted_fd_sns_debug.txt\");\n\t\t} else {\n\t\t\terror_log(\"Didn't recognize query type: \" . $this->qType);\n\t\t\texit(3);\n\t\t}\n\t\t//read in all serial numbers that have already been tweeted\n\t\tif (file_exists($usedSerialNumbersFileName)) {\n\t\t\techo \"Reading used serial numbers from file \" .$usedSerialNumbersFileName .\"…\\n\";\n\t\t\t$usedNumberFile = fopen($usedSerialNumbersFileName, 'r');\n\t\t\twhile ($usedNumberFile && !feof($usedNumberFile)) {\n\t\t\t\t$line = fgets($usedNumberFile);\n\t\t\t\t// verify it's an 8-digit serial number or blank (should be last line only)\n\t\t\t\tif( !preg_match('/^(\\d{8})|()$/',$line) ) {\n\t\t\t\t\t$msg = \"invalid line in \".$usedSerialNumbersFileName.\": \".$line;\n\t\t\t\t\tthrow new CockyBotException($msg, CockyBotException::ERROR_SN_FILE);\n\t\t\t\t}\n\t\t\t\t$lineValue = intval($line);\n\t\t\t\t// store with serial number as key to allow constant time lookup\n\t\t\t\t$usedSerialNumbers[$lineValue] = $lineValue;\n\t\t\t}\n\t\t\tfclose($usedNumberFile);\n\t\t}\n\t\t$this->usedSerialNumbersFileName = $usedSerialNumbersFileName;\n\t\t$this->usedSerialNumbers = $usedSerialNumbers;\n\t}", "public function snooze() {\n\t\tif (self::isAudioRunning()) {\n\t\t\tself::stopRadio();\n\t\t\t$date = date('H:i Y-m-d', strtotime(Flight::get(\"snooze\")));\n\t\t\texec('at '.$date.' -q A -f /srv/www/home.fr/public/conf/aton.txt');\n\t\t\tFlight::json(array('Status' => 'OK', 'Snooze at' => $date));\n\t\t}\n\t\telse\n\t\t\tFlight::json(array('Status' => 'KO', 'Snooze at' => 'Radio was not running'));\n\t}", "function Write($msg){\r\n $host = \"127.0.0.1\";\r\n $port = \"20205\";\r\n\t\t$sock = socket_create(AF_INET, SOCK_STREAM, 0); //socket openen.\r\n\t\t//socket_connect($sock, $host, $port);\r\n\r\n\t\t//socket_write($sock, $msg, strlen($msg)); //het versturen van de data in de vorm van ID,Value.\r\n\t\t//socket_close($sock); //socket verbinding beindigen.\t\t\r\n\t\t\r\n\t\t$jsonString = file_get_contents('/home/pi/actuator.json'); // actuatoren openen\r\n\t\t$data = json_decode($jsonString, true);\r\n\t\t$msg2 = explode(',', $msg); // bericht ui client splitten op kommas, \t\tbijvoorbeeld \"15,1\".\r\n\r\n\t\t$ID = $msg2[0]; // eerste deel is ID, \t\t\t\t\t\tbijvoorbeeld \"15\".\r\n\t\t$Value = $msg2[1]; // tweede deel is de aan te passen waarde, \tbijvoorbeeld \"1\".\r\n\t\t\r\n\t\t//print_r($data);\r\n\t\t$data[$ID] = $Value;\r\n\r\n\t\t$newJsonString = json_encode($data);\r\n\t\tfile_put_contents('/home/pi/actuator.json', $newJsonString); //uitgesplitste waarden naar actuator.json schrijven om geinterpreteerd te kunnen worden door De raspberry Pi.\r\n\r\n\t\t$msg = trim($msg);\r\n\t\techo \"Client Wrote:\\t\".$msg.\"\\n\\n\";\r\n }", "private function sensorsReadTemp()\n {\n // python's script using to read data from sensors\n $cmd = \"python /home/eker/Pulpit/tmp.py \";\n // read pin numbers for each room\n foreach ($this->rooms as $key => $value) {\n $cmd .= (string)$value[0] . ' ';\n }\n // var_dump($cmd);\n // exec return string, getFloats changes it to floats array\n // $temps = $this->getFloats(exec($cmd));\n $temps = [20, 21, 22, 19, 19];\n $i = 0;\n // for each room set current temperature\n foreach ($this->rooms as $key => $value) {\n $this->rooms[$key][1] = $temps[$i++];\n }\n }", "function estatInputs(){\n if ($this->lli_idllibre==0) return \" \";\n else return \" disabled \";\n }", "public function verAtrilEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"ATRIL\");\n\n }", "function evt__1__entrada()\r\n\t{\r\n\t\t$this->pasadas_por_solapa[1]++;\r\n\t}", "function crtprtlx2591N($ip,$impname) {\n\t\t$connection_parameters = array(I5_OPTIONS_JOBNAME=>'I5JOB',I5_OPTIONS_INITLIBL=>'PGMCOMET',I5_OPTIONS_LOCALCP=>'UTF-8;ISO8859-1'); //i5_OPTIONS_IDLE_TIMEOUT=>120,I5_OPTIONS_LOCALCP=>'CCSID'\n\t\tif ($conn = @i5_connect ( '127.0.0.1', 'hdh', 'hdh', $connection_parameters )) {\n\t\t\t$step1 = \"CRTDEVPRT DEVD($impname) DEVCLS(*LAN) TYPE(3812) MODEL(1) LANATTACH(*IP) PORT(9100) PPRSRC1(*CONT132) PPRSRC2(*NONE) FONT(011) FORMFEED(*AUTOCUT) PRTERRMSG(*INFO) MFRTYPMDL(*LEX2391) RMTLOCNAME('$ip') SYSDRVPGM(*IBMSNMPDRV)\";\n\t\t\t$step2 = i5_command($step1);\n\t\t\t// demarrage editeur\n\t\t\t$step3 = i5_command(\"VRYCFG CFGOBJ($impname) CFGTYPE(*DEV) STATUS(*ON)\");\n\t\t\t$step4 = i5_command(\"STRPRTWTR $impname\");\n\t\t}\n\t\tif (!i5_close($conn)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $step2;\n\t}", "function getRssi()\n {\n \t$sh_args = 'getcellrssi'; \t//admin client comand for getting cellular signal strength (rssi)\n $sh_out = atsexec(escapeshellcmd($sh_args));\t//socket call\n debug('(cell_controller.inc|getRssi()) admin client api command \"getcellrssi\" output: $sh_out', $sh_out); \t\t//DEBUG\n\n if($sh_out != 'phpcmd: fail' && $sh_out != 'phpcmd: invalid command' && $sh_out != 99)\n {\n \tdebug('(cell_controller.inc|getRssi()) getcellrssi command completed.'); \t//DEBUG\n \treturn $sh_out;\n }\n else\n {\n \tdebug('(cell_controller.inc|getRssi()) getcellrssi command failed.'); \t\t//DEBUG\n \treturn false;\n \t//return 'Failed to detect cellular signal';\n }\n }", "function process_unlock_set_king($socket, $data)\n{\n if ($socket->process === true) {\n $user_id = $data;\n $player = id_to_player($user_id, false);\n if (isset($player)) {\n $player->gainPart('head', 28, true);\n $player->gainPart('body', 26, true);\n $player->gainPart('feet', 24, true);\n $player->gainPart('eHead', 28);\n $player->gainPart('eBody', 26);\n $player->gainPart('eFeet', 24);\n $player->sendCustomizeInfo();\n }\n $socket->write('{\"status\":\"ok\"}');\n }\n}", "public function beep()\n {\n }", "protected function feedback()\n\t{\n\t\tif ($this->store['feedback_percent'] == 0) {\n\t\t\treturn;\n\t\t}\n\t\t$feedback = $this->store['feedback'] * $this->config->data()['feedback'];\n\t\t$feedbackPercent = ($this->store['feedback_percent'] / $this->config->data()['feedbackPercent']);\n\t\t$score = round($feedback / $feedbackPercent);\n\t\t$this->score += $score;\n\t}" ]
[ "0.67361104", "0.63869107", "0.637268", "0.6333738", "0.6120845", "0.5998225", "0.5959989", "0.5496361", "0.5434463", "0.5425039", "0.5282447", "0.5122386", "0.50976884", "0.5015681", "0.493998", "0.490481", "0.48499358", "0.48380274", "0.48319784", "0.4820319", "0.48064438", "0.48002395", "0.4793362", "0.47776696", "0.47612098", "0.47450435", "0.47244352", "0.4713484", "0.47130346", "0.47067618", "0.46932346", "0.46809745", "0.46740776", "0.46721545", "0.46667734", "0.46622095", "0.4662011", "0.4658675", "0.46496958", "0.46494645", "0.4647577", "0.4617791", "0.4604128", "0.45927227", "0.45924795", "0.45922253", "0.4585713", "0.45791575", "0.457853", "0.45681205", "0.45598197", "0.4557511", "0.45364723", "0.45355368", "0.45341277", "0.45107508", "0.45104185", "0.4505867", "0.45048743", "0.45011818", "0.4498656", "0.44938087", "0.44889417", "0.44860676", "0.44842476", "0.4480383", "0.44753277", "0.4473496", "0.4470618", "0.44673678", "0.44647735", "0.4463217", "0.4462696", "0.4461272", "0.4460285", "0.4454226", "0.44526383", "0.4451433", "0.44435176", "0.44416", "0.44283646", "0.44271225", "0.44258174", "0.44215947", "0.44194254", "0.44189408", "0.44116935", "0.4408176", "0.4408129", "0.4407753", "0.44073585", "0.44046858", "0.44044912", "0.440222", "0.4399957", "0.43962315", "0.43938267", "0.4384958", "0.43797645", "0.43786365" ]
0.65980387
1
Fungsi untuk mengirim perintah ke serial dan mendapatkan feedbacknya
function common_serial_read($query, $dev){ //Inisialisasi serial port //Siapkan port arduino untuk bisa digunakan //common_init_serial($dev); //Sertakan library php serial untuk menggunakan fungsi //php yang mendukung komunikasi serial require_once("php_serial.class.php"); //Inisialisasi parameter serial $serial = new phpSerial(); //Alamat perangkat $serial->deviceSet($dev); //baud rate $serial->confBaudRate(9600); //Buka koneksi (tulis) $serial->deviceOpen('w+'); //kirim query (delay 1 detik) $serial->sendMessage($query,1); //baca balasan $mp = $serial->readPort(); //tutup koneksi $serial->deviceClose(); //kembalikan hasil return $mp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function common_serial_write($query, $dev){\r\n\t//Inisialisasi serial port\r\n\t//Siapkan port arduino untuk bisa digunakan\r\n\t//common_init_serial($dev);\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//Alamat perangkat\r\n\t$serial->deviceSet($dev);\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t//Buka koneksi (tulis)\r\n\t$serial->deviceOpen('w+');\r\n\t//kirim query (delay 1 detik)\r\n\t$serial->sendMessage($query,0);\r\n\t//baca balasan\r\n\t$mp = $serial->readPort();\r\n\t//tutup koneksi\r\n\t$serial->deviceClose();\r\n\t//kembalikan hasil\r\n\treturn null;\r\n}", "function common_init_serial($dev){\r\n\t//Set permission ke 777 (Read, Write, Execute) Untuk semua orang\r\n\tshell_exec('sudo chmod 777 ' . $dev);\r\n\t//Siapkan parameter komunikasi serial\r\n\tshell_exec('sudo /bin/stty -F ' . $dev . ' cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts');\t\r\n}", "function common_serial_scan() {\r\n\t//Daftar perangkat serial, untuk Linux akan dimulai dengan ttyACMx atau ttyUSBx\r\n\t$acm = \"ttyACM\";\r\n\t$usb = \"ttyUSB\";\r\n\t//Dapatkan daftar perangkat yang terhubung ke komputer\r\n\t$cmd = shell_exec('ls /dev/');\r\n\t//Cari perangkat serial yang tersedia\r\n\t//cari ACM\r\n\t$flagACM = strpos($cmd, $acm);\r\n\t//cari USB\r\n\t$flagUSB = strpos($cmd, $usb);\r\n\t\r\n\t//Buat array untuk menyimpan daftar perangkat dengan alamat serial\r\n\t//yang tersedia\r\n\t$devList = array();\r\n\t\r\n\t//Query perangkat\r\n\tif($flagACM == true){\r\n\t\t//Pisahkan nilai raw berdasarkan string acm\r\n\t\t$rawACM = explode($acm, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer ACM\r\n\t\tforeach($rawACM as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer ACM yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyACM' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif($flagUSB == true) {\r\n\t\t//Pisahkan nilai raw berdasarkan string usb\r\n\t\t$rawUSB = explode($usb, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer USB\r\n\t\tforeach($rawUSB as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer USB yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyUSB' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//Kembalikan daftar perangkat serial yang terdeteksi\r\n\treturn $devList;\r\n}", "function send_message($serial, $instruction, $addrh, $addrl, $data1, $data2, $text)\r\n{\r\n\tusleep(COMM_WAIT_BETWEEN_MESSAGES);\r\n\r\n\t$sum = ($instruction + $addrh + $addrl + $data1 + $data2) & 255;\r\n\t$message = pack(\"CCCCCCC\", $instruction, $addrh, $addrl, $data1, $data2, $sum, 13);\r\n\t$try = 0;\r\n\t$result = -1;\r\n\tdo\r\n\t{\r\n\t//\tprint($text);\r\n\t\t\r\n\t\t$serial->sendMessage($message);\r\n\t\t\r\n\t\tusleep(COMM_WAIT_RESPONSE_DELAY);\r\n\t\t\r\n\t\t$read = $serial->readPort(7);\r\n\t\t\r\n\t\tif (strlen($read) == 7)\r\n\t\t{\r\n\t\t\t$data = unpack(\"C*\", $read);\t// first item has index 1 !!!\r\n\t\t\t\r\n\t\t\tif ($data[3] == 0x99 and $data[4] == 0x99 and $data[5] == 0x99)\r\n\t\t\t{\r\n//\t\t\t\tprint(\"No data available\");\r\n\t\t\t\t$result = -2;\r\n\t\t\t}\r\n\t\t\telse if ($data[1] == 0x00 and $data[2] == 0x00 and $data[3] == 0x00 and $data[4] == 0x00 and $data[5] == 0x00)\r\n\t\t\t{\r\n//\t\t\t\tprint(\"Unit busy\");\r\n\t\t\t\t$result = -3;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$result = ($data[3] << 16) + ($data[4] << 8) + $data[5];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($result < 0 and ++$try < COMM_NR_OF_RETRIES)\r\n\t\t{\t// retry\r\n\t\t\tusleep(COMM_RETRY_DELAY);\r\n\t\t}\r\n\t} while ($result < 0 and $try < COMM_NR_OF_RETRIES);\r\n\t\r\n\treturn $result;\r\n}", "function gettemp(){\nglobal $serial;\nwhile( empty($read)){\n$serial->deviceOpen();\n$serial->sendMessage(\"4\");\n//usleep(200000);\n$read = $serial->readPort();\n$serial->deviceClose();\n}\n$read2= trim($read);\nreturn $read2;\n\n}", "function common_serial_get_connected_device($query,$pass){\r\n//Inisialisasi serial port\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t$devList = common_serial_scan();\r\n\tforeach($devList as $dev){\r\n\t\t//Siapkan port arduino untuk bisa digunakan\r\n\t\tcommon_init_serial($dev);\t\r\n\t\t//Alamat perangkat\r\n\t\t$serial->deviceSet($dev);\r\n\t\t//Buka koneksi (tulis)\r\n\t\t$serial->deviceOpen('w+');\r\n\t\t//kirim query (delay 1 detik)\r\n\t\t$serial->sendMessage($query,1);\r\n\t\t//baca balasan\r\n\t\t$mp = $serial->readPort();\r\n\t\t//tutup koneksi\r\n\t\t$serial->deviceClose();\t\r\n\r\n\t\t//cek hasil query\r\n\t\tif($mp == $pass){\r\n\t\t\t//Jika respon sama dengan query\r\n\t\t\t//kembalikan alamat perangkat terkoneksi\r\n\t\t\treturn $dev;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}", "function teleinfor ($port = \"/dev/ttyAMA0\") {\n // Resultat : liste etiquette=>valeur\n $trame_array = array();\n \n // Ouvrir le port en lecture\n $handle = fopen ($port, \"r\");\n $char = \"\";\n $contents = \"\";\n while (fread($handle, 1) != chr(2));\n do {\n $char = fread($handle, 1);\n if ($char != chr(2)) $contents .= $char;\n } while ($char != chr(2));\n\n // Fermer le port\n fclose ($handle);\n\n // Supprimer les caracteres debut/fin de trame\n $trame = substr($contents,1,-1);\n\n // Separer les messages\n $trame = explode(chr(10).chr(10), $trame);\n\n // Verifier les checksum et supprimer les trames incorrectes\n foreach ($trame as $key=>$message) {\n \n // Separer l'etiquette, la valeur et le checksum\n $message = explode (chr(32), $message, 3);\n list ($etiquette, $valeur, $checksum) = $message;\n \n // Supprimer le message si incomplet ou incorrect (checksum invalide) \n if (count($message)<3 || \n checksum($etiquette, $valeur) != $checksum \n\t\t \n\t//\t|| \n // messize($etiquette) != strlen($valeur) \n ) { \n unset($trame[$key]); \n \n } else {\n // Enregistrer le message dans la liste trame_array\n $trame_array[$etiquette] = $valeur;\n\t\t\t \n }\n }\n \n return $trame_array;\n }", "function GenerarSerial()\n\t{\n\t\t$this->Serial = CifradorCodigo::generarNumero(\n\t\tCifradorCodigo::LongitudBitsSerialMaximo\n\t\t);\n\t}", "function common_device_init(){\r\n\t//Get perangkat mekanik yang terhubung\r\n\t//Get query dan pass\r\n\t$query = \"SELECT * FROM tbl_konfigurasi\";\r\n\t$conf = mysql_fetch_assoc(mysql_query($query));\r\n\t//Reset FIFO Camera\r\n\t$file = $_SERVER['DOCUMENT_ROOT'] . '/FIFO';\r\n\tfile_put_contents($file, '');\r\n\t//Get parameter mekanik yang diambil dari database\r\n\t$query = $conf['konfigurasi_query'];\r\n\t$pass = $conf['konfigurasi_pass'];\r\n\t$pwm = $conf['konfigurasi_pwm'];\r\n\t$servoX = $conf['konfigurasi_servoX'];\r\n\t$servoY = $conf['konfigurasi_servoY'];\r\n\t$laser = $conf['konfigurasi_laser'];\r\n\t$flash = $conf['konfigurasi_flash'];\r\n\t\r\n\t$dev = common_serial_get_connected_device($query, $pass);\r\n\t//Set variabel dev menjadi variabel sesi agar mudah diakses\r\n\tif(empty($dev) || !isset($dev)){\r\n \t\t$dev = '/dev/null';\r\n\t}\r\n\t$_SESSION['dev'] = $dev;\r\n\t//Simpan alamat perangkat terhubung\r\n\t$query = sprintf(\"UPDATE tbl_konfigurasi SET konfigurasi_dev = '%s'\", mysql_real_escape_string($dev));\r\n\t//Eksekusi query\r\n\tmysql_query($query);\r\n\t//Inisialisasi perangkat agar bisa digunakan\r\n\tcommon_init_serial($dev);\r\n\t//Set parameter mekanik sebelumnya\r\n\tcommon_serial_write('m'.$servoX.'o'.$servoY.'o',$dev);\r\n\tcommon_serial_write('p'.$pwm.'o',$dev);\r\n}", "function do_read_data()\r\n{\r\n\tglobal\t$TABLE_PDU_LOG;\r\n\tglobal\t$FIELD_UNIT, $FIELD_KWH_TOTAL, $FIELD_KWH_DISPLAY, $FIELD_CURRENT, $FIELD_TEMPERATURE;\r\n\tglobal\t$a_unit, $a_temp, $a_kwhtotal, $a_kwhdisplay, $a_current;\r\n\r\n//\tprint(\"Reading...\\n\\n\");\r\n\r\n\t$db = connect_to_database();\r\n\r\n\t$serial = new phpSerial;\r\n\t$serial->deviceSet(SERIAL_PORT);\r\n\t$serial->configure();\r\n\t$serial->deviceOpen();\r\n\r\n\t// get all data from the units\r\n//\tprint(\"kWh total\\n\");\r\n\t$result = send_message($serial, 56, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read kWh total\r\n\tread_all_units($db, $serial, 56);\t\t\t\t\t\t\t\t\t\t\t\t\t// read kWh total from all units\r\n\r\n//\tprint(\"kWh display\\n\");\r\n\t$result = send_message($serial, 143, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read kWh display\r\n\tread_all_units($db, $serial, 143);\t\t\t\t\t\t\t\t\t\t\t\t\t// read kWh display from all units\r\n\r\n//\tprint(\"Current\\n\");\r\n\t$result = send_message($serial, 68, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read current\r\n\tread_all_units($db, $serial, 68);\t\t\t\t\t\t\t\t\t\t\t\t\t// read current from all units\r\n\r\n//\tprint(\"Temperature\\n\");\r\n\t$result = send_message($serial, 90, 0, 0, 0, 0, \"\");\t\t\t\t\t\t\t\t// read temperature\r\n\tread_all_units($db, $serial, 90);\t\t\t\t\t\t\t\t\t\t\t\t\t// read temperature from all units\r\n\r\n\t// store the data in the database\r\n\tfor ($i = 0; $i < count($a_unit); $i++)\r\n\t{\r\n\t\tif ($a_unit[$i] > 0)\r\n\t\t{\r\n\t\t\t$sql = \"INSERT INTO $TABLE_PDU_LOG ($FIELD_UNIT, $FIELD_KWH_TOTAL, $FIELD_KWH_DISPLAY, $FIELD_CURRENT, $FIELD_TEMPERATURE) \".\r\n\t\t\t \"VALUES ($a_unit[$i],$a_kwhtotal[$i],$a_kwhdisplay[$i],$a_current[$i],$a_temp[$i])\";\r\n\t\t\tif (!($mysql_result = mysql_query($sql))) print(mysql_error($db) .\"\\n\");\r\n\t\t}\r\n\t}\r\n\r\n\t$serial->deviceClose();\r\n\tmysql_close($db);\r\n}", "public function serial() : string;", "public function validacionserial($serial)\n {\n $query = \"select id_equipo, COUNT(*) as canti FROM `equipo` WHERE estado =1 and serial_equipo ='\" . $serial . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "public function submit() {\n if(isset($this->request->post['serial'])) {\n $this->load->model('catalog/serial');\n $validSerials = trim($this->model_catalog_serial->validSerialNOJSON($this->request->post['serial']));\n if($validSerials != 'true') {\n $errors = $validSerials;\n }\n else { \n $errors = '';\n }\n }\n else {\n $errors = 'The serial number was empty. Please submit a valid serial number.';\n } \n\n // Need to check the database for a valid serial entry.\n\n $featurecodes = substr($this->request->post['serial'],-3,3);\n $serialcode = substr($this->request->post['serial'],0,5);\n \n // Need to check to make sure that the serial has not yet been registered\n $this->load->model('account/softwareregistration');\n $exists = $this->model_account_softwareregistration->serialPurchased($serialcode, $featurecodes);\n if(!$exists) {\n if(strlen($this->request->post['serial']) != 8) {\n $errors = 'The serial number you submitted was incorrect. Please submit a valid 8 character serial number.';\n }\n else {\n $errors = 'The serial you have entered has not been purchased.';\n }\n } \n\n $registered = $this->model_account_softwareregistration->isRegistered($serialcode, $featurecodes);\n if($registered) {\n $errors = 'The serial you entered is already registered.';\n }\n\n // Compile the states listing.\n if(isset($this->request->post['states'])) {\n foreach($this->request->post['states'] as $state) {\n $states[] = $state;\n }\n\n $customer_id = $this->model_account_softwareregistration->getCustomerIDfromSerial($serialcode, $featurecodes);\n if(isset($this->request->post['states'])) { $this->model_account_softwareregistration->editCustomerPayrollStates($customer_id, $this->request->post['states']); }\n\n }\n else {\n $states = array();\n }\n \n if(isset($this->request->post['comments'])) {\n $comments = $this->request->post['comments'];\n }\n else {\n $comments = '';\n }\n\n // Serial was valid and we should be good to go.\n if($errors == '') {\n $this->model_account_softwareregistration->addRegistration($serialcode, $featurecodes, $states, $comments);\n\n if($comments != '' && isset($comments)) {\n $from = \"Software Registration <no-reply@1099-etc.com>\";\n $subject = \"Software Registration for Serial Number \" . $serialcode . $featurecodes;\n $message = \"Serial - \" . $serialcode . $featurecodes . \"\\n\\n\";\n $message .= \"Payroll States - \\n\" . implode(\", \",$states) . \"\";\n $message .= \"\\n\\nComments - \\n\" . $comments . \"\\n\";\n mail(\"registration@1099-etc.com\", $subject, $message, \"From: \" . $from . \"\\n\");\n }\n\n $this->showPage(\"Thank you for registering.\");\n// $this->redirect($this->url->link('account/account', '', 'SSL')); \n\n/*\n $getRegistration = $this->model_account_softwareregistration->showRegistration($serialcode, $featurecodes);\n $g = implode('<br />',$getRegistration);\n $this->showPage($g ,$serialcode, $states, $comments);\n*/ }\n else {\n $this->showPage($errors,$this->request->post['serial'], $states, $comments);\n }\n }", "private function set_serial($serial) {\n\t\t$this->set_region(substr($serial, 0, 2));\n\t\t$this->serial = $serial;\n\t}", "function sendFaildVer(){\n\n}", "function updateSerial($serial) {\n\t$viererString = str_split($serial,4);\n\t$zweierString = str_split($viererString[1],2);\n\t// SerialCut ist Jahr,Monat,Tag,Nummer\n\t$serialCut = array(\"Y\" => $viererString[0], \"m\" => $zweierString[0], \"d\" => $zweierString[1], \"n\" => $viererString[2]);\n\tforeach($serialCut as $type => $value) {\n\t\tif($type!=\"n\") {\n\t\t\tif($value!=strftime(\"%\".$type)) {\n\t\t\t\t$serialCut[$type]=strftime(\"%\".$type);\n\t\t\t\t$serialCut[\"n\"]=\"01\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$value++;\n\t\t\t$serialCut[\"n\"]=str_pad($value,2,0,STR_PAD_LEFT);\n\t\t}\n\t}\n\treturn $serialCut[\"Y\"].$serialCut[\"m\"].$serialCut[\"d\"].$serialCut[\"n\"];\t\n}", "function ncurses_baudrate()\n{\n}", "public function validacionserialasignado($serial)\n {\n $query = \"select COUNT(*) as cantidad FROM `equipo`\n INNER JOIN asignacion_equipo on fkID_equipo=id_equipo\n WHERE asignacion_equipo.estado =1 and fkID_equipo='\" . $serial . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "function porte1() {\n\t\tsystem (\"gpio write 21 off\");\n\t\tsleep ( 1 );\n\t\tsystem (\"gpio write 21 on\");\n\t\t}", "function setDeviceState($dserial, $state) {\n\t#$non_num_pattern = \"/[^0-9A-Z]/\";\n\t\n\t#if(preg_match($non_num_pattern, $dserial) || preg_match($non_num_pattern, $state)) {\n\t#\tdie('Non decimal character detected');\n\t#}\n\t\n\t$state = intval($state, 10);\n\t\n\tif($state == DeviceState::Off) $msg = 'off';\n\telse if($state == DeviceState::On) $msg = 'on';\n\telse die('Invalid state' . $state);\n\t\n\t$msg .= '/pi/' . $dserial;\n\t\n\t$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\tif(!$sock) die('PHP cannot create socket');\n\t\n\tif(!socket_connect($sock, SCRIPT_IP, SCRIPT_PORT)) {\n\t\tsocket_close($sock);\n\t\tdie('Cannot connect to PiHome.py ip and port at ' . SCRIPT_IP . ', ' . SCRIPT_PORT);\n\t}\n\t\n\tsocket_send($sock, $msg, strlen($msg), 0);\n\t\n\tsocket_close($sock);\n}", "function wtsCtrlSaisieForfaits($ar){\n\n $p = new XParam($ar, array('mode'=>'a'));\n $mode = $p->get('mode');\n $r = array('ok'=>1, 'errors'=>array(), 'message'=>'');\n $cards = $p->get('card');\n $chips = $p->get('CHIPID');\n $accs = $p->get('ACCNO');\n $crcs = $p->get('CRC');\n $cardlabels = $p->get('NEWCARDLabel');\n $usedcards = array();\n // lecture de l'offre\n $offresoid = $p->get('offreoid');\n $productsoid = $p->get('productoid');\n $validfroms = $p->get('validfrom');\n $validtills = $p->get('validtill');\n \n $justgrps = $p->get('justgrp');\n\n // parcours des lignes et controles\n foreach($cards as $lineid => $card){\n $card2 = substr($card, 0, 7);\n /*\n\t$card = \n\tNEWCARD_'oidproduit' = achat nouvelle carte\n\tNEWCARD'uniqid' = carte en commande issue du panier\n\tWTPCARD strictement = saisie du numéro ou copie choix depuis les cartes du compte\n\tWTPCARD'unidiq'= carte saisie sélectionnée dans le panier\n\tdonc si substr(card, 0, 7) == NEWCARD : controles sur cartes en achat \n si substr(card, 0, 7) == WTPCARD : controles sur cartes en rechargement\n */\n if ($card2 == 'WTPCARD'){\n //$wtp = sprintf(\"%s-%s-%s\", $chips[$lineid], $crcs[$lineid], $accs[$lineid]);\n $wtp = $this->modresort->formatWTPParts(array($chips[$lineid], $crcs[$lineid], $accs[$lineid]));\n // TA, SKD 01- ou 1- le reste est fait dans le module\n if (strlen($wtp) != 16 && strlen($wtp) != 25 && strlen($wtp) != 24){\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_remplirwtp');\n break;\n } else if (!isset($usedcards[$wtp])){\n $usedcards[$wtp] = 1;\n // verification du WTP\n $r2 = $this->wtsCheckWTP(array('mode'=>'r', 'b'=>0, 'chipid'=>$chips[$lineid], 'accno'=>$accs[$lineid], 'crc'=>$crcs[$lineid]));\n if ($r2['ok'] != 1){\n $r['ok'] = 0; \n\t if (isset($r2['errormess'])){\n\t $r['message'] = $r2['errormess'];\n\t } else {\n\t $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_wtpinvalide');\n\t }\n\t array_push($r['errors'], \n\t\t array(\"CHIPDID[$lineid]\", '', $lineid), \n\t\t array(\"ACCNO[$lineid]\", '', $lineid), \n\t\t array(\"CRC[$lineid]\", '', $lineid),\n\t\t array(\"WTPMASK[$lineid]\", '', $lineid)\n\t\t );\n }\n // autres controles :\n $productoid = $productsoid[$lineid];\n $offreoid = $productsoid[$lineid];\n $validfrom = $validfroms[$lineid];\n $validtill = $validtills[$lineid];\n $justgrp = $justgrps[$lineid];\n if ($r['ok'] == 1){\n $r3 = $this->localWTPCheck($wtp, $offreoid, $productoid, $justgrp, false, $validfrom, $validtill, $lineid);\n if ($r3['ok'] != 1){\n $r['ok'] = 0;\n $r['message'] = $r3['message'];\n }\n }\n if (($r['ok'] == 1 || $r['ok'] == 0 && $r['iswarn'])){\n $r41 = $this->checkProductInCaddie($wtp, $offreoid, $productoid, $validfrom, $validtill);\n if ($r41['ok'] != 1){\n $r['ok'] = 0;\n $r['iswarn'] = $r41['iswarn'];\n if ($r['iswarn']){\n if ($r['message'] == '')\n $r['message'] = $r41['message'];\n else\n $r['message'] .= \"\\n\".$r41['message'];\n } else {\n $r['message'] = $r41['message'];\n }\n }\n }\n if (($r['ok'] == 1 || $r['ok'] == 0 && $r['iswarn'])){\n\t $r4 = $this->checkProductInOrder($wtp, $offreoid, $productoid, $validfrom, $validtill);\n if ($r4['ok'] != 1){\n $r['ok'] = 0;\n $r['iswarn'] = $r4['iswarn'];\n if ($r['iswarn']){\n if ($r['message'] == '')\n $r['message'] = $r4['message'];\n else\n $r['message'] .= \"\\n\".$r4['message'];\n } else {\n $r['message'] = $r4['message'];\n }\n }\n }\n // verifier que la carte n'est pas déjà dans le panier\n // si oui que ces forfaits sont compatibles ... avec le validfrom\n }else{\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_cartesuniques');\n break;\n }\n } else if ($card2 == 'NEWCARD'){\n $wtp = $cardlabels[$lineid];\n $justgrp = $justgrps[$lineid];\n $productoid = $productsoid[$lineid];\n $validfrom = $validfroms[$lineid];\n $validtill = $validtills[$lineid];\n $r31 = $this->localWTPCheck($wtp, $offreoid, $productoid, $justgrp, true, $validfrom, $validtill, $lineid);\n if ($r31['ok'] != 1){\n $r['ok'] = 0;\n $r['message'] = $r31['message'];\n break;\n }\n if (!isset($usedcards[$wtp])){\n $usedcards[$wtp] = 1;\n }else{\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_cartesuniques');\n break;\n }\n }\n }\n // sleep(10);\n\n // si ok vérification des dates (on prend le premier produit, tous devant avoir les même caractériqiques)\n if ($r['ok'] == 1){\n $this->checkDelais($r, $productsoid, $validfroms);\n }\n\n // if ($r['ok'] == 1){\n // $r['ok'] = 0; $r['message']='tests '.$r['message'];\n // $r['iswarn'] = 1;\n // }\n\n\n // TESTS PENDNT AJOUT PANIER\n // $r = array('ok'=>1,'iswarn'=>1, 'errors'=>array('kk'), 'message'=>'PAS DE CONTROLES');\n\n\n if (count($r['errors'])>0)\n $r['ok'] = 0;\n if ($mode == 'a'){\n header('Content-Type:application/json; charset=UTF-8');\n die(json_encode($r));\n }\n return $r;\n }", "public function serch()\n {\n }", "private function emailSerialNumbers()\n {\n if (!$this->individual_purchase) {\n $subject = $this->upgrade_purchase ? \"Upgrade Confirmation\" : \"New \"\n . $this->user->getCurrentRoleName() . \" \"\n . $this->payment_method->name . \" order\";\n\n $template = $this->upgrade_purchase ? \"upgrade-confirmation.phtml\" : \"serial-numbers-multiple.phtml\";\n\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo($this->user->email)\n ->setSubject($subject)\n ->setViewParam('order', $this)\n ->setViewParam('salesEmail', false)\n ->sendHtmlTemplate($template);\n\n //Send email to fisdap-sales@fisdap.net\n if (APPLICATION_ENV != \"production\") {\n $subject = ucfirst(APPLICATION_ENV) . \" - \" . $subject;\n }\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo(\"fisdap-sales@fisdap.net\")\n ->setSubject($subject)\n ->setViewParam('order', $this)\n ->setViewParam('salesEmail', true)\n ->sendHtmlTemplate($template);\n\n // send out a seperate email to those who have accounts that are being upgraded\n if ($this->upgrade_purchase) {\n foreach ($this->order_configurations as $config) {\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo($config->upgraded_user->email)\n ->setSubject(\"Your Fisdap account has been upgraded\")\n ->setViewParam('config', $config)\n ->setViewParam('orderer', $this->user->first_name . \" \" . $this->user->last_name)\n ->sendHtmlTemplate('account-upgrade.phtml');\n }\n }\n } elseif ($this->individual_purchase) {\n $subject = $this->upgrade_purchase ? \"Upgrades to your Fisdap account\" : \"Your new Fisdap account\";\n\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo($this->email)\n ->setSubject($subject)\n ->setViewParam('order', $this)\n ->setViewParam('urlRoot', \\Util_HandyServerUtils::getCurrentServerRoot())\n ->setViewParam('salesEmail', false)\n ->sendHtmlTemplate('individual-purchase-order.phtml');\n\n //Send email to fisdap-sales@fisdap.net\n if (APPLICATION_ENV != \"production\") {\n $subject = ucfirst(APPLICATION_ENV) . \" - \" . $subject;\n }\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo(\"fisdap-sales@fisdap.net\")\n ->setSubject($subject)\n ->setViewParam('order', $this)\n ->setViewParam('urlRoot', \\Util_HandyServerUtils::getCurrentServerRoot())\n ->setViewParam('salesEmail', true)\n ->sendHtmlTemplate('individual-purchase-order.phtml');\n }\n }", "function imprimir_voucher_estacionamiento($numero,$chofer,$patente,$horainicio,$horatermino,$montototal,$comentario,$correlativopapel,$cliente,$fecha_termino,$fecha_inicio_2){\ntry {\n // Enter the share name for your USB printer here\n //$connector = null; \n //$connector = new WindowsPrintConnector(\"EPSON TM-T81 Receipt\");\n $connector = new WindowsPrintConnector(\"EPSON TM-T20 Receipt\");\n // $connector = new WindowsPrintConnector(\"doPDF 8\");\n /* Print a \"Hello world\" receipt\" */\n $printer = new Printer($connector);\n\n \n $date=new DateTime();\n $fecha = $date->format('d-m-Y');\n\n\n $Chofer = $chofer;\n $Patente = $patente;\n $serie = $numero;\n $img = EscposImage::load(\"logo1.png\");\n $printer -> graphics($img);\n \n \n $printer -> text(\"Numero : $serie\\n\");\n $printer -> text(\"Chofer : $Chofer\\n\");\n $printer -> text(\"Patente: $Patente\\n\");\n\n if ($cliente != 0) {\n include_once(\"conexion.php\");\n $con = new DB;\n $buscarpersona = $con->conectar();\n $strConsulta = \"select * from cliente where rut_cliente ='$cliente'\";\n $buscarpersona = mysql_query($strConsulta);\n $numfilas = mysql_num_rows($buscarpersona);\n $row = mysql_fetch_assoc($buscarpersona);\n $nombre_cliente = $row['nombre_cliente'];\n //var_dump($numfilas);\n if($numfilas >= 1){\n $printer -> text(\"Cliente: $nombre_cliente\\n\");\n }\n \n }\n \n if ($correlativopapel != 0) {\n $printer -> text(\"\\nCorrelativo : $correlativopapel\\n\");\n }\n $printer -> text(\"Fecha Inicio : $fecha_inicio_2\\n\");\n $printer -> text(\"Hora de inicio : $horainicio\\n\");\n\n\n\n if ($horatermino != 0) {\n $printer -> text(\"Fecha de Termino: $fecha_termino\\n\");\n $printer -> text(\"Hora de Termino : $horatermino\\n\"); \n }\n \n \n if ($montototal != 0) {\n $printer -> text('Monto total : $'.$montototal);\n }\n \n if ($horatermino != 0) {\n $printer -> text(\"\\n\");\n $printer -> text(\"\\n\\n\");\n $printer -> text(\"Firma: _________________\\n\");\n \n }\n $printer -> text(\"$comentario\\n\");\n $printer -> cut();\n /* Close printer */\n $printer -> close();\n\n echo \"<div class='alert alert-success'><strong>Impresion Correcta $comentario</strong></div>\";\n} catch (Exception $e) {\n echo \"No se pudo imprimir \" . $e -> getMessage() . \"\\n\";\n}\n}", "public function encenderPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"ON\");\n $this->setEncendidoPizarra(1);\n\n }", "public function __toString() : string\n {\n return 'Serial';\n }", "public function verRedThinkClientEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"THINK_CLIENT\");\n\n }", "public function __construct($serial)\n {\n parent::__construct($serial);\n\n $this->sound = 'Baa!';\n }", "public function ram_input($cikk =''){\n if (bothAdminSeller($_SESSION[\"jog\"])) {\n $warranity = $this->adminModel->getWarranity();\n $data = [\n 'main_title' => 'RAM-ok bevitele',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => '',\n 'socets' => $this->ramModel->ramSocets(),\n 'warr' => $warranity,\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' => '',\n 'warranity' => '',\n 'price' => '',\n 'type' => '',\n 'man_type' => '',\n 'capacity' => '',\n 'timing' => '',\n 'voltage' => '',\n 'clock' => '',\n 'kit' => '',\n 'xmp' => 0,\n 'man_url' => '',\n 'picUrl' => '',\n 'disabledIn' => '',\n 'disabledMod' => 'disabled'\n ];\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n if (isset($_POST['ram_input'])) {\n $data = [\n 'main_title' => 'RAM-ok bevitele',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => trim($_POST[\"ram_cikkszam\"]),\n 'socets' => $this->ramModel->ramSocets(),\n 'selected_socket' => trim($_POST[\"foglalat\"]),\n 'warr' => $warranity,\n 'warranity' => trim($_POST[\"warranity\"]),\n 'price' => trim($_POST[\"price\"]),\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' =>trim($_POST[\"manufacturer\"]),\n 'type' => trim($_POST[\"type\"]),\n 'man_type' => trim($_POST[\"man_type\"]),\n 'capacity' => trim($_POST[\"capacity\"]),\n 'timing' => trim($_POST[\"timing\"]),\n 'voltage' => trim($_POST[\"voltage\"]),\n 'clock' => trim($_POST[\"clock\"]),\n 'kit' => trim($_POST[\"kit\"]),\n 'xmp' => trim($_POST[\"xmp\"]),\n 'man_url' => trim($_POST[\"man_url\"]),\n 'picUrl' => trim($_POST[\"picUrl\"]),\n 'disabledIn' => '',\n 'disabledMod' => 'disabled'\n ];\n if ($this->ramModel->ramProductInput($data) && $this->ramModel->manUrl($data[\"ram_cikkszam\"],$data[\"man_url\"]) && $this->ramModel->picUrl($data[\"ram_cikkszam\"],$data[\"picUrl\"]) && $this->ramModel->priceInput($data[\"ram_cikkszam\"],$data[\"price\"])) {\n flash(\"ramInputSuccess\",\"A (\".$data[\"type\"].\") típusú RAM bevitele sikeres volt\");\n redirect(\"admins/ram_input\");\n }else{\n flash(\"ramInputFail\",\"A (\".$data[\"type\"].\") típusú RAM bevitele sikertelen volt\", \"alert alert-danger\");\n redirect(\"admins/ram_input\");\n }\n }elseif(isset($_POST[\"editRAM\"])){\n $item = $this->ramModel->ramByCikkszam($cikk);\n $data = [\n 'main_title' => $cikk.' Módosítása',\n 'cikkszam' => $cikk,\n 'ram_cikkszam' => $item->cikkszam,\n 'socets' => $this->ramModel->ramSocets(),\n 'selected_socket' => $item->tipus,\n 'warr' => $warranity,\n 'warranity' => $item->WMonth,\n 'price' => $item->ramPrice,\n 'manufacts' => $this->ramModel->manufacturers(),\n 'manufacturer' => $item->manufacturer,\n 'type' => $item->type,\n 'man_type' => $item->typeCode,\n 'capacity' => $item->capacity,\n 'timing' => $item->timing,\n 'voltage' => $item->voltage,\n 'clock' => $item->clock,\n 'kit' => $item->kit,\n 'xmp' => $item->is_xmp,\n 'man_url' => $item->Url,\n 'picUrl' => $item->picUrl,\n 'disabledIn' => 'disabled',\n 'disabledMod' => ''\n ];\n }\n elseif (isset($_POST[\"ram_modify\"])) {\n $data = [\n 'cikkszam' => $cikk,\n 'selected_socket' => trim($_POST[\"foglalat\"]),\n 'warranity' => trim($_POST[\"warranity\"]),\n 'price' => trim($_POST[\"price\"]),\n 'manufacturer' =>trim($_POST[\"manufacturer\"]),\n 'type' => trim($_POST[\"type\"]),\n 'man_type' => trim($_POST[\"man_type\"]),\n 'capacity' => trim($_POST[\"capacity\"]),\n 'timing' => trim($_POST[\"timing\"]),\n 'voltage' => trim($_POST[\"voltage\"]),\n 'clock' => trim($_POST[\"clock\"]),\n 'kit' => trim($_POST[\"kit\"]),\n 'xmp' => trim($_POST[\"xmp\"]),\n 'man_url' => trim($_POST[\"man_url\"]),\n 'picUrl' => trim($_POST[\"picUrl\"]),\n ];\n if ($this->ramModel->ramProductModify($data) &&$this->ramModel->picUrlModify($data[\"cikkszam\"], $data[\"picUrl\"]) && $this->ramModel->manUrlModify($data[\"cikkszam\"],$data[\"man_url\"]) && $this->ramModel->ramPriceModify($data[\"cikkszam\"], $data[\"price\"]))\n {\n flash('ramModifySuccess','A ('.$data[\"type\"].' '.$data[\"typeCode\"].') Módosítása sikeres volt!');\n redirect(\"admins/ram_input\");\n }else{\n flash(\"ramModifyFail\", 'A ('.$data[\"type\"].' '.$data[\"typeCode\"].') Módosítása sikertelen volt!', 'alert alert-danger');\n redirect(\"admins/ram_input\");\n }\n } \n \n }\n $this->view('admin/ram_input',$data);\n }else{\n redirect('index');\n }\n \n }", "function send_complaint()\n\t{\n\t\t\t//?=usercode=12&complaint_code=1&description=hello sir\n\t\t \t$user_dt = $this->ObjM->get_user_by_usercode($_REQUEST['usercode']);\n\t\t\t\n\t\t\t$data['send_status'] \t\t= \t($user_dt[0]['user_type_id']=='2')? \"1\" : \"0\";\n\t\t\t$data['complaint_code']\t\t=\t$_REQUEST['complaint_code'];\n\t\t\t$data['description']\t\t=\t$_REQUEST['description'];\n\t\t\t$data['timedt']\t\t\t\t=\ttime();\n\t\t\t$id\t\t=\t$this->ObjM->addItem($data,'complaint_detail');\n\t\t\t$res\t=\tarray();\n\t\t\t$result[0]['validation']='true';\n\t\t\techo json_encode($result);\n\t}", "public function apagarPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"OFF\");\n $this->setEncendidoPizarra(0);\n\n }", "function MonitorListe_weiterenParameterHolen($ETA_ComID)\r\n {\r\n $MonitorListeWeiter =\"{MA\";\r\n \r\n If (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 0) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(02) . chr(01) . chr(01); //Standard\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 1) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(03) . chr(01) . chr(02); //Service\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 2) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(04) . chr(01) . chr(03); //Profi\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 3) {\r\n \t$MonitorListeWeiterBytes = chr(02) . chr(05) . chr(01) . chr(04); //Expert\r\n\t\t}\r\n\t\t$MonitorListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n\t\t$Daten = $MonitorListeWeiter . $MonitorListeWeiterBytes . $MonitorListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "public function sendTest()\n\t{\n\t\t$id = Input::get('device');\n\t\t$device = Device::find($id);\n\t\t$lock = cURL::post('http://localhost:3000/send',['name' => $device->tcpName,'data' => '**,imei:'.$device->imei.',L']);\n if($lock->statusCode != 200){\n return json_encode(array('text' => 'Error','msg' => 'Hubo un Error de Comunicacion con el Dispositivo, Porvafor Comuniquese con el Servicio Tecnico (Error Code #03)','type' => 'status'));\n }\n sleep(10);\n $data = Data::join('datatypes','datatypes.id','=','data.datatypes_id')->where('datatypes.name','lt')->orderBy('data.id', 'DESC')->take(1)->select('data.created_at')->get()->first();\n if((time()-strtotime($data->created_at)) <10){\n $unlock = cURL::post('http://localhost:3000/send',['name' => $device->tcpName,'data' => '**,imei:'.$device->imei.',M']);\n if($unlock->statusCode != 200){\n return json_encode(array('text' => 'Error','msg' => 'Hubo un Error de Comunicacion con el Dispositivo, Porvafor Comuniquese con el Servicio Tecnico (Error Code #03)','status' => 'error'));\n }\n sleep(10);\n $data = Data::join('datatypes','datatypes.id','=','data.datatypes_id')->where('datatypes.name','mt')->orderBy('data.id', 'DESC')->take(1)->select('data.created_at')->get()->first();\n if((time()-strtotime($data->created_at)) <10) {\n return json_encode(array('text' => 'Exitosa','msg' => 'Prueba Ejecutada Correctamente','status' => 'success'));\n }\n else{\n return json_encode(array('text' => 'Error','msg' => 'Hubo un Error al Consultar por el Estado del dispositivo, Porvafor Comuniquese con el Servicio Tecnico (Error Code #02)','status' => 'error'));\n }\n }\n else{\n return json_encode(array('text' => 'Error','msg' => 'Hubo un Error al Consultar por el Estado del dispositivo, Porvafor Comuniquese con el Servicio Tecnico (Error Code #01)','status' => 'error'));\n }\n\t}", "protected function readDevice()\n {\n $trame = '';\n $i=0;\n while (strlen($trame)==0 && $i < 3) {\n $trame = $this->readTrame();\n $i++;\n }\n\n echo date('Y-m-d H:i:s T').\" Read attempt : \".$i.\" for \".strlen($trame).\" octet(s)\\n\";\n\n $trame = chop(substr($trame, 1, -1)); // on supprime les caracteres de debut et fin de trame\n\n $messages = explode(chr(10), $trame); // on separe les messages de la trame\n $new = [];\n foreach ($messages as $msg) {\n $ligne = explode(' ', $msg, 3);\n if (count($ligne)<2) {\n continue;\n }\n $new[$ligne[0]] = $ligne[1];\n }\n return $new;\n }", "public function checkSlotWriting() {\n $writeSlot = 1;\n foreach($this->decission as $item) {\n if($item === 0) {\n $writeSlot = 0;\n }\n }\n if($writeSlot == 1 AND $this->nextStation->sendToAllAtOnce == 0) {\n $this->checkForNewSlot($this->nextStation->workflow_slot_id);\n }\n else {\n $this->nextStation->checkSendToAllAtOnce();\n }\n }", "public function vendorNotesSuccess($form){ \n $session = $this->hlp->sess(\"listing\");\n $date_ordered = date(\"j. n. Y\"); \n $buyer = $this->hlp->logn();\n $status = \"pending\";\n $buyer_notes = $form->getValues(TRUE)['notes'];\n $final_price = $session->finalPriceBTC;\n $czk_price = $session->finalPriceCZK;\n $quantity = $session->postageDetails['quantity'];\n $postage = $session->postageDetails['postage']; \n $product_name = $session->listingDetails['product_name'];\n $listing_id = $session->listingDetails->id;\n $author = $this->listings->getAuthor($listing_id);\n $FE = \"no\"; //$this->listings->isListingFE($listingID) ? \"yes\" : \"no\";\n \n //save order to DB and do BTC transactions\n //only if balance is sufficient\n // if ($this->wallet->balanceCheck($buyer, $price)){\n \n //unset unneccessary vars and assemble arg array\n //from these that remains\n unset($form, $session);\n $arguments = $this->orders->asArg(get_defined_vars());\n \n //and write new order to database\n $order_id = $this->orders->saveToDB($arguments);\n \n $con = $this->converter;\n\n //value that seller will receive and market profit\n $commisioned = $con->getCommisioned($final_price);\n $marketProfit = $con->getMarketProfit($final_price);\n $wallet = $this->wallet;\n \n //save and transact market profit\n $wallet->moveAndStore(\"saveprofit\", $buyer, \"profit\", $marketProfit, $order_id);\n \n //move funds and store trasactions into db\n if($FE == \"no\"){ \n //escrow branch\n $wallet->moveAndStore(\"pay\", $buyer, \"escrow\", $commisioned, $order_id, \"yes\");\n $this->flashMessage(\"Operace proběhla úspěšně. Platba je bezpečně uložena v Escrow.\"); \n // $this->redirect('Orders:in');\n }\n \n if ($FE == \"yes\"){ \n //FE - immediately transfer funds and redirect user to feedback\n $this->orders->finalize($order_id);\n $wallet->moveAndStore(\"pay\", $buyer, $author, $commisioned, $order_id, \"no\");\n $this->flashMessage(\"Finalize Early - Platba převedena na vendorův účet.\");\n $this->flashMessage(\"Zanechte feedback - Můžete později změnit ve Vašich objednávkách.\");\n $this->redirect(\"Orders:Feedback\", $order_id);\n }\n /* \n } else {\n $this->flashMessage(\"Něco se pokazilo. Prosím kontaktujte administrátora.\");\n $this->redirect(\"Orders:in\");\n } */\n }", "function my_hook_monitor_function($keyword, $params)\n{\n global $app_name, $app_version, $nama_modem;\n global $my_kembali_sms_format, $my_kembali_sms_sample;\n // Sometime, you don't need to reply SMS from non-user number,\n // such as SMS from Service Center, message center, \n // or promotional SMS:\n $valid_param_count = 5;\n // pre( $params);\n // return true;\n if (strlen($params['sender'])<=6) {\n return true;\n }\n else\n {\n if (count($params['params'])!=$valid_param_count){\n sms_send($params['sender'], '1/2. SMS tidak valid. Jumlah parameter data harus '.$valid_param_count.'.', $nama_modem);\n sms_send($params['sender'], '2/2. Format SMS: '.$my_monitor_sms_format, $nama_modem);\n sms_send($params['sender'], '3/2. Contoh SMS: '.$my_monitor_sms_sample, $nama_modem);\n }\n else\n {\n $kode_pinjam = strtoupper($params['params'][1]);\n // cek kode pinjam, jika ID = 0, berarti kode pinjam tidak valid:\n $id_pinjam = fetch_one_value(\"select coalesce( (\n select UUID_SHORT() id from inkubator_pinjam p where upper(p.kode_pinjam) = '$kode_pinjam'\n and p.status_pinjam = 'Disetujui' \n ),0) as id\");\n if ($id_pinjam == 0)\n {\n sms_send($params['sender'], 'Kode Pinjam tidak ditemukan: '.$kode_pinjam.'.', $nama_modem); \n } \n else\n { \n // proses SMS dan insert ke table `inkubator_kembali`:\n // Sample: KEMBALI*323431-353131-35*30*3.60*SEHAT;\n $p_pjg = trim($params['params'][ 2]);\n $p_berat = trim($params['params'][ 3]);\n $p_kondisi = strtoupper(trim($params['params'][ 4])); \n // cek tangal, panjang dan berat apakah formatnya sesuai atau tidak.\n // $p_validate_tgl = '/^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4}$/'; // dd/mm/yyyy\n $p_validate_pjg = '/^[0-9]{1,2}+([\\,\\.][0-9]{1,2})?$/'; // max2digits[.,]max2digits\n if (!preg_match($p_validate_pjg, $p_pjg))\n {\n sms_send($params['sender'], 'Maaf. Panjang bayi saat kembali salah. Contoh panjang bayi: 31.5', $nama_modem);\n }\n else\n if (!preg_match($p_validate_pjg, $p_berat))\n {\n sms_send($params['sender'], 'Maaf. Berat bayi saat kembali salah. Contoh berat bayi: 3,12', $nama_modem);\n }\n else\n if (($p_kondisi!='SEHAT') && ($p_kondisi!='SAKIT'))\n {\n sms_send($params['sender'], 'Maaf. Kondisi bayi salah. Harus SEHAT atau SAKIT.', $nama_modem);\n }\n else\n {\n // process tgl, berat & panjang:\n // xx/yy/xxxx\n $p_skor = ($p_kondisi=='SEHAT'?1:0);\n $p_berat = str_replace(',','.', $p_berat);\n $p_pjg = str_replace(',','.', $p_pjg);\n // all set! save it to database.\n $sub_mon_sql = \"insert into inkubator_monitoring \n \t\t(id, kode_pinjam, tgl_input, panjang_bayi, berat_bayi, kondisi, skor, keterangan)\n \t values\n \t\t(UUID_SHORT(), '$kode_pinjam', CURRENT_TIMESTAMP(), $p_pjg, $p_berat, '$p_kondisi', $p_skor,\n \t\tconcat('Data monitoring ', (select p.nama_bayi from inkubator_pinjam p where p.kode_pinjam = '$kode_pinjam'))\n \t );\";\n /*\n $f = fopen('d:/test-.txt','w');\n fputs($f, $save_sql);\n fputs($f, $sub_mon_sql);\n fclose($f);\n */ \n if (exec_query($sub_mon_sql))\n {\n sms_send($params['sender'], 'Data monitoring telah diterima.', $nama_modem);\n }\n else\n {\n sms_send($params['sender'], 'Maaf, server sedang sibuk. Cobalah beberapa saat lagi.', $nama_modem);\n } \n } \n }\n }\n return true;\n } \n}", "function ajaxMotDePasse($ar){\n $p = new XParam($ar, array());\n $message = $this->modcustomer->sendNewPassword($ar);\n die($message);\n }", "private function send_msg() {\r\n }", "public function add_code($serial_no){\r\n $insert_code = \"INSERT INTO confirmation(serial_no,status)VALUES('$serial_no','0')\";\r\n $insert_query = $this->conn->query($insert_code);\r\n header('Location:confirmation_code.php');\r\n }", "function DENON_InputSource($id, $value) // Input Source\n{\n CSCK_SendText($id, \"SI\".$value.chr(13));\n}", "function eis_device_signal($calldata) {\n\tglobal $eis_conf,$eis_dev_conf,$eis_dev_status;\n\t$callparam=$calldata[\"param\"];\n\tswitch ($calldata[\"cmd\"]) {\n\n\t\tdefault:\n\t\t\t// manage unknown command\n\t\t\teis_log(1,\"system:unknownSignal --> \".$calldata[\"cmd\"]);\n\t}\n}", "function ParameterHolenSTOPP($ETA_ComID)\r\n {\r\n $ParameterListeEnde = \"{MO\";\r\n $ParameterListeEndeBytes = chr(01) . chr(01);\r\n $ParameterListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n $Daten = $ParameterListeEnde . $ParameterListeEndeBytes . $ParameterListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "public function get_data($serial = '')\n {\n\n $out = array();\n $temp = array();\n if (! $this->authorized()) {\n $out['error'] = 'Not authorized';\n } else {\n $bluetooth = new bluetooth_model;\n foreach ($bluetooth->retrieve_records($serial) as $prefs) {\n $temp[] = $prefs->rs;\n }\n foreach ($temp as $value) {\n $out[$value['device_type']] = $value['battery_percent'];\n }\n }\n\n $obj = new View();\n $obj->view('json', array('msg' => $out));\n }", "public function userAskToBeNotified(){\n// $message = new Message();\n// $message->setHeure(\"19h50\");\n// $message->setVille(\"TO\");\n// $message->setStatue(\"Retart\");\n// $message->setPhoneNumber(\"+15143468023\");\n// $message->setMessage(\"Salut je fait un test\");\n// $messagemodel->sendSMS($message);\n $arryNotif [0]= $_POST[\"vol\"];\n $arryNotif[1] = $_POST[\"phone\"];\n $arryNotif[2] = $_POST[\"date\"];\n $arryNotif[3] = $_POST[\"status\"];\n $notifDAO = new NotifyDAO();\n $notifDAO->create($arryNotif);\n\n }", "function wtsProPaiement($ar){\n $p = new XParam($ar, array());\n $orderoid = $p->get('orderoid');\n // verification du client de la commande et du compte connecte\n list($okPaiement, $mess) = $this->paiementEnCompte($orderoid);\n if (!$okPaiement){\n XLogs::critical(get_class($this), 'paiement pro refusé '.$orderoid.' '.$mess);\n XShell::setNext($GLOBALS['TZR_SESSION_MANAGER']::complete_self(true, true).'&alias='.$this->aliasvente.'&moid='.$this->_moid.'&function=wtsLireOffres');\n return;\n }\n // traitement post commande std\n clearSessionVar('caddie');\n XLogs::critical(get_class($this), 'enregistrement paiement en compte '.$orderoid);\n // traitement standards après validation\n $this->postOrderActions($orderoid, true);\n\n // traitement post order - devrait être dans postOrderActions\n $this->proPostOrderActions($orderoid);\n\n // retour \n if (defined('EPL_ALIAS_PAIEMENT_ENCOMPTE')){\n XShell::setNext($GLOBALS['TZR_SESSION_MANAGER']::complete_self().'alias='.EPL_ALIAS_PAIEMENT_ENCOMPTE);} else {\n XShell::setNext($GLOBALS['TZR_SESSION_MANAGER']::complete_self(true, true).'&alias='.$this->aliasvente.'&moid='.$this->_moid.'&function=wtsLireOffres');\n }\n }", "public function vga_input($cikkszam = ''){\n if (bothAdminSeller($_SESSION['jog'])) {\n $pciSlots = [\n 'PCI-E 16x 2.0',\n 'PCI-E 16x 3.0',\n 'PCI-E 16x 4.0'\n ];\n $vramCap = [\n 1,2,3,4,5,6,8,11,24\n ];\n $warranity = $this->adminModel->getWarranity();\n $manufacturers = $this->vgaModel->getVgaManufacturers();\n $data = [\n 'main_title' => 'VGA bevitele',\n 'cikkszam' => $cikkszam,\n 'manufacturers' => $manufacturers,\n 'selected_man' => '',\n 'warranity' => $warranity,\n 'vramCap' => $vramCap,\n 'pciSlots' => $pciSlots,\n 'selected_warr' =>'',\n 'price' => '',\n 'vga_stock' => '',\n 'picUrl' => '',\n 'man_url' => '',\n 'type' => '',\n 'typeCode' => '',\n 'vga_man' =>'',\n 'pci_type' => '',\n 'gpu_clock' => '',\n 'gpu_peak' => '',\n 'vram_capacity' => '',\n 'vram_clock' => '',\n 'vram_type' => '',\n 'vram_bandwidth' => '',\n 'power_consumption' => '',\n 'power_pin' => '',\n 'directX' => '',\n 'displayPort' => '',\n 'DVI' => '',\n 'HDMI' => '',\n 'disabledIn' => '',\n 'disabledModify' => 'disabled'\n ];\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n if (isset($_POST['vgaInput'])) {\n $data = [\n 'main_title' => 'VGA bevitele',\n 'cikkszam' => trim($_POST['cikkszam']),\n 'manufacturers' => $manufacturers,\n 'selected_man' => trim($_POST['selected_man']),\n 'warranity' => $warranity,\n 'vramCap' => $vramCap,\n 'pciSlots' => $pciSlots,\n 'selected_warr' => trim($_POST['selected_warr']),\n 'price' => trim($_POST['price']),\n 'vga_stock' => trim($_POST['vga_stock']),\n 'picUrl' => trim($_POST['picUrl']),\n 'man_url' => trim($_POST['man_url']),\n 'type' => trim($_POST['type']),\n 'typeCode' => trim($_POST['typeCode']),\n 'vga_man' => trim($_POST['vga_man']),\n 'pci_type' => trim($_POST['pci_type']),\n 'gpu_clock' => trim($_POST['gpu_clock']),\n 'gpu_peak' => trim($_POST['gpu_peak']),\n 'vram_capacity' => trim($_POST['vram_capacity']),\n 'vram_clock' => trim($_POST['vram_clock']),\n 'vram_type' => trim($_POST['vram_type']),\n 'vram_bandwidth' => trim($_POST['vram_bandwidth']),\n 'power_consumption' => trim($_POST['power_consumption']),\n 'power_pin' => trim($_POST['power_pin']),\n 'directX' => trim($_POST['directX']),\n 'displayPort' => trim($_POST['displayPort']),\n 'DVI' => trim($_POST['DVI']),\n 'HDMI' => trim($_POST['HDMI']),\n 'disabledIn' => '',\n 'disabledModify' => 'disabled'\n ];\n try{\n if ($this->adminModel->VGAInput($data) && $this->adminModel->VGAManUrlInput($data['cikkszam'],$data['man_url']) && $this->adminModel->VGAPicUrlInput($data['cikkszam'],$data['picUrl']) && $this->adminModel->VGAPriceInput($data['cikkszam'],$data['price']) && $this->adminModel->VGAStockInput($data['cikkszam'],$data['vga_stock'])) {\n flash('input_success','A '.$data['type'].' Termék bevitele sikeres volt');\n redirect('admins/vga_input');\n }else {\n flash('input_fail','A '.$data['type'].' Termék bevitele sikertelen volt!!', 'alert alert-danger');\n redirect('admins/vga_input');\n }\n }catch(PDOException $ex){\n flash('input_fail',$ex->getMessage(), 'alert alert-danger');\n redirect('admins/vga_input');\n }\n } elseif(isset($_POST['editVGA'])){\n $vgaByCikk = $this->vgaModel->getVgaByCikkszam($cikkszam);\n $data = [\n 'main_title' => 'VGA bevitele',\n 'cikkszam' => $cikkszam,\n 'manufacturers' => $manufacturers,\n 'vramCap' => $vramCap,\n 'pciSlots' => $pciSlots,\n 'selected_man' => $vgaByCikk->manufacturer_id,\n 'warranity' => $warranity,\n 'selected_warr' => $vgaByCikk->warr_id,\n 'price' => $vgaByCikk->price,\n 'vga_stock' => $vgaByCikk->vga_stock,\n 'picUrl' => $vgaByCikk->picUrl,\n 'man_url' => $vgaByCikk->Url,\n 'type' => $vgaByCikk->type,\n 'typeCode' => $vgaByCikk->typeCode,\n 'vga_man' => $vgaByCikk->vga_man,\n 'pci_type' => $vgaByCikk->pci_type,\n 'gpu_clock' => $vgaByCikk->gpu_clock,\n 'gpu_peak' => $vgaByCikk->gpu_peak,\n 'vram_capacity' => $vgaByCikk->vram_capacity,\n 'vram_clock' => $vgaByCikk->vram_clock,\n 'vram_type' => $vgaByCikk->vram_type,\n 'vram_bandwidth' => $vgaByCikk->vram_bandwidth,\n 'power_consumption' => $vgaByCikk->power_consumption,\n 'power_pin' => $vgaByCikk->power_pin,\n 'directX' => $vgaByCikk->directX,\n 'displayPort' => $vgaByCikk->displayPort,\n 'DVI' => $vgaByCikk->DVI,\n 'HDMI' => $vgaByCikk->HDMI,\n 'disabledIn' => 'disabled',\n 'disabledModify' => ''\n ];\n }elseif(isset($_POST['vgaModify'])){\n $data = [\n 'cikkszam' => $cikkszam,\n 'selected_man' => trim($_POST['selected_man']),\n 'selected_warr' => trim($_POST['selected_warr']),\n 'price' => trim($_POST['price']),\n 'vga_stock' => trim($_POST['vga_stock']),\n 'picUrl' => trim($_POST['picUrl']),\n 'man_url' => trim($_POST['man_url']),\n 'type' => trim($_POST['type']),\n 'typeCode' => trim($_POST['typeCode']),\n 'vga_man' => trim($_POST['vga_man']),\n 'pci_type' => trim($_POST['pci_type']),\n 'gpu_clock' => trim($_POST['gpu_clock']),\n 'gpu_peak' => trim($_POST['gpu_peak']),\n 'vram_capacity' => trim($_POST['vram_capacity']),\n 'vram_clock' => trim($_POST['vram_clock']),\n 'vram_type' => trim($_POST['vram_type']),\n 'vram_bandwidth' => trim($_POST['vram_bandwidth']),\n 'power_consumption' => trim($_POST['power_consumption']),\n 'power_pin' => trim($_POST['power_pin']),\n 'directX' => trim($_POST['directX']),\n 'displayPort' => trim($_POST['displayPort']),\n 'DVI' => trim($_POST['DVI']),\n 'HDMI' => trim($_POST['HDMI']),\n ];\n if ($this->vgaModel->updateVgaProduct($data) && $this->vgaModel->updateVgaManUrl($data['cikkszam'], $data['man_url']) && $this->vgaModel->updateVgaPicUrl($data['cikkszam'], $data['picUrl']) && $this->vgaModel->updateVgaPrice($data['cikkszam'], $data['price']) && $this->vgaModel->updateVgaStockpile($data['cikkszam'], $data['vga_stock'])) {\n flash('modify_success','A '.$data['type'].' Termék módosítása sikeres volt');\n redirect('admins/vga_input');\n }else {\n flash('modify_fail','A '.$data['type'].' Termék módosítása sikertelen volt!!', 'alert alert-danger');\n redirect('admins/vga_input');\n }\n /**\n * TEENDŐK:\n * -ellenőrizni, hogy készleten vannak-e atermékek, illteve csőkkenteni a termék \n * számát\n * - MEGOLDANI, hogy a vásárlásaim tábla reponsive legyen\n * - ESETLEG betteni a pdf-et mediumBLOB-ba a DB-be NEM!!!\n * - AZ ADMINBÓL áttenni az input/modify/delete functionokat a hozzá tartozó\n * termék model-jébe\n */\n }\n }\n $this->view('admin/vga_input',$data);\n }else{\n redirect('index');\n }\n }", "function fermerToutesPortes(){\n\t\tfor ( $i = 25 ; $i <= 28 ; $i++ ) {\n\t\t$gpio=$i-4;\n\t\t$porte = system ( \"gpio read \".$i);\n\t\tif ($porte == \"0\"){\n\t\t\t\tsystem (\"gpio write \". $gpio .\" off\");\n\t\t\t\tsleep ( 1 );\n\t\t\t\tsystem (\"gpio write \". $gpio .\" on\");\n\t\t\t}\n\n\t\t}\n\t}", "function Parameter_Liste_weiterenParameterHolen($ETA_ComID)\r\n {\r\n $ParameterListeStart =\"{MF\";\r\n\r\n\t\t\tIf (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 0) {\r\n \t$ParameterListeStartBytes = chr(02) . chr(02) . chr(01) . chr(01); //Standard\r\n\t } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 1) {\r\n \t$ParameterListeStartBytes = chr(02) . chr(03) . chr(01) . chr(02); //Service\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 2) {\r\n\t\t\t \t$ParameterListeStartBytes = chr(02) . chr(04) . chr(01) . chr(03); //Profi\r\n } else if (GetValueInteger(GetObjectID(\"ETA/Setup/Einstellungen/Berechtigungs Stufe\")) == 3) {\r\n \t\t\t \t$ParameterListeStartBytes = chr(02) . chr(05) . chr(01) . chr(04); //Expert\r\n\t\t\t}\r\n $ParameterListeEndZeichen = \"}\";\r\n //Zusammensetzen\r\n $Daten = $ParameterListeStart . $ParameterListeStartBytes . $ParameterListeEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "public function send_registration_feedback()\n {\n // Get parameters.\n $admin_account = $this->GABIA_SMS_API->getAdminAccount();\n\n // From contact form.\n $email = $_POST['email'];\n $tel = $_POST['tel'];\n $course_title = $_POST['course_title'];\n $name = $_POST['name'];\n $amount = $_POST['amount'];\n\n wp_mail($email, '[어벤져스쿨] 성공적으로 강연 등록이 완료되었습니다.',\n '강의 제목: ' . $course_title . \"\\n\" .\n '수강자 이름: ' . $name . \"\\n\" .\n '결제 금액: ' . $amount . \"\\n\" .\n $admin_account . \"\\n\" .\n '입급 전 정원 초과시 자동 취소되오니 빠른 결제 부탁드립니다.' . \"\\n\" .\n '- 어벤져스쿨.');\n $message = '<' . $course_title . '> 강연 등록이 완료되었습니다. 입급 전 정원 초과시 자동 취소되오니 빠른 결제 부탁드립니다. - 어벤져스쿨';\n $this->sendSms($tel, $message, '무통장입금');\n }", "function SendDataToBankForCharging() {\n\t\n\t$c = $_POST[\"chckbx_succeed_with_payment\"];\n\t$success = $c == \"on\";\n\treturn $success;\t\n\t\n}", "public function get_data($serial_number = '')\n {\n $obj = new View();\n if (! $this->authorized()) {\n $obj->view('json', array('msg' => 'Not authorized'));\n return;\n }\n $power = new Power_model($serial_number);\n $temp_format = conf('temperature_unit');\n $power->rs['temp_format'] = $temp_format; // Add the temp format for use in the client tab's JavaScript \n $obj->view('json', array('msg' => $power->rs));\n }", "public function enviarNumero( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\", \"MARCADO\",$this->getNumeroIP());\n $this->enviarPeticion($cmd->getComando());\n\n }", "public function serial() {\n\t\tif(is_null($this->serial))\n\t\t\tthrow new DataAuthenticatorException('Unable to find a valid serial');\n\t\treturn $this->serial;\n\t}", "public function sendActivation()\n\t{\n\t}", "public function confirmation(): void {\n $this->writeData($this->token);\n }", "function getDatatoSend($type, $ext, $metering_ID, $time_interval, $unit, $factor, $timelastsend, $DeviceID){\n\t\n\t$timestamp_now = time();\n\t//echo $timestamp_now.\"<br>\";\n\t$diff_time = $timestamp_now - $timelastsend;\n\t$time_interval_seconds = $time_interval * 60;\n\t//echo $diff_time.\"<br>\";\n\tif ($diff_time >= $time_interval_seconds)\n\t{\n\t\t$type_split = explode(\"_\",$type);\n\t\n\t\t$PT1000 = new PT1000();\n\t\t$AIN = new AIN();\n\t\t$GPIO = new GPIO();\n\t\t$AOUT = new AOUT();\n\t\t$HUMIDITY = new HUMIDITY();\n\n\t\tswitch (trim($type_split[0])){\n\t\tcase \"DigiOUT\":\n\t\t\t$value_metering = $GPIO->getOutSingle($type_split[1]);\n\t\t\tbreak;\n\t\tcase \"DigiIN\":\n\t\t\t$value_metering = $GPIO->getInSingle($type_split[1]);\n\t\t\tbreak;\n\t\tcase \"AIN\":\n\t\t\t$value_metering = $AIN->getAIN($type_split[1], $ext);\n\t\t\t$value_metering = $value_metering * $factor;\n\t\t\tbreak;\n\t\tcase \"AOUT\":\n\t\t\t$value_metering = $AOUT->getAOUT($type_split[1], $ext);\n\t\t\t$value_metering = $value_metering * $factor;\n\t\t\tbreak;\n\t\tcase \"PT1000\":\n\t\t\t$value_metering = $PT1000->getPT1000($type_split[1], $ext);\n\t\t\t$value_metering = $value_metering * $factor;\n\t\t\tbreak;\n\t\tcase \"HUMIDITY\":\n\t\t\tif($type_split[1] == 0){ \n\t\t\t\t$value_metering = $HUMIDITY->getHUMIDITY($ext);\n\t\t\t\t$value_metering = $value_metering * $factor;\n\t\t\t}\n\t\t\telse if ($type_split[1] == 1){\n\t\t\t\t$value_metering = $HUMIDITY->getTemperature_C($ext);\n\t\t\t\t$value_metering = $value_metering * $factor;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\t$timestamp = time();\n\n\t\t$metering_array = array($DeviceID, $metering_ID, trim($value_metering), $timestamp, $unit);\n\t} else {\n\t\t$metering_array = null;\n\t}\n\n\treturn $metering_array;\n}", "public function main()\n {\n $sms = $this->SmsService->smsList();\n $sendId= [];\n $cnt = count($sms);\n $this->log(\"Send Message count \".$cnt,'debug');\n if($cnt>0){\n $refKey = \"FCCTV\".time();\n $api = new gabiaSmsApi('brickcommerce','6caf388099c1c8f8a782dfa57534b1dc');\n\n foreach($sms as $key => $info){\n try{\n //$sendId[]=$info->id;\n $r = $api->sms_send($info->recv_phone_number, \"070-5015-6383\",$info->message,$refKey);\n\n if ($r == gabiaSmsApi::$RESULT_OK)\n {\n $this->log(\"Send Message \".$info->id.\" : number : \".$info->recv_phone_number. \" : \" . $api->getResultMessage() . \"이전 : \" . $api->getBefore() . \" : 이후 : \" . $api->getAfter(),'debug');\n $this->SmsService->smsSendUpdate($info->id);\n }\n\n //$this->log(\"Send Message \".$info->id.\" : number : \".$info->recv_phone_number,'debug');\n }catch (Exception $e){\n $this->log($e->getMessage(),'error');\n }\n\n }\n\n $result = $api->get_status_by_ref($refKey);\n $this->log(\"CODE : \".$result[\"CODE\"].\"::::::MESG : \".$result[\"MESG\"],'debug');\n\n }\n }", "function Parameter_Index_Liste_weiterenParameterHolen($ETA_ComID)\r\n {\r\n $ParameterListeIndexStart =\"{MH\";\r\n \t\t\t$ParameterListeIndexStartBytes = chr(01) . chr(01) . chr(01);\r\n $ParameterListeIndexEndZeichen = \"}\";\r\n //Zusammensetzen\r\n $Daten = $ParameterListeIndexStart . $ParameterListeIndexStartBytes . $ParameterListeIndexEndZeichen;\r\n //ComPort_SendText($ETA_ComID, $Daten);\r\n CSCK_SendText($ETA_ComID, $Daten);\r\n }", "function get_seq_account_saving_no()\n\t{\n\t\t$product_code=$this->input->post('product_code');\n\t\t$cif_no=$this->input->post('cif_no');\n\t\t$data=$this->model_transaction->get_seq_account_saving_no($product_code,$cif_no);\n\t\t$jumlah=(int)$data['jumlah'];\n\t\tif(count($data)>0){\n\t\t\t$newseq=$jumlah+1;\n\t\t\tif($jumlah<10){\n\t\t\t\t$newseq='0'.$newseq;\n\t\t\t}\n\t\t}else{\n\t\t\t$newseq='01';\n\t\t}\n\t\t$return=array('newseq'=>$newseq);\n\t\techo json_encode($return);\n\t}", "function evt__procesar(){\n $m = $this->dep('datos')->tabla('mesa')->get();\n $p = array_search('junta_electoral', $this->s__perfil);\n if($p !== false){//Ingreso con perfil junta_electoral\n $m['estado'] = 3;//Cambia el estado de la mesa a Confirmado\n }\n else{\n $p = array_search('secretaria', $this->s__perfil);\n if($p !== false){//Ingreso con perfil secretaria\n $m['estado'] = 4;//Cambia el estado de la mesa a Definitivo\n }\n else{\n $p = array_search('autoridad_mesa', $this->s__perfil); \n if($p !== false){//Ingreso con perfil autoridad de mesa\n $m['estado'] = 1;//Cambia el estado de la mesa a Cargado\n }\n }\n }\n $this->dep('datos')->tabla('mesa')->set($m);\n// print_r($m['id_mesa']);\n $this->dep('datos')->tabla('mesa')->sincronizar();\n $this->dep('datos')->tabla('mesa')->resetear();\n \n \n if(isset($this->s__retorno)){//debe retornar a confirmar\n if($this->s__retorno_estado=='')\n $dato = true;\n else\n $dato['f'] = $this->s__retorno_estado;\n toba::vinculador()->navegar_a(\"\",$this->s__retorno,$dato); \n $this->s__retorno = null; \n $this->s__id_mesa = null;\n $this->s__retorno_estado = null;\n }\n }", "public function reportaproblem() {\n // Fetch the request data in JSON format and convert it into object\n $request_data = $this->request->input('json_decode');\n switch (true) {\n // When request is not made using POST method\n case!$this->request->isPost() :\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Wrong request method.';\n break;\n // Request is valid and phone no and name are present\n case!empty($request_data) && !empty($request_data->phone_no) && !empty($request_data->user_token) && !empty($request_data->problem_type):\n // && !empty($request_data->comment):\n // Check if phone no exists\n $data = $this->User->findUser($request_data->phone_no);\n\n // Check if record exists\n if (count($data) != 0) {\n // Check uuid entered is valid\n if ($data[0]['User']['verified'] === false) {\n $success = false;\n $status = UNAUTHORISED;\n $message = 'User not verified';\n } elseif ($request_data->user_token != $data[0]['User']['user_token']) { // User Token is not valid\n $success = false;\n $status = UNAUTHORISED;\n $message = 'User Token is invalid';\n } else {\n\n $dataArray = array();\n $dataArray['Feedback']['problem_type'] = $request_data->problem_type;\n if (!empty($request_data->spam_or_abuse_type))\n $dataArray['Feedback']['spam_or_abuse_type'] = $request_data->spam_or_abuse_type;\n $dataArray['Feedback']['comment'] = trim($request_data->comment);\n $dataArray['Feedback']['user_id'] = (string) $data[0]['User']['_id'];\n\n if ($this->Feedback->save($dataArray)) {\n $success = true;\n $status = SUCCESS;\n $message = 'Your problem has been saved.';\n } else {\n $success = false;\n $status = ERROR;\n $message = 'There was a problem in processing your request';\n }\n }\n }\n // Return false if record not found\n else {\n $success = false;\n $status = UNAUTHORISED;\n $message = 'Phone no. not registered.';\n }\n break;\n // User Token blank in request\n case!empty($request_data) && empty($request_data->user_token):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'User Token cannot be blank.';\n break;\n // Phone no. blank in request\n case!empty($request_data) && empty($request_data->phone_no):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Phone no. cannot be blank.';\n break;\n // Problem type blank in request\n case!empty($request_data) && empty($request_data->problem_type):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Problem type cannot be blank.';\n break;\n // Parameters not found in request\n case empty($request_data):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Request cannot be empty.';\n break;\n }\n\n $out = array(\n \"success\" => $success,\n \"message\" => $message\n );\n\n return new CakeResponse(array('status' => $status, 'body' => json_encode($out), 'type' => 'json'));\n }", "public function poll() { //validate request from interkassa\n\t\t$this->wrlog(\"====================START=========================\");\n\t\t$this->wrlog(\"Payment for order: \".getRequest(\"ik_pm_no\").\" Time: \".date(\"Y-m-d H:i:s\"));\n\t\t$buffer = outputBuffer::current();\n\t\t$buffer->clear();\n\t\t$buffer->contentType(\"text/plain\");\n\t\t$this->wrlog($_REQUEST);\n\t\tif (!$this->checkIP()) {\n\t\t\t$this->order->setOrderStatus('canceled');\n\t\t\t$buffer->push(\"failed\");\n\t\t\t$this->wrlog(\"Invalid IP reply address\");\n\t\t}\n\t\telseif($this->hash_validation()) {\n\t\t\t$status = getRequest(\"ik_inv_st\");\n\t\t\tswitch($status) {\n\t\t\t\tcase interkassaPayment::STATUS_FAIL : {\t//fail order\n\t\t\t\t\t$this->order->setPaymentStatus('declined');\n\t\t\t\t\t$this->order->setOrderStatus('canceled');\n\t\t\t\t\t$buffer->push(\"failed\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase interkassaPayment::STATUS_SUCCESS : { //success order, create payment\n\t\t\t\t\t$this->order->setPaymentStatus('accepted');\n\t\t\t\t\t$this->order->payment_document_num = getRequest('ik_inv_id');\n\t\t\t\t\t$buffer->push(\"OK\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase interkassaPayment::STATUS_PENDING : { //pedning payment, wait for payment\n\t\t\t\t\t$this->order->setPaymentStatus('initialized');\n\t\t\t\t\t$this->order->payment_document_num = getRequest('ik_inv_id');\n\t\t\t\t\t$buffer->push(\"waitAccept\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\t$this->order->setPaymentStatus('initialized');\n\t\t\t\t\t$this->order->payment_document_num = getRequest('ik_inv_id');\n\t\t\t\t\t$buffer->push(\"waitAccept\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else {\n\t\t\t$buffer->push(\"failed\");\n\t\t}\n\t\t$this->wrlog(\"=====================END=========================\");\n\t\t$buffer->end();\n\t}", "public function uploadTarifTunjangan($params = array())\n {\n $data = array();\n $total_rec = $ins_rec = $lastBaCode = $update_rec = 0;\n \n \n if ($_FILES[file][size] > 0) {\n //********************************* VALIDASI SEQUENCE UPLOAD DATA BUDGET ***************************************\n //1. ****************** Check BA dari CSV FILE\n $file = $_FILES[file][tmp_name];\n $handle = fopen($file,\"r\");\n $arrba = array();\n do {\n if (($datachk[0])&&($total_rec > 1)) {\n array_push($arrba,$datachk[1]);\n }\n $total_rec++;\n } while($datachk = fgetcsv($handle,1000,\";\",\"'\"));\n $arrbadis = array_values(array_unique($arrba, SORT_REGULAR)); //variabel array list BA pada CSV\n \n //2. ****************** Baca Urutan Upload dari T_SEQ\n $sqlCurTask=\"SELECT SEQ_NUM FROM T_SEQ WHERE TABLE_NAME='TM_TARIF_TUNJANGAN'\";\n $seqNum = $this->_db->fetchOne($sqlCurTask);\n $sqlSeq=\"SELECT * FROM T_SEQ WHERE SEQ_NUM < ($seqNum) ORDER BY SEQ_NUM, TASK_NAME\";\n $rows = $this->_db->fetchAll($sqlSeq);\n if (!empty($rows)) {\n foreach ($rows as $idx => $row) { \n $tablechk = $row['REMARKS'];\n //2.1 ****************** get BA CODE yang sudah dimasukan pada table di awal sequence\n $sqlba = \"SELECT DISTINCT BA_CODE FROM \".$row['TABLE_NAME'];\n $arrnormaba = array();\n $arrlockba = array();\n $rowsba = $this->_db->fetchAll($sqlba);\n foreach ($rowsba as $idxba => $rowba) {\n array_push($arrnormaba,$rowba['BA_CODE']); //variabel array list BA pada masing2 norma\n //2.2 ****************** get STATUS LOCK masing2 BA CODE di T_SEQ\n $sqlba1 = \"SELECT STATUS FROM T_SEQ_CHECK WHERE BA_CODE='\".$rowba['BA_CODE'].\"' AND TASK_NAME='\".$row['TABLE_NAME'].\"'\";\n \n $arrlockba[$rowba['BA_CODE']] = $this->_db->fetchOne($sqlba1);\n } \n $arrNotFound=array();\n for($x=0;$x<count($arrbadis);$x++){\n if(!in_array($arrbadis[$x],$arrnormaba)){ //check apakah data ba csv ada di data ba norma?\n $arrNotFound[]=$arrbadis[$x];\n }elseif($arrlockba[$arrbadis[$x]]==\"LOCKED\"){\n $arrNotFound[]=$arrbadis[$x];\n }\n }\n if($arrNotFound) break;\n }\n }\n $arrNotFound =array();\n if($arrNotFound){\n $return = array(\n 'status' => 'failed',\n 'total' => $total_rec - 2,\n 'ba_notfound' => implode(\",\",$arrNotFound),\n 'task_err' => $tablechk\n );\n return $return;\n }\n //********************************* VALIDASI SEQUENCE UPLOAD DATA BUDGET ***************************************//\n //get the csv file\n $file = $_FILES[file][tmp_name];\n $handle = fopen($file,\"r\");\n \n $total_rec = 0;\n \n //loop through the csv file and insert into database\n do {\n if (($data[0])&&($total_rec > 1)) {\n /*\n if ($lastBaCode <> addslashes($data[0])){\n try {\n //remove data\n $sqlDelete = \"\n DELETE FROM TM_TARIF_TUNJANGAN \n WHERE BA_CODE = TRIM('\".addslashes($data[0]).\"')\n AND to_char(PERIOD_BUDGET,'DD-MM-RRRR') = '{$this->_period}'\n \";\n //log file penghapusan data\n $this->_global->deleteDataLogFile($sqlDelete);\n \n $this->_db->query($sqlDelete); \n } catch (Exception $e) {\n \n }\n }\n */\n //cek data\n $sql = \"\n SELECT COUNT(*) \n FROM TM_TARIF_TUNJANGAN\n WHERE BA_CODE = TRIM('\".addslashes($data[0]).\"')\n AND to_char(PERIOD_BUDGET,'DD-MM-RRRR') = '{$this->_period}'\n AND JOB_CODE = TRIM('\".addslashes($data[1]).\"')\n AND EMPLOYEE_STATUS = TRIM('\".addslashes($data[2]).\"')\n AND TUNJANGAN_TYPE = TRIM('\".addslashes($data[3]).\"')\n \";\n $count = $this->_db->fetchOne($sql);\n if ($count == 0) {\n try {\n //insert data\n $sql = \"\n INSERT INTO TM_TARIF_TUNJANGAN \n (PERIOD_BUDGET, BA_CODE, JOB_CODE, EMPLOYEE_STATUS, TUNJANGAN_TYPE, VALUE, INSERT_USER, INSERT_TIME)\n VALUES (\n TO_DATE('{$this->_period}','DD-MM-RRRR'),\n TRIM('\".addslashes($data[0]).\"'),\n TRIM('\".addslashes($data[1]).\"'),\n TRIM('\".addslashes($data[2]).\"'),\n TRIM('\".addslashes($data[3]).\"'),\n REPLACE('\".addslashes($data[4]).\"', ',', ''),\n '{$this->_userName}',\n SYSDATE\n )\n \";\n $this->_db->query($sql);\n $this->_db->commit();\n $ins_rec++;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA SUCCESS', 'MASTER TARIF TUNJANGAN', '', '');\n } catch (Exception $e) {\n //menampilkan data yang tidak ditambahkan\n $data_error[] = $total_rec;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA FAILED', 'MASTER TARIF TUNJANGAN', '', $e->getCode());\n \n //error log file\n $this->_global->errorLogFile($e->getMessage());\n }\n }else{\n // cek apakah data non-aktif\n $sql = \"\n SELECT COUNT(*) \n FROM TM_TARIF_TUNJANGAN\n WHERE BA_CODE = TRIM('\".addslashes($data[0]).\"')\n AND to_char(PERIOD_BUDGET,'DD-MM-RRRR') = '{$this->_period}'\n AND JOB_CODE = TRIM('\".addslashes($data[1]).\"')\n AND EMPLOYEE_STATUS = TRIM('\".addslashes($data[2]).\"')\n AND TUNJANGAN_TYPE = TRIM('\".addslashes($data[3]).\"')\n AND DELETE_USER IS NULL\n \";\n $count = $this->_db->fetchOne($sql);\n \n if ($count == 0) {\n // update data menjadi aktif jika sebelumnya telah dinon-aktifkan\n try {\n $sql = \"\n UPDATE TM_TARIF_TUNJANGAN\n SET VALUE = REPLACE('\".addslashes($data[4]).\"', ',', ''),\n UPDATE_USER = '{$this->_userName}',\n UPDATE_TIME = SYSDATE,\n DELETE_USER = NULL,\n DELETE_TIME = NULL\n WHERE BA_CODE = TRIM('\".addslashes($data[0]).\"')\n AND to_char(PERIOD_BUDGET,'DD-MM-RRRR') = '{$this->_period}'\n AND JOB_CODE = TRIM('\".addslashes($data[1]).\"')\n AND EMPLOYEE_STATUS = TRIM('\".addslashes($data[2]).\"')\n AND TUNJANGAN_TYPE = TRIM('\".addslashes($data[3]).\"')\n \";\n $this->_db->query($sql);\n $this->_db->commit();\n $update_rec++;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA SUCCESS', 'MASTER TARIF TUNJANGAN', '', '');\n } catch (Exception $e) {\n //menampilkan data yang tidak ditambahkan\n $data_error[] = $total_rec;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA FAILED', 'MASTER TARIF TUNJANGAN', '', $e->getCode());\n \n //error log file\n $this->_global->errorLogFile($e->getMessage());\n }\n }else{\n //menampilkan data yang tidak ditambahkan\n $data_error[] = $total_rec;\n }\n }\n $lastBaCode = addslashes($data[0]);\n }\n $total_rec++;\n } while ($data = fgetcsv($handle,1000,\",\",\"'\"));\n //\n $return = array(\n 'status' => 'done',\n 'total' => $total_rec - 2,\n 'inserted' => $ins_rec,\n 'updated' => $update_rec,\n 'data_failed' => $data_error\n );\n }else{\n $return = array(\n 'status' => 'failed',\n 'total' => $total_rec - 2,\n 'inserted' => $ins_rec,\n 'updated' => $update_rec,\n 'data_failed' => $data_error\n );\n }\n \n return $return;\n }", "function procCtrl($ar){\n $ok = true;\n \n $p = new XParam($ar, array());\n \n // dtff !empty = date valide = écran edition\n // age si < 18 => champs complémentaire\n $dtnaiss = $this->xset->desc['dtnaiss']->post_edit($p->get('dtnaiss'));\n $diff = date_diff(new DateTime(date('Y-m-d')), new DateTime($dtnaiss->raw));\n if ($diff->y < 18){\n foreach($this->eplmodule->modcustomer->parentMandFields as $fn){\n $v = trim($p->get($fn));\n if (empty($v)){\n $ok = false;\n }\n }\n if (!$ok){\n $_REQUEST['message'] .= \"Pour un mineur renseigner les champs 'Responsable légal'\";\n }\n }\n if ($ok && $ar['_typecontrol'] == 'insert'){\n $wtpcard = trim($p->get('wtpcard'));\n if (empty($wtpcard)){\n $ok = false;\n $_REQUEST['message'] = 'Merci de renseigner le numéro de carte'; \n } else {\n list($okcard, $messcard) = $this->checkNewWTPCard($wtpcard);\n if (!$okcard){\n $ok = false;\n $_REQUEST['message'] .= $messcard;\n }\n }\n }\n// $_REQUEST['message'] .= 'TESTS';\n// $ok = false;\n$this->erreurCtrl = !$ok;\n return $ok;\n\n }", "public function getReceiptSerialNumber()\n\t{\n\t\t$stock_receipt_product_id = $this->input->post('stock_receipt_product_id');\n\t\t$divNumber = $this->input->post('divNumber');\n\t\t$rangeDivNumber = $this->input->post('rangeDivNumber');\n\t\t$office_id = $this->session->userdata('office_id');\n\t\t$office_operation_type = $this->session->userdata('office_operation_type');\n\t\t\n\t\t$table_name = \"inventory_\".$office_operation_type.\"_stock_receipt_product_serial_number_\".$office_id;\n\t\t$serialMaster = $this->db->select('serial_number')->get_where($table_name,array('stock_receipt_product_id'=>$stock_receipt_product_id,'stock_receipt_product_serial_number_status'=>'3'))->result();\n\t\t\n\t\t$divToAppend = '';\n\t\t$i=0;\n\t\tforeach($serialMaster as $key=>$serialNumber){\n\t\t\t$divToAppend .= '<div class=\"my_id-'.$i.'\"><div class=\"form-group col-lg-3\"><input type=\"text\" class=\"form-control\" id=\"initial_stock_starting_serial_popup'.$i.'\" readonly name=\"serial_number_'.$divNumber.'[]\" value=\"'.$serialNumber->serial_number.'\" /><a onclick=\"removeAddSrNoReceiptForm('.$divNumber.','.$rangeDivNumber.','.$i.')\" href=\"javascript:void(0);\" class=\"btn btn-round btn-default my-btn-round\"><i class=\"glyphicon glyphicon-remove\"></i></a></div></div>';\n\t\t\t$i++;\n\t\t}\n\t\t$lastValue = count($serialMaster)-1;\n\t\t$firstSerialNumber = $serialMaster[0]->serial_number;\n\t\t$lastSerialNumber = $serialMaster[$lastValue]->serial_number;\n\t\t\n\t\techo json_encode(array('firstSerialNumber'=>$firstSerialNumber,'lastSerialNumber'=>$lastSerialNumber,'msg'=>$divToAppend));\n\t\t\n\t}", "public function encender() {\n $respuesta=self::$plasma->estadoPlasma();\n\tif ( $respuesta == 'OFF' ){\n\t $respuesta=self::$plasma->encender();\n\t}\n\n }", "function mark_read()\n {\n /* BENCHMARK */ $this->benchmark->mark('func_mark_read_start');\n\n $read=$this->get_input_vals();\n\n $this->message_model->save_read($read['uid'],$read['mid'],1);\n\n /* BENCHMARK */ $this->benchmark->mark('func_mark_read_end');\n\n // success\n exit();\n }", "public function getTxSerialHardware()\n\t{\n\t\treturn $this->tx_serial_hardware;\n\t}", "public function enviarNoInterrumpir( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\", \"NO_INTERRUMPIR\",\n $this->getNoInterrumpir());\n usleep(1000000);\n $this->enviarPeticion($cmd->getComando());\n\n }", "public function getSerialNumber() {\n if ($this->serial) {\n return $this->serial;\n }\n if (is_array($this->rawData)) {\n $this->serial = $this->rawData[\"serial number\"];\n if (!$this->serial) { \n $this->serial = $this->rawData[\"серийный номер\"];\n }\n if (!$this->serial) { \n $this->serial = $this->rawData[12]; // CP-3911\n }\n }\n return $this->serial;\n }", "public function getSerialId()\n\t{\n\n\t\treturn $this->serial_id;\n\t}", "private function setPreviouslyTweetedSerialNumbers() {\n\t\t$usedSerialNumbers = [];\n\t\t$usedSerialNumbersFileName = \"\";\n\t\tif($this->qType === \"PO\") {\n\t\t\t$usedSerialNumbersFileName = ($this->realTweets ? \"tweeted_po_sns.txt\" : \"tweeted_po_sns_debug.txt\");\n\t\t} else if($this->qType === \"FD\") {\n\t\t\t$usedSerialNumbersFileName = ($this->realTweets ? \"tweeted_fd_sns.txt\" : \"tweeted_fd_sns_debug.txt\");\n\t\t} else {\n\t\t\terror_log(\"Didn't recognize query type: \" . $this->qType);\n\t\t\texit(3);\n\t\t}\n\t\t//read in all serial numbers that have already been tweeted\n\t\tif (file_exists($usedSerialNumbersFileName)) {\n\t\t\techo \"Reading used serial numbers from file \" .$usedSerialNumbersFileName .\"…\\n\";\n\t\t\t$usedNumberFile = fopen($usedSerialNumbersFileName, 'r');\n\t\t\twhile ($usedNumberFile && !feof($usedNumberFile)) {\n\t\t\t\t$line = fgets($usedNumberFile);\n\t\t\t\t// verify it's an 8-digit serial number or blank (should be last line only)\n\t\t\t\tif( !preg_match('/^(\\d{8})|()$/',$line) ) {\n\t\t\t\t\t$msg = \"invalid line in \".$usedSerialNumbersFileName.\": \".$line;\n\t\t\t\t\tthrow new CockyBotException($msg, CockyBotException::ERROR_SN_FILE);\n\t\t\t\t}\n\t\t\t\t$lineValue = intval($line);\n\t\t\t\t// store with serial number as key to allow constant time lookup\n\t\t\t\t$usedSerialNumbers[$lineValue] = $lineValue;\n\t\t\t}\n\t\t\tfclose($usedNumberFile);\n\t\t}\n\t\t$this->usedSerialNumbersFileName = $usedSerialNumbersFileName;\n\t\t$this->usedSerialNumbers = $usedSerialNumbers;\n\t}", "public function actionThankyou() {\n // $pnr = $utilsModel->randomString(10);\n $subject=\"Confirm Booking\";\n $session = Yii::$app->session;\n $arr_booking_data = $session['booking_data'];\n $userinfo=\\Yii::$app->user->identity;\n \n if(isset($arr_booking_data['phone']))\n {\n $param['mobile_no']=$arr_booking_data['phone'];\n }else if(isset($userinfo['id']))\n {\n \t$profile=\\backend\\models\\Profile::find()->where(['user_id'=>$userinfo['id']])->one();\n \t$param['mobile_no']=$profile->phone_no;\n }\n \n $param['subject']=$subject;\n if(isset($arr_booking_data['email']))\n {\n $param['email']=$arr_booking_data['email'];\n }else if(isset($userinfo['id']))\n {\n \t$param['email']=$profile->gravatar_email;\n }\n $clubObj= \\backend\\models\\Club::findOne( $arr_booking_data['c_id']);\n $param['club_name']= $clubObj->name ;\n $param['booking_date']=$arr_booking_data['txt_datepicker'];\n $param['booking_type']=$arr_booking_data['b_type'];\n $pnr= Yii::$app->request->get('pnr');\n $param['pnr']=$pnr;\n $view=\"orderconfirm\";\n $utilsobj=new \\common\\models\\Utils;\n $sendparam=array('mobile_no'=>$param['mobile_no'],'email'=>$param['email'],'club_name'=>$param['club_name'],'booking_date'=>$param['booking_date'],'pnr'=>$param['pnr'],'booking_type'=>$param['booking_type']);\n $mailsend=$utilsobj->sendMessage($param['email'], $param['subject'], $view, $sendparam);\n $view=\"sms/orderconfirm\";\n $sendsms=$utilsobj->sendSMS($param['mobile_no'], $param['subject'], $view, $sendparam);\n return $this->render('thankyou',['param'=>$param]);\n }", "public function retraitEspeceCarte()\n {\n $fkagence = $this->userConnecter->fk_agence;\n $data['typeagence'] = $this->userConnecter->idtype_agence;\n $data['lang'] = $this->lang->getLangFile($this->getSession()->getAttribut('lang'));\n $telephone = trim(str_replace(\"+\", \"00\", $this->utils->securite_xss($_POST['phone'])));\n $data['benef'] = $this->compteModel->beneficiaireByTelephone1($telephone);\n $data['soldeAgence'] = $this->utils->getSoldeAgence($fkagence);\n\n $typecompte = $this->compteModel->getTypeCompte($telephone);\n if ($typecompte == 0) {\n $username = 'Numherit';\n $userId = 1;\n $token = $this->utils->getToken($userId);\n $response = $this->api_numherit->soldeCompte($username, $token, $telephone);\n $decode_response = json_decode($response);\n if ($decode_response->{'statusCode'} == 000) {\n $data['soldeCarte'] = $decode_response->{'statusMessage'};\n } else $data['soldeCarte'] = 0;\n } else if ($typecompte == 1) {\n $numcarte = $this->compteModel->getNumCarte($telephone);\n $numeroserie = $this->utils->returnCustomerId($numcarte);\n $solde = $this->api_gtp->ConsulterSolde($numeroserie, '6325145878');\n $json = json_decode(\"$solde\");\n $responseData = $json->{'ResponseData'};\n if ($responseData != NULL && is_object($responseData)) {\n if (array_key_exists('ErrorNumber', $responseData)) {\n $message = $responseData->{'ErrorNumber'};\n $data['soldeCarte'] = 0;\n } else {\n $data['soldeCarte'] = $responseData->{'Balance'};\n $currencyCode = $responseData->{'CurrencyCode'};\n }\n } else $data['soldeCarte'] = 0;\n }\n\n $params = array('view' => 'compte/retrait-espece-carte');\n $this->view($params, $data);\n }", "public function activarPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"NO_MUTE\");\n $this->setPizarraMuteado(0);\n }", "function generateSerials ($numberOfChars,$lengthOfSerial) {\n\n\n$tokens = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWZY\";\n$serial = \"\";\n\nfor ($i = 0; $i < $lengthOfSerial; $i++) { \n \n for ($j = 0; $j < $numberOfChars; $j++) { \n \n $serial .= $tokens[rand(0,10)];\n \n }\n\n// append dash\n if ($i < $lengthOfSerial - 1) { \n $serial .= \"-\"; \n }\n \n}\n\n//let's return the value\n return $serial;\n\n}", "public function verificaNecessidadeQuantidade(){\n try{\n $this->load->model(\"produto/BuscaProdutoChatbot\");\n if(!isset($_GET[\"CodgEmpresa\"])){throw new Exception(\"Codigo da empresa não existente\");};\n if(!isset($_GET[\"QuantidadeItem\"])){throw new Exception(\"quantidade item não existente\");};\n //if(!isset($_GET[\"ProdutoSelecionado\"])){throw new Exception(\"Produto selecionado não existente\");};\n if(!isset($_GET[\"last_clicked_button_name\"])){throw new Exception(\"last_clicked_button_name não existente\");}\n //if(!isset($_GET[\"CaminhoProduto\"])){throw new Exception(\"CaminhoProduto não existente\");}\n $empresa = $_GET[\"CodgEmpresa\"];\n $quantidade = $_GET[\"QuantidadeItem\"];\n //$produtoSelecionado = $_GET[\"ProdutoSelecionado\"];\n $botaoSelecionado = $_GET[\"last_clicked_button_name\"];\n //$caminhoProduto = $_GET[\"CaminhoProduto\"];\n \n $resposta = $this->BuscaProdutoChatbot->precisaDeQuantidade($botaoSelecionado, $quantidade, $empresa);\n if($resposta != null){\n $json_str = json_encode($resposta);\n echo $json_str;\n } \n }catch (Exception $e){\n $fp = fopen(\"log_do_chatbot.txt\", \"a\");\n $escreve = fwrite($fp, \"\\n\".date('H:i:s d-m-Y').\" - \".((isset($_GET[\"CodgEmpresa\"])) ? \"Codigo da empresa = \".$_GET[\"CodgEmpresa\"] : \"\").\" \".$e->getMessage());\n fclose($fp); \n }\n }", "public function verAtrilEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"ATRIL\");\n\n }", "function evt__1__entrada()\r\n\t{\r\n\t\t$this->pasadas_por_solapa[1]++;\r\n\t}", "public function transferencia($row){\n\n // Data de Saida\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Data Saída: \"), 'LTB', 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->data_saida), 'TBR', 0, '');\n // Origem\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Origem: \"), 'LTB', 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(40, 6, utf8_decode($row->origem_nome), 'TBR', 0, '');\n\n $this->Ln();\n\n // Data de Entrada\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Data Entrada: \"), 'LTB', 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->data_saida), 'TBR', 0, '');\n // Destino\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Destino: \"), 'LTB', 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(40, 6, utf8_decode($row->destino_nome), 'TBR', 0, '');\n\n $this->Ln(10);\n\n\n // Status\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Status: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(30, 6, utf8_decode($row->status_nome), 'TBR', 0, '');\n\n // Peso Total\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Peso Total: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->saida_peso_total), 'TBR', 0, '');\n\n // Permanencia\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Perm. Média: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->permanencia_media), 'TBR', 0, '');\n\n // Machos\n $this->Ln();\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Machos: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(30, 6, utf8_decode($row->machos), 'TBR', 0, '');\n\n // Peso Medio\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Peso Médio: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->saida_peso_medio), 'TBR', 0, '');\n\n // Ganho Dia Medio\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Ganho/Dia: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->ganho_medio_media), 'TBR', 0, '');\n\n // Femeas\n $this->Ln();\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Femeas:\"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(30, 6, utf8_decode($row->femeas), 'TBR', 0, '');\n\n // Ganho Total\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Ganho Total: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->ganho_total), 'TBR', 0, '');\n\n // Maior Peso \n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Maior Peso: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->saida_maior_peso), 'TBR', 0, '');\n\n // Total\n $this->Ln();\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Total:\"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(30, 6, utf8_decode($row->quantidade), 'TBR', 0, '');\n\n // Ganho Total Medio\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Ganho Médio: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->ganho_total_media), 'TBR', 0, '');\n \n // Menor Peso\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Menor Peso: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->saida_menor_peso), 'TBR', 0, '');\n\n $this->Ln(6);\n }", "public function print_ack() {\n $userid = $this->input->post('userId');\n $data = $this->get_pdf_data($userid);\n //modified on 27/11/2014\n $data['meta_data'] = $this->meta_data;\n return generate_acknowledgment($data);\n }", "function printJSSerialNumberAutoDeduce() {\n\n\tglobal $langs;\n\t?>\n\t<script>\n\n\t\tfunction setSerialNumbers(fkProduct, TMatches) {\n\n\t\t\tvar prefix = TMatches[1] ? TMatches[1] : ''; // Si undefined car nombre pur => chaine vide\n\t\t\tvar currentNum = TMatches[2];\n\t\t\tvar i = 1;\n\t\t\tvar numSize = currentNum.length;\n\t\t\tvar count = parseInt(currentNum);\n\n\t\t\t$('table#dispatchAsset tr[data-fk-product='+fkProduct+']').not(':first').each(function() {\n\t\t\t\tvar lineID = $(this).attr('id').replace('dispatchAssetLine', '');\n\t\t\t\tvar elem = $(this).find('input#TLine\\\\['+lineID+'\\\\]\\\\[numserie\\\\]');\n\t\t\t\tvar suffixCount = count + i;\n\t\t\t\tvar suffix = (new String(suffixCount)).padStart(numSize, '0');\n\t\t\t\tvar newVal = prefix + suffix;\n\n\t\t\t\telem.val(newVal);\n\n\t\t\t\ti++;\n\t\t\t});\n\t\t}\n\n\t\tfunction setSerialNumberListener(fkProduct, TElemTR) {\n\t\t\tvar lineID = TElemTR.first().attr('id').replace('dispatchAssetLine', '');\n\t\t\tvar inputElem = $('input#TLine\\\\['+lineID+'\\\\]\\\\[numserie\\\\]'); // Doublement échapper les crochets faisant partie d'un ID ou d'une classe et non du sélecteur\n\n\t\t\tinputElem.on('change', function() {\n\n\t\t\t\t$('span#setSerialNumbers'+fkProduct).remove(); // On supprime le lien même s'il existe pour éventuellement le recréer avec un nouveau listener\n\n\t\t\t\tvar TMatches = $(this).val().match(/^(.*[^0-9])?([0-9]+)$/); // On détermine si le numéro de série finit par un nombre\n\n\t\t\t\tif(TMatches instanceof Array && TMatches.length > 0) { // String.match() retourne un tableau si des correspondances sont trouvées\n\n\t\t\t\t\t$('<span id=\"setSerialNumbers'+fkProduct+'\"> <a href=\"javascript:;\"><?php print dol_escape_js($langs->trans('CalculateFollowingSerialNumbers')); ?></a></span>')\n\t\t\t\t\t\t.insertAfter('input#TLine\\\\['+lineID+'\\\\]\\\\[commande_fournisseurdet_asset\\\\]')\n\t\t\t\t\t\t.on('click', function() {\n\t\t\t\t\t\t\tsetSerialNumbers(fkProduct, TMatches);\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t$(document).ready(function() {\n\n\t\t\tvar TProducts = [];\n\n\t\t\t$('table#dispatchAsset tr.dispatchAssetLine').each(function() {\n\t\t\t\tvar fkProduct = parseInt($(this).data('fk-product'));\n\n\t\t\t\tif(! TProducts.includes(fkProduct)) {\n\t\t\t\t\tTProducts.push(fkProduct);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tfor(var fkProduct of TProducts) { // Equivalent JS de foreach($TProducts as $fkProduct) en PHP\n\n\t\t\t\tvar TElemTR = $('table#dispatchAsset tr[data-fk-product='+fkProduct+']');\n\n\t\t\t\tif(TElemTR.length > 1) { // Si au moins 2 équipements à dispatcher issus du même produit\n\t\t\t\t\tsetSerialNumberListener(fkProduct, TElemTR);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t</script>\n\n\t<?php\n}", "function statement($details,$phone){\n\t$ussd_text=\"CON <br/> Enter your PIN\"; \n ussd_proceed($ussd_text); \n}", "public function setSerial($v)\n\t{\n\n\n\t\tif ($v === null) {\n\t\t\t$this->setSerialId(NULL);\n\t\t} else {\n\t\t\t$this->setSerialId($v->getId());\n\t\t}\n\n\n\t\t$this->aSerial = $v;\n\t}", "function connect($ip_address, $port)\n {\n //$this->connector = new FilePrintConnector(\"/dev/usb/lp0\");\n //$this->connector = new WindowsPrintConnector(\"smb://192.168.0.6/POS-80\");\n //$this->connector = new CupsPrintConnector(\"POS-80\");\n //$this->printer = new Printer($this->connector);\n /* Close printer */\n\n /*$this->connector = new FilePrintConnector(\"php://stdout\");\n $this->printer = new Printer($this->connector);\n */\n\n try {\n //$this->connector = new CupsPrintConnector(\"POS-80C\");\n $this->connector = new WindowsPrintConnector(\"POSS-80\");\n \n /* Print a \"Hello world\" receipt\" */\n $this->printer = new Printer($this->connector);\n //$this->printer -> text(\"TE AMO MCUHO MI VIDA..!\\n\");\n //$this->printer -> cut();\n \n /* Close printer */\n //$this->printer -> close();\n } catch (Exception $e) {\n echo \"Couldn't print to this printer: \" . $e -> getMessage() . \"\\n\";\n }\n }", "function estatInputs(){\n if ($this->lli_idllibre==0) return \" \";\n else return \" disabled \";\n }", "function feedbackAvaliador() {\n echo '<p class=\"feedback success\"><b>Revisor adicionado com sucesso.</b></p>';\n }", "function sendDataDichVuCong($username, $password,$mahoso,$madichvu,$xml){\r\n\tWriteLog('sendDataDichViCong','Call');\t\r\n\tif(checkAuthentication($username, $password)){\r\n\t\tWriteLog('sendDataDichViCong','Login Sucess');\r\n if(checkMaDichVu($madichvu) == false){\r\n WriteLog('sendDataDichVuCong failed : ','madichvu is invalid ('.$madichvu.') ');\r\n return 0;\r\n }\r\n \r\n\t\t$id = 0;\r\n if($xml == \"\"){\r\n WriteLog(\"sendDataDichVuCong : \", \"XML NULL\");\r\n return 0;\r\n\t\t}\r\n $sql = sprintf(\"\r\n\t\t\tselect count(*) as DEM from adapter_luutru where MAHOSO = '%s'\r\n\t\t\",mysql_real_escape_string($mahoso));\r\n\t\t\r\n\t\t$re = query($sql);\r\n\t\t$row = mysql_fetch_assoc($re);\r\n\t\t$xml = str_replace(\"'\",'\"',$xml);\r\n\t\tif((int)$row[\"DEM\"]){\r\n\t\t\t/* cap nhat */\r\n $sql = sprintf(\"\r\n update adapter_luutru\r\n SET `SOURCEXML` = '%s' ,`MADICHVU` = '%s',`IS_GET` = 0 \r\n WHERE MAHOSO = '%s'\r\n \",$xml,$madichvu,$mahoso);\t\t\r\n\t\t\tquery($sql);\r\n\t\t\t/* Lay cac thong tin de gui mail*/\r\n\t\t\t$sql1 = sprintf(\"select TENLOAI,SONGAYXULY from adapter_loai_hoso where CODE = '%s'\",$madichvu);\r\n\t\t\t$re = query($sql1);\r\n\t\t\t$row = mysql_fetch_assoc($re);\r\n\t\t\t \r\n\t\t\t$tenloaihoso = $row[\"TENLOAI\"];\r\n\t\t\t$soNgayXuLy = $row[\"SONGAYXULY\"];\r\n $ngayNhanToTime = BussinessDateModel::addDate(strtotime(date('Y-m-d')),(int)$soNgayXuLy);\r\n $ngayNhan = date('Y-m-d',$ngayNhanToTime); \r\n\t\t\t/*Lay ngay nhan ho so*/\r\n\t\t\t$today = date(\"d/m/Y\");\r\n\t\t\t/*Mang cac thong tin ho so*/\r\n\t\t\t$arrayInfo = XmlToArray($xml);\r\n \r\n try{\r\n $sqlTrangThai = sprintf(\"Insert into adapter_trangthaihoso(MASOHOSO, TENTOCHUCCANHAN, TENHOSO, TRANGTHAI,DIENTHOAI,NGAYNOP,NGAYNHAN) VALUES ('%s', '%s','%s',%d,'%s','%s','%s') \",$mahoso,base64_decode($arrayInfo['TENTOCHUCCANHAN']),$tenloaihoso,0,base64_decode($arrayInfo['DIENTHOAI']),date('Y-m-d H:i:s'),$ngayNhan);\r\n $id = query($sqlTrangThai);\r\n }catch(Exception $ex)\r\n {\r\n WriteLog('sendDataDichVuCong failed to adapter_trangthaihoso : ',$ex->getMessage());\r\n }\r\n \r\n try{\r\n\t\t\t//$mailerstatus = sendMail($mahoso,$tenloaihoso,$today,$arrayInfo);\r\n\t\t\t}catch(Exception $ex)\r\n {\r\n WriteLog('sendMail failed: ',$ex->getMessage());\r\n }\r\n return $id;\r\n\t\t}\r\n\t}else{\r\n\t\tWriteLog('sendDataDichViCong','Login Failed');\r\n\t\treturn -1;\r\n\t}\r\n}", "function refus($msg) {\n echo \"<b><font color=red>$msg</font></b><br>\";\n echo \"Action non commenc�e; rectifier les conditions initiales avant de reprendre<br>\";\n}", "public function tellInvalidCard()\n {\n }", "function wpsbc_action_get_serial_status() {\r\n\r\n\tif( ! current_user_can( 'manage_options' ) )\r\n\t\treturn;\r\n\r\n\t$serial_key = get_option( 'wpsbc_serial_key', '' );\r\n\r\n\tif( empty( $serial_key ) )\r\n\t\treturn;\r\n\r\n\t// Check to see if the notice should be shown\r\n\t$transient = get_transient( 'wpsbc_serial_status' );\r\n\r\n\tif( false !== $transient )\r\n\t\treturn;\r\n\r\n\t// Make the call to the website for the serial key status\r\n\t$response = wp_remote_get( add_query_arg( array( 'request' => 'get_serial_status', 'serial_key' => $serial_key ), 'https://www.wpsimplebookingcalendar.com/u/' ), array( 'timeout' => 30 ) );\r\n\r\n\tif( is_wp_error( $response ) )\r\n\t\treturn;\r\n\r\n\t// Set transient to make sure not to do checks next time\r\n\tset_transient( 'wpsbc_serial_status', (int)$response['body'], 36 * HOUR_IN_SECONDS );\r\n\r\n}", "function modifySerial($movedFile)\n{\n if (isset($_POST['modifySerial'])) {\n global $connection, $modifySerialResponse;\n $modifySerialResponse = '';\n\n $serialTitle = addslashes($_POST['modalTitle']);\n \n $serialThumbnail = $_FILES['modalThumbnail']['name'];\n $thumbnailFolder = '../../../thumbnail_serial/';\n $tempThumbnail = $_FILES['modalThumbnail']['tmp_name'];\n $extensions_arr_thumbnail = ['jpg', 'jpeg', 'png'];\n \n $serialSeason = addslashes($_POST['modalSeason']);\n $serialId = $_POST['modifySerial'];\n\n $query = \"UPDATE serial\n SET serial_name = '$serialTitle',\n serial_season = '$serialSeason'\";\n\n if (!empty($serialThumbnail)) {\n $movedFile = uploadFile($thumbnailFolder, $serialThumbnail, $extensions_arr_thumbnail, $tempThumbnail);\n if ($movedFile['response'] == 1) {\n $newTitle = $movedFile['newTitle'];\n $query .= \", serial_thumbnail = '$newTitle'\";\n } else {\n if ($movedFile == 'failed upload') {\n $modifySerialResponse = '\n <script language=\"javascript\">\n swal(\"Errore!\", \"Si è verificato un errore imprevisto! Riprovare di nuovo!\", \"error\");\n </script> ';\n }\n\n if ($movedFile == 'ext error') {\n $modifySerialResponse = '\n <script language=\"javascript\">\n swal(\"Errore!\", \"Il file non è supportato!\", \"error\");\n </script> ';\n }\n }\n }\n\n $result = mysqli_query($connection, $query);\n if ($result) {\n $modifySerialResponse = '\n <script language=\"javascript\">\n swal(\"Successo!\", \"Il seriale è stato creato!\", \"success\");\n </script> ';\n } else {\n $modifySerialResponse = '\n <script language=\"javascript\">\n swal(\"Errore!\", \"Il seriale non è stato creato!\", \"error\");\n </script> ';\n }\n }\n}", "public function sendFeedback($mercaOrderId)\n\t{\n\t $this->getAccess();\n\t \n\t if(!$mercaOrderId) return false;\n\t \n\t if($this->config->get('mercadolivre_feedback') && $this->config->get('mercadolivre_feedback_message')){\n\t \n\t $merca_order=$this->db->query(\"SELECT * FROM `\".DB_PREFIX.\"mercadolivre_order` WHERE `mercaOrderId` = '\" . $mercaOrderId . \"'\")->row;\n\t if($merca_order && !$merca_order['feedback']){\n\t\t\n\t\t\t\t $order_id=$merca_order['order_id'];\n\t\t\t\t \n\t\t\t\t $param=array();\n\t \t\t $param['rating']=$this->config->get('mercadolivre_feedback_rating');\n\t \t $param['fulfilled']=true;\n\t \t $param['message']=$this->config->get('mercadolivre_feedback_message');\n\t \n\t \t $param = json_encode($param); \n\t\t \t $header= array( \n\t\t 'Content-Type: application/json', \n\t\t 'Content-Length: ' . strlen($param) \n\t\t ); \n\t \n\t\t\t $url=self::$API_DOMAIN.'/orders/'.$mercaOrderId.'/feedback/?access_token='.$this->accessToken; \n\t\t\t $feedback_data=$this->callAPI($url,'POST',$param,$header);\n\t\t\t\n\t\t\t if($this->error=='')\n\t\t {\n\t\t $this->db->query(\"UPDATE `\" . DB_PREFIX . \"mercadolivre_order` SET `feedback` = '1' WHERE `order_id` = '\" . (int)$order_id. \"'\");\n\t\t }\n\t\t else{\n\t\t $this->log->write('MERCADOLIVRE Feedback API Error: '.$this->error);\n\t\t return false;\n\t\t }\n\t\t } \n\t }\n\t\t\n\t}", "public function akta($status,$id_akta,$tname,$regis){\n $ctrl = substr($id_akta,0,2);\n $re = base_url().'approval/index/'.$ctrl;\n\n $verified = $this->Approval_model->get_progres($id_akta);\n if ($verified->progres==NULL) {\n $this->session->set_flashdata('message', \"\n <div class='alert alert-danger alert-dismissable'>\n <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\n <h4><i class='glyphicon glyphicon-remove'></i> $verified->no_regis !!</h4>\n Anda Tidak Diperkenankan Mengubah Staus \\\"JADI\\\", Sebelum Melakukan Verifikasi !\n </div>\n \");\n redirect($re);\n }\n\n if($ctrl=='AM'){\n $dt_jenazah = $this->Data_jenazah_model->get_by_am($id_akta);\n $NIKJENAZAH = $dt_jenazah->nik;\n $data = array('status' => 'meninggal' );\n $this->Dps_model->update($NIKJENAZAH,$data);\n\n\n }\n\n $data['progres'] = $status;\n if ($status==\"diambil\") {//set field yang diisi apabila status adalah diambil\n $data['tgl_ambil'] = date(\"Y-m-d\");\n $data['oleh_ambil'] = $this->session->userdata('nama_user');\n }\n $this->Approval_model->update($id_akta, $data);\n if ($status=='jadi') {//jika jadi, maka akan juga mengirim SMS\n $dt_akta = $this->Approval_model->get_data_akta($tname,$regis);\n $item = array( 'no_pendaftaran' => $dt_akta->no_registrasi, \n );\n $sms = array(\n 'TextDecoded' => sms_jadi($item),\n 'DestinationNumber' => $dt_akta->no_hp, \n );\n $this->Outbox_model->insert($sms);\n }\n\n\n $this->session->set_flashdata('message', \"\n <div class='alert alert-success alert-dismissable'>\n <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\n <h4><i class='glyphicon glyphicon-ok'></i> Berhasil!</h4>\n Status Akta Telah Berhasil Diperbaharui => Berkas $status !\n </div>\n \");\n $keyword = substr($id_akta, 0, 2);\n redirect(site_url('approval/index/'.$keyword));\n \n }", "public function videoconferenciaNoInterrumpir( ) {\n $this->setNoInterrumpir(\"OFF\");\n //$this->setNoInterrumpir(\"ALLOCATED\");\n }", "public function simpan_spk($antarDealer=null){\n $nomorspk=($this->input->post('nospk'))?$this->input->post(\"nospk\"):$this->nomor_spk();\n $param=array(\n 'no_spk' => $nomorspk,\n 'kd_maindealer' =>$this->session->userdata(\"kd_maindealer\"),\n 'kd_dealer' => $this->session->userdata(\"kd_dealer\"),'kd_customer' => $this->input->post(\"kd_customer\"),\n 'type_penjualan'=> $this->input->post(\"type_penjualan\"),\n 'jenis_penjualan'=> $this->input->post(\"jenis_penjualan\"),\n 'jenis_p_antardealer'=> $this->input->post(\"jp_antardealer\"),\n 'kd_typecustomer' => $this->input->post(\"kd_typecustomer\"),\n 'penjualan_via' => $this->input->post(\"kd_groupsales\"),\n 'jenis_harga' => $this->input->post(\"jenis_harga\"),\n 'kd_sales' =>($this->input->post(\"kd_groupsales\")==\"TP\")?$this->input->post('kd_salesman_tp'): $this->input->post(\"kd_salesman\"),\n 'kd_saleshonda' => $this->input->post(\"kd_saleshonda\"),\n 'created_by' => $this->session->userdata(\"user_id\"),\n 'tgl_spk' => $this->input->post(\"tgl_spk\"),\n 'guest_no' => $this->input->post(\"guest_no\"),\n 'chanel' =>($this->input->post(\"jp_antardealer\"))?$this->input->post(\"kd_dealer\"):\"\"\n );\n $spkid=0;$spkcs=0;$spkgb=0;$hasil=array();\n $hasil = json_decode($this->curl->simple_post(API_URL.\"/api/spk/spk\", $param, array(CURLOPT_BUFFERSIZE => 100))); \n if($hasil->recordexists==TRUE){\n $param[\"lastmodified_by\"] = $this->session->userdata(\"user_id\");\n $hasil = json_decode($this->curl->simple_put(API_URL.\"/api/spk/spk\", $param, array(CURLOPT_BUFFERSIZE => 100))); \n }\n $spkid =($this->input->post('spkid'))?($this->input->post('spkid')):$hasil->message;\n //var_dump($hasil);var_dump($antarDealer);var_dump($spkid);\n if($antarDealer==\"1\"){\n //echo $spkid;\n return $spkid;\n }else{\n if($hasil){\n if((int)$hasil->message>0){\n $spkcs =$this->simpancs_spk($spkid);\n $spkcs +=$this->simpansurat_spk($spkid);\n if($spkcs >0){\n $this->guestbook_upd_status($nomorspk);\n }\n //updata data customer\n $spkgb=$this->update_customer($param[\"kd_customer\"]);\n }\n }\n echo $param[\"no_spk\"].\":\".$spkid.\":\".$hasil->status.\":\".$hasil->message;\n }\n }", "public function activeNumber($locketId)\n\t\t{\n\t\t\t$queueHelper = new QueueHelper($locketId);\n\t\t\tif ($queueHelper->getLocketData()!==null){\n\t\t\t\t$service = $queueHelper->getServiceData()->makeRowArray();\n\t\t\t\t$queueHelper->setLastOutQueue();\n\t\t\t\t$lastOut = $queueHelper->getLastOutQueue()->makeRowArray();\n\t\t\t\tif ($lastOut!==null){\n\t\t\t\t\techo json_encode(array(\n\t\t\t\t\t\t'status' => '200',\n\t\t\t\t\t\t'message' => 'antrian yang baru saja di panggil',\n\t\t\t\t\t\t'antrian' => $lastOut['antrian_nomor_aktif']\n\t\t\t\t\t));\n\t\t\t\t}else{\n\t\t\t\t\techo json_encode(array(\n\t\t\t\t\t\t'status' => '200',\n\t\t\t\t\t\t'message' => 'belum ada antrian dipanggil',\n\t\t\t\t\t\t'antrian' => $service['layanan_awalan'].'-000'\n\t\t\t\t\t));\n\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo json_encode(array(\n\t\t\t\t\t'status' => '200',\n\t\t\t\t\t'message' => 'loket tidak ada',\n\t\t\t\t\t'antrian' => '-000'\n\t\t\t\t));\n\t\t\t}\n\n\t\t}", "function read_all_units($db, $serial, $instruction)\r\n{\r\n\tglobal\t$TABLE_M_UNITS;\r\n\tglobal\t$FIELD_UNIT, $FIELD_UNIT_VERSION, $FIELD_ONLINE;\r\n\tglobal\t$a_unit, $a_temp, $a_kwhtotal, $a_kwhdisplay, $a_current;\r\n\r\n\t$sql = \"SELECT $FIELD_UNIT,$FIELD_UNIT_VERSION FROM $TABLE_M_UNITS\";\r\n\tif (!($mysql_result = mysql_query($sql))) { print(mysql_error($db) .\"\\n\"); return; }\r\n\r\n\t$i = 0;\r\n\twhile ($row = mysql_fetch_array($mysql_result))\r\n\t{\r\n\t\t$unit = $row[0];\r\n\t\t$a_unit[$i] = $unit;\r\n\r\n//\t\tprint \"$unit\\t\";\r\n\t\t\r\n\t\t$addrh = ($unit >> 8) & 255;\r\n\t\t$addrl = $unit & 255;\r\n\r\n\t\t$result = send_message($serial, 93, $addrh, $addrl, 0, 0, \"\");\t\t\t\t\t// read databuffer\r\n\t\t\r\n\t\tif ($result >= 0)\r\n\t\t{\r\n\t\t\tif ($instruction == 90)\t\t\t\t\t\t\t\t\t\t\t\t\t\t// temperature\r\n\t\t\t{\r\n\t\t\t\t$a_temp[$i] = ($result & 255);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$number = 0;\r\n\t\t\t\tfor ($j = 5; $j >= 0; $j--)\r\n\t\t\t\t\t$number = ($number * 10) + (($result >> (4 * $j)) & 15);\r\n\t\t\t\t\t\r\n\t\t\t\tswitch ($instruction)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase 56:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// KWh total\r\n\t\t\t\t\t\t$a_kwhtotal[$i] = $number;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 143:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// KWh display\r\n\t\t\t\t\t\t$a_kwhdisplay[$i] = $number;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 68:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\r\n\t\t\t\t\t\t$a_current[$i] = $number / 10000;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$online = \"Y\";\r\n\t\t\t//print \"ok\\n\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tswitch ($instruction)\r\n\t\t\t{\r\n\t\t\t\tcase 90:\t$a_temp[$i] = 0;\t\tbreak;\r\n\t\t\t\tcase 56:\t$a_kwhtotal[$i] = 0;\tbreak;\r\n\t\t\t\tcase 143:\t$a_kwhdisplay[$i] = 0;\tbreak;\r\n\t\t\t\tcase 68:\t$a_current[$i] = 0;\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$online = \"N\";\r\n\t\t\t//print \"missing\\n\";\r\n\t\t}\r\n\r\n\t\t// update online status of this unit\r\n\t\t$sql = \"UPDATE $TABLE_M_UNITS SET $FIELD_ONLINE='$online' WHERE $FIELD_UNIT=$unit\";\r\n\t\tif (!mysql_query($sql)) print(mysql_error($db) .\"\\n\");\r\n\t\t\r\n\t\t$i++;\r\n\t}\r\n\tmysql_free_result($mysql_result);\r\n\t\r\n\t//print(\"\\n\");\r\n}", "function request_feedback(){\n\t\t$response = $this->InteractModal->get_task();\n\t\tif(!empty($response)){\n\t\t\tforeach($response as $response_data){\n\t\t\t\t$task_id = $response_data['task_id'];\t\t\t\t\t\n\t\t\t\t$schedule_date = $response_data['schedule_date'];\n\t\t\t\t$listingdate = date_create($schedule_date);\n\t\t\t\t$time= date_format($listingdate,\"l d - M, Y h:i A\");\n\t\t\t\t$_details = $response_data['details'];\n\t\t\t\t$details = unserialize( $_details );\n\t\t\t\t$username = $details['user_name'];\n\t\t\t\t$contact = $details['contact_number'];\n\t\t\t\t$email_id = $details['showing_email'];\n\t\t\t\t$upcoming_all_showings = $this->InteractModal->get_fedback_links( $task_id );\n\t\t\t$config = array(\n\t\t\t\t'smtp_user' => 'info@interactre.com',\n\t\t\t\t'mailtype' => 'html',\n\t\t\t\t'charset' => 'utf-8',\n\t\t\t\t'starttls' => true,\n\t\t\t\t'newline' => \"\\r\\n\",\n\t\t\t\t\n\t\t\t);\n\t\t\t\tif(!empty($upcoming_all_showings)){\n\t\t\t\tforeach($upcoming_all_showings as $upcoming_showing){\n\t\t\t\t\t$feedback_link= $upcoming_showing['link'];\n\t\t\t\t\t$address= $upcoming_showing['property_address'];\n\t\t\t\t\t$broker_id= $upcoming_showing['broker_id'];\n\t\t\t\t\t$response = $this->InteractModal->signature_user_email($broker_id);\n\t\t\t\t\t$email_broker = $response[0]['user_email'];\n\t\t\t\t\t$concerned_person = $this->InteractModal->get_user_meta($broker_id,'concerned_person'); \n\t\t\t\t\n\t\t\t$subject = 'Please provide feedback for our recent showing';\n\t\t\t$msg = 'Hi,<br /><br />We would really appreciate your feedback, please tell us what you thought about your recent showing at \"'. $address .'\" on \"'. $time .'\". <br /><a href=\"'. $feedback_link .'\">Please click here to submit your feedback </a> <br /><br /> Thank you,<br /> <br /> '. $concerned_person .' <br /> '. $contact .' <br /> '. $email_broker .'';\n\t\t\t$this->load->library('email', $config);\n\t\t\t$this->email->from('info@interactacm.com', 'InteractRE');\n\t\t\t$this->email->set_header('InteractACM', 'InteractACM Notifications');\n\t\t\t$this->email->to( $email_id );\n\t\t\t$this->email->subject( $subject );\n\t\t\t$this->email->message( $msg ); \n\t\t\n\t\t\tif( $this->email->send() ){\n\t\t\t\t$data= array(\n\t\t\t'request_feedback' => 0,\n\t\t\t);\n\t\t\t$response = $this->InteractModal->update_task_details($data,$task_id);\n\t\t\t}else{\n\t\t\techo'Unable to send feedback link at this time. Please try again';\n\t\t} \n\t\t\t}}\n\t\t\t}\n\t\t}\n }" ]
[ "0.68176496", "0.67342645", "0.6488175", "0.643963", "0.643198", "0.6247054", "0.59916735", "0.58682585", "0.5625394", "0.55648386", "0.55492353", "0.5439157", "0.5398304", "0.5381658", "0.5261929", "0.5241642", "0.51733917", "0.51534456", "0.50263375", "0.50163186", "0.49853823", "0.49822155", "0.4971112", "0.49598345", "0.49449417", "0.49438083", "0.49132448", "0.4901954", "0.4900952", "0.4899304", "0.4884504", "0.48745131", "0.48735523", "0.48712015", "0.48679447", "0.4859878", "0.48537955", "0.48459837", "0.4840633", "0.48375073", "0.48195198", "0.48169038", "0.4805787", "0.4798757", "0.47658423", "0.47618493", "0.47485518", "0.47448966", "0.47424588", "0.47269076", "0.47197092", "0.47158346", "0.47149068", "0.4698595", "0.46940568", "0.46852386", "0.46803787", "0.46780688", "0.46722883", "0.46651515", "0.46608937", "0.46428934", "0.4642779", "0.4636132", "0.46299505", "0.46262434", "0.4618894", "0.46170923", "0.4614907", "0.4614533", "0.4614064", "0.46039632", "0.4599101", "0.4593919", "0.45935774", "0.4585706", "0.45764914", "0.4569845", "0.45611468", "0.456083", "0.45606092", "0.45582706", "0.45582414", "0.45545456", "0.45521623", "0.45520186", "0.45480084", "0.45478016", "0.4545507", "0.45438606", "0.45424727", "0.45374894", "0.45311502", "0.45294237", "0.45280826", "0.45265663", "0.45210725", "0.4511679", "0.4509661", "0.45081887" ]
0.65797174
2
Fungsi untuk inisialisasi parameter perangkat, dan menyimpan parameter perangkat pada database
function common_device_init(){ //Get perangkat mekanik yang terhubung //Get query dan pass $query = "SELECT * FROM tbl_konfigurasi"; $conf = mysql_fetch_assoc(mysql_query($query)); //Reset FIFO Camera $file = $_SERVER['DOCUMENT_ROOT'] . '/FIFO'; file_put_contents($file, ''); //Get parameter mekanik yang diambil dari database $query = $conf['konfigurasi_query']; $pass = $conf['konfigurasi_pass']; $pwm = $conf['konfigurasi_pwm']; $servoX = $conf['konfigurasi_servoX']; $servoY = $conf['konfigurasi_servoY']; $laser = $conf['konfigurasi_laser']; $flash = $conf['konfigurasi_flash']; $dev = common_serial_get_connected_device($query, $pass); //Set variabel dev menjadi variabel sesi agar mudah diakses if(empty($dev) || !isset($dev)){ $dev = '/dev/null'; } $_SESSION['dev'] = $dev; //Simpan alamat perangkat terhubung $query = sprintf("UPDATE tbl_konfigurasi SET konfigurasi_dev = '%s'", mysql_real_escape_string($dev)); //Eksekusi query mysql_query($query); //Inisialisasi perangkat agar bisa digunakan common_init_serial($dev); //Set parameter mekanik sebelumnya common_serial_write('m'.$servoX.'o'.$servoY.'o',$dev); common_serial_write('p'.$pwm.'o',$dev); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_param($param)\n{\n\t$user_id = $_SESSION['lid'];\n $atskaites_id = $_GET['h'];\n//\techo \"Lietotaja nr. =\".$user_id.'<br />';\n\n\t$r = mysql_query(\"select * from parametrs where nosaukums = '$param' and user_id = '$user_id' and atskaites_id = '$atskaites_id'\");\n\t\n\tif ($m = mysql_fetch_array($r))\n\t\treturn $m['vertiba'];\n\telse\n\t\treturn '';\n}", "private function get_rujukan_detail($parameter) {\n\n }", "private function setParams($statement, $parameters = array()){\n\t\tforeach ($parameters as $key => $value) { ///percorrer as linhas rows\n\t\t\t$this->setParam($key,$value);///percorer as colunas ID\n\t\t}\n\t}", "function get_parametros_db_negocio()\n\t{\n\t\t$fuentes = $this->get_indice_fuentes();\n\t\tif (empty($fuentes)) {\n\t\t\treturn;\n\t\t}\n\t\t$fuente_defecto = toba_info_editores::get_fuente_datos_defecto($this->identificador);\n\t\tif (! isset($fuente_defecto)) {\n\t\t\t$fuente_defecto = current($fuentes);\n\t\t}\n\t\t$id_def_base = $this->construir_id_def_base($fuente_defecto);\n\t\treturn $this->get_instalacion()->get_parametros_base($id_def_base);\n\t}", "public static function read_SqlParams($param);", "function parametry($delete,$hidden,$poradi,$parametry,$jednotky,$akce,$idKarta) {\n\n\t// pracuje s parametry ve Vzoru produktoveho listu\n\t// $akce urcuje zda bude INSERT nebo UPDATE\n\t\n\t// odstranujeme\n\tif(!empty($delete)) {\n\t\n\t\treset($delete);\n\t\twhile ($pD = each($delete)) {\n\t\t\n\t\t\t$D = $pD['key'];\n\t\t\t\n\t\t\t// id id_karta nazev jednotka poradi\n\t\t\t$query = 'DELETE FROM '.T_PARAMETRY2.' WHERE id = '.$D.' LIMIT 1';\n\t\t\tmy_DB_QUERY($query,__LINE__,__FILE__);\n\t\t\t\n\t\t\tmy_OPTIMIZE_TABLE(T_PARAMETRY2);\n\t\t\t\n\t\t\t\n\t\t\tdeleteSymboly(\"SELECT img FROM \".T_PARAMETRY3.\" WHERE id_parametr = $D AND img != ''\");\n\t\t\t\n\t\t\t// id_parametr hodnota id_kp\n\t\t\t$query = 'DELETE FROM '.T_PARAMETRY3.' WHERE id_parametr = '.$D.'';\n\t\t\tmy_DB_QUERY($query,__LINE__,__FILE__);\n\t\t\t\n\t\t\tmy_OPTIMIZE_TABLE(T_PARAMETRY3);\n\t\t\n\t\t}\n\t\n\t}\n\t\n\t\n\t\n\t// zpracujeme parametry\n\tif(!empty($parametry)) {\n\t\t\n\t\t// aktualizujeme nebo pridavame\n\t\treset($parametry);\n\t\twhile ($p = each($parametry)) {\n\t\t\n\t\t\t$K = $p['key'];\n\t\t\t\n\t\t\tif(!empty($parametry[$K]) && empty($delete[$K])) {\n\t\t\t\n\t\t\t\t$hi = trim($hidden[$K]);\n\t\t\t\t$pa = addslashes(trim($parametry[$K]));\n\t\t\t\t$je = addslashes(trim($jednotky[$K]));\n\t\t\t\t$po = trim($poradi[$K]);\n\t\t\t\t\n\t\t\t\tif(empty($hi))$hi=0;\n\t\t\t\t\n\t\t\t\tif($akce == 'update') {\n\t\t\t\t\n\t\t\t\t\t// id id_karta nazev jednotka poradi\n\t\t\t\t\t$query = \"UPDATE \".T_PARAMETRY2.\" SET \n\t\t\t\t\tnazev = '$pa', \n\t\t\t\t\thidden = '$hi',\n\t\t\t\t\tjednotka = '$je', \n\t\t\t\t\tporadi = '$po' \n\t\t\t\t\tWHERE id = $K\";\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($akce == 'insert') {\n\t\t\t\t\n\t\t\t\t\t// id id_karta nazev jednotka poradi\n\t\t\t\t\t$query = \"INSERT INTO \".T_PARAMETRY2.\" VALUES(NULL,$idKarta,'$pa','$hi','$je','$po')\";\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tmy_DB_QUERY($query,__LINE__,__FILE__);\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t}\n\n}", "public function getParameter();", "public function getParameter();", "function _DBParameter($sql)\n\t{\n\t\t$savelog = $this->conn->LogSQL(false);\n\t\tif (is_array($sql)) {\n\t\tglobal $ADODB_FETCH_MODE;\n\n\t\t\t$sql1 = $sql[0];\n\t\t\t$key = $sql[1];\n\t\t\tif (sizeof($sql)>2) $pos = $sql[2];\n\t\t\telse $pos = 1;\n\t\t\tif (sizeof($sql)>3) $coef = $sql[3];\n\t\t\telse $coef = false;\n\t\t\t$ret = false;\n\t\t\t$save = $ADODB_FETCH_MODE;\n\t\t\t$ADODB_FETCH_MODE = ADODB_FETCH_NUM;\n\t\t\tif ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);\n\n\t\t\t$rs = $this->conn->Execute($sql1);\n\n\t\t\tif (isset($savem)) $this->conn->SetFetchMode($savem);\n\t\t\t$ADODB_FETCH_MODE = $save;\n\t\t\tif ($rs) {\n\t\t\t\twhile (!$rs->EOF) {\n\t\t\t\t\t$keyf = reset($rs->fields);\n\t\t\t\t\tif (trim($keyf) == $key) {\n\t\t\t\t\t\t$ret = $rs->fields[$pos];\n\t\t\t\t\t\tif ($coef) $ret *= $coef;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$rs->MoveNext();\n\t\t\t\t}\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t\t$this->conn->LogSQL($savelog);\n\t\t\treturn $ret;\n\t\t} else {\n\t\t\tif (strncmp($sql,'=',1) == 0) {\n\t\t\t\t$fn = substr($sql,1);\n\t\t\t\treturn $this->$fn();\n\t\t\t}\n\t\t\t$sql = str_replace('$DATABASE',$this->conn->database,$sql);\n\t\t\t$ret = $this->conn->GetOne($sql);\n\t\t\t$this->conn->LogSQL($savelog);\n\n\t\t\treturn $ret;\n\t\t}\n\t}", "function param($name)\n{\n static $dbParams;\n if(isset(Yii::app()->params[$name]))\n return Yii::app()->params[$name];\n\telse\n return \"\"; \n}", "function consultar_parametros($db){\n\t\t\t$query = \"SELECT P.id, P.empresa, P.razonsocial_fiscal, P.razonsocial_fantasia, P.clientes_regimen_de_iva_id,\n\t\t\t\t\t\t\tP.deposito_id, P.moneda_id, P.tipo_de_pago_id, P.decimales, P.fecha_inicio_actividades,\n\t\t\t\t\t\t\tP.logo, P.banner, P.logo_marca_de_agua, P.parametros_perfil_empresa, P.rec_desc_tipo_de_pago_por_item,\n\t\t\t\t\t\t\tP.domicilio_comercial, P.domicilio_localidad_comercial, P.telefono_comercial, P.email_comercial,\n\t\t\t\t\t\t\tPAD.slogan\n\t\t\t\t\t\tFROM parametros P\n\t\t\t\t\t\t\tLEFT OUTER JOIN parametros_adicional AS PAD ON (P.id = PAD.id)\n\t\t\t\t\t\tWHERE P.oculto = 0 \n\t\t\t\t\t\tORDER BY P.id DESC\n\t\t\t\t\t\tLIMIT 1 \";\n\t\t\t\n\t\t\t$resultpp = $this->LOGS_PARAM($db,$query);\n\t\t\t\n\t\t\treturn $resultpp;\n\t\t}", "function add($param) {\n extract($param);\n // nunca suponga el orden de las columnas: INSERT INTO tabla VALUES (v1, v2,v3, ...); tómese el trabajo de indicar los nombres de columnas\n // los nombres de los elementos del array asociativo corresponden a los atributos name de las columnas del jqGrid\n $sql = \"INSERT INTO usuario(id_usuario, direccion, telefonos, correos, contrasena, rol )\n VALUES ('$id_usuario', '$direccion','$telefonos', '$correos', '$contrasena','operario' );\n INSERT INTO operario(fk_usuario,nombres, apellidos) \n VALUES ('$id_usuario','$nombres', '$apellidos');\";\n $conexion->getPDO()->exec($sql);\n echo $conexion->getEstado();\n }", "function db_parameter(){\n\t$param[\"host\"] = \"localhost\"; // to be changed\n\t$param[\"name\"] = \"wbd3\";\n\t\n\t$param[\"user\"] = \"root\"; // to be changed\n\t$param[\"pass\"] = \"root\"; // to be changed\n\t\n\treturn $param;\n}", "function setParamsToSaveQuery()\n {\n \n \n if($this->form->getQuery())\n {\n $stringTmp=$this->form->getQuery()->getSqlQuery();\n $stringTmp=substr($stringTmp, strpos($stringTmp,' FROM ' ));\n $stringTmp=substr($stringTmp, 0, strpos($stringTmp,' LIMIT ' ));\n $this->getUser()->setAttribute('queryToSaveWhere', $stringTmp);\n }\n \n if($this->form->getQuery()->getParams())\n {\n $stringTmp=\"\";\n $arrayTmp=$this->form->getQuery()->getParams();\n if(isset($arrayTmp['where']))\n {\n foreach($arrayTmp['where'] as $key=>$value)\n {\n $stringTmp.=\";|\".$value.\"|\";\n }\n $this->getUser()->setAttribute('queryToSaveParams', $stringTmp);\n }\n }\n return;\n }", "function p_modificar_parametro($cod_usuario,$cod_parametro,$val_parametro){\n\t\tif(!$cod_usuario)return false;\n\t\tglobal $db;\n\t\t\n\t\tif(!$val_parametro)$val_parametro = 0;\n\t\telse $val_parametro = 1;\n\n\t\t// primero consulta si existe\n\t\t$query = \"select count(*) as num_registros\t\n\t\t\t\t\t\t\tfrom \tparametro_x_usuario \n\t\t\t\t\t\t\twhere \tcod_usuario = $cod_usuario\n\t\t\t\t\t\t\tand\t\tcod_parametro = $cod_parametro\";\n\t\t$row = $db->consultar_registro($query);\n\t\t$num_registros = $row['num_registros'];\n\t\t\n\t\t// si existe algun dato lo actualiza\n\t\tif($num_registros > 0){\n\t\t\t$query = \"update parametro_x_usuario \n\t\t\t\t\t\tset val_parametro = $val_parametro \t\n\t\t\t\t\t\twhere cod_usuario = $cod_usuario\t \n\t\t\t\t\t\tand cod_parametro = $cod_parametro\";\n\n\t\t\t$db->consultar($query);\t\t\n\t\t}else{\n\t\t\t$query=\"insert into parametro_x_usuario \n\t\t\t\t\t(cod_usuario,cod_parametro,val_parametro)\n\t\t\t\t\tVALUES\n\t\t\t\t\t($cod_usuario,$cod_parametro,$val_parametro)\";\n\n\t\t\t$db->consultar($query);\t\t\n\t\t}\n\t\n\t\t// primero consulta si existe\n\t\t$query = \"select *\n\t\t\t\t\tfrom \tparametro_x_usuario \n\t\t\t\t\twhere \tcod_usuario = $cod_usuario\n\t\t\t\t\tand\t\tcod_parametro = $cod_parametro\";\n\t\t$row = $db->consultar_registro($query);\n\t\t$val_parametro = $row['val_parametro'];\n\n\t\treturn $val_parametro;\n\n\n\t}", "function getParamInfo($type='case'){ // default type = case\r\n global $pdo;\r\n#### returns all the info stored in params table\r\n\tif($type == 'all'){\r\n\t\t$select = \"SELECT * FROM parameters \r\n WHERE `org_id` = $this->org_id\";\r\n $args = array();\r\n\t}\r\n\telse{\r\n\t\t$select = \"SELECT parameters.* FROM parameters, parameter_classes \r\n\t\tWHERE parameter_classes.id = parameters.class \r\n AND `org_id` = $this->org_id \r\n\t\tAND parameter_classes.name = ?\";\r\n $args = array($type);\r\n\t}\r\n\r\n\ttry{\r\n\t$stmt = $pdo->prepare($select);\r\n \t$stmt->execute($args);\r\n\t}\r\n\tcatch(PDOException $e){\r\n\t\t$this->setError($e->getMessage());\r\n\t}\r\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n}", "function DBParameter($param)\n\t{\n\t\tif (empty($this->settings[$param])) return false;\n\t\t$sql = $this->settings[$param][1];\n\t\treturn $this->_DBParameter($sql);\n\t}", "function add_pejabat($params)\n {\n $this->db->trans_begin();\n $this->db->where('idstruktural',$params['idstruktural']);\n $this->db->update('pejabat', ['status'=>false]); \n $this->db->insert('pejabat',$params);\n $id = $this->db->insert_id();\n \n if($this->db->trans_status()){\n $this->db->trans_commit();\n $result = $this->db->query(\"SELECT\n `pejabat`.*,\n `struktural`.`nm_struktural`,\n `pegawai`.`Nama`\n FROM\n `pejabat`\n LEFT JOIN `pegawai` ON `pejabat`.`idpegawai` = `pegawai`.`idpegawai`\n LEFT JOIN `struktural` ON `struktural`.`idstruktural` =\n `pejabat`.`idstruktural`\n WHERE pejabat.idpejabat= '$id'\")->row_array();\n return $result;\n }else{\n $this->db->trans_rollback();\n return $this->db->trans_status();\n }\n }", "public function parametreValide($id,$dateSortie,$lieu) {\n $em = $this->getDoctrine()->getManager();\n $saison = new Saison;\n $year = $saison->connaitreSaison();\n //on s'assure que les parametres n'ont pas ete changer a la main\n $saison = $em->getRepository('SC\\ActiviteBundle\\Entity\\Saison')->findOneByAnnee($year);\n $lieuObjet = $em->getRepository('SC\\ActiviteBundle\\Entity\\Lieu')->findOneByNomLieu($lieu);\n $activite = $em->getRepository('SC\\ActiviteBundle\\Entity\\Activite')->find($id);\n $sortie = $em->getRepository('SC\\ActiviteBundle\\Entity\\Sortie')->findOneBy(array('saison'=> $saison, 'activite'=>$activite,'dateSortie'=>$dateSortie)); \n \n if(is_null($activite) OR is_null($lieuObjet) OR is_null($sortie)) {\n return false;\n }\n else {\n return true;\n }\n }", "private function processarParametros() {\n\n /**\n * Busca os usuarios definidos para notificar quando acordo ira vencer, ordenando pelo dia\n */\n $oDaoMensageriaUsuario = db_utils::getDao('mensagerialicenca_db_usuarios');\n $sSqlUsuarios = $oDaoMensageriaUsuario->sql_query_usuariosNotificar('am16_sequencial', 'am16_dias');\n $rsUsuarios = db_query($sSqlUsuarios);\n $iTotalUsuarios = pg_num_rows($rsUsuarios);\n\n if ($iTotalUsuarios == 0) {\n throw new Exception(\"Nenhum usuário para notificar.\");\n }\n\n /**\n * Percorre os usuarios e define propriedades necessarias para buscar acordos\n */\n for ($iIndiceUsuario = 0; $iIndiceUsuario < $iTotalUsuarios; $iIndiceUsuario++) {\n\n /**\n * Codigo do usuario para notificar: mensageriaacordodb_usuario.ac52_sequencial\n */\n $iCodigoMensageriaLicencaUsuario = db_utils::fieldsMemory($rsUsuarios, $iIndiceUsuario)->am16_sequencial;\n\n /**\n * Codigo dos usuarios que serao notificados\n * - usado para verificar os usuarios que ja foram notificados\n * - mensageriaacordodb_usuario.ac52_sequencial\n */\n $this->aCodigoMensageriaLicencaUsuario[] = $iCodigoMensageriaLicencaUsuario;\n\n /**\n * Usuario para notificar\n * - mensageriaacordodb_usuario\n */\n $oMensageriaLicencaUsuario = MensageriaLicencaUsuarioRepository::getPorCodigo($iCodigoMensageriaLicencaUsuario);\n\n /**\n * Codigo do usuario do sistema\n * - db_usuarios.id_usuario\n */\n $iCodigoUsuario = $oMensageriaLicencaUsuario->getUsuario()->getCodigo();\n\n /**\n * Data de vencimento:\n * - Soma data atual com dias definidos na rotina de parametros de mensageria\n */\n $iDias = $oMensageriaLicencaUsuario->getDias();\n $this->aDataVencimento[] = date('Y-m-d', strtotime('+ ' . $iDias . ' days'));\n }\n\n return true;\n }", "public function parameters();", "public function parameters();", "function constitueCommande($idProd,$idCommande,$qteProd){\n require(\"./modele/connexionBD.php\");\n $sql_ajt = \"INSERT INTO `constitue`(`idProduit`, `idCommande`, `qteProduit`) \n VALUES (:idp,:idc,:qteP);\";\n try {\n $statement = $pdo->prepare($sql_ajt);\n $statement->bindParam(':idc', $idCommande);\n $statement->bindParam(':idp', $idProd);\n $statement->bindParam(':qteP', $qteProd);\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $statement->execute();\n } catch (PDOException $e) {\n echo utf8_encode(\"Echec de select : \" . $e->getMessage() . \"\\n\");\n die();\n }\n\n}", "private function fetchParameter()\r\n\t{\r\n\t\t//@TODO schlundus, move fetch inside the parameterInfo class\r\n\t\t$parameterSource = $this->parameterInfo->source;\r\n\t\t$parameterName = $this->parameterInfo->name;\r\n\t\t\r\n\t\t$src = null;\r\n\t\tswitch($parameterSource)\r\n\t\t{\r\n\t\t\tcase \"POST\":\r\n\t\t\t\t$src = $_POST;\r\n\t\t\t\tbreak;\r\n\t\r\n\t\t\tcase \"GET\":\r\n\t\t\t\t$src = $_GET;\r\n\t\t\t\tbreak;\r\n\t\r\n\t\t\tcase \"REQUEST\":\r\n\t\t\t\t$src = $_REQUEST;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\r\n\t\t$value = null;\r\n\t\t$fetched = false;\r\n\t\tif ($src)\r\n\t\t{\t\r\n\t\t\tif (isset($src[$parameterName]))\r\n\t\t\t{\r\n\t\t\t\t$value = $src[$parameterName];\r\n\t\t\t\t$fetched = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->bFetched = $fetched;\r\n\t\t$this->taintValue = $value;\r\n\t}", "protected function reemplazaParametro(){\n\t\t$vector=func_get_arg(0);\n\t\t$params=$this->dato;\n//\t\tprint_r($params);\n//\t\techo \"<br>\";\n\t\t$cant=sizeof($params);\n\t\t$accion=$vector[0];\n\t\tif (sizeof($params)!=0){\n\t\t\t$claves=array_keys($params);\n//\t\tfor($x=1;$x<$cant;$x++){\n\t\t\tforeach($claves as $clave){\n\t\t\t\t$str=\"#\".($clave).\"#\";\n\t\t\t\t$accion=str_replace($str,$params[$clave],$accion);\n\t\t\t}\n\t\t}\n\t\treturn $accion;\n\t}", "public function UpdateParamsGen() {\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n\n if (isset($_REQUEST['data'])) {\n $idSociete = $_REQUEST['data']['idSociete'];\n $idDefaultTva = $_REQUEST['data']['idDefaultTva'];\n $idDefaultDevise = $_REQUEST['data']['idDefaultDevise'];\n // Input validations\n if (!empty($idSociete)) {\n\n try {\n $sql = $this->db->prepare(\"UPDATE paramsGenerale SET idDefaultTva = :idDefaultTva, idDefaultDevise = :idDefaultDevise \"\n . \"WHERE idSociete = :idSociete\");\n\n $sql->bindParam('idDefaultTva', $idDefaultTva, PDO::PARAM_STR);\n $sql->bindParam('idDefaultDevise', $idDefaultDevise, PDO::PARAM_STR);\n $sql->bindParam('idSociete', $idSociete, PDO::PARAM_INT);\n\n $sql->execute();\n\n if ($sql) {\n $success = array('status' => \"Success\", \"msg\" => \"Successfully updated\");\n $this->response($this->json($success), 200);\n }\n } catch (Exception $ex) {\n $this->response('', $ex->getMessage()); // If no records \"No Content\" status\n }\n }\n }\n\n // If invalid inputs \"Bad Request\" status message and reason\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid param\");\n $this->response($this->json($error), 400);\n }", "function BDDselect($sql, $param){\n $bdd = BDDopen();\n $req = $bdd->prepare($sql);\n if($req->execute($param) === FALSE){\n echo 'Errore de la requette';\n print_r($param);\n }\n return $req;\n}", "private function restartParam()\n\t{\n\t\t$this ->status = 0;\n\t\t$this ->num_rows = 0;\n\t\t$this ->affected_rows = 0;\n\t\t$this ->insert_id = 0;\n\t\t$this ->data = 0;\n\t\t$this ->types = \"\";\n\t\t$this ->query = \"\";\n\t\t$this ->queryFields = \"\";\n\t\t$this ->queryTablesKeys = \"\";\n\t\t$this ->queryForeign = \"\";\n\t\t$this ->table = \"\";\n\t\t$this ->alterTable = FALSE;\n\t}", "public function getParam(){\n return $this->data[\"sql\"];\n }", "public function adj_test($parameter){\n // print_r($parameter);\n $storedProcedure='adj_get_brand_name';\n $this -> dbmodel = new DBModel();\n $retrieval = $this -> dbmodel -> call_dbFunction($storedProcedure, $parameter);\n \n $i=0;\n $data=array();\n while($row=mysql_fetch_array($retrieval)){\n $data[$i]['id'] = $row['id'];\n $data[$i]['b_category_name'] = $row['b_category_name'];\n \n $i++;\n }\n $retrieval = $this -> dbmodel -> make_result($data);\n \n return $retrieval;\n }", "function saveParams($data=1) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->data_source)) {\n $p[\"data_source\"]=$this->data_source;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function saveParams($data=1) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->data_source)) {\n $p[\"data_source\"]=$this->data_source;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "public function perimetriaAction(){\n $id = (int) $this->getRequest()->getParam('id');\n $request = $this->getRequest();\n $perimetria = $this->_perimetria->fetchRow(\"cli_codigo_fk='$id' \", null);\n $dados = $this->getRequest()->getParams();\n \n if(isset($perimetria)){\n\n\n try {\n\n\n $perimetria->per_busto=$dados[\"per_busto\"];\n $perimetria->per_cicatriz_umbilical=$dados[\"per_cicatriz_umbilical\"];\n $perimetria->per_cintura=$dados[\"per_cintura\"];\n $perimetria->per_5_cm_acima=$dados[\"per_5_cm_acima\"];\n $perimetria->per_gluteos=$dados[\"per_gluteos\"];\n $perimetria->per_mse_braco=$dados[\"per_mse_braco\"];\n $perimetria->per_mse_antebraco=$dados[\"per_mse_antebraco\"];\n $perimetria->per_msd_braco=$dados[\"per_msd_braco\"];\n $perimetria->per_msd_antebraco=$dados[\"per_msd_antebraco\"];\n $perimetria->per_mie_coxa=$dados[\"per_mie_coxa\"];\n $perimetria->per_mie_perna=$dados[\"per_mie_perna\"];\n $perimetria->per_mid_coxa=$dados[\"per_mid_coxa\"];\n $perimetria->per_mid_perna=$dados[\"per_mid_perna\"];\n $perimetria->per_consideracoes=$dados[\"per_consideracoes\"];\n \n $perimetria->save();\n \n \n $this->_helper->flashMessenger('<div class=\"alert alert-info fade in\">\n <button class=\"close\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Perimetria editada!</strong>\n Perimetria editada com sucesso!\n </div>');\n \n $this->_redirect('/cliente/ficha/id/' .$id);\n \n\n } catch (Zend_Db_Exception $e) {\n \n echo $e->getMessage();\n exit;\n \n $this->_dbAdapter->rollBack();\n $flashMessenger = $this->_helper->FlashMessenger;\n $flashMessenger->addMessage('<div class=\"alert fade in\">\n <button class=\"close\" data-dismiss=\"alert\" type=\"button\">x</button>\n <strong>Ocorreu um erro!</strong>\n Se o erro persistir entre em contato com o suporte!\n </div>');\n\n $this->_redirect('/cliente/ficha/id/' .$id);\n }\n\n\n \n }else{\n\n if ($request->isPost()) {\n\n $this->_dbAdapter->beginTransaction();\n\n $perimetria=array(\n \"per_busto\"=>$dados[\"per_busto\"],\n \"per_cicatriz_umbilical\"=>$dados[\"per_cicatriz_umbilical\"],\n \"per_cintura\"=>$dados[\"per_cintura\"],\n \"per_5_cm_acima\"=>$dados[\"per_5_cm_acima\"],\n \"per_gluteos\"=>$dados[\"per_gluteos\"],\n \"per_mse_braco\"=>$dados[\"per_mse_braco\"],\n \"per_mse_antebraco\"=>$dados[\"per_mse_antebraco\"],\n \"per_msd_braco\"=>$dados[\"per_msd_braco\"],\n \"per_msd_antebraco\"=>$dados[\"per_msd_antebraco\"],\n \"per_mie_coxa\"=>$dados[\"per_mie_coxa\"],\n \"per_mie_perna\"=>$dados[\"per_mie_perna\"],\n \"per_mid_coxa\"=>$dados[\"per_mid_coxa\"],\n \"per_mid_perna\"=>$dados[\"per_mid_perna\"],\n \"per_consideracoes\"=>$dados[\"per_consideracoes\"],\n \"cli_codigo_fk\"=>$id,\n );\n\n try {\n \n \n $lastId = $this->_perimetria->insert($perimetria);\n\n $this->_dbAdapter->commit();\n \n \n $flashMessenger = $this->_helper->FlashMessenger;\n $flashMessenger->addMessage('<div class=\"alert alert-info fade in\">\n <button class=\"close\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Perimetria adicionada!</strong>\n Perimetria adicionada com sucesso!\n </div>');\n \n $this->_redirect('/cliente/ficha/id/' . $id);\n exit;\n \n } catch (Zend_Db_Exception $e) {\n \n echo $e->getMessage();\n exit;\n \n $this->_dbAdapter->rollBack();\n $flashMessenger = $this->_helper->FlashMessenger;\n $flashMessenger->addMessage('<div class=\"alert fade in\">\n <button class=\"close\" data-dismiss=\"alert\" type=\"button\">x</button>\n <strong>Ocorreu um erro!</strong>\n Se o erro persistir entre em contato com o suporte!\n </div>');\n\n $this->_helper->redirector('index');\n }\n\n }\n\n }\n\n }", "function add_lokasi_pelayanan($params)\n {\n $this->db->insert('mstlokasipelayanan',$params);\n return $this->db->insert_id();\n }", "public function parametreValide2($id,$dateSortie) {\n $em = $this->getDoctrine()->getManager();\n $saison = new Saison;\n $year = $saison->connaitreSaison();\n //on s'assure que les parametres n'ont pas ete changer a la main\n $saison = $em->getRepository('SC\\ActiviteBundle\\Entity\\Saison')->findOneByAnnee($year);\n\n $activite = $em->getRepository('SC\\ActiviteBundle\\Entity\\Activite')->find($id);\n $sortie = $em->getRepository('SC\\ActiviteBundle\\Entity\\Sortie')->findOneBy(array('saison'=> $saison, 'activite'=>$activite,'dateSortie'=>$dateSortie)); \n \n if(is_null($activite) OR is_null($sortie)) {\n return false;\n }\n else {\n return true;\n }\n }", "public function get_params()\n {\n }", "public function get_params()\n {\n }", "function haki($param = null, $id = null){\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\n\t\t$data['p_ta'] = $this->input->post(\"thn\");\n\t\t$data['p_smt'] = $this->input->post(\"smt\");\n\t\tif ($data['p_ta'] == null && $data['p_smt'] == null){\n\t\t\t$data['ta'] = $this->session->userdata('ta');\n\t\t\t$data['smt'] = $this->session->userdata('smt');\t\t\n\t\t}else{\n\t\t\t$data['ta'] = $this->input->post(\"thn\");\n\t\t\t$data['smt'] = $this->input->post(\"smt\");\n\t\t}\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_data_haki';\n\t\t$parameter = array('api_search' => array($kd_dosen));\n\t\t$data['haki'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t# get data dosen prodi \n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_all_dosen';\n\t\t\t$parameter = array('api_search' => array());\n\t\t\t$data['dosen'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_bebankerja';\n\t\t\t\n\t\t\t$thn= $this->session->userdata('ta');\n\t\t\t$smt=$this->session->userdata('smt');\n\t\t\t$parameter = array('api_search' => array('H',$kd_dosen, $thn, $smt));\n\t\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\tif ($param != null){\n\t\t\t$data['jenis_haki'] = $this->s00_lib_api->get_api_jsob(URL_API_BKD.'bkd_beban_kerja/get_jenis_haki','POST',array());\t\n\t\t\tif($param == 'tambah'){\n\t\t\t\tif($id != null){\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_haki';\n\t\t\t\t\t$parameter = array('api_search' => array($id));\n\t\t\t\t\t$ch=$data['curr_haki'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_bkd';\n\t\t\t\t\t$parameter = array('api_search' => array($ch->KD_BK, 'H'));\n\t\t\t\t\t$data['current_data'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t}\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_all_dosen';\n\t\t\t\t$parameter = array('api_search' => array());\n\t\t\t\t$data['dosen'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/form_haki',$data);\n\t\t\t}\n\t\t\telse if ($param == 'detail'){\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_haki';\n\t\t\t\t$parameter = array('api_search' => array($id));\n\t\t\t\t$data['curr_haki'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\t\t\t\t\t\t\t\n\n\t\t\t\t# GET PARTNER\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/partner';\n\t\t\t\t$parameter = array('api_kode' => 11000, 'api_subkode' => 1, 'api_search' => array($id,'HAKI'));\n\t\t\t\t$data['partner'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t\t\t#print_r($data['partner']); die();\n\t\t\t\t$data['nama_partner'] = array();\n\t\t\t\tforeach ($data['partner'] as $p){\n\t\t\t\t\t$data['nama_partner'][$p->PARTNER] = $this->get_nama_partner($p->PARTNER);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/daftar_haki',$data);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/daftar_haki',$data);\n\t\t\t}\n\t\t}else{\n\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t$this->output99->output_display('dosen/daftar_haki',$data);\n\t\t}\n\t}", "function lireParam($sql)\n {\n $collection = $this->execute($sql);\n $collection = $collection[0];\n if ($this->auto_date == 1) {\n $collection = $this->utilDatesDBVersLocale($collection);\n }\n if ($this->codageHtml) {\n $collection = $this->htmlEncode($collection);\n }\n if ($this->toUTF8) {\n $collection = $this->utf8Encode($collection);\n }\n return $collection;\n }", "public function sqlSetParam($Value,$ParamName='?'){\n\n if (is_scalar($Value)) {\n\n switch (gettype($Value)){\n\n case \"string\":\n\n // se nella stringa ci sono barre la funzione mysql_real_escape_string non funziona $Value = str_replace('\\\\','\\\\\\\\',$Value);\n // metto le slashes perche' su preg_replace me le interpreta e le elimina\n $Value = '\"'.(mysql_real_escape_string($Value,$this->hDatabase)).'\"';\n\n // se nel campo valore ci sono ? allora devono essere ignorati come markup per i parametri\n $Value = str_replace(\"?\",\"\\?\",$Value);\n\n $replaceString = $Value;\n\n break;\n\n break;\n case \"boolean\":\n ($Value) ? $replaceString=1 : $replaceString=0; \n break;\n case \"double\":\n //$v = localeconv();\n //$replaceString = $Value;\n $old = setlocale(LC_NUMERIC,0);\n setlocale(LC_NUMERIC,'en');\n //set settype($replaceString,'double');\n $replaceString = (string)$Value;\n #$decimal_point = ','; #$v[decimal_point]\n setlocale(LC_NUMERIC,$old);\n #$thousands_sep = '.'; #$v[thousands_sep]\n #$replaceString = str_replace($thousands_sep,'',$Value);\n #$replaceString = str_replace($decimal_point,'.',$replaceString);\n //settype($replaceString,'double'); Attenzione se il locale è italia allora crea \n break;\n default:\n $replaceString = ($Value);\n }\n } else if (is_array($Value)){\n\n if (!empty($Value)){\n\n foreach ($Value as $theValue){\n\n if (is_string($theValue)){\n\n $theValue = '\"'.(mysql_real_escape_string($theValue,$this->hDatabase)).'\"';\n // se nel campo valore ci sono ? allora devono essere ignorati come markup per i parametri\n $theValue = str_replace(\"?\",\"\\?\",$theValue);\n\n }\n\n $_replaceString[] = $theValue;\n\n }\n $replaceString = join(',',$_replaceString); \n } else {\n $replaceString = '';\n }\n } else if (is_null($Value)){\n $replaceString = \"NULL\"; \n } else if ($Value instanceof ISqlFunction) {\n\n $replaceString = (string)($Value);\n\n } else if ($Value instanceof ISqlStatement) {\n\n $replaceString = (string)($Value);\n\n }\n\n\n $prec = '';\n $pos = strpos($this->sqlQuery,'?');\n\n /* for($i = 0; $i < strlen($this->sqlQuery); $i++){\n if ($i>0){ $prec = $this->sqlQuery{$i-1}; }\n if ( ($prec!='\\\\') && ($this->sqlQuery{$i}=='?') ){\n $pos = $i;\n break;\n }\n }*/\n\n\n while ($pos!==false) {\n if (($pos>0) and ($this->sqlQuery{$pos-1}!='\\\\')) {\n $this->sqlQuery = substr_replace($this->sqlQuery,$replaceString,$pos,1);\n $pos = false;\n } else {\n $pos = strpos($this->sqlQuery,'?',$pos+1);\n }\n\n }\n\n /* if ($pos !== false){\n if (($pos>0) and ($this->sqlQuery{$pos-1}!='\\\\')) {\n $this->sqlQuery = substr_replace($this->sqlQuery,$replaceString,$pos,1);\n } else {\n\n }\n }*/\n\n }", "function getdataRwyt($skpd_id, $AsetId, $tglakhirperolehan, $tglawalperolehan, $param, $tglpembukuan)\n{\n\n if($param == '01') {\n $tabel_log = 'log_tanah';\n\n $tabel = 'tanah';\n $tabel_view = 'view_mutasi_tanah';\n } elseif($param == '02') {\n $tabel_log = 'log_mesin';\n $tabel = 'mesin';\n $tabel_view = 'view_mutasi_mesin';\n } elseif($param == '03') {\n $tabel_log = 'log_bangunan';\n $tabel = 'bangunan';\n $tabel_view = 'view_mutasi_bangunan';\n } elseif($param == '04') {\n $tabel_log = 'log_jaringan';\n $tabel = 'jaringan';\n $tabel_view = 'view_mutasi_jaringan';\n } elseif($param == '05') {\n $tabel_log = 'log_asetlain';\n $tabel = 'asetlain';\n $tabel_view = 'view_mutasi_asetlain';\n } elseif($param == '06') {\n $tabel_log = 'log_kdp';\n $tabel = 'kdp';\n $tabel_view = 'view_mutasi_kdp';\n }\n\n /*Kode Riwayat\n 0 = Data baru\n 2 = Ubah Kapitalisasi\n 7 = Penghapusan Sebagian\n 21 = Koreksi Nilai\n 26 = Penghapusan Pemindahtanganan\n 27 = Penghapusan Pemusnahan\n */\n/* $paramLog = \"l.TglPerubahan >'$tglawalperolehan' and l.TglPerubahan <='$tglakhirperolehan' and l.TglPembukuan>='$tglpembukuan'\n AND l.Kd_Riwayat in (0,1,2,3,7,21,26,27,28,50,51,29) and l.Kd_Riwayat != 77 \n and l.Aset_ID = '{$AsetId}' \n order by l.Aset_ID ASC\";*/\n\n $paramLog = \"l.TglPerubahan >'$tglawalperolehan' and l.TglPerubahan <='$tglakhirperolehan' \n AND l.Kd_Riwayat in (0,1,2,3,7,21,26,27,28,50,51,29,30,281,291,36) and l.Kd_Riwayat != 77 \n and l.Aset_ID = '{$AsetId}' \n order by l.Aset_ID ASC\";\n\n\n $log_data = \"select l.* from {$tabel_log} as l \n inner join {$tabel} as t on l.Aset_ID = t.Aset_ID \n where $paramLog\";\n //pr($log_data);\n $splitKodeSatker = explode ('.', $skpd_id);\n if(count ($splitKodeSatker) == 4) {\n $paramSatker = \"kodeSatker = '$skpd_id'\";\n $paramSatker_mts_tr = \"SatkerAwal = '$skpd_id'\";\n $paramSatker_mts_rc = \"SatkerTujuan = '$skpd_id'\";\n\n } else {\n $paramSatker = \"kodeSatker like '$skpd_id%'\";\n $paramSatker_mts_tr = \"SatkerAwal like '$skpd_id%'\";\n $paramSatker_mts_rc = \"SatkerTujuan like '$skpd_id%'\";\n\n }\n $queryALL = array( $log_data );\n for ($i = 0; $i < count ($queryALL); $i++) {\n $result = mysql_query ($queryALL[ $i ]) or die ($param.\"---\".$queryALL[ $i ].\" \".mysql_error());\n if($result) {\n while ($dataAll = mysql_fetch_object ($result)) {\n if($dataAll->Kd_Riwayat == 3 && $dataAll->kodeSatker != $skpd_id) {\n\n } else {\n $getdata[] = $dataAll;\n }\n\n }\n }\n\n }\n if($getdata) {\n return $getdata;\n }\n}", "function ibase_param_info($query, $param_number)\n{\n}", "public static function Nuevo_Parametro($id_matriz_pdf, $clave, $parametro, $tiempo_cliente, $tiempo_analista, $id_tecnica_analitica, $id_metodo_inter, $precio, $lim_deteccion, $lim_cuantificacion, $lim_inf_trabajo, $lim_sup_trabajo, $unidades, $decimales, $id_analista, $id_area, $holding_time, $holding_time_express, $acreditacion, $nombre_corto, $volumen, $envase, $area, $impresion)\n {\n // Sentencia INSERT\n $comando = \"INSERT INTO parametros (id_matriz_pdf, clave, parametro, tiempo_cliente, tiempo_analista, id_tecnica_analitica, id_metodo_inter, precio, lim_deteccion, lim_cuantificacion, lim_inf_trabajo, lim_sup_trabajo, unidades, decimales, id_analista, id_area, holding_time, holding_time_express, acreditacion, nombre_corto, volumen, envase, area, ventas, impresion) VALUES( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,0,?)\";\n\n // Preparar la sentencia\n $sentencia = Database::getInstance()->getDb()->prepare($comando);\n\n return $sentencia->execute(\n array(\n $id_matriz_pdf, \n $clave,\n $parametro,\n $tiempo_cliente,\n $tiempo_analista,\n $id_tecnica_analitica,\n $id_metodo_inter,\n $precio,\n $lim_deteccion,\n $lim_cuantificacion,\n $lim_inf_trabajo,\n $lim_sup_trabajo,\n $unidades,\n $decimales,\n $id_analista,\n $id_area,\n $holding_time,\n $holding_time_express,\n $acreditacion,\n $nombre_corto,\n $volumen,\n $envase,\n $area,\n $impresion\n )\n );\n\n }", "function pullaction($params){\n\t\t$this->config = new model_core_config();\n\t\t$this->requestobj = new model_ext_request('pull',$params,$this->auth());\n\t\t$this->modelmysql = new model_ext_mysql($this->config);\n\t\t$this->view = new helper_viewhelper();\n\t\t$this->modelmysql->connect();\n\t\t$this->modelmysql->selectdb();\n\t\t$this->result = $this->modelmysql->processrequest($this->requestobj);\n\t}", "function edit($param) {\n extract($param);\n $sql = \"UPDATE operario SET fk_usuario='$id_usuario', nombres='$nombres', apellidos='$apellidos' WHERE fk_usuario='$id_usuario';\n UPDATE usuario SET id_usuario='$id_usuario', direccion='$direccion', telefonos='$telefonos', correos='$correos', contrasena='$contrasena' WHERE id_usuario = '$id_usuario'; \"; // <-- el ID de la fila asignado en el SELECT permite construir la condición de búsqueda del registro a modificar\n $conexion->getPDO()->exec($sql);\n echo $conexion->getEstado();\n }", "function publikasi($param = null, $id = null){\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\n\t\t$data['p_ta'] = $this->input->post(\"thn\");\n\t\t$data['p_smt'] = $this->input->post(\"smt\");\n\t\tif ($data['p_ta'] == null && $data['p_smt'] == null){\n\t\t\t$data['ta'] = $this->session->userdata('ta');\n\t\t\t$data['smt'] = $this->session->userdata('smt');\t\t\n\t\t}else{\n\t\t\t$data['ta'] = $this->input->post(\"thn\");\n\t\t\t$data['smt'] = $this->input->post(\"smt\");\n\t\t}\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_data_publikasi';\n\t\t$parameter = array('api_search' => array($kd_dosen, $data['ta'], $data['smt']));\n\t\t$data['data_publikasi'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t# get data dosen prodi \n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_all_dosen';\n\t\t\t$parameter = array('api_search' => array());\n\t\t\t$data['dosen'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\tif ($param != null){\n\t\t\tif($param == 'tambah'){\n\t\t\t\tif($id != null){\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_publikasi';\n\t\t\t\t\t$parameter = array('api_search' => array($id));\n\t\t\t\t\t$data['curr_publikasi'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_all_dosen';\n\t\t\t\t$parameter = array('api_search' => array());\n\t\t\t\t$data['dosen'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/form_publikasi',$data);\n\t\t\t}\n\t\t\telse if ($param == 'detail'){\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_publikasi';\n\t\t\t\t$parameter = array('api_search' => array($id));\n\t\t\t\t$data['curr_publikasi'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\t\t\t\t\t\t\t\n\n\t\t\t\t# GET PARTNER\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/partner';\n\t\t\t\t$parameter = array('api_kode' => 11000, 'api_subkode' => 1, 'api_search' => array($id,'PUBLIKASI'));\n\t\t\t\t$data['partner'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t\t\t#print_r($data['partner']); die();\n\t\t\t\t$data['nama_partner'] = array();\n\t\t\t\tforeach ($data['partner'] as $p){\n\t\t\t\t\t$data['nama_partner'][$p->PARTNER] = $this->get_nama_partner($p->PARTNER);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/daftar_publikasi',$data);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/daftar_publikasi',$data);\n\t\t\t}\n\t\t}else{\n\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t$this->output99->output_display('dosen/daftar_publikasi',$data);\n\t\t}\n\t}", "function getTunjTarifParam($conn) {\n $last = self::getLastDataPeriodeGaji($conn);\n\n $sql = \"select g.idpegawai,g.kodetunjangan\n from \" . static::table('ga_pegawaitunjangan') . \" g\n left join \" . static::table('ms_tunjangan') . \" t on t.kodetunjangan=g.kodetunjangan\n where g.tmtmulai <= '\" . $last['tglawalhit'] . \"' and t.carahitung in ('P','M') and t.isbayargaji = 'T' and t.isaktif = 'Y' and g.idpegawai is not null and g.isaktif = 'Y'\n order by g.tmtmulai asc\";\n $rs = $conn->Execute($sql);\n\n while ($row = $rs->FetchRow()) {\n $a_tunjtarifparam[$row['kodetunjangan']][$row['idpegawai']] = $row['idpegawai'];\n }\n\n return $a_tunjtarifparam;\n }", "function getParametersType($parameters=array()){\n $result=getParametersTypeDataBase($parameters);\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n $jTableResult['Options'] = $result; \n return $jTableResult;\n}", "protected function getParametrosWhere(){\n\t\t\t$parametros = array();\n\t\t\t$parametros[\":pkusuario\"] = $this->pkUsuario;\n\t\t\treturn $parametros;\n\t}", "public function parametersAndQueriesDataProvider() {}", "public static function getParam() {\n\n\t}", "function saveParams($data=1) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function _set_config_param($name,$value)\r\n\t{\r\n\t\t$this->db->query(\"update m_config_params set value = ? where name = ? limit 1\",array($value,$name));\r\n\t}", "public function param_value($param1 , $param2){\n\t\t$query= $this->inventory_model->paramvalue($param1, $param2);\n\t\treturn $query; \n\t\t\n\t}", "public static function getParam($strTableName,$strFieldName){\n $value = \"\";\n $table = array();\n include 'dbInventory.php';\n //$table = self::loadDb();\n \n // Verification que le nom de la table soit défini\n if($strTableName == \"\" || is_null($strTableName)){\n Applog::ecrireLog(\"[DB-GET]- parametre strTableName [\".$strTableName.\"] est vide ou null\", \"sql\");\n \n }\n // Verification de l'existance du nom de table def\n // ini\n else if(!array_key_exists($strTableName, $table)){\n Applog::ecrireLog($table[\"'\".$strTableName.\"'\"],\"sql\");\n Applog::ecrireLog(\"[DB-GET]- La table [\".$strTableName.\"] n'est pas referencee dans la base\", \"sql\");\n \n \n }else{\n // NOM DE TABLE SAISI ET VALIDE\n \n // Si le nom du champ n'est pas défini --> Afficher le nom de table\n if($strFieldName == \"\" || is_null($strFieldName)){\n $strFieldName = \"#\";\n $value = $table[$strTableName][$strFieldName];\n }\n // Si le nom du champ est saisi mais faux, ERREUR\n else if(!array_key_exists($strFieldName, $table[$strTableName])){\n Applog::ecrireLog(\"[DB-GET]- Le champ [\".$strFieldName.\"] de la table [\".$strTableName.\"] n'existe pas\", \"sql\");\n }\n // Si le nom est valide (correspond a un des champs de la table définie)\n else{\n // NOM DU CHAMP SAISI ET VALIDE \n $value .= $table[$strTableName][$strFieldName];\n // Vérification de la présence ou nom d'un alias\n if(isset($strAlias)){\n // Si l'alias n'est pas null ou vide\n if(!is_null($strAlias) && trim($strAlias) != \"\"){ \n $value = $value.\" AS \". str_replace(\" \",\"\",$strAlias);\n }\n }\n \n }\n \n }\n \n \n \n \n return $value;\n \n }", "function _get_config_param($name)\r\n\t{\r\n\t\treturn $this->db->query(\"select value from m_config_params where name = ? \",$name)->row()->value;\r\n\t}", "function get_penyerapan($thang=\"2011\", $kddept=null, $kdunit=null, $kdprogram=null, $kdsatker=null, $kdgiat=null)\r\n{\r\n\t$ci = & get_instance();\r\n\t$ci->load->database();\r\n\t$sql = 'select sum( realisasi ) as jmlrealisasi, sum( pagu ) as jmlpagu, round(( sum( realisasi ) / sum( pagu ) ) *100, 2) as p\r\n\tfrom tb_penyerapan_anggaran\r\n\twhere thang='.$thang.' ';\r\n\t\r\n\tif(isset($kddept)):\r\n\t\t$sql .= 'and kddept='.$kddept.' ';\r\n\tendif;\r\n\tif(isset($kdunit)):\r\n\t\t$sql .= 'and kdunit='.$kdunit.' ';\r\n\tendif;\r\n\tif(isset($kdprogram)):\r\n\t\t$sql .= 'and kdprogram='.$kdprogram.' ';\r\n\tendif;\r\n\tif(isset($kdsatker)):\r\n\t\t$sql .= 'and kdsatker='.$kdsatker.' ';\r\n\tendif;\r\n\tif(isset($kdgiat)):\r\n\t\t$sql .= 'and kdgiat='.$kdgiat.' ';\r\n\tendif;\r\n\treturn $ci->db->query($sql)->row();\r\n}", "function updateInscritosTMP($NEWCODE,$PROVINCIA,$CLAVE,$TOMO,$FOLIO)\n{\n global $mysqli;\n $query = new Query($mysqli, \"UPDATE inscritostmp SET n_ins =? WHERE provincia=? and clave=? and tomo=? and folio=?\");\n $parametros = array('sssss', &$NEWCODE, &$PROVINCIA,&$CLAVE,&$TOMO,&$FOLIO);\n $data = $query->getresults($parametros);\n return true;\n}", "public function GetParamsGen() {\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n\n if (isset($_REQUEST['data'])) {\n $idSociete = $_REQUEST['data'][\"idSociete\"];\n // Input validations\n if (!empty($idSociete)) {\n try {\n $sql = $this->db->prepare(\"SELECT * FROM paramsGenerale WHERE idSociete = :idSociete LIMIT 1\");\n $sql->bindParam('idSociete', $idSociete, PDO::PARAM_INT);\n $sql->execute();\n\n if ($sql->rowCount() > 0) {\n $result = $sql->fetch();\n\n // If success everythig is good send header as \"OK\" and user details\n $this->response($this->json($result), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n } catch (Exception $ex) {\n $this->response('', $ex->getMessage());\n }\n }\n }\n\n // If invalid inputs \"Bad Request\" status message and reason\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid param\");\n $this->response($this->json($error), 400);\n }", "function getParameters();", "function getParameters();", "public function setParameters()\n {\n $params = array();\n $associations = array();\n foreach ($this->datatablesModel->getColumns() as $key => $data) {\n // if a function or a number is used in the data property\n // it should not be considered\n if( !preg_match('/^(([\\d]+)|(function)|(\\s*)|(^$))$/', $data['data']) ) {\n $fields = explode('.', $data['data']);\n $params[$key] = $data['data'];\n $associations[$key] = array('containsCollections' => false);\n\n if (count($fields) > 1) {\n $this->setRelatedEntityColumnInfo($associations[$key], $fields);\n } else {\n $this->setSingleFieldColumnInfo($associations[$key], $fields[0]);\n }\n }\n }\n\n $this->parameters = $params;\n // do not reindex new array, just add them\n $this->associations = $associations + $this->associations;\n }", "function storeParameters()\n {\n }", "function check_parameter_insertion(){\r\n $error = false;\r\n if(!isset($_GET[\"codc\"]) || trim($_GET[\"codc\"])==''){\r\n //chiamo la funzione che stampa l'errore sui parametri\r\n print_insertion_error(\"Codice Ciclista\");\r\n $error = true;\r\n }\r\n if(!isset($_GET[\"namec\"]) || trim($_GET[\"namec\"])==''){\r\n //chiamo la funzione che stampa l'errore sui parametri\r\n print_insertion_error(\"Nome Ciclista\");\r\n $error = true;\r\n }\r\n if(!isset($_GET[\"cognomec\"]) || trim($_GET[\"cognomec\"])==''){\r\n //chiamo la funzione che stampa l'errore sui parametri\r\n print_insertion_error(\"Cognome Ciclista\");\r\n $error = true;\r\n }\r\n if(!isset($_GET[\"nazionalitàc\"]) || trim($_GET[\"nazionalitàc\"])==''){\r\n //chiamo la funzione che stampa l'errore sui parametri\r\n print_insertion_error(\"Nazionalità Ciclista\");\r\n $error = true;\r\n }\r\n if(!isset($_GET[\"cods\"]) || trim($_GET[\"cods\"])==''){\r\n //chiamo la funzione che stampa l'errore sui parametri\r\n print_insertion_error(\"Codice Squadra\");\r\n $error = true;\r\n }\r\n if(!isset($_GET[\"anno_nascita\"]) || trim($_GET[\"anno_nascita\"])==''){\r\n //chiamo la funzione che stampa l'errore sui parametri\r\n print_insertion_error(\"Anno nascita Ciclista\");\r\n $error = true;\r\n }\r\n if($error == true)\r\n die();\r\n}", "function saveParams($data=0) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->data_source)) {\n $p[\"data_source\"]=$this->data_source;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function saveParams($data=0) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->data_source)) {\n $p[\"data_source\"]=$this->data_source;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function smarty_function_find_special_param($params, &$smarty)\n{\n\t//$params['id_product'] $params['id_product_group'] $params['param_tag']\n $GLOBALS['GCMS']->assign('findSpecialParam', RelProParam::get(array(\"id_product\" => $params['id_product'],\"id_product_group\" =>$params['id_product_group'],\"param_tag\"=>$params['param_tag']), false, null, \"param\" ));\n}", "function update_pejabat($idpejabat,$params)\n {\n $item = [\n 'idstruktural'=>$params['idstruktural'],\n 'status'=>$params['status'],\n 'NoSK'=>$params['NoSK'],\n 'idpegawai'=>$params['idpegawai']\n ];\n $this->db->where('idpejabat',$idpejabat);\n $this->db->update('pejabat',$params);\n $result = $this->db->query(\"SELECT\n `pejabat`.*,\n `struktural`.`nm_struktural`,\n `pegawai`.`Nama`\n FROM\n `pejabat`\n LEFT JOIN `pegawai` ON `pejabat`.`idpegawai` = `pegawai`.`idpegawai`\n LEFT JOIN `struktural` ON `struktural`.`idstruktural` =\n `pejabat`.`idstruktural`\n WHERE pejabat.idpejabat= '$idpejabat'\")->row_array();\n return $result;\n }", "function add_pembayaran($params)\n {\n $this->db->insert('PEMBAYARAN',$params);\n return $this->db->insert_id();\n }", "public function prepare_params_Pdu(\n\t\t\t$parametres) {\n\t\t$params = $this->prepare_standard_params ( $parametres );\n\t\tforeach ( $parametres as $champ => $valeur ) {\n\t\t\tswitch ($champ) {\n\t\t\t\tcase 'location_name' :\n\t\t\t\t\t$params ['location_id'] = $this->getObjetItopLocation ()\n\t\t\t\t\t\t->creer_oql ( array (\n\t\t\t\t\t\t\t'name' => $valeur,\n\t\t\t\t\t\t\t'org_id' => $params ['org_id']\n\t\t\t\t\t) )\n\t\t\t\t\t\t->getOqlCi ();\n\t\t\t\t\t$this->valide_mandatory_field_filled ( 'location_id', $params ['location_id'] );\n\t\t\t\t\tif (isset ( $params ['location_name'] )) {\n\t\t\t\t\t\tunset ( $params ['location_name'] );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'rack_name' :\n\t\t\t\t\t$params ['rack_id'] = $this->getObjetItopRack ()\n\t\t\t\t\t\t->creer_oql ( array (\n\t\t\t\t\t\t\t'name' => $valeur,\n\t\t\t\t\t\t\t'org_id' => $params ['org_id'],\n\t\t\t\t\t\t\t'location_name'=>$parametres['location_name']\n\t\t\t\t\t) )\n\t\t\t\t\t\t->getOqlCi ();\n\t\t\t\t\t$this->valide_mandatory_field_filled ( 'rack_id', $params ['rack_id'] );\n\t\t\t\t\tif (isset ( $params ['rack_name'] )) {\n\t\t\t\t\t\tunset ( $params ['rack_name'] );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'contacts_list' :\n\t\t\t\t\t$params ['contacts_list'] = array ();\n\t\t\t\t\tforeach ( $valeur as $contact ) {\n\t\t\t\t\t\t$params ['contacts_list'] [count ( $params ['contacts_list'] )] = $this->creer_lnkContactToFunctionalCI ( $contact [\"id\"] );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $params;\n\t}", "function input_data($data,$table){\n\t\t$this->db->insert($table,$data);//menginputkan data ke database dengan function input_data\n }", "function aggiungiIndirizzo($pratica,$indirizzo){\n $dbh=new PDO(DSN);\n $schema=\"pe\";\n $params = Array(\"via\",\"civico\",\"interno\");\n foreach($params as $key){\n $data[$key]=($indirizzo[$key])?($indirizzo[$key]):(null);\n }\n $data[\"pratica\"]=$pratica;\n utils::debug(utils::debugDir.\"aggiungiIndirizzo.debug\", $data);\n $result=Array();\n $sql=\"INSERT INTO $schema.indirizzi(pratica,civico,interno,via) VALUES(:pratica,:civico,:interno,:via);\";\n $stmt=$dbh->prepare($sql);\n \n if (!$stmt->execute($data)){\n $errors=$stmt->errorInfo();\n utils::debug(utils::debugDir.\"error-aggiungiIndirizzo.debug\", $errors);\n }\n else{\n $idindirizzo=$dbh->lastInsertId(\"pe.soggetti_id_seq\");\n }\n \n if ($errors){\n //$dbh->rollBack();\n $result=Array(\"success\"=>\"-1\",\"message\"=>$errors[2]);\n }\n else{\n $result = Array(\"success\"=>1,\"message\"=>\"OK\",\"indirizzo\"=>$idindirizzo);\n }\n return $result;\n}", "function pp($classe_choix)\n{\n global $prefix_base;\n $call_prof_classe = mysqli_query($GLOBALS[\"mysqli\"], \"SELECT * FROM \".$prefix_base.\"classes, \".$prefix_base.\"j_eleves_professeurs, \".$prefix_base.\"j_eleves_classes WHERE \".$prefix_base.\"j_eleves_professeurs.login = \".$prefix_base.\"j_eleves_classes.login AND \".$prefix_base.\"j_eleves_classes.id_classe = \".$prefix_base.\"classes.id AND \".$prefix_base.\"classes.classe = '\".$classe_choix.\"'\");\n $data_prof_classe = mysqli_fetch_array($call_prof_classe);\n $suivi_par = $data_prof_classe['suivi_par'];\n return($suivi_par);\n}", "private function load($tipo_parametri)\n {\n $con = DBUtils::getConnection();\n $sql = \"SELECT * FROM parametri_business WHERE tipo='$tipo_parametri'\";\n\n $res = mysql_query($sql);\n while ($row = mysql_fetch_object($res))\n {\n $parametro = $row->nome_parametro;\n $valore = $row->valore;\n $this->parametri[$parametro] = $valore;\n }\n\n DBUtils::closeConnection($con);\n }", "private function loadParams() {\r\n foreach ($this->_param_names as $param_name)\r\n\t{\r\n\t\t$funcname = 'set'.$param_name;\r\n\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\t$this->$funcname(Configuration::get('KWIXO_'.strtoupper($param_name)));\r\n\t\telse\r\n\t\t\t$this->$funcname(Configuration::get('KWIXO_'.strtoupper($param_name), null, null, $this->getIdshop()));\r\n\t}\r\n }", "function konfirmasiTerima()\n {\n $data_pengajuan = array(\n 'status_pengajuan' => 'VERIFIKASI'\n );\n $this->db->where('id_pengajuan', $this->input->post('id_pengajuan'));\n $this->db->update('tbl_pengajuan', $data_pengajuan);\n }", "protected function getParamList()\n {\n\t$isconnected = $this->cedarconnect() ;\n\tif( $isconnected != \"good\" )\n\t{\n\t print( \"$isconnected\\n\" ) ;\n\t exit( 0 ) ;\n\t}\n\n\t$query = \"SELECT DISTINCT PARAMETER_ID, LONG_NAME, SHORT_NAME, MADRIGAL_NAME FROM tbl_parameter_code\" ;\n\n\t//print( \"$query\\n\" ) ;\n\n\t$result = parent::dbquery( $query ) ;\n\t$num_rows = mysql_num_rows( $result ) ;\n\tif( $num_rows != 0 )\n\t{\n\t while( $line = mysql_fetch_row( $result ) )\n\t {\n\t\tif( $line )\n\t\t{\n\t\t $colnum = 0 ;\n\t\t foreach( $line as $value )\n\t\t {\n\t\t\tif( $colnum > 0 ) echo \",\" ;\n\t\t\techo $value ;\n\t\t\t$colnum++ ;\n\t\t }\n\t\t echo \"\\n\" ;\n\t\t}\n\t }\n\t}\n\n\tparent::dbclose( $result ) ;\n }", "public function mod_prov() {\n\n\n try{\n \n $pdo = AccesoDB::getCon();\n\n $sql_mod_prov = \"\";\n\n\n $stmt = $pdo->prepare($sql_mod_prov);\n $stmt->bindParam(\":\", $, PDO::PARAM_INT);\n $stmt->execute();\n\n\n\n return $stmt->rowCount();\n\n \n\n } catch (Exception $e) {\n //echo\"-1\";\n echo $e->getMessage();\n }\n }", "public function getPoliceByImmat($immatriculation){\n $connector = $this->getConnector();\n $pRequest = $connector->prepare(\"SELECT * FROM police_valide where immatriculation=\".\"'\".$immatriculation.\"'\".\"|| numchassis=\".\"'\".$immatriculation.\"'\");\n try{\n $pRequest->execute();\n $police=$pRequest->fetchAll(PDO::FETCH_ASSOC);\n return $police;\n }catch(Exception $e){\n return $e->getMessage();\n }\n}", "function updateCardParameter($pDB, $arrParameter, $where)\n {\n $queryUpdate = $pDB->construirUpdate('card_parameter', $arrParameter, $where);\n $result = $pDB->genQuery($queryUpdate);\n\n return $result;\n }", "private function setParams($statemant, $parameters = array()){\n\t\tforeach ($parameters as $key => $value) {\n\t\t\t//Parametros da query.\n\t\t\t$this->setParam($statemant, $key, $value);\n\t\t}\n\t}", "function SetUpMasterParms() {\r\n\t\tglobal $rekeningju;\r\n\r\n\t\t// Hide foreign keys\r\n\t\t$sMasterTblVar = $rekeningju->getCurrentMasterTable();\r\n\t\tif ($sMasterTblVar == \"master_transaksi2\") {\r\n\t\t\t$rekeningju->kode_otomatis_master->Visible = FALSE;\r\n\t\t\tif ($GLOBALS[\"master_transaksi2\"]->EventCancelled) $rekeningju->EventCancelled = TRUE;\r\n\t\t}\r\n\t\t$this->DbMasterFilter = $rekeningju->getMasterFilter(); // Get master filter\r\n\t\t$this->DbDetailFilter = $rekeningju->getDetailFilter(); // Get detail filter\r\n\t}", "function select($parametro, $modo){\n $ingrediente = new ingrediente();\n try{\n if($modo == 1){\n $stmte = $this->pdo->prepare(\"SELECT * FROM tb_ingrediente WHERE igr_nome LIKE :parametro\");\n $stmte->bindParam(\":parametro\", $parametro . \"%\", PDO::PARAM_STR);\n }elseif ($modo == 2) {\n $stmte = $this->pdo->prepare(\"SELECT * FROM tb_ingrediente WHERE igr_pk_id = :parametro\");\n $stmte->bindParam(\":parametro\", $parametro , PDO::PARAM_INT);\n }\n if($stmte->execute()){\n if($stmte->rowCount() > 0){\n while($result = $stmte->fetch(PDO::FETCH_OBJ)){\n $ingrediente->setPkId($result->igr_pk_id);\n $ingrediente->setNome($result->igr_nome);\n $ingrediente->setUnidade($result->igr_unidade);\n $ingrediente->setValor($result->igr_valor);\n }\n }\n }\n return $ingrediente;\n }\n catch(PDOException $e){\n echo $e->getMessage();\n return -1;\n }\n }", "function calculaPotenciaSimples($idSim, $paramTensao, $paramCorren, $sentido, $param){\n /*\n * $sentido = ENTRADA OU SAIDA, $param = R,S,T\n */\n\n // CRIA UM OBJETO DE DA CLASSE DE CONEXAO\n $connBase = new EficazDB;\n\n\n // Fecha a conexao\n $connBase->close();\n\n return $retorno;\n}", "function add_prodi($params)\n {\n $this->db->insert('prodi',$params);\n return $this->db->insert_id();\n }", "public function saveParams()\r\n\t{\r\n\t\tforeach ($this->param_names as $param_name)\r\n\t\t{\r\n\t\t\t$funcname = 'get'.$param_name;\r\n\t\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\t\tConfiguration::updateValue('CERTISSIM_'.Tools::strtoupper($param_name), $this->$funcname());\r\n\t\t\telse\r\n\t\t\t\tConfiguration::updateValue('CERTISSIM_'.Tools::strtoupper($param_name), $this->$funcname(), false, null, $this->getIdshop());\r\n\t\t}\r\n\t}", "function new_parameters() {\r\n\r\n }", "function saveParams($data=0) {\r\n $p=array();\r\n if (IsSet($this->id)) {\r\n $p[\"id\"]=$this->id;\r\n }\r\n if (IsSet($this->view_mode)) {\r\n $p[\"view_mode\"]=$this->view_mode;\r\n }\r\n if (IsSet($this->edit_mode)) {\r\n $p[\"edit_mode\"]=$this->edit_mode;\r\n }\r\n if (IsSet($this->data_source)) {\r\n $p[\"data_source\"]=$this->data_source;\r\n }\r\n if (IsSet($this->tab)) {\r\n $p[\"tab\"]=$this->tab;\r\n }\r\n return parent::saveParams($p);\r\n}", "public function print_recibo_paciente($n_recibo,$n_venta,$id_paciente){\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\"select*from recibos where numero_recibo=? and numero_venta=? and id_paciente=?;\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$n_recibo);\n $sql->bindValue(2,$n_venta);\n $sql->bindValue(3,$id_paciente);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function BBdekat_tempatIbadah(){\n\t\t$this->db->select('batas_bawah');\n\t\t$this->db->where('nama_parameter', 'dekat');\n\t\t$q = $this->db->get('parameter');\n\t\t$data = $q->result_array();\n\n\t\treturn $hasil = $data[1]['batas_bawah'];\n\t}", "function seleccionInicio($idP){\r\n }", "function saveParams($data=0) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function saveParams($data=0) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function saveParams($data=0) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function saveParams($data=0) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "abstract public function getParameters();", "public static function Najdi_kolize_pro_formular ($iducast, $formular ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n \r\n //echo(\"<br>\" . $formular . \"<br>\");\r\n //var_dump ($kolize_pole);\r\n return $kolize_pole; \r\n}", "public function save(){\n $statement =\"INSERT INTO conf_usuario(email,username,pass,estado,id_rol,id_persona,id_main)\n values(:Email,:Username,:Pass,:Estado,:IdRol,:IdPersona,:IdMain)\";\n $sql= MainModel::getConection()->prepare($statement);\n $sql->bindParam(\":Email\",$this->getEmail());\n $sql->bindParam(\":Username\",$this->getUsername());\n $sql->bindParam(\":Pass\",$this->getPass());\n $sql->bindParam(\":Estado\",$this->getEstado());\n $sql->bindParam(\":IdRol\",$this->getId_rol());\n $sql->bindParam(\":IdPersona\",$this->getId_persona());\n $sql->bindParam(\":IdMain\",$this->getId_main());\n $sql->execute();\n return $sql;\n }", "function build_param($param)\n\t{\n\t\t$string_param = NULL;\n\n\t\tif($param!=null){\n\n\t\t\tif(isset($param->id_jadwal)) $string_param .= \" id_jadwal LIKE '%\".$param->id_jadwal.\"%' \";\n\t\t}\n\n\t\treturn $string_param;\n\t}", "function aff_param_form($cat)\n{\n $texte_form = \"\";\n if ( $cat==0 || $cat==11 )\n $texte_form = \"<p><a href='../openvpn/config.php' title='Configuration Open VPN'>Configuration Open VPN</a></p>\";\n\t$texte_form .= \"<table border=\\\"1\\\">\\n\";\n\t$cat=((isset($GLOBALS[\"___mysqli_ston\"]) && is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_real_escape_string($GLOBALS[\"___mysqli_ston\"], $cat) : ((trigger_error(\"[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.\", E_USER_ERROR)) ? \"\" : \"\"));\n\t$result=mysqli_query($GLOBALS[\"___mysqli_ston\"], \"SELECT * from params WHERE cat=$cat ORDER BY `id`\");\n\tif ($result) {\n while ($r=mysqli_fetch_array($result)) {\n $texte_form .= \"<tr><td colspan=\\\"2\\\">\".utf8_encode($r[\"descr\"]).\" (<em><font color=\\\"red\\\">\".$r[\"name\"].\"</font></em>)</td>\";\n if ( $r[\"name\"] == \"ldap_port\" || $cat == 3 || $cat == 11 || $cat == 5 ) {\n $texte_form .= \"<td>\".$r[\"value\"].\"</td></tr>\\n\";\n $texte_form .= \"<input type=\\\"hidden\\\" size=\\\"25\\\" value=\\\"\".$r[\"value\"].\"\\\" name=\\\"form_\".$r[\"name\"].\"\\\">\";\n } else\n $texte_form .= \"<td><input type=\\\"text\\\" size=\\\"50\\\" value=\\\"\".$r[\"value\"].\"\\\" name=\\\"form_\".$r[\"name\"].\"\\\"</td></tr>\\n\";\n }\n\t}\n\t$texte_form .= \"</table>\\n\";\n\n\treturn $texte_form;\n}", "function data_pensiun()\n {\n $query = $this->db->query(\"SELECT\n id_pegawai,\n nama,\n nip,\n path_foto,\n tgl_lahir,\n tgl_pensiun,\n umur,\n selisih\n FROM data_usulan_pensiun\n WHERE selisih <= 180 \");\n\n return $query->result();\n }" ]
[ "0.6620716", "0.6465432", "0.6376475", "0.6365713", "0.6361463", "0.6324803", "0.63062555", "0.63062555", "0.62548506", "0.61455894", "0.6116927", "0.6083526", "0.60587883", "0.60269785", "0.602009", "0.6005176", "0.6000559", "0.59905624", "0.59800327", "0.5959463", "0.5914812", "0.5914812", "0.5910337", "0.59088844", "0.58927286", "0.58802366", "0.5868267", "0.58635175", "0.58575696", "0.5839177", "0.5832716", "0.5832716", "0.5827087", "0.58262396", "0.5823433", "0.5819863", "0.5819863", "0.58078307", "0.58055615", "0.57874054", "0.5785163", "0.57774276", "0.577158", "0.5764216", "0.57616156", "0.57571596", "0.5752248", "0.5736288", "0.5733722", "0.57298267", "0.57296926", "0.5715311", "0.57017505", "0.5701215", "0.5698731", "0.56879103", "0.5683268", "0.56812227", "0.56785506", "0.5677758", "0.5677758", "0.5669076", "0.56598425", "0.5658017", "0.5652124", "0.5652124", "0.564594", "0.56406385", "0.5634629", "0.56327677", "0.56197876", "0.5615278", "0.5615134", "0.56113535", "0.5608436", "0.5598253", "0.55900216", "0.55899423", "0.5585578", "0.55853593", "0.55818665", "0.5577793", "0.55650723", "0.5563199", "0.5562242", "0.55611265", "0.5559743", "0.5559658", "0.55595756", "0.5557426", "0.55568206", "0.55520046", "0.55520046", "0.55520046", "0.55520046", "0.5551122", "0.5549929", "0.55478996", "0.5545942", "0.55408674", "0.5538888" ]
0.0
-1
Fungsi untuk menscan jaringan wifi yg tersedia
function common_wlan_scan(){ global $text; //get output dari iwlist $iw_ssid = shell_exec('sudo /sbin/iwlist wlan0 scan'); $iw_mac = $iw_ssid; $iw_quality = $iw_ssid; $iw_ssid = explode('ESSID:"', $iw_ssid); $iw_mac = explode('Address:', $iw_mac); $iw_quality = explode('Quality=', $iw_quality); //get sssid $data_ssid = array(); $counter = 0; foreach($iw_ssid as $ssid){ $tmp = explode('"',$ssid); if(!empty($tmp[0]) && $counter != 0){ $data_ssid[] = $tmp[0]; } $counter++; } //get mac address $data_mac = array(); $counter = 0; foreach($iw_mac as $mac){ $tmp = explode(' ',$mac); if(!empty($tmp[1]) && $counter != 0){ $data_mac[] = $tmp[1]; } $counter++; } //get kekuatan sinyal $data_quality = array(); $counter = 0; foreach($iw_quality as $signal){ $tmp = explode(' ',$signal); if(!empty($tmp[0]) && $counter != 0){ $tmpb = explode('/',$tmp[0]); $a = $tmpb[0]; $b = $tmpb[1]; $c = number_format(($a/$b) * 100,0,',','.'); $data_quality[] = $c; } $counter++; } $result = array( 'ssid' => $data_ssid, 'mac' => $data_mac, 'signal' => $data_quality ); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function detectWifiChannelAction(Request $request){\n $iwinfo='wlan0 ESSID: \" Wifi HotSpot 2\" Access Point: D4:6E:0E:7D:BF:56 Mode: Master Channel: 8 (2.447 GHz) Tx-Power: unknown Link Quality: unknown/70 Signal: unknown Noise: unknown Bit Rate: unknown Encryption: WPA2 PSK (CCMP) 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: 9C:50:EE:29:43:9C ESSID: \"Anh Quoc\" Mode: Master Channel: 1 Signal: -74 dBm Quality: 36/70 Encryption: mixed WPA/WPA2 PSK (TKIP, CCMP) Cell 02 - Address: 9C:50:EE:1C:AF:3C ESSID: \"Su Bin\" Mode: Master Channel: 1 Signal: -90 dBm Quality: 20/70 Encryption: mixed WPA/WPA2 PSK (TKIP, CCMP) Cell 03 - Address: C4:A3:66:F8:1E:24 ESSID: \"Khong biet\" Mode: Master Channel: 2 Signal: -85 dBm Quality: 25/70 Encryption: mixed WPA/WPA2 PSK (CCMP) Cell 04 - Address: F4:F2:6D:FD:27:8E ESSID: \" Wifi Hotspot\" Mode: Master Channel: 3 Signal: -12 dBm Quality: 70/70 Encryption: none Cell 05 - Address: C6:E9:84:F0:69:4C ESSID: \"Wifi\" Mode: Master Channel: 8 Signal: -39 dBm Quality: 70/70 Encryption: WPA2 PSK (CCMP) Cell 06 - Address: A0:65:18:3E:D3:4E ESSID: \"Chau sa\" Mode: Master Channel: 7 Signal: -78 dBm Quality: 32/70 Encryption: WPA2 PSK (CCMP) Cell 07 - Address: 92:F6:52:21:57:B6 ESSID: \"Wifi\" Mode: Master Channel: 8 Signal: -71 dBm Quality: 39/70 Encryption: WPA2 PSK (CCMP) Cell 08 - Address: 62:65:18:07:82:E4 ESSID: \"PPPOE\" Mode: Master Channel: 8 Signal: -9 dBm Quality: 70/70 Encryption: none Cell 09 - Address: A0:65:18:07:82:E5 ESSID: unknown Mode: Master Channel: 8 Signal: -8 dBm Quality: 70/70 Encryption: mixed WPA/WPA2 PSK (TKIP, CCMP) Cell 10 - Address: 00:1C:E0:54:3D:47 ESSID: \"BICH THAO\" Mode: Master Channel: 13 Signal: -70 dBm Quality: 40/70 Encryption: mixed WPA/WPA2 PSK (CCMP)';\n $matches=array();\n $iwinfo= str_replace(\"unknown/70\", \"0/70\", $iwinfo);\n preg_match_all(\"/Channel:\\s+(\\d+)/\", $iwinfo, $matches);\n if(count($matches)<2) return new Response(serialize(array('0',\"option channel auto\")));\n $channels=$matches[1];\n if(count($channels)<2) return new Response(serialize(array('0',\"option channel auto\")));\n //\n preg_match_all(\"/Quality:\\s+(\\d+)/\", $iwinfo, $matches);\n if(count($matches)<2) return new Response(serialize(array('0',\"option channel auto\")));\n $qualities=$matches[1];\n if(count($qualities)<2) return new Response(serialize(array('0',\"option channel auto\")));\n //\n\n $qualities[0]=\"0\";\n $currentWifiChannel=$channels[0];\n unset($channels[0]);\n unset($qualities[0]);\n arsort($qualities);\n $suppress=true;\n $threshold=30;\n\n if(count($qualities)>10) $threshold=35;\n if(count($qualities)>15) $threshold=40;\n while($suppress==true && count($qualities)>0){\n $index=array_search(min($qualities), $qualities);\n if(intval($qualities[$index])<intval($threshold)){\n unset($qualities[$index]);\n unset($channels[$index]);\n }\n else{\n $suppress=false;\n }\n }\n if(count($qualities)==0) return new Response(serialize(array('0',\"option channel auto\")));\n $range=array(1,2,3,4,5,6,7,8,9,10,11);\n $possible=array_diff($range,$channels);\n if(empty($possible)){\n $currentWifiChannel=$channels[array_search(min($qualities), $qualities)];\n dump( array('1',\"option channel \".$currentWifiChannel));\n }\n elseif(false===array_search($currentWifiChannel, $possible)){\n dump(array('1',\"option channel \".min($possible)));\n\n }\n else{\n dump(array('0',\"option channel auto\"));\n }\n\n return new Response('<html></html>');\n }", "private function detectWifiChannel($iwinfo){\n //$iwinfo='wlan0 ESSID: \"GSS-V4\" Access Point: 90:F6:52:21:57:B6 Mode: Master Channel: 4 (2.427 GHz) Tx-Power: 18 dBm Link Quality: 33/70 Signal: -77 dBm Noise: -95 dBm Bit Rate: 39.0 MBit/s Encryption: WPA2 PSK (CCMP) Type: nl80211 HW Mode(s): 802.11bgn Hardware: unknown [Generic MAC80211] TX power offset: unknown Frequency offset: unknown Supports VAPs: yes PHY name: phy0\n\t // Cell 01 - Address: EC:08:6B:89:DA:86 ESSID: \"Wifi T2\" Mode: Master Channel: 1 Signal: -46 dBm Quality: 64/70 Encryption: none\n\t // Cell 02 - Address: C4:E9:84:F0:69:4C ESSID: \"Wifi Phong Khach\" Mode: Master Channel: 4 Signal: -61 dBm Quality: 49/70 Encryption: none\n\t // Cell 03 - Address: A0:65:18:3E:D3:4E ESSID: \"VNPT HUE\" Mode: Master Channel: 7 Signal: -83 dBm Quality: 27/70 Encryption: WPA2 PSK (CCMP)\n\t // Cell 04 - Address: 4C:F2:BF:23:BA:7C ESSID: \"Dung Si\" Mode: Master Channel: 7 Signal: -86 dBm Quality: 24/70 Encryption: mixed WPA/WPA2 PSK (TKIP, CCMP)\n\t // Cell 05 - Address: A0:65:18:07:82:E5 ESSID: \"Wifi\" Mode: Master Channel: 11 Signal: -13 dBm Quality: 70/70 Encryption: WPA2 PSK (TKIP, CCMP)';\n\t $matches=array();\n\t $iwinfo= str_replace(\"unknown/70\", \"0/70\", $iwinfo);\n\t preg_match_all(\"/Channel:\\s+(\\d+)/\", $iwinfo, $matches);\n\t if(count($matches)<2) return new Response(serialize(array('0',\"option channel auto\")));\n\t $channels=$matches[1];\n\t if(count($channels)<2) return new Response(serialize(array('0',\"option channel auto\")));\n\t //\n\t preg_match_all(\"/Quality:\\s+(\\d+)/\", $iwinfo, $matches);\n\t if(count($matches)<2) return new Response(serialize(array('0',\"option channel auto\")));\n\t $qualities=$matches[1];\n\t if(count($qualities)<2) return new Response(serialize(array('0',\"option channel auto\")));\n\t //\n\n\t $qualities[0]=\"0\";\n\t $currentWifiChannel=$channels[0];\n\t unset($channels[0]);\n\t unset($qualities[0]);\n\t arsort($qualities);\n\t $suppress=true;\n\t $threshold=30;\n\n\t if(count($qualities)>10) $threshold=35;\n\t if(count($qualities)>15) $threshold=40;\n\t while($suppress==true && count($qualities)>0){\n\t\t $index=array_search(min($qualities), $qualities);\n\t\t if(intval($qualities[$index])<intval($threshold)){\n\t\t\t unset($qualities[$index]);\n\t\t\t unset($channels[$index]);\n\t\t }\n\t\t else{\n\t\t\t $suppress=false;\n\t\t }\n\t }\n\t if(count($qualities)==0) return new Response(serialize(array('0',\"option channel auto\")));\n\t $range=array(1,2,3,4,5,6,7,8,9,10,11);\n\t $possible=array_diff($range,$channels);\n if(empty($possible)){\n $currentWifiChannel=$channels[array_search(min($qualities), $qualities)];\n return array('1',\"option channel '\".$currentWifiChannel.\"'\");\n }\n elseif(false===array_search($currentWifiChannel, $possible)){\n return array('1',\"option channel '\".min($possible).\"'\");\n\n }\n else{\n return array('0',\"option channel 'auto'\");\n }\n }", "public function scanGatewayAll(Request $request)\n {\n //for audit logs\n $ip = $request->ip();\n $username = auth()->user();\n $host = $username->USERNAME;\n $module = 'Gateway Management';\n $instruction = 'Scanned All the Gateway';\n $this->auditLogs($ip,$host,$module,$instruction);\n\n $local_ip = $_SERVER['SERVER_ADDR'];\n // Convert ip to array\n $ip_arr = explode(\".\", $local_ip);\n $scan_arr = array();\n $res_arr = array();\n\n\n\n // \"Scan\" network for gateways\n for ($i = 1; $i <= 254; $i++) {\n $ip_arr[3] = $i; // Set last octet of ip\n\n // MC network details\n // Convert ip array back to string\n $remote_ip = implode(\".\", $ip_arr);\n $remote_port = env('PORT_SCAN_CLIENT');\n\n //Collect JSON Data\n $message = '{\"message\":{\n \"mode\" : \"registerGateway\",\n \"local_ip\" : \"' . $local_ip.'\",\n \"app_key\" : \"' . substr(env('APP_KEY'), 7).'\"\n },\n \"iv_key\":\"\",\n \"length\":\"\"\n }';\n $message = base64_encode($message);\n $timeout = array(\"sec\"=>0,\"usec\"=>10000);\n\n // sRet is assumed to be in mac address format\n // sRet is then converted to a standard mac address format\n // (e.g. Aa:Bb:Cc:11:22:33 => AA:BB:CC:11:22:33)\n //\n // For future reference, there might be a need to change the processing\n // of sRet in cases where sRet is not in mac address format\n // (i.e. hardware is not from Wulian)\n $sRet = $this->sendToSocket($remote_ip, $remote_port, $message,\n $timeout);\n //Remove New Line and White Spaces\n $sRet = preg_replace('/\\s+/',' ',trim($sRet));\n\n\n //check if not null and a valid JSON\n if($sRet==null || $this->isJson($sRet)==false){\n continue;\n }\n //Parse JSON\n $sRet = json_decode($sRet,true);\n //Check if not null\n if ($sRet[\"mac_address\"] != null && $sRet[\"company_name\"] != null) {\n\n $serial_number = substr($sRet[\"mac_address\"], 0, 17);\n $serial_number = strtoupper($serial_number);\n\n $manufacturer_id = Manufacturer::where('MANUFACTURER_NAME',\n $sRet[\"company_name\"])\n ->first()\n ->MANUFACTURER_ID;\n\n $temp_arr = [\n 'GATEWAY_IP' => $remote_ip,\n 'GATEWAY_SERIAL_NO' => $serial_number,\n 'MANUFACTURER_ID' => $manufacturer_id\n ];\n array_push($scan_arr, $temp_arr);\n\n }\n }\n\n // Insert all scanned gateways to database\n foreach ($scan_arr as $arr) {\n\n $gateway = Gateway::where('GATEWAY_IP', $arr['GATEWAY_IP'])\n ->where('GATEWAY_SERIAL_NO',\n $arr['GATEWAY_SERIAL_NO'])\n ->first();\n\n\n\n if (!$gateway) {\n try {\n $gateway = new Gateway;\n $gateway->MANUFACTURER_ID = $arr['MANUFACTURER_ID'];\n $gateway->GATEWAY_SERIAL_NO = $arr['GATEWAY_SERIAL_NO'];\n $gateway->GATEWAY_IP = $arr['GATEWAY_IP'];\n $gateway->REG_FLAG = 0;\n $gateway->ONLINE_FLAG = 0;\n $gateway->save();\n } catch (\\Exception $e) {\n //abort(500);\n return $e;\n }\n // Response to request\n array_push($res_arr, $gateway);\n }else{\n try {\n $gateway->GATEWAY_SERIAL_NO = $arr['GATEWAY_SERIAL_NO'];\n $gateway->save();\n } catch (\\Exception $e) {\n abort(500);\n }\n }\n }\n\n return $res_arr;\n }", "public function actionWifidisconnect()\n {\n \t$mcode = Yii::$app->request->post('mcode');\n \t\n \tif(MyWifi::CrewTypeBool($mcode)) {\n \t\t//船员\n \t\t$type = 2;\n \t\t$sql =' SELECT crew_id as member_id,crew_code as member_code,cn_name,smart_card_number, passport_number, crew_password as member_password ,\n\t\t\t\t\tcrew_email as member_email,mobile_number,money as member_money,crew_credit as member_credit,sign,overdraft_limit,curr_overdraft_amount\n\t\t\t\t\tFROM vcos_wifi_crew WHERE crew_code=\\''.$mcode.'\\' ';\n \t\t$membership = Yii::$app->mdb->createCommand($sql)->queryOne();\n \t}else {\n \t\t//会员\n \t\t$type = 1;\n \t\t$member = Member::find ()->select ( [\n \t\t\t\t'sign',\n \t\t] )->where ( [\n \t\t\t\t'member_code' => $mcode\n \t\t] )->one ();\n \t\t\n \t\t$sign = $member['sign'];\n \t\t$membership = MemberService::getMemberbysign($sign);\n \t}\n \t\n //先查看comst 中有没有这个用户\n $find_res = MyCurl::FindUser($membership['passport_number']);\n $find_res = json_decode($find_res,true);\n if($find_res['success']!==false){\n\n \t//查找comst中$passport对应的idRec\n \t$idRec = MyCurl::FindidRec($membership['passport_number']);\n \t\n \t//断开连接网络\n \t$disc_json = MyCurl::DisConnect($idRec);\n \t\n \t//查流量\n \t$check_out_json = MyCurl::CheckFlow($membership['passport_number']);\n \t$check_out_array = json_decode($check_out_json,true);\n \t$arr = explode(\"<br>\", $check_out_array['data']['feeInfo']);\n \t\n \t//剔除不必要的字符\n \t$wifi_online_in_flow = str_replace('MB','',explode(\": \",$arr[5])[1]);\n \t$wifi_online_out_flow = str_replace('MB','',explode(\": \",$arr[6])[1]);\n \t$wifi_online_total_flow = str_replace('MB','',explode(\": \",$arr[7])[1]);\n \t\n \t//初始化用户流量\n \tCruiseLineService::getRunInitStatus($type, $membership['passport_number']);\n \t\n \t\n \t\n \t//断开连接记录写入DB\n \tMyWifi::WriteWifiLogoutLogToDB($membership,$wifi_online_in_flow,$wifi_online_out_flow,$wifi_online_total_flow);\n \techo $disc_json;\n }else{\n \techo '{\"success\":false,\"Info\":\"用户不存在,此帐号没有连接网络,请先连接网络\"}';\n }\n \n }", "function virustotalscan_check_url($link, $text, $more = \" \", $key)\r\n{\r\n global $lang;\r\n // se adauga fisierul de limba\r\n $lang->load('virustotalscan');\r\n // mai intai se verifica daca nu cumva existe un raport in baza de date\r\n $retrieve = virustotalscan_get_url_report($link, $key); \r\n // daca exista se verifica ca nu cumva sa fie vechi\r\n if ($retrieve && isset($retrieve['report'][0])) \r\n {\r\n if (function_exists('date_default_timezone_set')) {\r\n date_default_timezone_set('UTC');\r\n } \r\n // verificam timpul\r\n $report_date = strtotime($retrieve['report'][0]);\r\n // crearea intervalul de rescanare\r\n $interval = \"+\".intval($mybb->settings['virustotalscan_setting_url_rescan']).\" day\";\r\n $max = strtotime($interval, $report_date);\r\n //$max_time = date('Y-m-d H:i:s', $max);\r\n if ($max < TIME_NOW) {\r\n // daca timpul e depasit, atunci se realizeaza o rescanare\r\n $retrieve = virustotalscan_get_url_report($link, $key, 1);\r\n }\r\n if ($retrieve && isset($retrieve['scan_id'])) \r\n {\r\n // dupa rescanare se intoarce raportul\r\n $retrieve = virustotalscan_get_url_report($retrieve['scan_id'], $key);\r\n if ($retrieve && isset($retrieve['report'][0])) \r\n {\r\n // totul e bine\r\n // exista virusi ?\r\n // numarul de elemente\r\n $total = count($retrieve['report'][1]);\r\n // innumaram de cate ori apare textul \"Clean site\" si \"Error\"\r\n $count_array = array_count_values($retrieve['report'][1]);\r\n $number_clean = 0;\r\n if (isset($count_array['Clean site'])) {\r\n $number_clean = intval($count_array['Clean site']);\r\n }\r\n $number_error = 0;\r\n if (isset($count_array['Error'])) {\r\n $number_error = intval($count_array['Error']);\r\n } \r\n $protection = ($mybb->settings['virustotalscan_setting_url_protection']) ? intval($mybb->settings['virustotalscan_setting_url_protection']) : 50;\r\n if (floatval($number_clean - $number_error) >= floatval($protection) * floatval($total - $number_error) / 100) {\r\n // in acest caz adresa URL este curata\r\n return $lang->sprintf($lang->virustotalscan_link_notfound, $link, $more, $text);\r\n }\r\n else {\r\n // altfel exista virusi\r\n return $lang->sprintf($lang->virustotalscan_link_found, $link, $more, $text, $retrieve['file-report']);\r\n }\r\n }\r\n else {\r\n // daca raportul primt nu e corect, se considera a fi o adresa web in regula\r\n return $lang->sprintf($lang->virustotalscan_link_notfound, $link, $more, $text);\r\n }\r\n }\r\n else {\r\n // daca nu a fost nevoie de o rescanare\r\n // facem teste pentru existenta virusilor ?\r\n // numarul de elemente din vector\r\n $total = count($retrieve['report'][1]);\r\n // innumaram de cate ori apare textul \"Clean site\" si \"Error\"\r\n $count_array = array_count_values($retrieve['report'][1]);\r\n $number_clean = 0;\r\n if (isset($count_array['Clean site'])) {\r\n $number_clean = intval($count_array['Clean site']);\r\n }\r\n $number_error = 0;\r\n if (isset($count_array['Error'])) {\r\n $number_error = intval($count_array['Error']);\r\n } \r\n $protection = ($mybb->settings['virustotalscan_setting_url_protection']) ? intval($mybb->settings['virustotalscan_setting_url_protection']) : 50;\r\n if (floatval($number_clean - $number_error) >= floatval($protection) * floatval($total - $number_error) / 100) {\r\n // in acest caz adresa URL este curata\r\n return $lang->sprintf($lang->virustotalscan_link_notfound, $link, $more, $text);\r\n }\r\n else {\r\n // altfel exista virusi\r\n return $lang->sprintf($lang->virustotalscan_link_found, $link, $more, $text, $retrieve['file-report']);\r\n }\r\n }\r\n }\r\n else {\r\n // ce se intampla daca nu exista un raport in sistem ?\r\n // raspuns : se face o scanare\r\n $retrieve = virustotalscan_get_url_report($link, $key, 1);\r\n if ($retrieve && isset($retrieve['scan_id'])) \r\n {\r\n // dupa rescanare se intoarce raportul\r\n $retrieve = virustotalscan_get_url_report($retrieve['scan_id'], $key);\r\n if ($retrieve && isset($retrieve['report'][0])) \r\n {\r\n // totul e bine\r\n // exista virusi ?\r\n // numarul de elemente\r\n $total = count($retrieve['report'][1]);\r\n // innumaram de cate ori apare textul \"Clean site\" si \"Error\"\r\n $count_array = array_count_values($retrieve['report'][1]);\r\n $number_clean = 0;\r\n if (isset($count_array['Clean site'])) {\r\n $number_clean = intval($count_array['Clean site']);\r\n }\r\n $number_error = 0;\r\n if (isset($count_array['Error'])) {\r\n $number_error = intval($count_array['Error']);\r\n } \r\n $protection = ($mybb->settings['virustotalscan_setting_url_protection']) ? intval($mybb->settings['virustotalscan_setting_url_protection']) : 50;\r\n if (floatval($number_clean - $number_error) >= floatval($protection) * floatval($total - $number_error) / 100) {\r\n // in acest caz adresa URL este curata\r\n return $lang->sprintf($lang->virustotalscan_link_notfound, $link, $more, $text);\r\n }\r\n else {\r\n // altfel exista virusi\r\n return $lang->sprintf($lang->virustotalscan_link_found, $link, $more, $text, $retrieve['file-report']);\r\n }\r\n }\r\n else {\r\n // daca raportul primt nu e corect, se considera a fi o adresa web in regula\r\n return $lang->sprintf($lang->virustotalscan_link_notfound, $link, $more, $text);\r\n }\r\n }\r\n else {\r\n // nu s-a intors niciun scan_id\r\n // presupunem ca totul e in regula\r\n return $lang->sprintf($lang->virustotalscan_link_notfound, $link, $more, $text);\r\n }\r\n }\r\n}", "public function get_wifi_name()\n {\n $out = array();\n $sql = \"SELECT COUNT(CASE WHEN ssid <> '' AND ssid IS NOT NULL THEN 1 END) AS count, ssid \n FROM wifi\n LEFT JOIN reportdata USING (serial_number)\n \".get_machine_group_filter().\"\n GROUP BY ssid\n ORDER BY count DESC\";\n \n foreach ($this->query($sql) as $obj) {\n if (\"$obj->count\" !== \"0\") {\n $obj->ssid = $obj->ssid ? $obj->ssid : 'Unknown';\n $out[] = $obj;\n }\n }\n \n return $out;\n }", "function blacklisted($type, $key, $blacklist) {\n \n $blacklist_wlan_chk_mh = $_SESSION[\"blacklist_wlan_chk_mh\"];\n $blacklist_fp_chk_mh = $_SESSION[\"blacklist_fp_chk_mh\"];\n $blacklist_mode_fp_mh = $_SESSION[\"blacklist_mode_fp_mh\"];\n $blacklist_bt_chk_mh = $_SESSION[\"blacklist_bt_chk_mh\"];\n\n $blacklist_exploded = explode(\",\", $blacklist);\n switch ($type) {\n case \"wifi_global\":\n if ($blacklist_wlan_chk_mh == \"1\") {\n foreach ($blacklist_exploded as $blacklist_key => $blacklist_value) {\n if ($key == $blacklist_value) {\n // found key in blacklist\n return 1;\n }\n }\n }\n break;\n \n case \"wifi_local\":\n if ($blacklist_fp_chk_mh == \"1\") {\n $essids = explode(\",\", $key);\n $essids_blacklisted = 0;\n foreach ($blacklist_exploded as $blacklist_key => $blacklist_value) {\n foreach ($essids as $essid_key => $essid_value) {\n if ($essid_value == $blacklist_value) {\n $essids_blacklisted++;\n }\n }\n }\n switch ($blacklist_mode_fp_mh) {\n case \"ALL\":\n // fingerprint is made of blacklisted essids only\n if ($essids_blacklisted == count($essids)) { return 1; }\n break;\n case \"ONE\":\n // fingerprint contains at least one blacklisted essid\n if ($essids_blacklisted > 0) { return 1; }\n break;\n default:\n die(\"function blacklisted ERROR: Unknown local MAC mode: \" . $blacklist_mode_fp_mh);\n }\n }\n break;\n\n case \"bt\":\n if ($blacklist_bt_chk_mh == \"1\") {\n foreach ($blacklist_exploded as $blacklist_key => $blacklist_value) {\n if ($key == $blacklist_value) {\n // found key in blacklist\n return 1;\n }\n }\n }\n break;\n\n default:\n die(\"function blacklisted ERROR: Unknown type: \" . $type);\n }\n return 0;\n}", "function common_serial_get_connected_device($query,$pass){\r\n//Inisialisasi serial port\r\n\t//Sertakan library php serial untuk menggunakan fungsi\r\n\t//php yang mendukung komunikasi serial\r\n\trequire_once(\"php_serial.class.php\");\r\n\t//Inisialisasi parameter serial\r\n\t$serial = new phpSerial();\t\r\n\t//baud rate\r\n\t$serial->confBaudRate(9600);\r\n\t$devList = common_serial_scan();\r\n\tforeach($devList as $dev){\r\n\t\t//Siapkan port arduino untuk bisa digunakan\r\n\t\tcommon_init_serial($dev);\t\r\n\t\t//Alamat perangkat\r\n\t\t$serial->deviceSet($dev);\r\n\t\t//Buka koneksi (tulis)\r\n\t\t$serial->deviceOpen('w+');\r\n\t\t//kirim query (delay 1 detik)\r\n\t\t$serial->sendMessage($query,1);\r\n\t\t//baca balasan\r\n\t\t$mp = $serial->readPort();\r\n\t\t//tutup koneksi\r\n\t\t$serial->deviceClose();\t\r\n\r\n\t\t//cek hasil query\r\n\t\tif($mp == $pass){\r\n\t\t\t//Jika respon sama dengan query\r\n\t\t\t//kembalikan alamat perangkat terkoneksi\r\n\t\t\treturn $dev;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}", "function virustotalscan_scan_url($message)\r\n{\r\n\tglobal $mybb;\r\n // in momentul in care se apeleaza aceasta functie toate testele au fost facute\r\n // altfel se incepe scanarea prin construirea cheii\r\n $key = $mybb->settings['virustotalscan_setting_key'];\r\n // se parseaza eventuale legaturi\r\n $message = preg_replace('#<a href=\"(.*?)\"(.*?)>(.*?)</a>#s', virustotalscan_check_url('\\1', '\\3', '\\2', $key), $message);\r\n // dupa prelucrari se iese din functie\r\n return;\r\n}", "public function get_wifi_state()\n {\n $sql = \"SELECT COUNT(CASE WHEN state = 'running' THEN 1 END) AS connected,\n\t\t\t\tCOUNT(CASE WHEN state = 'init' THEN 1 END) AS on_not_connected,\n\t\t\t\tCOUNT(CASE WHEN state = 'sharing' THEN 1 END) AS sharing,\n\t\t\t\tCOUNT(CASE WHEN state = 'unknown' THEN 1 END) AS unknown,\n\t\t\t\tCOUNT(CASE WHEN state = 'off' THEN 1 END) AS off\n\t\t\t\tFROM wifi\n\t\t\t\tLEFT JOIN reportdata USING(serial_number)\n\t\t\t\t\".get_machine_group_filter();\n return current($this->query($sql));\n }", "function virustotalscan_scan(&$attacharray)\r\n{\r\n\tglobal $mybb, $db, $lang;\t\r\n // daca cheia nu este definita sau daca atasamentele nu sunt verificate atunci nu se intampla nimic\r\n if ($mybb->settings['virustotalscan_setting_attach_enable'] && !empty($mybb->settings['virustotalscan_setting_key']))\r\n {\r\n // in acest moment fisierul a fost deja incarcat pe server\r\n // se construieste URL-ul catre atasamentul incarcat pe server\r\n $file = \".\".substr($mybb->settings['uploadspath'], 1).\"/\".$attacharray['attachname'];\r\n $key = $mybb->settings['virustotalscan_setting_key'];\r\n $scan = virustotalscan_scan_file($file, $key);\r\n // se intoarce ID scanarii din string-ul primit ca rezultat\r\n $scan_id = explode('-', $scan['scan_id']);\r\n $scan_id = $scan_id[0];\r\n $retrieve = virustotalscan_get_report($scan_id, $key);\r\n if ($retrieve && $retrieve['result'] == 1) \r\n {\r\n \t\t$lang->load('virustotalscan');\r\n $total = count($retrieve['report'][1]);\r\n $count_array = array_count_values($retrieve['report'][1]);\r\n // se sorteaza vectorul dupa valori in ordine descrescatoare\r\n arsort($count_array);\r\n // acum se alege prima valoare nenula a cheii din vector\r\n $virus = \"-\";\r\n foreach ($count_array as $key => $val) {\r\n if ($key != \"\") {\r\n // prima valoare gasita e numele virusului ce va fi afisat pe forum\r\n $virus = $key;\r\n // dupa ce se gaseste se iese din structura repetitiva\r\n break;\r\n }\r\n // daca nu se cauta mai departe\r\n }\r\n $percent = \"<font color=\\\"#D71A1A\\\">\".intval($total - $count_array['']).\"</font>/\".$total.\" (\".number_format(floatval(floatval($total - $count_array[''])/floatval($total))*100, 2).\"%)\";\r\n // informatie folosita pentru log-uri\r\n $data = $lang->sprintf($lang->virustotalscan_data, $attacharray['attachname'], $virus, $percent);\r\n // ce se va afisa pe ecranul userului\r\n $size = virustotalscan_get_size($attacharray['filesize']);\r\n\t\t\t$error_data = $lang->sprintf($lang->virustotalscan_error_data, $attacharray['attachname'], $size, $retrieve['report'][0], $virus, $percent, addslashes($retrieve['permalink']));\r\n\t\t\t// se sterge fisierul de pe disc! Astfel el nu va putea ajunge in baza de date!\r\n\t\t\t@unlink($mybb->settings['uploadspath'].\"/\".$attacharray['attachname']);\r\n // se insereaza un log in sistem\r\n $insert_array = array(\r\n 'uid' => intval($mybb->user['uid']),\r\n 'username' => $db->escape_string($mybb->user['username']),\r\n 'date' => TIME_NOW,\r\n 'data' => $db->escape_string($data)\r\n );\r\n // se insereaza in baza de date\r\n $db->insert_query('virustotalscan_log', $insert_array);\r\n // se trimite email ?\r\n\t\t\tif (!empty($mybb->settings['virustotalscan_setting_email']) && virustotalscan_valid_email($mybb->settings['virustotalscan_setting_email'])) {\r\n my_mail($mybb->settings['virustotalscan_setting_email'], $lang->virustotalscan_email_subject, $lang->sprintf($lang->virustotalscan_email_message, htmlspecialchars_uni($mybb->user['username']), my_date($mybb->settings['timeformat'], TIME_NOW), $data), $mybb->settings['bbname'], '', '', false, 'html');\r\n\t\t\t}\t\r\n\t\t\t// in fine se afiseaza eroare si pe ecranul utilizatorului\r\n\t\t\terror($lang->sprintf($lang->virustotalscan_error_infected, nl2br($error_data)));\r\n }\r\n else {\r\n // nu s-a depistat niciun virus\r\n }\r\n } else {\r\n // daca nu e definita o cheie publica atunci nu se intampla nimic\r\n // daca pluginul nu e activ nu se intampla iar nimic\r\n }\r\n}", "function ghbt_scanner() {\n $this->name=\"ghbt_scanner\";\n $this->title=\"GoogleHome BT Scanner\";\n $this->module_category=\"<#LANG_SECTION_DEVICES#>\";\n $this->checkInstalled();\n}", "public function scan()\n {\n $id = $this->input->post('id');\n\n // data scan\n $data_scan = array(\n 'kode_baterai' => $id, \n );\n\n $insert = $this->M_codeigniter->insert('tbl_scan',$data_scan);\n //jika berhasil insert data scan\n if ($insert > 0) {\n\n //set output\n $output = array(\n 'status' => true,\n 'pesan' => 'sukses'\n );\n } else {\n $output = array(\n 'status' => false,\n 'pesan' => \"<div class='col-lg-12'><center><h4>Gagal</h4></center></div></div>\"\n );\n }\n\n echo json_encode($output);\n }", "public function actionWificonnect()\n { \n \t$mcode = Yii::$app->request->post('mcode');\n \t\n \tif(MyWifi::CrewTypeBool($mcode)) {\n \t\t//船员\n \t\t$type = 2;\n \t\t$sql =' SELECT crew_id as member_id,crew_code as member_code,cn_name,smart_card_number, passport_number, crew_password as member_password ,\n\t\t\t\t\tcrew_email as member_email,mobile_number,money as member_money,crew_credit as member_credit,sign,overdraft_limit,curr_overdraft_amount\n\t\t\t\t\tFROM vcos_wifi_crew WHERE crew_code=\\''.$mcode.'\\' ';\n \t\t$membership = Yii::$app->mdb->createCommand($sql)->queryOne();\n \t}else {\n \t\t//会员\n \t\t$type = 1;\n \t\t$member = Member::find ()->select ( [\n \t\t\t\t'sign',\n \t\t] )->where ( [\n \t\t\t\t'member_code' => $mcode\n \t\t] )->one ();\n \t\t$sign = $member['sign'];\n \t\t$membership = MemberService::getMemberbysign($sign);\n \t}\n \t\n //先查看comst 中有没有这个用户\n $find_res = MyCurl::FindUser($membership['passport_number']);\n $find_res = json_decode($find_res,true);\n if($find_res['success']!==false){\n \t//查流量\n \t$check_out_json = MyCurl::CheckFlow($membership['passport_number']);\n \t$check_out_array = json_decode($check_out_json,true);\n \t$arr = explode(\"<br>\", $check_out_array['data']['feeInfo']);\n \t\n \t//剔除不必要的字符\n \t$wifi_online_in_flow = str_replace('MB','',explode(\": \",$arr[5])[1]);\n \t$wifi_online_out_flow = str_replace('MB','',explode(\": \",$arr[6])[1]);\n \t$wifi_online_total_flow = str_replace('MB','',explode(\": \",$arr[7])[1]);\n \t\n \t//初始化用户流量\n \tCruiseLineService::getRunInitStatus($type, $membership['passport_number']);\n \t\n \t//连接网络\n \t$username = $membership['passport_number'];\n \t$sql = \"SELECT * FROM vcos_comst_wifi WHERE username ='$username'\";\n \t$password = Yii::$app->db->createCommand($sql)->queryOne()['password'];\n \t \n \t$online_json = MyCurl::Connect($membership['passport_number'],$password);\n \t\n \t$online_arr = json_decode($online_json,true);\n \tif($online_arr['success']){\n \t\t//write login log to db\n \t\tMyWifi::WriteWifiLoginLogToDB($membership,$wifi_online_in_flow,$wifi_online_out_flow,$wifi_online_total_flow);\n \t\techo $online_json;\n \t}else{\n \t\techo '{\"success\":false,\"Info\":\"'.$online_json.'\"}';\n \t}\n \t\n }else{\n \techo '{\"success\":false,\"Info\":\"请先购买流量包\"}';\n } \n }", "private function refreshData()\n {\n $output = [];\n exec('iwconfig 2> /dev/null', $output);\n foreach ($output as $line) {\n $firstChar = substr($line, 0, 1);\n if ($firstChar != \" \" && $firstChar != \"\") {\n $interface = rtrim(substr($line, 0, 9));\n $this->interfaces[$interface] = [];\n }\n if (preg_match('/(?<=ESSID:\")[\\S\\s]+(?=\")/', $line, $matches)) {\n $this->interfaces[$interface]['ssid'] = $matches[0];\n }\n }\n }", "private function getConnectStatus () \n\t\t{\t\n\t\t\t$status_data = file ( $this->config['status'] ) ;\n\t\t\t$i = 0;\n\t\t\twhile ( $i < count ( $status_data ) ) {\n\t\t\t\t$buffer = explode (\",\" , $status_data [$i] ) ;\n\t\t\t\tif ( count ( $buffer ) == 4) { /* part private ip and public ip */\n\t\t\t\t\tif ( strstr( $status_data[$i], $this->c ) ) {\n\t\t\t\t\t\t$status_info = explode (\",\" , $status_data[$i] );\n\t\t\t\t\t\t$this->result['data']['id'] = $this->c;\n\t\t\t\t\t\t$this->result['data']['status'] = \"Connected\";\n\t\t\t\t\t\t$this->result['data']['private_ip'] = trim($status_info[0]);\t\n\t\t\t\t\t\t$this->result['data']['public_ip'] = trim($status_info[2]);\t\n\t\t\t\t\t\t$this->result['data']['connect_date'] = trim($status_info[3]);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t} /* Not found in openvpn-status.log */\n\t\t\tif ( ! isset( $this->result['data']['status'] ) ) \n\t\t\t\t$this->result['data']['result'] = \"Offline [note: status.log refresh every 1 minute.]\";\n\t\t\treturn;\n\t\t}", "function common_get_ap_config($tipe){\r\n\t$file = '/etc/wpa_supplicant/wpa_supplicant.conf';\r\n\t$curr = file_get_contents($file);\r\n\t\r\n\tif($tipe == 'ssid'){\r\n\t\t//get current ssid\r\n\t\t$conf = explode('#ap-main-ssid',$curr);\r\n\t\t$conf = $conf[1];\r\n\t\t$conf = explode('=',$conf);\r\n\t\t$ssid = trim(str_replace('\"','',$conf[1]));\r\n\t\treturn $ssid;\r\n\t}\r\n\telse if($tipe == 'psk'){\r\n\t\t//get current pass\r\n\t\t$conf = explode('#ap-main-psk',$curr);\r\n\t\t$conf = $conf[1];\r\n\t\t$conf = explode('=',$conf);\r\n\t\t$psk = trim($conf[1]);\r\n\t\treturn $psk;\r\n\t}\r\n\telse if($tipe == 'ssid-b'){\r\n\t\t//get current ssid\r\n\t\t$conf = explode('#ap-backup-ssid',$curr);\r\n\t\t$conf = $conf[1];\r\n\t\t$conf = explode('=',$conf);\r\n\t\t$ssid = trim(str_replace('\"','',$conf[1]));\r\n\t\treturn $ssid;\r\n\t}\r\n\telse if($tipe == 'psk-b'){\r\n\t\t//get current pass\r\n\t\t$conf = explode('#ap-backup-psk',$curr);\r\n\t\t$conf = $conf[1];\r\n\t\t$conf = explode('=',$conf);\r\n\t\t$psk = trim($conf[1]);\r\n\t\treturn $psk;\r\n\t}\t\r\n\treturn null;\r\n}", "public function is_scanning() {\r\n\t\t$this->refresh_status();\r\n\t\treturn $this->is_scanning;\r\n\t}", "function connectAP($essid, $passw, $authMode, $encryptType, $retry=5)\n {\n $result = $this->scan();\n $ch = -1;\n\n foreach($result as $line)\n {\n if($line['essid'] == $essid)\n {\n $ch = $line['channel'];\n }\n }\n\n if($ch == -1)\n {\n echo \"No Essid: \".$essid.\" existing\";\n return \"No Essid: \".$essid.\" existing\";\n }\n\n\n exec('ifconfig ' . escapeshellarg($this->interface) . ' down');\n $this->switchChannel($ch);\n exec( $this->arfilelocation['iwpriv'] . ' '\n . escapeshellarg($this->interface) . ' set ApCliEnable=0');\n exec( $this->arfilelocation['iwpriv'] . ' '\n . escapeshellarg($this->interface) . ' set ApCliSsid='.escapeshellarg($essid));\n exec( $this->arfilelocation['iwpriv'] . ' '\n . escapeshellarg($this->interface) . ' set ApCliAuthMode='.$authMode);\n exec( $this->arfilelocation['iwpriv'] . ' '\n . escapeshellarg($this->interface) . ' set ApCliEncrypType='.$encryptType);\n exec( $this->arfilelocation['iwpriv'] . ' '\n . escapeshellarg($this->interface) . ' set ApCliWPAPSK='.$passw);\n exec( $this->arfilelocation['iwpriv'] . ' '\n . escapeshellarg($this->interface) . ' set ApCliEnable=1');\n exec('ifconfig ' . escapeshellarg($this->interface) . ' up');\n\n $isConnected = 0;\n while($retry--)\n {\n if(!strcmp($this->getconnectedAP(), $essid))\n {\n $isConnected=1;\n break;\n }\n\n if($retry == 0 )\n break;\n\n # sleep 1 seconds.\n sleep(1);\n }\n\n if($isConnected == 1)\n return '';\n else\n return 'fail';\n }", "public function allIpAction() {\n\n $url = \"156.17.231.34\";\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_NOBODY, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_exec($ch);\n $retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n if ($retcode >= 100 && $retcode <= 505) {\n //echo \"work \" . $retcode . \"<br/>\";\n } else {\n // echo \"nie dziala \" . $retcode . \"<br/>\";\n }\n }", "function getUserCount(){\n try{\n $api = $this->routerosapi;\n $user = $this->devices->getUserRouter(array('id' => '1111'));\n $api->port = $user['port'];\n if($api->connect(\"10.10.10.1\",$user['username'],$user['password'])){\n $api->write('/ip/hotspot/host/print');\n $read = $api->read();\n $api->disconnect(); \n return count($read); \n }\n }catch(Exeption $error){\n return $error;\n }\n }", "function getconnectedAP()\n {\n $arMatches = array();\n \n exec( $this->arfilelocation['iwconfig'] . ' '\n . escapeshellarg($this->interface), $arMatches );\n\n $essidreg = '/ESSID:\"([^\"]+)\"/';\n\n $match = array();\n if(preg_match($essidreg, $arMatches[0], $match))\n return $match[1];\n else\n return '';\n }", "function my_hook_monitor_function($keyword, $params)\n{\n global $app_name, $app_version, $nama_modem;\n global $my_kembali_sms_format, $my_kembali_sms_sample;\n // Sometime, you don't need to reply SMS from non-user number,\n // such as SMS from Service Center, message center, \n // or promotional SMS:\n $valid_param_count = 5;\n // pre( $params);\n // return true;\n if (strlen($params['sender'])<=6) {\n return true;\n }\n else\n {\n if (count($params['params'])!=$valid_param_count){\n sms_send($params['sender'], '1/2. SMS tidak valid. Jumlah parameter data harus '.$valid_param_count.'.', $nama_modem);\n sms_send($params['sender'], '2/2. Format SMS: '.$my_monitor_sms_format, $nama_modem);\n sms_send($params['sender'], '3/2. Contoh SMS: '.$my_monitor_sms_sample, $nama_modem);\n }\n else\n {\n $kode_pinjam = strtoupper($params['params'][1]);\n // cek kode pinjam, jika ID = 0, berarti kode pinjam tidak valid:\n $id_pinjam = fetch_one_value(\"select coalesce( (\n select UUID_SHORT() id from inkubator_pinjam p where upper(p.kode_pinjam) = '$kode_pinjam'\n and p.status_pinjam = 'Disetujui' \n ),0) as id\");\n if ($id_pinjam == 0)\n {\n sms_send($params['sender'], 'Kode Pinjam tidak ditemukan: '.$kode_pinjam.'.', $nama_modem); \n } \n else\n { \n // proses SMS dan insert ke table `inkubator_kembali`:\n // Sample: KEMBALI*323431-353131-35*30*3.60*SEHAT;\n $p_pjg = trim($params['params'][ 2]);\n $p_berat = trim($params['params'][ 3]);\n $p_kondisi = strtoupper(trim($params['params'][ 4])); \n // cek tangal, panjang dan berat apakah formatnya sesuai atau tidak.\n // $p_validate_tgl = '/^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4}$/'; // dd/mm/yyyy\n $p_validate_pjg = '/^[0-9]{1,2}+([\\,\\.][0-9]{1,2})?$/'; // max2digits[.,]max2digits\n if (!preg_match($p_validate_pjg, $p_pjg))\n {\n sms_send($params['sender'], 'Maaf. Panjang bayi saat kembali salah. Contoh panjang bayi: 31.5', $nama_modem);\n }\n else\n if (!preg_match($p_validate_pjg, $p_berat))\n {\n sms_send($params['sender'], 'Maaf. Berat bayi saat kembali salah. Contoh berat bayi: 3,12', $nama_modem);\n }\n else\n if (($p_kondisi!='SEHAT') && ($p_kondisi!='SAKIT'))\n {\n sms_send($params['sender'], 'Maaf. Kondisi bayi salah. Harus SEHAT atau SAKIT.', $nama_modem);\n }\n else\n {\n // process tgl, berat & panjang:\n // xx/yy/xxxx\n $p_skor = ($p_kondisi=='SEHAT'?1:0);\n $p_berat = str_replace(',','.', $p_berat);\n $p_pjg = str_replace(',','.', $p_pjg);\n // all set! save it to database.\n $sub_mon_sql = \"insert into inkubator_monitoring \n \t\t(id, kode_pinjam, tgl_input, panjang_bayi, berat_bayi, kondisi, skor, keterangan)\n \t values\n \t\t(UUID_SHORT(), '$kode_pinjam', CURRENT_TIMESTAMP(), $p_pjg, $p_berat, '$p_kondisi', $p_skor,\n \t\tconcat('Data monitoring ', (select p.nama_bayi from inkubator_pinjam p where p.kode_pinjam = '$kode_pinjam'))\n \t );\";\n /*\n $f = fopen('d:/test-.txt','w');\n fputs($f, $save_sql);\n fputs($f, $sub_mon_sql);\n fclose($f);\n */ \n if (exec_query($sub_mon_sql))\n {\n sms_send($params['sender'], 'Data monitoring telah diterima.', $nama_modem);\n }\n else\n {\n sms_send($params['sender'], 'Maaf, server sedang sibuk. Cobalah beberapa saat lagi.', $nama_modem);\n } \n } \n }\n }\n return true;\n } \n}", "private function _locate_hw() {\n\t\t$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);\t\t\n\t\tsocket_bind($socket, \"0.0.0.0\", 55555);\n\t\t\n\t\t$timeout = array('sec'=>20,'usec'=>0);\n\t\tsocket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO,$timeout);\n\t\tsocket_set_option($socket, SOL_SOCKET, SO_BROADCAST, 1);\n\t\tsocket_set_option($socket, SOL_SOCKET, SO_REUSEADDR, 1);\n\t\tsocket_set_option($socket, SOL_SOCKET, SO_DEBUG, 0);\t\t\t\t\n\t\t\n\t\twhile(true) {\n\t\t\tsocket_recvfrom($socket, $buf, 512, 0, $remote_ip, $remote_port);\t\t\t\n\t\t\tif (strpos($buf,'HomeWizard') !== false) {\n\t\t\t\t$this->ip_address = $remote_ip;\t\t\t\t\n\t\t\t\tsocket_close($socket);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tsocket_close($socket);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\t\t\n\t}", "function getRssi()\n {\n \t$sh_args = 'getcellrssi'; \t//admin client comand for getting cellular signal strength (rssi)\n $sh_out = atsexec(escapeshellcmd($sh_args));\t//socket call\n debug('(cell_controller.inc|getRssi()) admin client api command \"getcellrssi\" output: $sh_out', $sh_out); \t\t//DEBUG\n\n if($sh_out != 'phpcmd: fail' && $sh_out != 'phpcmd: invalid command' && $sh_out != 99)\n {\n \tdebug('(cell_controller.inc|getRssi()) getcellrssi command completed.'); \t//DEBUG\n \treturn $sh_out;\n }\n else\n {\n \tdebug('(cell_controller.inc|getRssi()) getcellrssi command failed.'); \t\t//DEBUG\n \treturn false;\n \t//return 'Failed to detect cellular signal';\n }\n }", "public function MyExecute()\r\n\t{\r\n Utility::turnDebugOn();\r\n //config switch\r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",1);\r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",2); \r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",3); \r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",4); \r\n// \r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",1);\r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",2); \r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",3);\r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",4); \r\n \r\n// $this->apRadioControl($this->scenario->GetDevice('AP2'),\"Disabled\");\r\n// \r\n// Utility::insertBreakPoint(); \r\n// \r\n// $this->apRadioControl($this->scenario->GetDevice('AP2'),\"Enabled\");\r\n// \r\n// $this->syncAPs();\r\n \r\n// if($this->checkPage()==TRUE)\r\n// {\r\n// Utility::insertBreakPoint(\"hahahahaha\"); \r\n// }\r\n// else\r\n// {\r\n// system(\"banner baga\");\r\n// }\r\n \r\n\r\n $MYVSC=new VSC(\"V2\",\"V2\",\"WPA2(AES/CCMP)\",\"802.1X\");\r\n $MYVSC->commit();\r\n \r\n// $MYVSC=new VSC(\"V3\",\"V3\",\"WEP\",\"HTML\");\r\n// $my_wireless=new WirelessProtection();\r\n// $my_wireless->setWirelessProtectionType(\"WEP\");\r\n// $my_wireless->setKeySource(\"STATIC\");\r\n// $my_wireless->setKey(array( \"c67347dd12a787b7a132f690d0\", \"c67347dd12a797b7a132f690d1\", \"c673a7dd12a787b7a132f690d2\", \"c67347dd16a787b7a132f690d3\", \"2\", \"HEX\"));\r\n// $MYVSC->configureWirelessProtection($my_wireless); \r\n// $MYVSC->commit();\r\n \r\n $MYVSC=new VSC(\"V3\",\"V3\",\"WPA(TKIP)\",\"HTML\");\r\n $my_wireless=new WirelessProtection();\r\n $my_wireless->setWirelessProtectionType(\"WPA(TKIP)\");\r\n $my_wireless->setKeySource(\"STATIC\");\r\n $my_wireless->setKey(\"26d4a5f7cf549710a7aae2db4e712027\");\r\n $MYVSC->configureWirelessProtection($my_wireless); \r\n $MYVSC->commit();\r\n \r\n \r\n \r\n// $MYVSC=new VSC(\"V4\",\"V4\",\"None\",\"MAC\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V5\",\"V5\",\"None\",\"HTML_MAC\");\r\n// $MYVSC->commit();\r\n// \r\n // $MYVSC=new VSC(\"V6\",\"V6\",\"WEP\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V7\",\"V7\",\"WPA2(AES/CCMP)\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V8\",\"V8\",\"WPA/WPA2\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// $MYVSC=new VSC(\"V2\",\"V2\",\"WEP\");\r\n// $MYVSC->commit(); \r\n// \r\n// $MYVSC=new VSC(\"V3\",\"V3\",\"WEP\",\"HTML\"); \r\n// $MYVSC->commit(); \r\n// \r\n \r\n Utility::insertBreakPoint(); \r\n return \"passed\";\r\n \r\n\t}", "function virustotalscan_activate()\r\n{\r\n\tglobal $db;\r\n\t// grupul de setari\r\n\t$group = array(\r\n \"name\" => \"virustotalscan_group\", \r\n\t\t\"title\" => \"Virus Total Scanner\", \r\n\t\t\"description\" => \"Settings for \\\"Virus Total Scanner\\\" plugin.\", \r\n\t\t\"disporder\" => 100, \r\n\t\t\"isdefault\" => 0\r\n\t);\r\n\t$gid = $db->insert_query(\"settinggroups\", $group);\r\n // setarile modificarii\r\n \t$setting_1 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_key\",\r\n\t\t\"title\"\t\t\t=> \"Public Key\",\r\n\t\t\"description\"\t=> \"Enter your VirusTotal.com public key. Without this key you cannot use \\\"Virus Total Scanner\\\" application. You can get one by visiting <a href=\\\"http://www.virustotal.com/vt-community/register.html\\\" target=\\\"_blank\\\">this</a> page.\",\r\n\t\t\"optionscode\"\t=> \"text\",\r\n\t\t\"value\"\t\t\t=> \"\",\r\n\t\t\"disporder\"\t\t=> 1,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_1);\r\n \t$setting_2 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_attach_enable\",\r\n\t\t\"title\"\t\t\t=> \"Is \\\"Attachment Scan\\\" module enabled?\",\r\n\t\t\"description\"\t=> \"If it is set to \\\"Yes\\\" then all your new attachments will be checked before they are inserted in database.\",\r\n\t\t\"optionscode\"\t=> \"yesno\",\r\n\t\t\"value\"\t\t\t=> \"yes\",\r\n\t\t\"disporder\"\t\t=> 2,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_2);\r\n\t$setting_3 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_bantime\",\r\n\t\t\"title\"\t\t\t=> \"Ban Time for \\\"Attachment Scan\\\" module :\",\r\n\t\t\"description\"\t=> \"For how much time a user will be banned from the administration panel. Leave blank or enter negative values if you want the ban to be permanently. (Default : \\\"\\\")\",\r\n\t\t\"optionscode\"\t=> \"text\",\r\n\t\t\"value\"\t\t\t=> \"\",\r\n\t\t\"disporder\"\t\t=> 3,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_3);\r\n\t$setting_4 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_bangroup\",\r\n\t\t\"title\"\t\t\t=> \"After banning user, he will be moved to usergroup :\",\r\n\t\t\"description\"\t=> \"When a member is banned then it will be moved to the group below. The group is represented by its id. (Default : 7)\",\r\n\t\t\"optionscode\"\t=> \"text\",\r\n\t\t\"value\"\t\t\t=> \"7\",\r\n\t\t\"disporder\"\t\t=> 4,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_4);\r\n\t$setting_5 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_email\",\r\n\t\t\"title\"\t\t\t=> \"Email\",\r\n\t\t\"description\"\t=> \"Enter the email address of the person who receives an email once someone tries to upload an infected file. Leave blank to disable this feature.\",\r\n\t\t\"optionscode\"\t=> \"text\",\r\n\t\t\"value\"\t\t\t=> \"\",\r\n\t\t\"disporder\"\t\t=> 5,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_5);\r\n \t$setting_6 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_url_enable\",\r\n\t\t\"title\"\t\t\t=> \"Is \\\"Link Scan\\\" module enabled?\",\r\n\t\t\"description\"\t=> \"If it is set to \\\"Yes\\\" then all links from messages will be checked for viruses.\",\r\n\t\t\"optionscode\"\t=> \"yesno\",\r\n\t\t\"value\"\t\t\t=> \"yes\",\r\n\t\t\"disporder\"\t\t=> 6,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_6);\r\n\t$setting_7 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_url_protection\",\r\n\t\t\"title\"\t\t\t=> \"Protection level :\",\r\n\t\t\"description\"\t=> \"Set a protection level for your \\\"Link Scan\\\" module. (Default : Medium Protection)\",\r\n\t\t\"optionscode\"\t=> \"select\\n25=Low Protection\\n50=Medium Protection\\n75=Maximum Protection\\n\",\r\n\t\t\"value\"\t\t\t=> \"50\",\r\n\t\t\"disporder\"\t\t=> 7,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_7);\r\n\t$setting_8 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_url_rescan\",\r\n\t\t\"title\"\t\t\t=> \"Rescan frequency :\",\r\n\t\t\"description\"\t=> \"Set a rescan frequency for your \\\"Link Scan\\\" module. (Default : 1 Month)\",\r\n\t\t\"optionscode\"\t=> \"select\\n7=7 Days\\n14=14 Days\\n30=1 Month\\n90=3 Months\\n180=6 Months\\n\",\r\n\t\t\"value\"\t\t\t=> \"30\",\r\n\t\t\"disporder\"\t\t=> 8,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_8);\r\n\t$setting_9 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_url_loadlimit\",\r\n\t\t\"title\"\t\t\t=> \"Server load limit :\",\r\n\t\t\"description\"\t=> \"Set an upper limit for your server load time over the module \\\"Link Scan\\\" stop working. (Default : 5)\",\r\n\t\t\"optionscode\"\t=> \"select\\n1=1.0\\n3=3.0\\n5=5.0\\n7=7.0\\n9=9.0\\n\",\r\n\t\t\"value\"\t\t\t=> \"5\",\r\n\t\t\"disporder\"\t\t=> 9,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_9);\r\n\t$setting_10 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_url_groups\",\r\n\t\t\"title\"\t\t\t=> \"Groups Except :\",\r\n\t\t\"description\"\t=> \"User groups defined below will not benefit from the scanning links. (Default : 7)\",\r\n\t\t\"optionscode\"\t=> \"text\",\r\n\t\t\"value\"\t\t\t=> \"7\",\r\n\t\t\"disporder\"\t\t=> 10,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_10);\r\n\t// se actualizeaza toate setarile\r\n\trebuild_settings();\r\n // inainte de a crea eventuale tabele vom vedea ce colocatie avem...\r\n\t$collation = $db->build_create_table_collation();\r\n\t// daca tabelul cu log-uri exista atunci nu se va mai crea\r\n\tif(!$db->table_exists(\"virustotalscan_log\")) {\r\n // daca nu exista se purcede la crearea lui\r\n $db->write_query(\"CREATE TABLE `\".TABLE_PREFIX.\"virustotalscan_log` (\r\n `lid` bigint(30) UNSIGNED NOT NULL auto_increment,\r\n `uid` bigint(30) UNSIGNED NOT NULL default '0',\r\n `username` varchar(128) NOT NULL default '',\r\n `date` bigint(30) UNSIGNED NOT NULL default '0',\r\n `data` TEXT NOT NULL,\r\n PRIMARY KEY (`lid`), KEY(`date`)\r\n ) ENGINE=MyISAM{$collation}\");\r\n }\r\n // se adauga in baza de date noi stiluri\r\n $css_url_template = array(\r\n \"title\" => \"virustotalscan_url_css\",\r\n \"template\" => $db->escape_string('\r\n <style type=\"text/css\">\r\n a.virustotalscan_found, a.virustotalscan_notfound \r\n {\r\n position: relative;\r\n z-index:24; \r\n text-decoration:none\r\n }\r\n a.virustotalscan_found:hover\r\n {\r\n z-index:25; \r\n background-color:#800000\r\n }\r\n a.virustotalscan_notfound:hover\r\n {\r\n z-index:25; \r\n background-color:#008000\r\n }\r\n a.virustotalscan_found span, a.virustotalscan_notfound span\r\n {\r\n display: none\r\n }\r\n a.virustotalscan_found:hover span \r\n { \r\n display:block;\r\n position:absolute;\r\n top:2em; left:2em; width:15em;\r\n border:1px solid #0cf;\r\n background-color:#cff; \r\n color:#FF0000;\r\n text-align: center\r\n }\r\n a.virustotalscan_notfound:hover span \r\n { \r\n display:block;\r\n position:absolute;\r\n top:2em; left:2em; width:15em;\r\n border:1px solid #0cf;\r\n background-color:#cff; \r\n color:#000;\r\n text-align: center\r\n }\r\n </style>\r\n '),\r\n \"sid\" => \"-1\",\r\n \"version\" => \"1.0\",\r\n \"dateline\" => TIME_NOW\r\n );\r\n $db->insert_query('templates', $css_url_template); \r\n}", "function virustotalscan_get_url_report($resource, $key, $scan = 0)\r\n{ \r\n $url = 'http://www.virustotal.com/api/get_url_report.json';\r\n $fields = array('resource' => $resource, 'key' => $key, 'scan' => $scan);\r\n $fields_string = '';\r\n foreach($fields as $key => $value) { \r\n $fields_string .= $key.'='.$value.'&'; \r\n }\r\n $fields_string = rtrim($fields_string, '&');\r\n // se initializeaza o cerere \r\n $ch = curl_init();\r\n // se seteaza optiunile cererii\r\n curl_setopt($ch, CURLOPT_URL, $url);\r\n curl_setopt($ch, CURLOPT_POST, count($fields));\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n // se intoarce rezultatul cererii \r\n $result = curl_exec($ch);\r\n // se inchide cererea\r\n curl_close($ch);\r\n // se decodeaza rezultatul de pe server \r\n $result = json_decode($result, true);\r\n // se intoarce rezultatul \r\n if($scan && $result['result'] == 0) {\r\n // atunci s-a obtinut un scan_id\r\n return $result['scan_id'];\r\n } \r\n else {\r\n // altfel se obtine un raport\r\n return $result;\r\n } \r\n}", "function nSmFromIp($sm) {\n\n $count = 0;\n\n for($i=0;$i<32;$i++) {\n\n if($sm[$i]==\"1\") {\n $count++;\n }\n }\n \n return $count;\n}", "public function findOnline() {}", "public function get_connections() {\n\t\t$sql = \"SELECT `id` FROM `devices` WHERE `tech` <> 'custom'\";\n\t\t$alldevices = FreePBX::create()->Database->query($sql)->fetchAll(PDO::FETCH_COLUMN, 0);\n\t\t$devices = array_flip($alldevices);\n\n\t\t$protocols = array(\"sip\", \"iax2\", \"pjsip\");\n\t\t$vars = array(\n\t\t\t\"users_online\", \"users_offline\", \"users_total\",\n\t\t\t\"trunks_online\", \"trunks_offline\", \"trunks_total\",\n\t\t\t\"registrations_online\", \"registrations_offline\", \"registrations_total\",\n\t\t);\n\n\t\t// Build array to return\n\t\tforeach ($protocols as $p) {\n\t\t\tforeach ($vars as $v) {\n\t\t\t\t$retarr[$p.\"_\".$v] = 0;\n\t\t\t}\n\t\t}\n\n\t\t// Add Totals\n\t\tforeach ($vars as $v) {\n\t\t\t$retarr[$v] = 0;\n\t\t}\n\n\t\tif (!$this->astman) {\n\t\t\treturn $retarr;\n\t\t}\n\n\t\t$response = $this->astman->send_request('Command',array('Command'=>\"sip show peers\"));\n\t\t$astout = explode(\"\\n\",$response['data']);\n\t\t$blacklist = \\FreePBX::Dashboard()->extIgnoreList();\n\t\tforeach ($astout as $line) {\n\t\t\t// Previous bug IRT trunks starting or ending with /'s here. Investigate.\n\t\t\t$exploded = preg_split('/\\s+/', $line);\n\t\t\tif (strpos($exploded[0], '/') === false) {\n\t\t\t\t$name = $exploded[0];\n\t\t\t} else {\n\t\t\t\tlist($name, $null) = explode('/', $exploded[0]);\n\t\t\t}\n\t\t\t//prefix blacklist\n\t\t\tforeach($blacklist as $num)\n\t\t\tif(substr($name,0,$num['length']) == $num['value'] && $name !== $num['value']){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// How to we see if a trunk is down?\n\t\t\tif ( $exploded[1] == \"(Unspecified)\" || // No IP Address\n\t\t\t\t$exploded[5] == \"UNREACHABLE\" || $exploded[6] == \"UNREACHABLE\") {\n\t\t\t\t// This is a device that's down\n\t\t\t\tif (!isset($devices[$name])) {\n\t\t\t\t\t// It is, actually a TRUNK that's down.\n\t\t\t\t\t$retarr['sip_trunks_offline']++;\n\t\t\t\t} else {\n\t\t\t\t\t$retarr['sip_users_offline']++;\n\t\t\t\t}\n\t\t\t} elseif (filter_var($exploded[1], FILTER_VALIDATE_IP)) {\n\t\t\t\t// This is a device that's up.\n\t\t\t\tif (!isset($devices[$name])) {\n\t\t\t\t\t$retarr['sip_trunks_online']++;\n\t\t\t\t} else {\n\t\t\t\t\t$retarr['sip_users_online']++;\n\t\t\t\t}\n\t\t\t} // else it's not a device.\n\t\t}\n\n\t\t$response = $this->astman->send_request('Command',array('Command'=>\"sip show registry\"));\n\t\t$astout = explode(\"\\n\",$response['data']);\n\t\t$pos = false;\n\t\tforeach ($astout as $line) {\n\t\t\tif (trim($line) != '') {\n\t\t\t\tif ($pos===false) {\n\t\t\t\t\t// find the position of \"State\" in the first line\n\t\t\t\t\t$pos = strpos($line,\"State\");\n\t\t\t\t} else {\n\t\t\t\t\t// subsequent lines, check if it says \"Registered\" at that position\n\t\t\t\t\tif (substr($line,$pos,10) == \"Registered\") {\n\t\t\t\t\t\t$retarr['sip_registrations_online']++;\n\t\t\t\t\t} elseif (strlen($line) > $pos) {\n\t\t\t\t\t\t$retarr['sip_registrations_offline']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$response = $this->astman->send_request('Command',array('Command'=>\"iax2 show peers\"));\n\t\t$astout = explode(\"\\n\",$response['data']);\n\t\tforeach ($astout as $line) {\n\t\t\tif (preg_match('/^(([a-z0-9\\-_]+)(\\/([a-z0-9\\-_]+))?)\\s+(\\([a-z]+\\)|\\d{1,3}(\\.\\d{1,3}){3})/i', $line, $matches)) {\n\t\t\t\t//matches: [2] = name, [4] = username, [5] = host, [6] = part of ip (if IP)\n\n\t\t\t\t// have an IP address listed, so its online\n\t\t\t\t$online = !empty($matches[6]);\n\n\t\t\t\tif (!isset($devices[$matches[2]])) {\n\t\t\t\t\t// this is a trunk\n\t\t\t\t\t//TODO match trunk tech as well?\n\t\t\t\t\t$retarr['iax2_trunks_'.($online?'online':'offline')]++;\n\t\t\t\t} else {\n\t\t\t\t\t$retarr['iax2_users_'.($online?'online':'offline')]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t$response = $this->astman->send_request('Command',array('Command'=>\"iax2 show registry\"));\n\t\t$astout = explode(\"\\n\",$response['data']);\n\t\t$pos = false;\n\t\tforeach ($astout as $line) {\n\t\t\tif (trim($line) != '') {\n\t\t\t\tif ($pos===false) {\n\t\t\t\t\t// find the position of \"State\" in the first line\n\t\t\t\t\t$pos = strpos($line,\"State\");\n\t\t\t\t} else {\n\t\t\t\t\t// subsequent lines, check if it syas \"Registered\" at that position\n\t\t\t\t\tif (substr($line,$pos,10) == \"Registered\") {\n\t\t\t\t\t\t$retarr['iax2_registrations_online']++;\n\t\t\t\t\t} elseif (strlen($line) > $pos) {\n\t\t\t\t\t\t$retarr['iax2_registrations_offline']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$response = $this->astman->send_request('Command',array('Command'=>\"pjsip show endpoints\"));\n\t\t// This is an amazingly awful format to parse.\n\t\t$lines = explode(\"\\n\", $response['data']);\n\t\t$inheader = true;\n\t\t$istrunk = $isendpoint = false;\n\t\tforeach ($lines as $l) {\n\t\t\tif ($inheader) {\n\t\t\t\tif (isset($l[1]) && $l[1] == \"=\") {\n\t\t\t\t\t// Last line of the header.\n\t\t\t\t\t$inheader = false;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$l = trim($l);\n\t\t\tif (!$l) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If we have a line starting with 'Endpoint:' then we found one!\n\t\t\tif (strpos($l, \"Endpoint:\") === 0) {\n\t\t\t\tif (preg_match(\"/Endpoint:\\s+(.+)\\/(.+?)\\b\\s+(.+)/\", $l, $out)) {\n\t\t\t\t\t// Found a device\n\t\t\t\t\t$isendpoint = $out[1];\n\t\t\t\t\t$istrunk = false;\n\t\t\t\t\tif (isset($out[3]) && strpos($out[3], \"Unavail\") === 0) {\n\t\t\t\t\t\t// Unavailable endpoint.\n\t\t\t\t\t\t$retarr['pjsip_users_offline']++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$retarr['pjsip_users_online']++;\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t} elseif (preg_match(\"/Endpoint:\\s+(.+?)\\b/\", $l, $out)) {\n\t\t\t\t\t// Found a trunk\n\t\t\t\t\t$isendpoint = false;\n\t\t\t\t\t$istrunk = $out[1];\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new \\Exception(\"Unable to parse endpoint $l\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we have a Contact: line, then that's something that's registered!\n\t\t\tif (strpos($l, \"Contact:\") === 0) {\n\t\t\t\tif ($isendpoint !== false) {\n\t\t\t\t\t// This is a registered endpoint\n\t\t\t\t\t$retarr['pjsip_registrations_online']++;\n\t\t\t\t} elseif ($istrunk !== false) {\n\t\t\t\t\t// Trunk status... Check for 'avail'\n\t\t\t\t\tif (strpos($l, \"Avail \") === false) {\n\t\t\t\t\t\t// Trunk down.\n\t\t\t\t\t\t$retarr['pjsip_trunks_offline']++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$retarr['pjsip_trunks_online']++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new \\Exception(\"Found a contact before I figured out what it is!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Now figure out the totals.\n\t\tforeach ($protocols as $p) {\n\t\t\t$users = $retarr[$p.\"_users_online\"]+$retarr[$p.\"_users_offline\"];\n\t\t\t$retarr[$p.\"_users_total\"] = $users;\n\n\t\t\t$trunks = $retarr[$p.\"_trunks_online\"]+$retarr[$p.\"_trunks_offline\"];\n\t\t\t$retarr[$p.\"_trunks_total\"] = $trunks;\n\n\t\t\t$regs = $retarr[$p.\"_registrations_online\"]+$retarr[$p.\"_registrations_offline\"];\n\t\t\t$retarr[$p.\"_registrations_total\"] = $regs;\n\t\t}\n\n\t\tforeach ($vars as $v) {\n\t\t\tforeach ($protocols as $p) {\n\t\t\t\t$retarr[$v] += $retarr[$p.\"_\".$v];\n\t\t\t}\n\t\t}\n\n\t\treturn $retarr;\n\t}", "function outputled_gateway() {\n\t\tglobal $g;\n\t\tglobal $config;\n\t\t$a_gateways = return_gateways_array();\n\t\t$gateways_status = array();\n\t\t$gateways_status = return_gateways_status(true);\n\t\tforeach ($a_gateways as $gname => $gateway)\n\t\t{\n\t\t\tif ($gateways_status[$gname]['status'] != \"none\")\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}", "private function getClientIP ()\n {\n $status_data = file ( $this->config['status'] ) ;\n $i = 0;\n while ( $i < count ( $status_data ) ) { /* Process openvpn-status.log */\n $buffer = explode (\",\" , $status_data [$i] ) ;\n if ( count ( $buffer ) == 4) {\n if ( strstr( $status_data[$i], $this->c ) ) {\n $status_info = explode (\",\" , $status_data[$i] );\n $this->result['data']['id'] = $this->c;\n $this->result['data']['private_ip'] = trim($status_info[0]);\n $this->result['data']['connect_date'] = trim($status_info[3]);\n $this->result['data']['from'] = \"status.log\";\n }\n }\n $i++;\n }\n\n\t\t\t/* Id not found in openvpn-status.log */\n\t\t\t/* Check fixed ip address from database */\t\t\t\n\t\t\tif ( ! isset ( $this->result['data']['private_ip'] ) ) \t{\n\t\t\t\t$dbs = new DB ( $this->config['database'] );\n \t$c = $dbs->query (\"SELECT * FROM tbl_vpn_org where org_id = '\" . $this->c . \"'\");\n \tif ( count ( $c ) ) { /* Check org */\n\t\t\t\t\t$dbfx = new DB ( $this->config['database'] );\t\t\n\t\t\t\t\t$resfx = $dbfx->query (\"SELECT * FROM tbl_custom_ip WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t\t\tif ( count ( $resfx ) ) { /* Check fixed ip by id */\n\t\t\t\t\t\t$this->result['data']['id'] = $this->c;\n\t\t\t\t\t\t$this->result['data']['ip'] = $resfx[0]['fix_ip'];\n\t\t\t\t\t\t$this->result['data']['note'] = \"Fixed ip address\";\n\t\t\t\t\t} else /* Fixed ip address not found, But id founded in main system */\n\t\t\t\t\t\t$this->result['data']['result'] = \"DHCP\";\n\t\t\t\t\t$dbfx->CloseConnection ();\t\n\t\t\t\t} else { \n\t\t\t\t\t/* Main id not found */\n\t\t\t\t\t$this->result['data']['result'] = \"Not found [error code:100:101]\";\t\n\t\t\t\t}\n\t\t\t\t$dbs->CloseConnection ();\n\t\t\t}\n return;\n }", "function IPTrackingAdmin()\n{\n\t////////////////////////////////////////////////TRACKING IP////////////////////////////////////////////////////////////////\n\tinclude_once(\"Browser.php\"); \n\tmysql_connect(\"localhost\",\"admindbuser\",\"Khfi887$33\") or die(\"Could not connect to webadmin database\");\n\tmysql_select_db(\"webadmin\") or die(\"Could not select webadmin database\");\n\t\n\t$timestamp = time();\n\t$datetime = date(\"Y-m-d H:i:s\", $timestamp);\n\t$url=mysql_real_escape_string(curPageURL());\n\t$ip1=@$REMOTE_ADDR; \n\t$ip2=$_SERVER['REMOTE_ADDR'];\n\t$ip=$ip1;\n\tif (strlen($ip)==0) $ip=$ip2;\n\t$browser = new Browser();\n\t$b=$browser->getBrowser(); \n\t$user=$_SESSION['user'];\n\n\n\tif ($b!='GoogleBot')\n\t{\n\t\t$str6=\"insert into iptracking(timestamp,ip,datetime,url,browser,user) \";\n\t\t$str6.=\" values('$timestamp','$ip','$datetime','$url','$b','$user')\";\n\t\t$result6=mysql_query($str6) or die(mysql_error());\n\t\t\n\t\t///Kiem tra URL co hop le hay khong, neu khong thi dua vao Blacklist\n\t\tif ((strpos($url,'0x')===false) and (strpos($url,'concat')===false) and (strpos($url,'information')===false) and\n\t\t(strpos($url,'substring')===false) and (strpos($url,'-')===false) and (strpos($url,'%')===false) and\n\t\t(strpos($url,'union')===false) and (strpos($url,'select')===false) and (strpos($url,'delete')===false) and\n\t\t(strpos($url,'acunetix')===false) and (strpos($url,'hack')===false) and (strpos($url,'database')===false)) \n\t\t{\n\t\t\t$k=0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Kiem tra va dua vao blacklist\n\t\t\t$condition=\"((locate('0x',url)>0) or (locate('concat',url)>0) or (locate('information',url)>0) \n\t\t\tor (locate('substring',url)>0) or (locate('-',url)>0) or (locate('%',url)>0) or (locate('union',url)>0) \n\t\t\tor (locate('select',url)>0) or (locate('delete',url)>0) or (locate('acunetix',url)>0) or (locate('hack',url)>0) \n\t\t\tor (locate('database',url)>0))\";\n\t\t\t$str6=\"select ip,datetime,browser,url,user,count(ip) as cip from iptracking where \"; //timestamp>$today\n\t\t\t$str6.=\" $condition and ip='$ip' group by ip order by datetime desc\";\n\t\t\t$result6=mysql_query($str6) or die(mysql_error());\n\t\t\t$row6=mysql_fetch_array($result6);\n\t\t\tif ($row6['cip']>=5)\n\t\t\t{\n\t\t\t\t$str6=\"insert into blacklist(ip) \";\n\t\t\t\t$str6.=\" values('$ip')\";\n\t\t\t\t$result6=mysql_query($str6) or die(mysql_error());\n\t\t\t\t//Neu trong CSDL da luu 5 lan truy xuat khong hop le tro len, va tiep tuc co truy xuat khong hop le thi thuc hien chan\n\t\t\t\techo(\"<center>Truy xuat khong hop le (Your request is denied!)</center><br>\");\n\t\t\t\techo(\"<center>Vui long lien he nhan vien quan tri cong! (Please contact our webmaster!)</center><br>\");\n\t\t\t\techo(\"<center><a href='http://www.binhdinh.gov.vn'>Quay ve trang chu (Homepage)</a></center>\");\t\t\t\t\n\t\t\t\texit();\n\t\t\t\t//header('Location:message.php?id=9');\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t}\n\tmysql_close();\n}", "public static function Checkip($ip){\n $q = new Active;\n $arr = array(\"ip_address\"=>$ip);\n $r = $q->select('','notification',$arr);\n if($r!=0){\n if($r[0]['wkiki_aware_checked']==1)\n return 1;\n\n }\n return 0;\n }", "public function index(){\n\t\t$this->load->view('scan');\n\n\t}", "function sms_gate_status($sms_id)\r\n\t{\r\n\t\tglobal $sms_accountno, $sms_pwd;\r\n\r\n\t\t$status_url = \"https://api.accessyou.com/sms/getstatus.php?\";\r\n\t\t$status_url .= \"accountno=\".urlencode($sms_accountno);\r\n\t\t$status_url .= \"&pwd=\".urlencode($sms_pwd);\r\n\t\t$status_url .= \"&id=\".urlencode($sms_id);\r\n\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $status_url);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\r\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 20);\r\n\r\n\t\t$result = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\tif (!preg_match(\"/pending|queue|ready|finish/i\", $result)) {\r\n\t\t\t$result = \"Error: \" . $result;\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "function virustotalscan_info()\r\n{\r\n return array(\r\n\t\t\"name\"\t\t\t=> \"Virus Total Scanner\",\r\n\t\t\"description\"\t=> \"Scans new attachments and links by using VirusTotal.com's API.\",\r\n\t\t\"website\"\t\t=> \"http://mybb.ro\",\r\n\t\t\"author\"\t\t=> \"Surdeanu Mihai\",\r\n\t\t\"authorsite\"\t=> \"http://mybb.ro\",\r\n\t\t\"version\"\t\t=> \"1.1\",\r\n \"guid\" => \"1572096dc083bc7f00f2b4f5ae3837f7\",\r\n\t\t\"compatibility\"\t=> \"16*\"\r\n\t);\r\n}", "public function checkPage()\r\n {\r\n WEB::startBrowser(MTMEnv::$msc1_ip, MTMEnv::$product_name_of_msc1);\r\n //Login to the device's home.asp page\r\n WEB::login();\r\n $selenium_driver=WEB::getSelenium();\r\n Logger::toAll(MTMEnv::$msc1_ip.\"/stat/l3_overview.asp\");\r\n $selenium_driver->open(\"stat/l3_overview.asp\");\r\n sleep(10);\r\n \r\n $return_code=TRUE;\r\n $return_code=$selenium_driver->isTextPresent($this->scenario->GetDevice('AP1')->GetInterface('eth0')->GetMAC()); \r\n //$return_code=$selenium_driver->isTextPresent(\"Data\"); \r\n WEB::logout();\r\n WEB::closeBrowser(TRUE);\r\n return $return_code;\r\n }", "function common_serial_scan() {\r\n\t//Daftar perangkat serial, untuk Linux akan dimulai dengan ttyACMx atau ttyUSBx\r\n\t$acm = \"ttyACM\";\r\n\t$usb = \"ttyUSB\";\r\n\t//Dapatkan daftar perangkat yang terhubung ke komputer\r\n\t$cmd = shell_exec('ls /dev/');\r\n\t//Cari perangkat serial yang tersedia\r\n\t//cari ACM\r\n\t$flagACM = strpos($cmd, $acm);\r\n\t//cari USB\r\n\t$flagUSB = strpos($cmd, $usb);\r\n\t\r\n\t//Buat array untuk menyimpan daftar perangkat dengan alamat serial\r\n\t//yang tersedia\r\n\t$devList = array();\r\n\t\r\n\t//Query perangkat\r\n\tif($flagACM == true){\r\n\t\t//Pisahkan nilai raw berdasarkan string acm\r\n\t\t$rawACM = explode($acm, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer ACM\r\n\t\tforeach($rawACM as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer ACM yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyACM' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif($flagUSB == true) {\r\n\t\t//Pisahkan nilai raw berdasarkan string usb\r\n\t\t$rawUSB = explode($usb, $cmd);\r\n\t\t\r\n\t\t//Cek string hasil explode untuk mencari nomer USB\r\n\t\tforeach($rawUSB as $raw){\r\n\t\t\t//Variabel untuk menyimpan nomer USB yang terdeteksi\r\n\t\t\t$buildDev = '';\r\n\t\t\t//Get karakter pertama dari hasil explode\r\n\t\t\t$firstChar = substr($raw, 0, 1);\r\n\t\t\t//Cek karakter kesatu apakah numerik\t\t\r\n\t\t\tif(is_numeric($firstChar)){\r\n\t\t\t\t//Jika iya, simpan ke nomer digit pertama\r\n\t\t\t\t$buildDev .= $firstChar; \r\n\t\t\t\t//Get karakter kedua\r\n\t\t\t\t$secondChar = substr($raw, 1, 1);\r\n\t\t\t\t//Cek karakter kedua apakah numerik\r\n\t\t\t\tif(is_numeric($secondChar)){\r\n\t\t\t\t\t//Jika iya, simpan digit kedua\r\n\t\t\t\t\t$buildDev .= $secondChar; \r\n\t\t\t\t\t//Get karakter ketiga apakah numerik\r\n\t\t\t\t\t$thirdChar = substr($raw, 2, 1);\r\n\t\t\t\t\t//Cek karakter ketiga\r\n\t\t\t\t\tif(is_numeric($thirdChar)){\r\n\t\t\t\t\t\t//Jika iya, simpan digit ketiga\r\n\t\t\t\t\t\t$buildDev .= $thirdChar; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Selesai, sekarang tambahkan alamat lengkap port serial\r\n\t\t\t\t//diikuti digit nomer port\r\n\t\t\t\t$devList[] = '/dev/ttyUSB' . $buildDev;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//Kembalikan daftar perangkat serial yang terdeteksi\r\n\treturn $devList;\r\n}", "function caricastatorelays()\n {\n global $arrRelays;\n $statorele = shell_exec( '/usr/sbin/i2cget -y 1 0x23' );\n if (empty($statorele)) {\n\n die(\"<h1>La multipresa sembra scollegata!</h1>\");\n }\n $relays = zerificabinario( base_convert( $statorele, 16, 2 ) );\n $arrRelays = str_split( $relays );\n return ( $arrRelays );\n }", "public function get_was_polling()\n\t{\n\t\t$ip = $this->input->ip_address();\n\t\t$this->db->select(\"ifnull(count(*),0) as waspoll, kepuasan\");\n\t\t$hasil = $this->db->get_where(\"__polling\",array(\"ip_address\"=>$ip));\n\t\treturn $hasil->row();\n\t}", "function wtsCtrlSaisieForfaits($ar){\n\n $p = new XParam($ar, array('mode'=>'a'));\n $mode = $p->get('mode');\n $r = array('ok'=>1, 'errors'=>array(), 'message'=>'');\n $cards = $p->get('card');\n $chips = $p->get('CHIPID');\n $accs = $p->get('ACCNO');\n $crcs = $p->get('CRC');\n $cardlabels = $p->get('NEWCARDLabel');\n $usedcards = array();\n // lecture de l'offre\n $offresoid = $p->get('offreoid');\n $productsoid = $p->get('productoid');\n $validfroms = $p->get('validfrom');\n $validtills = $p->get('validtill');\n \n $justgrps = $p->get('justgrp');\n\n // parcours des lignes et controles\n foreach($cards as $lineid => $card){\n $card2 = substr($card, 0, 7);\n /*\n\t$card = \n\tNEWCARD_'oidproduit' = achat nouvelle carte\n\tNEWCARD'uniqid' = carte en commande issue du panier\n\tWTPCARD strictement = saisie du numéro ou copie choix depuis les cartes du compte\n\tWTPCARD'unidiq'= carte saisie sélectionnée dans le panier\n\tdonc si substr(card, 0, 7) == NEWCARD : controles sur cartes en achat \n si substr(card, 0, 7) == WTPCARD : controles sur cartes en rechargement\n */\n if ($card2 == 'WTPCARD'){\n //$wtp = sprintf(\"%s-%s-%s\", $chips[$lineid], $crcs[$lineid], $accs[$lineid]);\n $wtp = $this->modresort->formatWTPParts(array($chips[$lineid], $crcs[$lineid], $accs[$lineid]));\n // TA, SKD 01- ou 1- le reste est fait dans le module\n if (strlen($wtp) != 16 && strlen($wtp) != 25 && strlen($wtp) != 24){\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_remplirwtp');\n break;\n } else if (!isset($usedcards[$wtp])){\n $usedcards[$wtp] = 1;\n // verification du WTP\n $r2 = $this->wtsCheckWTP(array('mode'=>'r', 'b'=>0, 'chipid'=>$chips[$lineid], 'accno'=>$accs[$lineid], 'crc'=>$crcs[$lineid]));\n if ($r2['ok'] != 1){\n $r['ok'] = 0; \n\t if (isset($r2['errormess'])){\n\t $r['message'] = $r2['errormess'];\n\t } else {\n\t $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_wtpinvalide');\n\t }\n\t array_push($r['errors'], \n\t\t array(\"CHIPDID[$lineid]\", '', $lineid), \n\t\t array(\"ACCNO[$lineid]\", '', $lineid), \n\t\t array(\"CRC[$lineid]\", '', $lineid),\n\t\t array(\"WTPMASK[$lineid]\", '', $lineid)\n\t\t );\n }\n // autres controles :\n $productoid = $productsoid[$lineid];\n $offreoid = $productsoid[$lineid];\n $validfrom = $validfroms[$lineid];\n $validtill = $validtills[$lineid];\n $justgrp = $justgrps[$lineid];\n if ($r['ok'] == 1){\n $r3 = $this->localWTPCheck($wtp, $offreoid, $productoid, $justgrp, false, $validfrom, $validtill, $lineid);\n if ($r3['ok'] != 1){\n $r['ok'] = 0;\n $r['message'] = $r3['message'];\n }\n }\n if (($r['ok'] == 1 || $r['ok'] == 0 && $r['iswarn'])){\n $r41 = $this->checkProductInCaddie($wtp, $offreoid, $productoid, $validfrom, $validtill);\n if ($r41['ok'] != 1){\n $r['ok'] = 0;\n $r['iswarn'] = $r41['iswarn'];\n if ($r['iswarn']){\n if ($r['message'] == '')\n $r['message'] = $r41['message'];\n else\n $r['message'] .= \"\\n\".$r41['message'];\n } else {\n $r['message'] = $r41['message'];\n }\n }\n }\n if (($r['ok'] == 1 || $r['ok'] == 0 && $r['iswarn'])){\n\t $r4 = $this->checkProductInOrder($wtp, $offreoid, $productoid, $validfrom, $validtill);\n if ($r4['ok'] != 1){\n $r['ok'] = 0;\n $r['iswarn'] = $r4['iswarn'];\n if ($r['iswarn']){\n if ($r['message'] == '')\n $r['message'] = $r4['message'];\n else\n $r['message'] .= \"\\n\".$r4['message'];\n } else {\n $r['message'] = $r4['message'];\n }\n }\n }\n // verifier que la carte n'est pas déjà dans le panier\n // si oui que ces forfaits sont compatibles ... avec le validfrom\n }else{\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_cartesuniques');\n break;\n }\n } else if ($card2 == 'NEWCARD'){\n $wtp = $cardlabels[$lineid];\n $justgrp = $justgrps[$lineid];\n $productoid = $productsoid[$lineid];\n $validfrom = $validfroms[$lineid];\n $validtill = $validtills[$lineid];\n $r31 = $this->localWTPCheck($wtp, $offreoid, $productoid, $justgrp, true, $validfrom, $validtill, $lineid);\n if ($r31['ok'] != 1){\n $r['ok'] = 0;\n $r['message'] = $r31['message'];\n break;\n }\n if (!isset($usedcards[$wtp])){\n $usedcards[$wtp] = 1;\n }else{\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_cartesuniques');\n break;\n }\n }\n }\n // sleep(10);\n\n // si ok vérification des dates (on prend le premier produit, tous devant avoir les même caractériqiques)\n if ($r['ok'] == 1){\n $this->checkDelais($r, $productsoid, $validfroms);\n }\n\n // if ($r['ok'] == 1){\n // $r['ok'] = 0; $r['message']='tests '.$r['message'];\n // $r['iswarn'] = 1;\n // }\n\n\n // TESTS PENDNT AJOUT PANIER\n // $r = array('ok'=>1,'iswarn'=>1, 'errors'=>array('kk'), 'message'=>'PAS DE CONTROLES');\n\n\n if (count($r['errors'])>0)\n $r['ok'] = 0;\n if ($mode == 'a'){\n header('Content-Type:application/json; charset=UTF-8');\n die(json_encode($r));\n }\n return $r;\n }", "function gupnp_root_device_get_available($root_device)\n{\n}", "public function scanGateway(Request $request)\n {\n //\n }", "public function arp_liveboard()\n {\n $arr_all_record_type = $this->model->qry_all_record_type();\n \n //Tiep nhan trong ngay\n $arr_count_today_receive_record = $this->model->qry_count_today_receive_record();\n \n //Da ban giao trong ngay\n $arr_count_today_handover_record = $this->model->qry_count_today_handover_record();\n \n //Dang xu ly\n $arr_count_execing_record = $this->model->qry_count_execing_record();\n \n //Dung tien do\n $arr_count_in_schedule_record = $this->model->qry_count_in_schedule_record();\n \n //Cham tien do\n $arr_count_over_deadline_record = $this->model->qry_count_over_deadline_record();\n \n //Qua han\n $arr_count_expried_record = $this->model->qry_count_expried_record();\n \n //Bo sung\n $arr_count_supplement_record = $this->model->qry_count_supplement_record();\n \n //Cho tra kq\n $arr_count_waiting_for_return_record = $this->model->qry_count_waiting_for_return_record();\n \n //Da tra kq\n $arr_count_returned_record = $this->model->qry_count_returned_record();\n \n $i=1;\n ?>\n <?php foreach ($arr_all_record_type as $v_record_type_id => $arr_record_type):\n $v_record_type_code = $arr_record_type['C_CODE'];\n $v_record_type_name = $arr_record_type['C_NAME'];\n $v_tooltip = $v_record_type_code . ' - ' . $v_record_type_name;\n ?>\n <tr>\n <td><?php echo $i;?></td>\n <td class=\"code\" onmouseover=\"Tip('<?php echo $v_tooltip;?>');\" onmouseout=\"UnTip()\"><?php echo $v_record_type_code;?></td>\n <td><?php echo (isset($arr_count_today_receive_record[$v_record_type_id])) ? $arr_count_today_receive_record[$v_record_type_id] : '';?></td>\n <td><?php echo (isset($arr_count_today_handover_record[$v_record_type_id])) ? $arr_count_today_handover_record[$v_record_type_id] : '';?></td>\n <td class=\"e\"><?php echo (isset($arr_count_execing_record[$v_record_type_id])) ? $arr_count_execing_record[$v_record_type_id] : '';?></td>\n <td class=\"is\"><?php echo (isset($arr_count_in_schedule_record[$v_record_type_id])) ? $arr_count_in_schedule_record[$v_record_type_id] : '';?></td>\n <td class=\"od\"><?php echo (isset($arr_count_over_deadline_record[$v_record_type_id])) ? $arr_count_over_deadline_record[$v_record_type_id] : '';?></td>\n <td class=\"od\"><?php echo (isset($arr_count_expried_record[$v_record_type_id])) ? $arr_count_expried_record[$v_record_type_id] : '';?></td>\n <td><?php echo (isset($arr_count_supplement_record[$v_record_type_id])) ? $arr_count_supplement_record[$v_record_type_id] : '';?></td>\n <td><?php echo (isset($arr_count_waiting_for_return_record[$v_record_type_id])) ? $arr_count_waiting_for_return_record[$v_record_type_id] : '';?></td>\n <td class=\"r left\"><?php echo (isset($arr_count_returned_record[$v_record_type_id])) ? $arr_count_returned_record[$v_record_type_id] : '';?></td>\n </tr>\n <?php $i++;?>\n <?php endforeach;?>\n <?php \n }", "function getTunjTetapGaji($conn) {\n $sql = \"select kodetunjangan,namatunjangan from \" . static::table('ms_tunjangan') . \" where isgajitetap = 'Y' and isbayargaji = 'Y' and isaktif = 'Y' \n\t\t\t\t\torder by kodetunjangan\";\n $a_jtunj = Query::arrQuery($conn, $sql);\n\n return $a_jtunj;\n }", "function listNetworkIp($net,$broadcast,$sn) {\n\n $lista=[]; // lista da ritornare \n\n $no = explode('.', $net); // array con gli ottetti dell'indirizzo NET\n $bo = explode('.', $broadcast); // array con gli ottetti dell'indirizzo NET\n\n $nbit = 32-$sn; // numero di bit assegnati agli host\n \n $nhost = pow(2,$nbit); // numero totale degli host\n\n $start = (int) $no[3]+1;\n $end = (int) $bo[3]-1;\n $roots = $no[0].\".\".$no[1].\".\".$no[2].\".\";\n $roote = $bo[0].\".\".$bo[1].\".\".$bo[2].\".\";\n $primo = $roots.$start;\n $ultimo = $roote.$end;\n $hosts = [];\n\n //echo $start.\" - \".$end.\"<br>\";\n\n // verifica che gli IP disponibili non superino le 5000 unità -> stila la lista\n if($nhost > 35000) {\n $lista[0] = $primo;\n $lista[1] = $ultimo;\n }\n else {\n for($i=ip2long($primo); $i<=ip2long($ultimo); $i++) {\n\n $ip2conv = $i;\n $ip2write = long2ip($ip2conv);\n $lista[] = $ip2write;\n \n $host=gethostbyaddr($ip2write); // prelevo il nome del host (se disponibile)\n //echo $host.\" | \";\n\n // se il nome host NON è uguale all'IP -> salvo il nome Host in una lista\n if(!filter_var($host, FILTER_VALIDATE_IP)) {\n $hosts[] = \"IP: $ip2write ==> Nome Host:<b> $host </b><br>\";\n }\n\n }\n }\n\n $ret['hostnames'] = $hosts;\n $ret['primo'] = $primo;\n $ret['ultimo'] = $ultimo;\n $ret['lista'] = $lista;\n $ret['nhost'] = $nhost; \n\n return $ret;\n}", "public function productScanning(){\n $user = $this->auth();\n if(empty($this->auth())){\n Utils::response(['status'=>false,'message'=>'Forbidden access.'],403);\n }\n $data = $this->getInput();\n if(($this->input->method() != 'post') || empty($data)){ \n Utils::response(['status'=>false,'message'=>'Bad request.'],400);\n }\n $validate = [\n ['field' =>'bar_code','label'=>'Barcode','rules' => 'required' ],\n\t\t\t['field' =>'scan_city','label'=>'Scan City','rules' => 'trim' ],\n\t\t\t['field' =>'pin_code','label'=>'Scan PIN Code','rules' => 'trim' ],\n ['field' =>'latitude','label'=>'Latitude','rules' => 'trim'],\n ['field' =>'longitude','label'=>'Longitude','rules' => 'trim' ],\n\t\t\t//['field' =>'registration_address','label'=>'Registration Address','rules' => 'trim|required' ],\n ];\n $errors = $this->ScannedproductsModel->validate($data,$validate);\n if(is_array($errors)){\n Utils::response(['status'=>false,'message'=>'Validation errorss.','errors'=>$errors]);\n }\n $result = $this->ScannedproductsModel->findProduct($data['bar_code']);\n $bar_code_data = $data['bar_code'];\n\t\t$bar_code2_data = $data['bar_code'];\n\t\t$product_id = $result->id;\n\t\t$consumerId = $user['id'];\n\t\t$data['ps_ip_address'] = $this->input->ip_address();\n\t\t\n\t\t// function to get product registration status\n $isRegistered = $this->ScannedproductsModel->isProductRegistered($bar_code_data, $bar_code2_data); \n\t\n $isLoyaltyForVideoFBQuesGiven = $this->ScannedproductsModel->isLoyaltyForVideoFBQuesGiven($consumerId,$product_id);\n $isLoyaltyForAudioFBQuesGiven = $this->ScannedproductsModel->isLoyaltyForAudioFBQuesGiven($consumerId,$product_id);\n $isLoyaltyForImageFBQuesGiven = $this->ScannedproductsModel->isLoyaltyForImageFBQuesGiven($consumerId,$product_id);\n $isLoyaltyForPDFFBQuesGiven = $this->ScannedproductsModel->isLoyaltyForPDFFBQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductPushedAdVideoFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductPushedAdVideoFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductPushedAdAudioFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductPushedAdAudioFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductPushedAdPDFFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductPushedAdPDFFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductPushedAdImageFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductPushedAdImageFeedbackQuesGiven($consumerId,$product_id);\n\t\t\n\t\t$isLoyaltyForProductSurveyVideoFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductSurveyVideoFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductSurveyAudioFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductSurveyAudioFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductSurveyPDFFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductSurveyPDFFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductSurveyImageFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductSurveyImageFeedbackQuesGiven($consumerId,$product_id);\n\t\t\n\t\t$isLoyaltyForProductDemoVideoFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductDemoVideoFeedbackQuesGiven($consumerId,$product_id);\n\t\t$isLoyaltyForProductDemoAudioFeedbackQuesGiven = $this->ScannedproductsModel->isLoyaltyForProductDemoAudioFeedbackQuesGiven($consumerId,$product_id);\n\t\t\n\t\t$mnv25_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 25)->get()->row();\n\t\t$mnvtext25 = $mnv25_result->message_notification_value;\n\t\t$mnv26_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 26)->get()->row();\n\t\t$mnvtext26 = $mnv26_result->message_notification_value;\n\t\t$mnv27_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 27)->get()->row();\n\t\t$mnvtext27 = $mnv27_result->message_notification_value;\n\t\t$mnv28_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 28)->get()->row();\n\t\t$mnvtext28 = $mnv28_result->message_notification_value;\n\t\t$mnv29_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 29)->get()->row();\n\t\t$mnvtext29 = $mnv29_result->message_notification_value;\n\t\t$mnv30_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 30)->get()->row();\n\t\t$mnvtext30 = $mnv30_result->message_notification_value;\n \n if(empty($result)){\n $data['user_id'] = $user['id'];\n $data['created'] = date('Y-m-d H:i:s');\n $this->db->insert('scanned_product_logs', $data);\n\t\t$mnv24_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 24)->get()->row();\n\t\t$mnvtext24 = $mnv24_result->message_notification_value;\n //$this->response(['status'=>false,'message'=>'This product and barcode is not supported by TRUSTAT.'],200);\n\t\t\t$this->response(['status'=>false,'message'=>$mnvtext24],200);\n }\n\t\tif(!empty($result->product_thumb_images)){\n $result->product_thumb_images = Utils::setFileUrl($result->product_thumb_images);\n }\n\t\t\n if(!empty($result->product_image)){\n $result->product_image = Utils::setFileUrl($result->product_image);\n }\n\t\tif(!empty($result->product_code_print_bg_images)){\n $result->product_code_print_bg_images = Utils::setFileUrl($result->product_code_print_bg_images);\n }\n if(!empty($result->product_video)){\n $result->product_video = Utils::setFileUrl($result->product_video);\n }\n if(!empty($result->product_audio)){\n $result->product_audio = Utils::setFileUrl($result->product_audio);\n }\n if(!empty($result->product_pdf)){\n $result->product_pdf = Utils::setFileUrl($result->product_pdf);\n }\n\t\tif(!empty($result->product_demo_video)){\n $result->product_demo_video = Utils::setFileUrl($result->product_demo_video);\n }\n\t\tif(!empty($result->product_demo_audio)){\n $result->product_demo_audio = Utils::setFileUrl($result->product_demo_audio);\n }\n\t\tif(!empty($result->product_user_manual)){\n $result->product_user_manual = Utils::setFileUrl($result->product_user_manual);\n }\n\t\t$result->product_registration_status = $isRegistered;\n\n\t\t$result->isLoyaltyForVideoFBQuesGiven = $isLoyaltyForVideoFBQuesGiven;\n\t\t$result->isLoyaltyForAudioFBQuesGiven = $isLoyaltyForAudioFBQuesGiven;\n\t\t$result->isLoyaltyForImageFBQuesGiven = $isLoyaltyForImageFBQuesGiven;\n\t\t$result->isLoyaltyForPDFFBQuesGiven = $isLoyaltyForPDFFBQuesGiven;\n\t\t$result->isLoyaltyForProductPushedAdVideoFeedbackQuesGiven = $isLoyaltyForProductPushedAdVideoFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductPushedAdAudioFeedbackQuesGiven = $isLoyaltyForProductPushedAdAudioFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductPushedAdPDFFeedbackQuesGiven = $isLoyaltyForProductPushedAdPDFFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductPushedAdImageFeedbackQuesGiven = $isLoyaltyForProductPushedAdImageFeedbackQuesGiven;\n\t\t\n\t\t$result->isLoyaltyForProductSurveyVideoFeedbackQuesGiven = $isLoyaltyForProductSurveyVideoFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductSurveyAudioFeedbackQuesGiven = $isLoyaltyForProductSurveyAudioFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductSurveyPDFFeedbackQuesGiven = $isLoyaltyForProductSurveyPDFFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductSurveyImageFeedbackQuesGiven = $isLoyaltyForProductSurveyImageFeedbackQuesGiven;\n\t\t\n\t\t$result->isLoyaltyForProductDemoVideoFeedbackQuesGiven = $isLoyaltyForProductDemoVideoFeedbackQuesGiven;\n\t\t$result->isLoyaltyForProductDemoAudioFeedbackQuesGiven = $isLoyaltyForProductDemoAudioFeedbackQuesGiven;\n\t\t\n\t\t\n\n\t\t$result->scanned_code = $data['bar_code']; \n\t\tif($data['bar_code'] == ($result->barcode_qr_code_no)) {\n\t\t\t\n\t\t$result->activation_level = $result->pack_level; \n\t\t\n\t\t$activation_packaging_level = $result->pack_level; \n\t\t\n\t\t\n\t\t} else {\n\t\t\t\n\t\t$result->activation_level = $result->pack_level2; \n\t\t$activation_packaging_level = $result->pack_level2;\n\t\t\t\n\t\t} \n $data['consumer_id'] = $user['id'];\n\t\t\n $data['product_id'] = $result->id;\n\t\t$data['customer_id'] = $result->created_by;\n $data['code_scan_date'] = date(\"Y-m-d H:i:s\");\n\t\t$data['del_by_cs'] = 0;\n //$result->pack_level = $result->pack_level; registration_status\n\t\t\n\t\t$consumer_id = $data['consumer_id'];\n\t\t$customer_id = $data['customer_id'];\n\t\t$product_id = $data['product_id'];\n\t\t\n\t\t$isConsAlreadyLinkedtoCust = $this->ScannedproductsModel->isConsAlreadyLinkedtoCust($consumer_id, $customer_id);\t\t\n\t\t\n\t\t$mnv1_result62 = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 62)->get()->row();\n\t\t$message_notification_value62 = $mnv1_result62->message_notification_value;\n\t\t\n if($this->db->insert($this->ScannedproductsModel->table, $data)){\t\n\t\t\n\t\tif($isConsAlreadyLinkedtoCust==false){\n\t\t$data['registration_status'] = \"Registered\";\n\t\t$this->db->insert('consumer_customer_link', $data);\n\t\t}\n\t\t\n\t\t\tif($activation_packaging_level==1){\n\t\t\t// Consumer Activity Log Data insert start\n\t\t\t$CALdata['date_time'] = date('Y-m-d H:i:s'); \n\t\t\t$CALdata['consumer_name'] = get_consumer_name_by_consumer_id($consumerId);\n\t\t\t$CALdata['consumer_id'] = $consumerId; \n\t\t\t$CALdata['consumer_mobile'] = getConsumerMobileNumberById($consumerId); \n\t\t\t$CALdata['customer_name'] = getUserNameById($customer_id); \n\t\t\t$CALdata['customer_id'] = $customer_id; \n\t\t\t$CALdata['unique_customer_code'] = getCustomerCodeById($customer_id); \n\t\t\t$CALdata['product_name'] = get_products_name_by_id($product_id); \n\t\t\t$CALdata['product_id'] = $product_id; \n\t\t\t$CALdata['product_sku'] = get_product_sku_by_id($product_id); \n\t\t\t$CALdata['product_code'] = $data['bar_code']; \n\t\t\t$CALdata['gloc_latitude'] = $data['latitude'];\n\t\t\t$CALdata['gloc_longitude'] = $data['longitude'];\n\t\t\t$CALdata['gloc_city'] = $data['scan_city'];\n\t\t\t$CALdata['gloc_pin_code'] = $data['pin_code'];\n\t\t\t$CALdata['consumer_activity_type'] = $message_notification_value62;\n\t\t\t$CALdata['loyalty_rewards_points'] = 0;\n\t\t\t$CALdata['loyalty_rewards_type'] = getCustomerLoyaltyTypeById($customer_id);\n\t\t\t\n\t\t\t$this->db->insert('consumer_activity_log_table', $CALdata);\n\t\t\t// Consumer Log Data insert end\n\t\t\t}\n\t\t\t$updateDataCityScan = array(\n\t\t\t\t\t 'city_last_scan' => $data['scan_city']\n\t\t\t\t\t\t);\n\t\t\t\t\t$this->db->update('consumers', $updateDataCityScan, array('id' => $consumerId));\n\t\t\t\t\t\n\t\t\t//$this->db->insert('consumer_customer_link', $data);\n\t\t\t\n\t\t\t\n\t\t\t// Super Loyalty start\t\t\n\t\t\t// Insert number if Scans \n\t\t\t//check if the product code is already registerd\n\t\t\tif($activation_packaging_level==1){\n\t\t$ifSuperLoyaltyAlreadyGivenConsumerProduct = $this->ScannedproductsModel->ifSuperLoyaltyAlreadyGivenConsumerProduct($product_id, $consumerId); \n\t\t\t}else{\n\t\t$ifSuperLoyaltyAlreadyGivenConsumerProduct = \"NotGiven\";\n\t\t\t}\n\t\t$isSuperLoyaltyYes\t= SuperLoyaltyStatusonProductByProductID($product_id);\n\t\tif($isSuperLoyaltyYes==\"Yes\"){\n\t\t\tif($isRegistered==false){\n\t\t\t\tif($ifSuperLoyaltyAlreadyGivenConsumerProduct==\"NotGiven\"){\n\t\t$resultC = $this->db->select('number_of_scans')->from('consumers')->where('id', $consumerId)->get()->row();\n\t\t$number_of_scansBD = $resultC->number_of_scans;\n\t\t$number_of_scansAD = $number_of_scansBD + 1;\n\t\t$updateData = array(\n\t\t\t\t\t 'number_of_scans' => $number_of_scansAD\n\t\t\t\t\t\t);\n\t\t\t\t\t$this->db->update('consumers', $updateData, array('id' => $consumerId));\n\t\t\t\t\t\n\t\t$resultP = $this->db->select('*')->from('products')->where('id', $product_id)->get()->row();\n\t\t$include_the_product_in_super_loyalty = $resultP->include_the_product_in_super_loyalty;\n\t\t$number_of_scans_for_super_loyalty = $resultP->number_of_scans_for_super_loyalty;\n\t\t$number_of_loyalty_points_for_super_loyalty = $resultP->number_of_loyalty_points_for_super_loyalty;\t\n\t\t$number_of_scans_for_productBD = $resultP->number_of_scans_for_product;\n\t\t\n\t\t$number_of_scans_for_productAD = $number_of_scans_for_productBD + 1;\n\t\t$updateDataP = array(\n\t\t\t\t\t 'number_of_scans_for_product' => $number_of_scans_for_productAD\n\t\t\t\t\t\t);\n\t\t\t\t\t$this->db->update('products', $updateDataP, array('id' => $product_id));\n\t\t\n\t$remainder = $number_of_scans_for_productAD%$number_of_scans_for_super_loyalty;\n\t\tif(($remainder ==0)&&($number_of_loyalty_points_for_super_loyalty!=0)) {\t\t\n\t\t//$Product_id = getProductIDbyProductCode($data['bar_code']);\n\t\t\t$customerId = get_customer_id_by_product_id($product_id);\t\t\t\n\t\t\t\t$purchased_points = total_approved_points2($customerId);\n\t\t\t\t$consumed_points = get_total_consumed_points($customerId);\n\t\t\t\t$customer_loyalty_type = get_customer_loyalty_type_by_customer_id($customerId);\n\t\t\t\t$product_name = get_products_name_by_id($product_id);\n\t\t\t\t$consumer_name = getConsumerNameById($consumerId);\t\n\t\t\t\t$product_brand_name = get_products_brand_name_by_id($product_id);\n\t\t\t\t$customer_id = get_customer_id_by_product_id($product_id);\n\t\t\t\t\n\t\t\t\t$customer_name = getUserFullNameById($customerId);\t\t\n\t\t\t\t$product_name = get_products_name_by_id($product_id);\n\t\t\t\t$consumer_name = getConsumerNameById($consumerId);\n\t\t\n\t\t\t\t\n\t\t\t\t$LPconsumed_points = $consumed_points+$number_of_loyalty_points_for_super_loyalty;\n\t\t\t\t//echo \"<pre>\";print_r($LPconsumed_points); die;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($purchased_points > ($consumed_points+$number_of_loyalty_points_for_super_loyalty)){\n $message = 'Thank You for Product Registration. '. $number_of_loyalty_points_for_super_loyalty .' loyalty points will be added to your TRUSTAT loyalty account';\n\t\t\t\t//echo \"<pre>Jyada\";print_r($LPconsumed_points); die;\n\t\t\t\t}else{\n\t\t\t\t\t$message = 'Thank You for Scan!';\n\t\t\t\t\t//echo \"<pre>kam\";print_r($LPconsumed_points); die;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t // $transactionType = 'product-registration-without-warranty'; \n\t\t\t\t$transactionType = \"Super Loyalty\";\n\t\t\t\t//$mnv61_result = $this->db->select('message_notification_value,message_notification_value_part2')->from('message_notification_master')->where('id', 61)->get()->row();\n\t\t\t\t//$mnvtext61 = $mnv61_result->message_notification_value;\n\t\t\t\t$mnvtext61 = getAPPPassbookOnScreenDisplayMessageSLByProductId($product_id);\n\t\t\t\t//$mnvtext61_p2 = $mnv61_result->message_notification_value_part2;\n\t\t\t //$transactionTypeName = $mnvtext61 . $number_of_scans_for_productAD . $mnvtext52_p2;\n\t\t\t $transactionTypeName = $mnvtext61;\n\t\t\t\t//$userId = $user['id'];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($purchased_points > ($consumed_points+$number_of_loyalty_points_for_super_loyalty)){\n\t\t\t\t$this->Productmodel->saveSuperLoylty($transactionType, $consumerId, $product_id, ['verification_date' => date(\"Y-m-d H:i:s\"), 'consumer_id' =>$consumerId, 'consumer_name' => $consumer_name, 'brand_name' => $product_brand_name, 'customer_name' => $customer_name, 'product_name' => $product_name, 'product_id' => $product_id, 'product_code' => $data['bar_code'],'customer_loyalty_type' => $customer_loyalty_type], $customer_id, $customer_loyalty_type, $number_of_loyalty_points_for_super_loyalty);\n\t\t\t\n\t\t\t\t$this->Productmodel->saveConsumerPassbookSuperLoyalty($transactionType, ['verification_date' => date(\"Y-m-d H:i:s\"), 'brand_name' => $product_brand_name, 'customer_name' => $customer_name, 'product_name' => $product_name, 'product_id' => $product_id, 'product_code' => $data['bar_code'],'customer_loyalty_type' => $customer_loyalty_type], $customer_id, $product_id, $consumerId, $transactionTypeName, 'Loyalty', $customer_loyalty_type, $number_of_loyalty_points_for_super_loyalty);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$fb_token = getConsumerFb_TokenById($consumerId);\n // $this->ConsumerModel->sendFCM('Thank you for Product Registration, Please check the details in \"my purchase list\" in TRUSTAT App.', $fb_token);\n\t\t\t //$mnv52_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 52)->get()->row();\n\t\t\t //$mnvtext52 = $mnv52_result->message_notification_value;\n\t\t\t $mnvtext52 = getAPPNotificationMessageforSuperLoyaltyByProductId($product_id);\n\t\t\t $this->ConsumerModel->sendFCM($mnvtext52, $fb_token);\n\t\t\t\t$NTFdata['consumer_id'] = $consumerId; \n\t\t\t\t$NTFdata['title'] = \"TRUSTAT Super Loyalty\";\n\t\t\t\t$NTFdata['body'] = $mnvtext52; \n\t\t\t\t$NTFdata['timestamp'] = date(\"Y-m-d H:i:s\",time()); \n\t\t\t\t$NTFdata['status'] = 0; \n\t\t\t\n\t\t\t$this->db->insert('list_notifications_table', $NTFdata);\n\t\t\t\n\t\t\t$TRNNC_result = $this->db->select('billin_particular_name, billin_particular_slug')->from('customer_billing_particular_master')->where('cbpm_id', 10)->get()->row();\n\t\t\t$TRNNC_billin_particular_name = $TRNNC_result->billin_particular_name;\n\t\t\t$TRNNC_billin_particular_slug = $TRNNC_result->billin_particular_slug;\n\t\t\t\n\t\t\t$TRNNCData['customer_id'] = $customer_id;\n\t\t\t$TRNNCData['consumer_id'] = $consumerId;\n\t\t\t$TRNNCData['billing_particular_name'] = $TRNNC_billin_particular_name.' TRUSTAT Super Loyalty';\t\t\n\t\t\t$TRNNCData['billing_particular_slug'] = $TRNNC_billin_particular_slug.'_TRUSTAT_Super_Loyalty';\n\t\t\t$TRNNCData['trans_quantity'] = 1; \n\t\t\t$TRNNCData['trans_date_time'] = date(\"Y-m-d H:i:s\",time()); \n\t\t\t$TRNNCData['trans_status'] = 1; \t\t\t\n\t\t\t$this->db->insert('tr_customer_bill_book', $TRNNCData);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Super Loyalty end\t\n\t\t\n\t\t\t\n\t\t\tif($result->barcode_qr_code_no == $data['bar_code']) {\n if( $result->pack_level == 0 ){\n if( $isRegistered ){\n\t\t\t\t\t\n\t\t\t\t\tif( $isRegistered == completed ){\n\t\t\t\t\t\n //$result->message1 = 'This product is already registered, please contact your retailer/manufacturer for further details.';\n\t\t\t\t\t$result->message1 = $mnvtext25;\n }else {\n\t\t\t\t\t//$result->message1 = 'This product registration is already under process. Outcome of product registration will be notified to TRUSTAT member, who had initiated the registration process.';\n\t\t\t\t\t$result->message1 = $mnvtext26;\n\t\t\t\t}\n\t\t\t\t}else{\n //$result->message1 = 'Thank You for initiating Product Registration, Click Ok to scan and upload valid invoice for this product purchase and activate the warranty.';\n\t\t\t\t\t$result->message1 = $mnvtext27;\n }\n }elseif( $result->pack_level == 1 ){\n //$result->message1 = 'Scanned product details for lavel '.$result->pack_level.'.';\n\t\t\t\t//$result->message1 = 'The barcode you have scanned is on the product packing, please scan the barcode on the product for registration.';\n\t\t\t\t$result->message1 = $mnvtext29;\n }elseif($result->pack_level > 1){\n //$result->message1 = 'This is not a product barcode for consumer, Please scan barcode placed on consumer pack';\n\t\t\t\t$result->message1 = $mnvtext30;\n }\n\t\t\t} else {\n\t\t\t\t\n\t\t\tif( $result->pack_level2 == 0 ){\n if( $isRegistered ){\n\t\t\t\t\t\n\t\t\t\t\tif( $isRegistered == completed ){\n\t\t\t\t\t\n //$result->message1 = 'This product is already registered, please contact your retailer/manufacturer for further details';\n\t\t\t\t\t$result->message1 = $mnvtext25;\n }else {\n\t\t\t\t\t//$result->message1 = 'This product registration is already under process. Outcome of product registration will be notified to TRUSTAT member, who had initiated the registration process';\n\t\t\t\t\t$result->message1 = $mnvtext26;\n\t\t\t\t}\n\t\t\t\t}else{\n // $result->message1 = 'Thank You for initiating Product Registration, Click Ok to scan and upload valid invoice for this product purchase and activate the warranty';\n\t\t\t\t\t $result->message1 = $mnvtext27;\n }\n }elseif( $result->pack_level2 == 1 ){\n //$result->message1 = 'Scanned product details for lavel '.$result->pack_level.'.';\n\t\t\t\t//$result->message1 = 'The barcode you have scanned is on the product packing, please scan the barcode on the product for registration.';\n\t\t\t\t$result->message1 = $mnvtext29;\n }elseif($result->pack_level2 > 1){\n //$result->message1 = 'This is not a product barcode for consumer, Please scan barcode placed on consumer pack';\n\t\t\t\t$result->message1 = $mnvtext30;\n }\t\n\t\t\t}\n\t\t\t\n //$this->response(['status'=>true,'message'=>'Scanned product details for lavel '.$result->pack_level.'.','data'=>$result]);\n\t\t$mnv31_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 31)->get()->row();\n\t\t$mnvtext31 = $mnv31_result->message_notification_value;\n\t\t\t//$this->response(['status'=>true,'message'=>'Thanks for scanning the product.','data'=>$result]);\n\t\t\t$this->response(['status'=>true,'message'=>$mnvtext31,'data'=>$result]);\n\t\t\t\n }else{\n\t\t$mnv32_result = $this->db->select('message_notification_value')->from('message_notification_master')->where('id', 32)->get()->row();\n\t\t$mnvtext32 = $mnv32_result->message_notification_value;\t\n // $this->response(['status'=>false,'message'=>'System failed to scan the record.'],200); \n\t\t\t$this->response(['status'=>false,'message'=>$mnvtext32],200); \n }\n }", "public function search_ont($search)\n {\n $this->db->select('*, ont.id as ont_id');\n $this->db->from('ont');\n $this->db->join('device', 'device.id = ont.id_device');\n $this->db->like('ont_mac', $search);\n $this->db->or_like('ont_desc', $search);\n $query = $this->db->get();\n return $query->result_array();\n }", "public function index()\n {\n $network = new NetworkRepository();\n $eth0 = $network->get('eth0');\n $wlan0 = $network->get('wlan0');\n\n $data=array();\n $data[\"connected\"] = 1;\n $data[\"eth0\"] = $eth0->ip;\n $data[\"wlan0\"] = $wlan0->ip;\n\n\n return view(\"index\",$data);\n }", "public function scanAvailablePackages() {}", "function tunjanganAwal($conn) {\n $sql = \"select kodetunjangan from \" . static::table('ms_tunjangan') . \"\twhere isbayargaji = 'T' and isaktif = 'Y'\";\n $rst = $conn->Execute($sql);\n\n while ($rowt = $rst->FetchRow()) {\n $a_tunj[] = $rowt['kodetunjangan'];\n }\n\n return $a_tunj;\n }", "private function start_QRCode_WiFi_BA_DM_Plugin() {\n\t\tinclude_once(plugin_dir_path(__FILE__).'/qr-code/qr_code_wifi.php');\n\t\t$qrc_wifi_obj_ba_dm_plugin = new QRCode_WiFi_BA_DM_Plugin();\n\t\t$qrc_wifi_obj_ba_dm_plugin->start_QRCode_WiFi_BA_DM_Plugin();\n\t}", "function get_padlist() \n {\n $MYSQL_SERVER = \"localhost\";\n $MYSQL_USER = \"etherpad\";\n $MYSQL_PASS = \"eth3r!pad!\";\n $MYSQL_DB = \"etherpad\";\n \n \n $con=mysqli_connect($MYSQL_SERVER,$MYSQL_USER,$MYSQL_PASS,$MYSQL_DB);\n // Check connection\n $cont = \"\";\n if (mysqli_connect_errno())\n {\n $cont .= \"Failed to connect to MySQL: \" . mysqli_connect_error();\n }\n\n $result = mysqli_query($con,'select distinct substring(store.key,5,locate(\":\",store.key,5)-5) AS pads from store where store.key like \"pad:%\"');\n\n while($row = mysqli_fetch_array($result))\n {\n $cont .= '<div class=\"etherpad-item\"><a href=\"http://stura.hft-leipzig.de/pad/'.$row['pads'].'\" target=\"_blank\">' . $row['pads'] . '</a></div>';\n }\n\n mysqli_close($con);\n \n return $cont;\n }", "function getJAVA($url) {\r\n // inisialisasi CURL\r\n $ip = $url;\r\n $data = curl_init();\r\n// $ip = $getRow['ipAddr'] . '' . $url;\r\n//\techo $ip;\r\n // setting CURL\r\n curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($data, CURLOPT_URL, $ip);\r\n\r\n // menjalankan CURL untuk membaca isi file\r\n $hasil = curl_exec($data);\r\n curl_close($data);\r\n return json_decode($hasil);\r\n}", "function sprawdzHasloLogin($login,$haslo){\r\n\r\n\tglobal $polaczenie;\r\n\r\n\t$zapytanie = \"select czy_aktywowane from \".TBL_PROFILE.\" where login = '$login' and haslo='\".md5($haslo).\"';\";\r\n\r\n\t$wynik = mysql_query($zapytanie, $polaczenie);\r\n\r\n\t$wiersz = mysql_fetch_array($wynik);\r\n\r\n\tif(mysql_num_rows($wynik)==1){\r\n\r\n\t\tif($wiersz[\"czy_aktywowane\"]==0)\r\n\r\n\t\treturn 1;\r\n\r\n\t\tif($wiersz[\"czy_aktywowane\"]==1)\r\n\r\n\t\treturn 2;\r\n\r\n\t}\r\n\r\n\telse return 0;\r\n\r\n\r\n\r\n}", "function getAPinfo()\n\t{\n\t\t$wifi_dat = file($this->confpath);\t\t//open the conf file for reading\n\t\tdebug('(wifi_controller.inc|getAPinfo()) reading wifi conf file at: '.$this->confpath); \t//LOG\n\t\t\n\t\t$ap_data = array();\n\t\t\n\t\tif($wifi_dat)\n\t\t{\n\t\t\tforeach ($wifi_dat as $data)\n\t\t\t{\n\t\t\t\tif(strpos($data,\"SSID=\") === 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$ssid = explode('=', $data);\r\n\t\t\t\t\t$ap_data['ssid'] = trim($ssid[1]);\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif(strpos($data,\"AuthMode=\") === 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$auth = explode('=', $data);\r\n\t\t\t\t\t$ap_data['auth'] = trim($auth[1]);\r\n\t\t\t\t}\n\t\t\t\tif(strpos($data,\"EncrypType=\") === 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$encryp = explode('=', $data);\n\t\t\t\t\t$ap_data['encryp'] = trim($encryp[1]);\r\n\t\t\t\t}\r\n\t\t\t\tif(strpos($data,\"Key1Str=\") === 0 && (strcasecmp($ap_data['encryp'],'WEP') == 0))\r\n\t\t\t\t{\r\n\t\t\t\t\t$pass = explode('=', $data);\n\t\t\t\t\t$ap_data['pass'] = $pass[1];\r\n\t\t\t\t}\n\t\t\t\tif(strpos($data,\"WPAPSK=\") === 0 && ((strcasecmp($ap_data['encryp'],'TKIP') == 0) || (strcasecmp($ap_data['encryp'],'AES') == 0) || (strcasecmp($ap_data['encryp'],'TKIPAES') == 0)))\n\t\t\t\t{\n\t\t\t\t\t$pass = explode('=', $data);\n\t\t\t\t\t$ap_data['pass'] = $pass[1];\n\t\t\t\t} \n\t\t\t\tif(strpos($data,\"Channel=\") === 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$channel = explode('=', $data);\r\n\t\t\t\t\t$ap_data['channel'] = trim($channel[1]);\r\n\t\t\t\t}\n\t\t\t}\n\t\t} //END if\n\t\tdebug('(wifi_controller.inc|getAPinfo()) wifi ap data read from conf file', $ap_data); \t//LOG\n\t\treturn $ap_data;\n\t}", "function _is_pejabat_penunjang_nt(){\n\t\t$CI \t\t=& get_instance();\n\t\t$kd \t\t= $CI->session->userdata('kd_dosen');\n\t\t$tgl \t\t= date('d-m-Y');\n\t\t$api_url \t= URL_API_SIMPEG1.'simpeg_mix/data_search';\n\t\t$parameter = array('api_kode' =>1121, 'api_subkode' => 3, 'api_search' => array($tgl, $kd, 1));\n\t\t$data = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t//print_r ($data);\n\t\t$value = array();\n\t\t//echo $data[count($data)-1]->STR_NAMA;\n\t\tif(!empty($data)){\n\t\t\t//$kd_jab \t= $data[count($data)-1]->STR_ID;\n\t\t\t//ini harusnya yang aktif, bukan yang index 0 ; \n\t\t\tforeach ($data as $d) {\n\t\t\t\t$kd_jab \t= $d->STR_ID;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/jabatan';\n\t\t\t\t$parameter = array('api_kode' =>20000, 'api_subkode' => 1, 'api_search' => array($kd_jab));\n\t\t\t\t$data2 = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif(!empty($data2)){\n\t\t\t\t\t//$value['nama_jabatan'] = $data[count($data)-1]->STR_NAMA;\n\t\t\t\t\t$value['nama_jabatan'] = $d->STR_NAMA;\n\t\t\t\t\t$value['sks_maks'] = $this->_get_sks_max($d->STR_ID);//$data2[0]->SKS_MAX;\n\t\t\t\t\t$value['bukti_penugasan'] = 'Surat Keputusan';\n\t\t\t\t\t$value['masa_penugasan'] = '1 Tahun';\n\t\t\t\t\t$value['tgl_mulai'] = $d->RR_TANGGAL_MULAI_F;\n\t\t\t\t\t$value['tgl_selesai'] = $d->RR_TANGGAL_AKHIR_F;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $value;\n\t\t#return $data;\n\t\t\n\t}", "function getTunjTetapAwal($conn) {\n $sql = \"select kodetunjangan,namatunjangan from \" . static::table('ms_tunjangan') . \" where isbayargaji = 'T' and isaktif = 'Y' order by kodetunjangan\";\n $a_jtunjawal = Query::arrQuery($conn, $sql);\n\n return $a_jtunjawal;\n }", "public function index()\r\n {\r\n $sql = \"SELECT * FROM customer order by id asc\";\r\n $results = Db::query($sql);\r\n $data['html_str'] = \"\";\r\n if ($results) {\r\n foreach ($results as $i => $fs) {\r\n $id = $fs[\"id\"];\r\n $name = $fs[\"name\"];\r\n\r\n $sitenum = Db::table('scan_list')->where(['customer' => $id])->count();\r\n\r\n\r\n $sitenum = $sitenum;\r\n $contact = $fs[\"contact\"];\r\n $phone = $fs[\"phone\"];\r\n $email = $fs[\"email\"];\r\n $address = $fs[\"address\"];\r\n $date1 = $fs[\"date1\"];\r\n $date2 = $fs[\"date2\"];\r\n $type = $fs[\"type\"];\r\n $delay = $fs[\"delay\"];\r\n $remark = $fs[\"remark\"];\r\n\r\n\r\n if ($delay == '1') {\r\n $class = 'success';\r\n $scan_delay = \"每月一次\";\r\n } else if ($delay == '2') {\r\n $class = 'warning';\r\n $scan_delay = \"每季度一次\";\r\n } else if ($delay == '3') {\r\n $class = 'error';\r\n $scan_delay = \"每半年一次\";\r\n } else if ($delay == '4') {\r\n $class = 'info';\r\n $scan_delay = \"仅一次\";\r\n } else {\r\n $class = 'info';\r\n $scan_delay = \"仅一次\";\r\n }\r\n\r\n if ($type == '1') {\r\n $scan_type = \"定扫+预警+敏检\";\r\n } else if ($type == '2') {\r\n $scan_type = \"预警+敏检\";\r\n } else if ($type == '3') {\r\n $scan_type = \"定扫+预警\";\r\n } else if ($type == '4') {\r\n $scan_type = \"预警\";\r\n } else {\r\n $scan_type = \"定扫+预警+敏检\";\r\n }\r\n $hash = \"111\";\r\n\r\n $data['html_str'] .= \"\r\n\t\t\t\t\t\t\t\t\t<tr class=\\\"$class\\\">\r\n\t\t\t\t\t\t\t\t\t\t<td style=\\\"text-align:center\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t$id\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td style=\\\"text-align:center\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t<a href=\\\"?m=cusinfo&id={$id}\\\"> $name</a>\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td style=\\\"text-align:center\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t<a href=\\\"?m=cusinfo&id={$id}\\\">$sitenum</a>\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td style=\\\"text-align:center\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t$contact\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td style=\\\"text-align:center\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t$phone\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td style=\\\"text-align:center\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t$email\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<td style=\\\"text-align:center\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t$date1 -- $date2\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<td style=\\\"text-align:center\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t$scan_type\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td style=\\\"text-align:center\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t$scan_delay\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td style=\\\"text-align:center\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t$remark\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td style=\\\"text-align:center\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t<a href=\\\"?m=cusinfo&id={$id}\\\">详情</a>|<a id=\\\"modal - 978241\\\" href=\\\"#$id\\\" role=\\\"button\\\" data-toggle=\\\"modal\\\" >编辑</a>|<a href=\\\"javascript:delcustomer('{$id}')\\\">删除</a>\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t</tr>\\r\\n\";\r\n }\r\n\r\n }\r\n return View::fetch('html/customer', $data);\r\n }", "function jml_mhs_bimbingan_kkn(){\n\t\t\t$nip \t= $this->session->userdata('id_user'); //'197510242009121002';//\n\t\t\t$smt \t= array(1,2,3);\n\t\t\t$ta \t= $this->session->userdata('kd_ta');\n\t\t\t$kd_current_smt = $this->session->userdata('kd_smt');\n\t\t\t$jumlah_mahasiswa = 0;\n\n\t\t\t//GET ID DPL :\n\t\t\t\n\t\t\t$url \t\t= 'kkn_dosen/data_search';\n\t\t\t$api_url \t= URL_API_KKN.$url;\n\t\t\t$parameter \t= array(\n\t\t\t\t'api_kode' => 201400,\n\t\t\t\t'api_subkode' => 1,\n\t\t\t\t'api_search' => array('KKN.KKN_DPL2014','ID_DPL',array('NIP' => $nip)));\n\n\t\t\t$dpl = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter);\n\n\t\t\tif($dpl){\n\t\t\t\t//GET LIST KELOMPOK KKN\n\t\t\t\t$id_dpl \t= $dpl[0]['ID_DPL'];\n\n\t\t\t\tforeach ($smt as $kd_smt) {\n\t\t\t\t\t$parameter2 = array(\n\t\t\t\t\t\t'api_kode' => 201402,\n\t\t\t\t\t\t'api_subkode' => 1,\n\t\t\t\t\t\t'api_search' => array($ta,$kd_smt,$id_dpl)\n\t\t\t\t\t);\n\n\t\t\t\t\t$kelompok = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter2);\n\n\t\t\t\t\tforeach ($kelompok as $kel) {\n\t\t\t\t\t\t//GET LIST DATA MAHASISWA PER KELOMPOK\n\t\t\t\t\t\t$id_kelompok = $kel['ID_KELOMPOK'];\n\n\t\t\t\t\t\t$parameter \t= array(\t'api_kode' => 201401,\n\t\t\t\t\t\t\t\t\t\t'api_subkode' => 2,\n\t\t\t\t\t\t\t\t\t\t'api_search' => array($id_kelompok));\n\n\t\t\t\t\t\t$member \t= $this->s00_lib_api->get_api_json($api_url, 'POST', $parameter);\n\t\t\t\t\t\tforeach ($member as $mbr) {\n\t\t\t\t\t\t\t//CEK SEMESTER MAHASISWA KKN\n\t\t\t\t\t\t\t$nim \t= $mbr['NIM'];\n\t\t\t\t\t\t\t$tgl \t= str_replace('-', '/', $mbr['TGL_DAFTAR']);\n\t\t\t\t\t\t\t$data_mhs \t= $this->get_data_mhs($nim);\n\t\t\t\t\t\t\t$kd_prodi \t= $data_mhs[0]['KD_PRODI'];\n\n\t\t\t\t\t\t\t$semester \t= $this->periode_semester($tgl, $kd_prodi);\n\n\t\t\t\t\t\t\t$kd_ta_data \t= $semester[0]['KD_TA'];\n\t\t\t\t\t\t\t$kd_smt_data \t= $semester[0]['KD_SMT'];\n\n\t\t\t\t\t\t\t//JIKA SESUAI DENGAN SEMESTER SAAT INI MAKA :\n\t\t\t\t\t\t\tif($ta == $kd_ta_data && $kd_current_smt == $kd_smt_data){\n\t\t\t\t\t\t\t\t$jumlah_mahasiswa++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//$jumlah_mahasiswa++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\treturn $jumlah_mahasiswa;\n\t\t}", "public function koneksi(){\n\t\t\t$koneksi = mysql_connect($this->dbHost, $this->dbUser, $this->dbPass);\t\t// Menyambungkan ke server\n\t\t\t$database = mysql_select_db($this->dbName, $koneksi);\t// Memilih database\n\t\t}", "function findNet($ip,$sm) {\n\n $res = \"\";\n\n // divido gli ottetti\n $exip = explode('.',$ip);\n $exsm = explode('.',$sm);\n\n for($i=0; $i<4; $i++) {\n\n $subip=$exip[$i]; // ottetto del IP\n $subsm=$exsm[$i]; // ottetto della SM\n\n for($k=0; $k<8; $k++) {\n \n if($subip[$k] & $subsm[$k]) {\n $res.=\"1\";\n }\n else {\n $res.=\"0\";\n }\n }\n\n // rimetto i punti (tranne alla fine)\n if($i<3) {\n $res.=\".\";\n }\n \n }\n\n return $res;\n}", "function parsescan($arLines)\n {\n #no data in first two lines.skip them.\n array_shift($arLines);\n array_shift($arLines);\n\n $result = array();\n foreach($arLines as $key=>$line)\n {\n if(trim($line) == '')\n {\n continue;\n }\n\n $arMatches = array();\n $temp = array();\n if (!preg_match($this->channelreg, $line, $arMatches))\n print \"channel not found\";\n\n $temp['channel']=$arMatches[0];\n\n $line = trim(substr($line,strlen($arMatches[0])));\n if (!preg_match($this->essidreg, $line, $arMatches))\n print \"essid not found\";\n\n $temp['essid']=trim($arMatches[0]);\n\n $line = trim(substr($line,strlen($arMatches[0])));\n if (!preg_match($this->macreg, $line, $arMatches))\n print \"mac not found\";\n\n $temp['mac']=$arMatches[0];\n\n $line = trim(substr($line,strlen($arMatches[0])));\n if (!preg_match($this->securityreg, $line, $arMatches))\n print \"security not found\";\n\n $temp['security']=$arMatches[0];\n\n $line = trim(substr($line,strlen($arMatches[0])));\n\n if (!preg_match($this->signalreg, $line, $arMatches))\n print \"signal not found\";\n\n $temp['signal']=$arMatches[0];\n\n array_push($result, $temp);\n\n print(\"\\n\");\n\n }\n return $result;\n }", "function tunjanganTdkTetap($conn) {\n $sql = \"select kodetunjangan from \" . static::table('ms_tunjangan') . \"\twhere (isgajitetap = 'N' or isgajitetap is null) and isbayargaji = 'Y' and isaktif = 'Y'\";\n $rst = $conn->Execute($sql);\n\n while ($rowt = $rst->FetchRow()) {\n $a_tunjt[] = $rowt['kodetunjangan'];\n }\n\n return $a_tunjt;\n }", "function checkregistro($usuario,$idfb,$link) {\n $reg=0;\n $consulta = \"SELECT * FROM bdlt_registro where usuario='\".$usuario.\"' or idfb='\".$idfb.\"'\";\n $ip= ($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : 0;\n $date= date(\"Y-m-d H:i:s\");\n writelog($comple);\n $comple='IP:['.$ip.'] Fecha['.$date.'] ejecucion:['.$consulta.']';\n if ($resultado = mysqli_query($link, $consulta)) {\n while ($fila = mysqli_fetch_row($resultado)) {\n $reg=$fila[0];\n }\n /* liberar el conjunto de resultados */\n mysqli_free_result($resultado);\n }\n return $reg;\n}", "function getScans( $data ){\n $colArray = array( 'scan_detail_id', 'scan_id', 'ez', 'ez_string', 'hsn', 'tsn', 'vsn', 'field_2_2', 'vin', 'd3', 'registrationNumber', 'name1', 'name2', 'firstname', 'address1', 'address2', 'j', 'field_4', 'field_3', 'd1', 'd2_1', 'd2_2', 'd2_3', 'd2_4', 'field_2', 'field_5_1', 'field_5_2', 'v9', 'field_14', 'p3', 'field_10', 'field_14_1', 'p1', 'l', 'field_9', 'p2_p4', 't', 'field_18', 'field_19', 'field_20', 'g', 'field_12', 'field_13', 'q', 'v7', 'f1', 'f2', 'field_7_1', 'field_7_2', 'field_7_3', 'field_8_1', 'field_8_2', 'field_8_3', 'u1', 'u2', 'u3', 'o1', 'o2', 's1', 's2', 'field_15_1', 'field_15_2', 'field_15_3', 'r', 'field_11', 'k', 'field_6', 'field_17', 'field_16', 'field_21', 'field_22', 'hu', 'creation_date', 'creation_city', 'document_id', 'Maker', 'Model', 'PowerKw', 'PowerHpKw', 'Ccm', 'Fuel', 'FuelCode', 'Filename', 'itime' );\n \n //get last timestamp from database\n $lastTimestamp = $GLOBALS['dbh']->getOne( 'SELECT itime FROM lxc_fs_scans ORDER BY itime DESC LIMIT 1' )['itime'];\n $lastTsDB = (int) strtotime( $lastTimestamp ); //seconds from unix epoch\n\n $apiKeyArray = getDefaultsByArray( array( 'lxcarsapi') );\n $rs = file_get_contents( 'https://fahrzeugschein-scanner.de/api/Scans/GetScans/'.$apiKeyArray['lxcarsapi'].'/?take=16' );\n $rsArray = json_decode( $rs, TRUE ); //JSON to Array\n\n foreach( $rsArray AS $key => $value ){ // Timestamp from scanner is always a iso 8601 timestamp!!!\n $scanTs = (int) strtotime( $value['timestamp'] );\n if( $lastTsDB < $scanTs ){ \n $rsFsData = file_get_contents( 'https://fahrzeugschein-scanner.de/api/Scans/ScanDetails/'.$apiKeyArray['lxcarsapi'].'/'.$value['id'].'/false' );\n $rsFsDataArray = json_decode( $rsFsData, TRUE ); //JSON to Array\n foreach( $rsFsDataArray AS $key1 => $value1 ) if( strpos( $key1, 'img' ) ) unset( $rsFsDataArray[$key1] ); // remove *_img data\n $fsValues = array_values( $rsFsDataArray );\n $fsValues[] = $value['timestamp'];\n $GLOBALS['dbh']->insert( 'lxc_fs_scans', $colArray, $fsValues );\n }\n }\n\n //get FS from DB\n $dbScans = $GLOBALS['dbh']->getAll( \"SELECT *, to_char( itime::TIMESTAMP AT TIME ZONE 'GMT', 'DD.MM.YYYY HH24:MI' ) AS myts FROM lxc_fs_scans ORDER BY itime DESC LIMIT \".$data['fsmax'] );\n echo json_encode( $dbScans );\n }", "public function scanAction()\n {\n $all = array();\n\n FOREACH($this->dbCtrl->fetchAll() AS $row) {\n $all[] = new Admin_Model_DbRow_Controller($row);\n }\n\n $scanned = $this->ctrlModel->getControllers();\n $new = $this->dbCtrl->filterExistingControllers($scanned);\n $vanished = $this->ctrlModel->filterVanishedControllers($all, $scanned);\n \n $this->view->vanished = $vanished;\n $this->view->new = $new;\n }", "function playerStatus()\n\t\t{\n\t\t\t$request = $_SESSION['mac'].\" status 0 100 \\n \";\n\t\t\t$mySqueezeCLI = new SqueezeCLI($request);\n\t\t\t$response = $mySqueezeCLI->receiveCLI();\n\t\t\t//echo \"la réponse non traité : $response \\n\";\n\t\t\t//parfois le retour CLI change attention\n\t\t\t//$response = get_string_between($response,\" mode:\",\"rate:\");\n\t\t\t$response = substr($response, strpos($response, \"mode:\"));\n\t\t\t$response = substr($response, 0, strpos($response, \" \"));\n\t\t\t$response = substr($response, 5);\n\n\t\t\treturn $response;\n\t\t}", "function isKaliHariKerja($conn) {\n $sql = \"select kodetunjangan from \" . static::table('ms_tunjangan') . \"\twhere iskaliharikerja = 'Y'\";\n $rst = $conn->Execute($sql);\n\n while ($rowt = $rst->FetchRow()) {\n $a_tunjhk[] = $rowt['kodetunjangan'];\n }\n\n return $a_tunjhk;\n }", "public function handleStopScanRFXCode() // vytvorit fci vypne odchytavaci priznak pro funkci serveRFXsignal\n\t{\n\t\tDebugger::barDump($this->config->scanCodes, 'this->config->scanCodes');\n\t\t$selectCode='';\n\t\t$maxCount=0;\n\t\tforeach($this->config->scanCodes as $code)\n\t\t{\n\t\t\t$count=0;\n\t\t\tforeach($this->config->scanCodes as $item)\n\t\t\t{\n\t\t\t\tif ($item==$code) $count=$count+1;\n\t\t\t}\n\t\t\tif ($count>$maxCount) \n\t\t\t{\n\t\t\t\t$selectCode=$code;\n\t\t\t\t$maxCount=$count;\n\t\t\t}\n\t\t}\n\t\tDebugger::barDump($selectCode, 'selectCode');\n\t\tif ($selectCode!='')\n\t\t{\n\t\t\tif ($this->config->scanning==\"RUN\") $this->config->code=$selectCode;\n\t\t}\n\t\tDebugger::barDump($this->config, 'this->config');\n\t\t$this->config->scanning=\"\";\n\t\t$this->config->scanCodes=array();\n\t\t$this->saveConfig(); \n\t}", "public function actionDefault(?string $ssid = null, string $format = 'html'): void\n\t{\n\t\t$this->ssid = $ssid;\n\t\tif ($this->ssid !== null) {\n\t\t\tif ($this->upcKeys->isValidSsid($this->ssid)) {\n\t\t\t\tif ($this->ssid !== strtoupper($this->ssid)) {\n\t\t\t\t\t$this->redirect('this', strtoupper($this->ssid));\n\t\t\t\t}\n\t\t\t\t$keys = $this->upcKeys->getKeys($this->ssid);\n\t\t\t\tif (!$keys) {\n\t\t\t\t\t$error = 'Oops, something went wrong, please try again in a moment';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$error = 'Wi-Fi network name is not \"UPC\" and 7 numbers, the password cannot be recovered by this tool';\n\t\t\t\t$this->httpResponse->setCode(IResponse::S404_NotFound);\n\t\t\t}\n\t\t}\n\n\t\t$this->template->ssid = $this->ssid;\n\t\t$this->template->error = $error ?? null;\n\t\t$this->template->keys = isset($keys) && !isset($error) ? $keys : null;\n\t\tswitch ($format) {\n\t\t\tcase 'text':\n\t\t\t\t$this->httpResponse->setContentType('text/plain');\n\t\t\t\t$this->sendResponse($this->upcKeys->getTextResponse($this->ssid, $error ?? null, $keys ?? []));\n\t\t\t\t// no break, Presenter::sendResponse() is in earlyTerminatingMethodCalls defined in the phpstan-nette extension config\n\t\t\tcase 'html':\n\t\t\t\t$this->template->filterTypes = WiFiBand::getKnown();\n\t\t\t\t$this->template->modelsWithPrefixes = $this->upcKeys->getModelsWithPrefixes();\n\t\t\t\t$this->template->prefixes = $this->upcKeys->getPrefixes();\n\t\t\t\t$this->template->placeholder = $this->upcKeys->getSsidPlaceholder();\n\t\t\t\tbreak;\n\t\t\tcase 'json':\n\t\t\t\t$this->sendJson(array_filter([\n\t\t\t\t\t'ssid' => $this->ssid,\n\t\t\t\t\t'error' => $error ?? null,\n\t\t\t\t\t'keys' => $keys ?? null,\n\t\t\t\t]));\n\t\t\t\t// no break, Presenter::sendJson() is in earlyTerminatingMethodCalls defined in the phpstan-nette extension config\n\t\t\tdefault:\n\t\t\t\tthrow new BadRequestException('Unknown format');\n\t\t}\n\t}", "public function statut()\n {\n $username = 'admin';\n $password = '3d2R';\n $ip = '10.1.1.200';\n $port = '22';\n\n\n $connection = ssh2_connect( $ip, $port);\n ssh2_auth_password($connection, $username, $password);\n $cisco = \"show interface status\";\n $stream = ssh2_exec($connection, $cisco);\n $errorStream = ssh2_fetch_stream($stream, SSH2_STREAM_STDERR);\n stream_set_blocking($errorStream, true);\n stream_set_blocking($stream, true);\n $output = stream_get_contents($stream);\n $json = [];\n $lignes = explode(\"\\n\", $output);\n\n foreach ( $lignes as $key => $ligne ){\n if ($key < 1) continue;\n\n $champ1 = substr($ligne,0,9);\n if ( trim(preg_replace('/\\s\\s+/', ' ',$champ1)) == '\"\"\"' || trim(preg_replace('/\\s\\s+/', ' ',$champ1)) == 'Port') continue;\n $champ1 = trim($champ1);\n\n $champ2 = substr($ligne,10,18);\n if ( $champ2 == false) continue;\n $champ2 = trim($champ2);\n\n $champ3 = trim( substr($ligne,29,12));\n $champ4 = trim(preg_replace('/\\s\\s+/', ' ',substr($ligne,42,10) ));\n $champ5 = trim(preg_replace('/\\s\\s+/', ' ',substr($ligne,53,7) ));\n $champ6 = trim(preg_replace('/\\s\\s+/', ' ',substr($ligne,61,5) ));\n $champ7 = trim(preg_replace('/\\s\\s+/', ' ',substr($ligne,67,17) ));\n $json[] = [\n 'port' => $champ1,\n 'name' => $champ2,\n 'status' => $champ3,\n 'vlan' => $champ4,\n 'duplex' => $champ5,\n 'speed' => $champ6,\n 'type' => $champ7,\n ];\n }\n return response()->json([\n 'data' => $json\n ]);\n }", "function privacy_ping_filter($sites)\n {\n }", "public function set_wifi_network( $name ) {\n\t\t$this->set_prop( 'wifi_network', $name );\n\t}", "public static function send( $scan ) {\n\t\tif ( ! $scan instanceof Scan ) {\n\t\t\t_doing_it_wrong( __METHOD__, __( 'Must pass Scan instance.', 'it-l10n-ithemes-security-pro' ), '5.8.1' );\n\n\t\t\treturn false;\n\t\t}\n\n\t\t$code = $scan->get_code();\n\n\t\tif ( 'clean' === $code ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$nc = ITSEC_Core::get_notification_center();\n\n\t\t$mail = $nc->mail();\n\t\t$mail->set_subject( static::get_scan_subject( $code ) );\n\t\t$mail->set_recipients( $nc->get_recipients( 'malware-scheduling' ) );\n\n\t\t$mail->add_header(\n\t\t\tesc_html__( 'Site Scan', 'it-l10n-ithemes-security-pro' ),\n\t\t\tsprintf(\n\t\t\t\tesc_html__( 'Site Scan for %s', 'it-l10n-ithemes-security-pro' ),\n\t\t\t\t'<b>' . ITSEC_Lib::date_format_i18n_and_local_timezone( $scan->get_time()->getTimestamp(), get_option( 'date_format' ) ) . '</b>'\n\t\t\t)\n\t\t);\n\t\tstatic::format_scan_body( $mail, $scan );\n\t\t$mail->add_footer();\n\n\t\treturn $nc->send( 'malware-scheduling', $mail );\n\t}", "public function list_wilayah()\n\t{\n\t\tif($this->is_login){\n\t\t\t$products = $this->M_region->getAll();\n\t\t\t// Set Response\n\t\t\t$this->response_code = 200;\n\t\t\t$this->response['status'] = TRUE;\n\t\t\t$this->response['data'] = $products;\n\t\t}\n\n\t\t// Run the Application\n\t\t$this->run(SECURED);\n\t}", "function getDscanTower($key) {\n\t/*$csv = explode(\"\\n\", file_get_contents(\"controltowers.csv\"));\n\tforeach($csv as $ct) {\n\t\t$ct = str_getcsv($ct, \",\", \"\\\"\", \"\\\\\");\n\t\t$m['id'] = $ct[0];\n\t\t$m['igbName'] = $ct[1];\n\t\t$m['typeName'] = $ct[2];\n\t\t$cts[$m['typeName']] = $m;\n\t}*/\n\n\t//Connect MySQL\n\t/*include(\"config.php\");\n\t$db = new PDO('mysql:host='.$mysql_host.';dbname='.$mysql_db.';charset=utf8', $mysql_user, $mysql_pass);\n\t\n\t//Check if scan exists\n\t$st = $db->prepare(\"SELECT * FROM dscanScans WHERE `key`=:key LIMIT 1\");\n\t$st->bindValue(\":key\", $key, PDO::PARAM_STR);\n\t$st->execute();\n\t$rows = $st->fetchAll(PDO::FETCH_ASSOC);\n\tif(count($rows) < 1) {\n\t\t//No scan found\n\t\treturn null;\n\t}\n\t\n\t//Get objects for scan\n\t$id = $rows[0]['id'];\n\t$st = $db->prepare(\"SELECT type, distance FROM dscanObjects WHERE scan=:scan AND distance >= 0\");\n\t$st->bindValue(\":scan\", $id, PDO::PARAM_STR);\n\t$st->execute();\n\t$rows = $st->fetchAll(PDO::FETCH_ASSOC);\n\t\n\t//Search objects for tower\n\t$found = false;\n\tforeach($rows as $row) {\n\t\tif(array_search($row['type'], array_keys($cts)) !== false) {\n\t\t\t$type = $row['type'];\n\t\t\t$found = true;\n\t\t}\n\t}*/\n\t\n\tif(true) {\n\t\t$dscan = file_get_contents(\"scans/\".$key);\n\t\t//echo $dscan;\n\t\treturn parseDscanTower($dscan);\n\t} else {\n\t\treturn null;\n\t}\n}", "function tunjanganTetap($conn) {\n $sql = \"select kodetunjangan from \" . static::table('ms_tunjangan') . \"\twhere isgajitetap = 'Y' and isbayargaji = 'Y' and isaktif = 'Y'\";\n $rst = $conn->Execute($sql);\n\n while ($rowt = $rst->FetchRow()) {\n $a_tunj[] = $rowt['kodetunjangan'];\n }\n\n return $a_tunj;\n }", "public function checkBarcode(Request $request) //Cek barcode melaui scan hp || Jangan lupa database tes dan erasystem_2012 || Cari bercode berdasarkan data pengirim || Tambahkan parameter ID SO\n {\n $pt = $request->input('PT_ID'); // yg kirim\n $gudang = $request->input('GUDANG'); // yg kirim\n $barcode = $request->input('BARCODE');\n $kode = substr($barcode, 0, 13);\n $newpt = $pt == '1' ? 'ERA' : ( $pt == '2' ? 'ERI' : 'EPI'); \n\n //Jika pilih PT & gudang penerima\n //$id_so = $request->input('ID_SO');\n //$soi = DB::table('erasystem_2012.soi_pellet')->selectRaw('DARI_PT_ID, DARI_GUDANG')->where('ID_SO', $id_so)->first();\n //$newpt = $soi->DARI_PT_ID; // check barcode dari PT pengirim\n //$gudang = $soi->DARI_GUDANG; // cek barcode dari gudang pengirim\n \n $dept = 'PPC';\n $area = 'Plastics Pellet Warehouse';\n $newstatus = 'TERIMA';\n\n $soi_item = DB::table('erasystem_2012.soi_pellet_item')\n ->whereRaw('soi_pellet_item.KODE_PELLET = ?', [$kode])->select('*')->first();\n\n $result = DB::table('erasystem_2012.barcode_pellet')\n ->join('erasystem_2012.barcode_pellet_det', function ($join) {\n $join->on('barcode_pellet.BARCODE', '=', 'barcode_pellet_det.BARCODE')->on('barcode_pellet.LAST_UPDATE', '=', 'barcode_pellet_det.TANGGAL');\n })\n ->whereRaw('barcode_pellet_det.BARCODE = ? AND barcode_pellet_det.PT_ID = ? AND barcode_pellet_det.GUDANG = ? AND barcode_pellet_det.DEPT_ID = ? AND barcode_pellet_det.DEPT_AREA = ? AND barcode_pellet_det.STATUS = ? AND barcode_pellet.AKTIF = ?', [$barcode, $newpt, $gudang, $dept, $area, $newstatus, '1'])\n ->selectRaw(\"barcode_pellet_det.*\")\n ->first();\n\n if($soi_item){\n if ($result) {\n $out = [\n 'message' => 'success',\n 'data' => $barcode,\n 'code' => 200\n ];\n } else {\n $out = [\n 'message' => 'empty',\n 'data' => $barcode,\n 'code' => 404\n ];\n }\n } else {\n $out = [\n 'message' => 'empty',\n 'data' => $barcode,\n 'code' => 404\n ];\n }\n\n return response()->json($out, $out['code']);\n }", "function iploc($ip){\n\t\t/* preg_match(\"/<li>Country : (.*?) <img/\",$html,$data); */\n\t\t$d['pais'] = \"nada\";\n\t\t/* preg_match(\"/<li>State\\/Province : (.*?)<\\/li>/\",$html,$data); */\n\t\t$d['estado'] = \"nada\";\n\t\t/* preg_match(\"/<li>City : (.*?)<\\/li>/\",$html,$data); */\n\t\t$d['ciudad'] = \"nada\";\n\t\treturn ($d);\n\t}", "public function searchByMacAddress(Request $request)\n {\n $usuarioAuth = Auth::user();\n $idusuario = $usuarioAuth->id;\n $rolNombre = $usuarioAuth->role->nombre;\n $usuario = $usuarioAuth->username;\n \n $fech_hor = date(\"Y-m-d H:i:s\");\n \n $tipoBus = $request->type_data;\n $bus = $request->text;\n \n $multiconsultaFuntions = new MulticonsultaFunctions;\n $multiconsultaFuntions->validarSearchMacAddress($bus,$tipoBus,$fech_hor,$rolNombre);//verifica que la consulta sea valida\n \n $armado_query = $multiconsultaFuntions->ArmandoQuery($tipoBus,$bus);\n\n $recordP= $multiconsultaFuntions->queryPrincipal($armado_query[\"filtroWhere\"],$armado_query[\"limit\"]);\n \n $newResultMulti = $multiconsultaFuntions->procesarMulticonsulta($recordP);\n \n return $this->resultData(\n array(\n 'cantidad' => 1,\n 'resultado' => view('administrador.modulos.multiconsulta.searchResult',[\"resultadoMulti\"=>$newResultMulti])->render(),\n )\n ); \n \n }", "function isAvailable() ;", "function isAvailable() ;", "function nvram_country_setup($wlif_bss_idx, $ccode, $pci_path)\n{\n\t$ctry_code = $ccode;\n\t\n\tif ($ccode == \"US\") \n\t{\n\t\t$regrev = 0;\n\t\t//$ctry_code = \"Q2\";\t\n\t}\n\telse if ($ccode == \"CN\") \n\t\t$regrev = 0;\n\telse if ($ccode == \"TW\")\n\t\t$regrev = 0;\n\telse if ($ccode == \"CA\") \n\t{\n\t\t$regrev = 0;\n\t\t//$ctry_code = \"Q2\";\t\n\t}\n\telse if ($ccode == \"KR\")\n\t\t$regrev = 1;\n\telse if ($ccode == \"JP\")\n\t\t$regrev = 1;\n\telse if ($ccode == \"AU\")\n\t\t$regrev = 0;\n\telse if ($ccode == \"SG\")\n\t{\n\t\t/* Singaport two choice:\n\t\t\t1. DFS enable= SG/0 or \n\t\t\t2. No use 5G band= SG/1\n\t\t*/\n\t\t$regrev = 0;\n\t}\n\telse if ($ccode == \"LA\")\n\t\t$regrev = 0;\n\telse if ($ccode == \"IL\")\n\t\t$regrev = 0;\n\telse if ($ccode == \"EG\")\n\t\t$regrev = 0;\n\telse if ($ccode == \"BR\")\n\t\t$regrev = 0;\n\telse if ($ccode == \"RU\")\n\t{\n\t\t/* Russia two choice:\n\t\t\t1. DFS enable= RU/1 or \n\t\t\t2. No use 5G band= RU/0\n\t\t*/\n\t\t$regrev = 1;\n\t}\n\telse if ($ccode == \"GB\" || $ccode == \"EU\")\n\t\t$regrev = 0;\n\telse\n\t\t$regrev = 0;\n\n\t/*echo \"nvram set \".$pci_5g_path.\"regrev=\".$regrev.\"\\n\";\n\techo \"nvram set \".$pci_5g_path.\"ccode=\".$ctry_code.\"\\n\";*/\n\tstartcmd(\"nvram set \".$pci_path.\"regrev=0\");\n\tstartcmd(\"nvram set \".$pci_path.\"ccode=0\");\n\t\n\tstartcmd(\"nvram set wl\".$wlif_bss_idx.\"_country_code=\".$ctry_code);\n\tstartcmd(\"nvram set wl\".$wlif_bss_idx.\"_country_rev=\".$regrev);\n\t/* alpha create nvram parameter: it's value include country code and regulatory revision */\n\tstartcmd(\"nvram set wl\".$wlif_bss_idx.\"_alpha_country_code=\".$ctry_code.\"/\".$regrev);\n}", "public function downloadObservations() {\n $this->loginToWigle();\n\n $ap = $this->database->table('wigle_aps')\n ->where('downloaded',0)\n ->order('priority DESC, rand()')\n ->limit(1)\n ->fetch();\n\n $observationsWigle = $this->sendCurlRequest(self::WIGLE_OBSERVATIONS_URL,array('netid'=>$ap['mac']));\n\n $observationsDecoded = json_decode($observationsWigle,true);\n\n dump($observationsDecoded);\n\n $wifis = array();\n\n foreach($observationsDecoded['result'] as $r) {\n foreach($r['locationData'] as $o) {\n $wifi = new Wifi();\n $wifi->setAltitude($o['alt']);\n $wifi->setAccuracy($o['accuracy']);\n $wifi->setBcninterval($r['bcninterval']);\n $wifi->setChannel($r['channel']);\n $wifi->setComment($r['comment']);\n $wifi->setDateAdded(new DateTime());\n $wifi->setFirsttime($r['firsttime']);\n $wifi->setFlags($r['flags']);\n $wifi->setFreenet($r['freenet']);\n $wifi->setLasttime($o['time']);\n $wifi->setLastupdt($o['lastupdt']);\n $wifi->setLatitude($o['latitude']);\n $wifi->setLongitude($o['longitude']);\n $wifi->setMac($o['netid']);\n $wifi->setName($o['name']);\n $wifi->setPaynet($r['paynet']);\n $wifi->setQos($r['qos']);\n $wifi->setSource(WigleDownload::ID_SOURCE);\n $wifi->setSsid($o['ssid']);\n $wifi->setType($r['type']);\n $wifi->setWep($o['wep']);\n $wifis[] = $wifi;\n }\n }\n\n $this->database->beginTransaction();\n $rows = $this->saveAll($wifis);\n $id_wigle_download_queue = $ap['id_wigle_download_queue'];\n\n\n // stazeno z wigle -> v najdem pokud je v donwload importu tak pridame do google\n $this->database->table(DownloadImportService::TABLE)\n ->where('id_wigle_aps',$ap['id'])\n ->where('state',1)\n ->update(array('state'=>DownloadImport::DOWNLOADED_WIGLE));\n\n\n $idGR = null;\n\n $googleDownloadService = new GoogleDownload($this->database);\n if ($rows) foreach($rows as $row) {\n $w = Wifi::createWifiFromDBRow($row);\n if($w) {\n $idGR = $googleDownloadService->createRequestFromWifi($w,2);\n }\n }\n\n $this->database->table(DownloadImportService::TABLE)\n ->where('id_wigle_aps',$ap['id'])\n ->where('state',DownloadImport::DOWNLOADED_WIGLE)\n ->where('id_google_request',null)\n ->update(array(\n 'state'=>DownloadImport::ADDED_GOOGLE,\n 'id_google_request' => $idGR\n ));\n\n $ap->update(array('downloaded'=>1,'downloaded_date'=>new DateTime()));\n if($id_wigle_download_queue) {\n $this->database->table('wigle_download_queue')\n ->where('id',$id_wigle_download_queue)\n ->update(array('count_downloaded_observations'=>new SqlLiteral('count_downloaded_observations + 1')));\n }\n $this->database->commit();\n // PO UPDATE wigle_download_queue se pomoci DB triggeru zmeni hodnoty u download_requestu\n // a pokud je ten reuqest jiz dokoncen tak i requesty ktere cekaly na ten dany request\n dump($wifis);\n }", "public function setSSID($ssid){\n\t\t$this->ssid = $ssid;\n\t}", "public function getFullKilometerData($result);", "function filter_mellat_pay_channel_pay_answer($transaction){\n $terminalId\t\t= \"xxxxx\"; //-- شناسه ترمینال\n $userName\t\t= \"xxxxx\"; //-- نام کاربری\n $userPassword\t= \"xxxxx\"; //-- کلمه عبور\n\n $ResCode \t\t= (isset($_POST['ResCode']) && $_POST['ResCode'] != \"\") ? $_POST['ResCode'] : \"\";\n\n if ($ResCode == '0')\n {\n $client \t\t\t\t= new nusoap_client('https://bpm.shaparak.ir/pgwchannel/services/pgw?wsdl');\n $namespace \t\t\t\t='http://interfaces.core.sw.bps.com/';\n $orderId \t\t\t\t= (isset($_POST['SaleOrderId']) && $_POST['SaleOrderId'] != \"\") ? $_POST['SaleOrderId'] : \"\";\n $verifySaleOrderId \t\t= (isset($_POST['SaleOrderId']) && $_POST['SaleOrderId'] != \"\") ? $_POST['SaleOrderId'] : \"\";\n $verifySaleReferenceId \t= (isset($_POST['SaleReferenceId']) && $_POST['SaleReferenceId'] != \"\") ? $_POST['SaleReferenceId'] : \"\";\n\n $parameters = array(\n 'terminalId' \t\t=> $terminalId,\n 'userName' \t\t\t=> $userName,\n 'userPassword' \t\t=> $userPassword,\n 'orderId' \t\t\t=> $orderId,\n 'saleOrderId' \t\t=> $verifySaleOrderId,\n 'saleReferenceId' \t=> $verifySaleReferenceId\n );\n\n $result = $client->call('bpVerifyRequest', $parameters, $namespace);\n\n if($result == 0)\n {\n $result = $client->call('bpSettleRequest', $parameters, $namespace);\n\n if($result == 0)\n {\n $transaction->setStatus(PayChannelTransaction::STATUS_PAID);\n }\n }\n }\n #TODO: handling mellat pay answer error\n return $transaction;\n}", "public function CheckAction() {\n\t//echo '<pre>';\n\t//$data = $this->getRequest()->getParam('pincode');\n\t\n $data =753459;\n //echo $data;\n\t$resource = Mage::getSingleton('core/resource');\n\t$read = $resource->getConnection('core_read');\n\t$query = \"SELECT * FROM cod_table WHERE pincode= '\".$data.\"'\";\n\necho $query;\n\t$result=$read->query($query);\n\t\n\t$query = \"SELECT * FROM ncod_table WHERE pincode= '\".$data.\"'\";\n\n\t\n\t\t$result1=$read->query($query);\n\t\t$cod = $result->fetch();\n\t\t$ncod = $result1->fetch();\n\n\t\tprint_r($cod['qcod']);\n\t\tprint_r($ncod['qcod']);\n\n\t if($cod['qcod']=='0' && $cod['bcod']=='0')\n\t {\n\t\t if($cod['eastzone']=='E')\n\t\t {\n\t\t \tMage::getSingleton('core/session')->unsPayment();\n\t\t\tMage::getSingleton('core/session')->setPayment('ncod');\n\t\t\t echo \"ncod\";\n\n\t\t }\n\t else\n\t\t { \n\t\t\tMage::getSingleton('core/session')->unsPayment();\n\t\t\tMage::getSingleton('core/session')->setPayment('cod');\n\t\t\techo 'cod';\n\t\t\t\t \n\t }\n\t }\n\t else\n\t {\n\t if($cod['cod']=='1' && $ncod['ncod']=='0')\n\t\t{\n\t\t if($cod['eastzone']=='E' ||$ncod['eastzone']=='E')\n\t\t {\t\t \n\t\t\tMage::getSingleton('core/session')->unsPayment();\n\t\t\tMage::getSingleton('core/session')->setPayment('ncod');\n\t\t\techo 'ncod';\n\t\n\t }\n\t\t\telse{\n\t\t Mage::getSingleton('core/session')->unsPayment();\n\t\t\tMage::getSingleton('core/session')->setPayment('ocod');\n\t\t\techo 'ocod';\n\t\t}\n\t\t}\n\t\telseif($cod['cod']=='0' && $ncod['ncod']=='1')\n\t {\n\t\t\tMage::getSingleton('core/session')->unsPayment();\n\t\t\tMage::getSingleton('core/session')->setPayment('ncod');\n\t echo 'ncod';\n\t \t \n\t }\n\t elseif($cod['cod']=='0'||$ncod['ncod']=='1')\n\t {\n\t\t\tMage::getSingleton('core/session')->unsPayment();\n\t\t\tMage::getSingleton('core/session')->setPayment('ncod');\n\t echo 'ncod';\n\t\t\t\n\t }\n\t \n\t elseif($cod['cod']=='1'||$ncod['ncod']=='0')\n\t {\n\t \n\t\t\tMage::getSingleton('core/session')->unsPayment();\n\t\t\tMage::getSingleton('core/session')->setPayment('ocod');\n\t echo 'ocod';\n\t }\n\t else\n\t {\n\t echo \"none\";\n\t }\n\t \n\t }\n\t }", "function virustotalscan_check_server_load($level)\r\n{\r\n $load = 0;\r\n // daca functia exista atunci se intorc timpii de incarcare a severului\r\n if (function_exists('get_server_load')) {\r\n $load = get_server_load();\r\n }\r\n if (floatval($load) > floatval($level)) {\r\n // timpul de incarcare e mai mare si deci scanarea nu se va efectua\r\n return false;\r\n }\r\n else {\r\n // timpul de incarcare e mai mic decat cel trimis ca parametru, iar ca rezultat scanarea va incepe\r\n return true;\r\n }\r\n}", "public function robot()\n {\n if ($device == 'robot') {\n #which robot is it. google, yahoo, amazon etc..\n\n #return result to be stored\n } \n }", "public function getWifiCount() {\n return $this->wifi;\n }", "function searchIP()\t{\n \t$position = mt_rand(1, $this->rnd_ips_number);\n $query = \"select ip from \".self::RNDIPSC_NAME.\" where id=\".$position;\n if ($result = $this->db_conn->query($query)) {\n $row = $result->fetch_assoc();\n return $row[\"ip\"];\n }\n else {\n die (\"Error sending the query '\".$query.\"' to MySQL\");\n }\n\t}", "function virustotalscan_scan_file($filepath, $key)\r\n{\r\n\t$post = array('key' => $key, 'file' => '@'.$filepath);\r\n\t// se initializeaza o cerere\r\n\t$ch = curl_init();\r\n // parametrii cererii\r\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));\r\n\tcurl_setopt($ch, CURLOPT_URL, 'http://www.virustotal.com/api/scan_file.json');\r\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post); \r\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \r\n\t// rezultatul cererii \r\n\t$result = curl_exec($ch);\r\n\t// se inchide cererea\r\n\tcurl_close($ch);\r\n\t// se decodeaza rezultatul\r\n\t$result = json_decode($result, true);\r\n // se intoarce rezultatul\r\n\tif(isset($result['scan_id'][0])) {\r\n return $result;\r\n\t} \r\n else {\r\n return false;\r\n\t}\t\r\n}", "public function parsing_sms($isi_pesan,$nama_kontak){\n \n return $parsing_pesan;\n }", "public function scans() {\n return Scans::where('uid', '=', $this->id)->get();\n }", "function isTunjJamKerja($conn) {\n $sql = \"select kodetunjangan from \" . static::table('ms_tunjangan') . \"\twhere iskeldosen = 'Y'\";\n $rst = $conn->Execute($sql);\n\n while ($rowt = $rst->FetchRow()) {\n $a_tunjjk[] = $rowt['kodetunjangan'];\n }\n\n return $a_tunjjk;\n }", "public function get_wifi_network( $context = 'view' ) {\n\t\treturn $this->get_prop( 'wifi_network', $context );\n\t}" ]
[ "0.6325678", "0.60188013", "0.5873877", "0.5699183", "0.5687343", "0.56432587", "0.5567517", "0.5566768", "0.55443805", "0.5471827", "0.5466729", "0.54461837", "0.5402348", "0.539658", "0.53802484", "0.5340009", "0.53367406", "0.5257566", "0.52463925", "0.5225829", "0.52166563", "0.5211552", "0.51920146", "0.51854414", "0.5184714", "0.51724625", "0.5166525", "0.51526815", "0.5148537", "0.512615", "0.50759125", "0.5068085", "0.5057941", "0.5046144", "0.5029792", "0.50024533", "0.4982696", "0.49753326", "0.49478042", "0.4944339", "0.4929528", "0.49201575", "0.49111366", "0.49088186", "0.4904414", "0.48787048", "0.48761973", "0.4862566", "0.48571387", "0.48382267", "0.48333114", "0.4832042", "0.48213002", "0.4815974", "0.4814038", "0.48086265", "0.47782004", "0.4777772", "0.47756466", "0.47734338", "0.47626707", "0.47566625", "0.4751871", "0.47478053", "0.4741247", "0.4736738", "0.473371", "0.47335368", "0.47325996", "0.4731007", "0.47274864", "0.47201934", "0.47180852", "0.47097096", "0.47087416", "0.47078735", "0.4706597", "0.4703046", "0.47018299", "0.4694101", "0.46919715", "0.46883774", "0.46623793", "0.46563327", "0.46563327", "0.46538836", "0.46472144", "0.46406037", "0.46387038", "0.4637833", "0.4633939", "0.46325326", "0.4631211", "0.46280584", "0.4609138", "0.45939416", "0.45899904", "0.45791203", "0.45778984", "0.4576625" ]
0.77866054
0
Fungsi untuk mendapatkan konfigurasi access point perangkat
function common_get_ap_config($tipe){ $file = '/etc/wpa_supplicant/wpa_supplicant.conf'; $curr = file_get_contents($file); if($tipe == 'ssid'){ //get current ssid $conf = explode('#ap-main-ssid',$curr); $conf = $conf[1]; $conf = explode('=',$conf); $ssid = trim(str_replace('"','',$conf[1])); return $ssid; } else if($tipe == 'psk'){ //get current pass $conf = explode('#ap-main-psk',$curr); $conf = $conf[1]; $conf = explode('=',$conf); $psk = trim($conf[1]); return $psk; } else if($tipe == 'ssid-b'){ //get current ssid $conf = explode('#ap-backup-ssid',$curr); $conf = $conf[1]; $conf = explode('=',$conf); $ssid = trim(str_replace('"','',$conf[1])); return $ssid; } else if($tipe == 'psk-b'){ //get current pass $conf = explode('#ap-backup-psk',$curr); $conf = $conf[1]; $conf = explode('=',$conf); $psk = trim($conf[1]); return $psk; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function konfig(){\n\t\t$data['title'] \t\t= \"Konfigurasi Umum\";\n\t\t$data['konfig'] \t= $this->model_konfig->tampil()->row_array();\n\n\t\t$this->view('admin/konfigurasi/kUmum.php', $data, FALSE);\n\t}", "public function access();", "function init_accessMap(){\n\t$map = array(\n\t\t/* user */\n\t\t'user.get' => array('root', 'admin', 'developer', 'normal'),\n\t\t'user.get_others' => array('root', 'admin'),\n\n\t\t/* logs */\n\t\t'logs.get' => array('root', 'admin', 'developer', 'normal'),\n\t\t'logs.get_others' => array('root', 'admin'),\n\n\t\t/* site */\n\t\t'site.add' => array('root', 'admin', 'developer', 'normal'),\n\t\t'site.get' => array('root', 'admin', 'developer', 'normal'),\n\t\t'site.get_others' => array('root', 'admin'),\n\t\t'site.update' => array('root', 'admin', 'developer', 'normal'),\n\t\t'site.update_others' => array('root', 'admin'),\n\t\t'site.remove' => array('root', 'admin', 'developer', 'normal'),\n\t\t'site.remove_others' => array('root', 'admin'),\n\n\t\t/* pattern */\n\t\t'pattern.get' => array('root', 'admin', 'developer', 'normal'),\n\t\t'pattern.get_others' => array('root', 'admin'),\n\t\t'pattern.add' => array('root', 'admin', 'developer', 'normal'),\n\t\t'pattern.remove' => array('root', 'admin', 'developer', 'normal'),\n\t\t'pattern.remove_others' => array('root', 'admin'),\n\n\t\t/* count data */\n\t\t'count.get' => array('root', 'admin', 'developer', 'normal'),\n\t\t'count.get_others' => array('root', 'admin'),\n\n\t\t/* ucenter entry show control */\n\t\t'ucenter.home' => array('root', 'admin', 'developer', 'normal'),\n\t\t'ucenter.sites' => array('root', 'admin', 'developer', 'normal'),\n\t\t'ucenter.logs' => array('root', 'admin', 'developer', 'normal'),\n\t\t'ucenter.logs_all' => array('root', 'admin'),\n\t\t'ucenter.sites_all' => array('root', 'admin'),\n\t\t'ucenter.visitors' => array('root', 'admin'),\n\t);\n\tAccessController::setMap($map);\n}", "protected function serviceAccessGates()\n {\n //\n }", "public function mikrotik_access() {\n\t\treturn true;\n\t}", "public function _config_para_view() {\n $this->controller->set('ControleAcessoConfig', $this->config);\n }", "function getAccessibilityMapping() {\n return ['download' => ['dbgap','pdb','geo','lincs','gemma',\n 'arrayexpress','sra','bioproject','dryad',\n 'cvrg','dataverse','neuromorpho','peptideatlas',\n 'cia','mpd', 'niddkcr','openfmri','nursadatasets',\n 'physiobank','proteomexchange','yped','cil','icpsr','gdc',\n 'swissprot','retina','emdb','epigenomics','nitrcir',\n 'neurovaultatlases','neurovaultcols','neurovaultnidm',\n 'rgd','datacitebgi','datacitemorphobank','vectorbase',\n 'datacitegnd','datacitepeerj','datacitezenodo','omicsdi','datacitesbgrid','simtk',\n 'datacitecxidb','datacitebils','dataciteada','dataciteukda','dataciteadaptive','datacitemit','datacitectsi',\n 'datacitefdz','datacitembf','datacitenimh','datacitejhu','datacitecandi','datacitelshtm','datacitedatabrary',\n 'immport','datacitesdscsg','datacitecrcns','nsrr','naturedata','lsdb','genenetwork','ndarpapers','datacitethieme',\n 'datacitefigshare','dataciteccdc','wormbase','gtexldacc','metabolomics'#'ctn','clinicaltrials'\n ],\n 'remoteAccess' => [],\n 'remoteService' => ['openfmri'],\n 'enclave' => [],\n 'notAvailable' => [],#'clinvar'],\n ];\n}", "public function setPrivilages()\n {\n // $this->acl->allow('guest',null, array('view', 'index'));\n // $this->acl->allow('editor',array('view','edit'));\n // $this->acl->allow('admin');\n \n // Setting privilages for actions as per particular controller\n // $this->acl->allow('<role>','<controller>', <array of controller actions>);\n // You can also fetch it from DB.\n \n// // $this->acl->deny('guest','news', 'index');\n// $this->acl->allow('guest','news', array( 'demo1', 'view', 'index'));\n// $this->acl->allow('guest','job-board', array('index'));\n//\n// $this->acl->allow('editor','news', array( 'edit', 'view', 'index')); \n// $this->acl->allow('editor','job-board', array('edit', 'index'));\n//\n// $this->acl->allow('admin');\n //$this->acl->allow('guest');\n //Guest ACL\n $this->acl->deny('guest',array('user','shop','admin'));\n $this->acl->allow('guest','index');\n \n //User ACL\n $this->acl->deny('user',array('shop','admin'));\n $this->acl->allow('user','user');\n $this->acl->allow('user','index',array('logout','notfound'));\n \n \n // Shop ACL\n $this->acl->deny('shop',array('user','admin'));\n $this->acl->allow('shop',array('index','shop'));\n \n //Admin ACL\n //$this->acl->deny('admin',array('user','shop'));\n //$this->acl->allow('admin',array('index','admin'));\n $this->acl->allow('admin');\n // Note that the actions which are not mentioned above i.e. inside array of\n // controller-action - becomes access-denied automatically\n // as in above example, news controller also have one more action demo2,\n // but demo2 is not mentioned in above allow actions, so \n // when guest tries to access the action - demo2, it would not show the \n // content of demo2, rather It would show content of error/index.phtml\n }", "public function getAccessConfig()\n {\n return $this->access_config;\n }", "public function save_info_pointeuse() {\n $this->autoRender = false;\n header('Cache-Control: no-cache, must-revalidate');\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\n header('Content-type: application/json');\n header('Access-Control-Allow-Origin: *');\n header(\"Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS\");\n header(\"Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With\");\n if ($this->request->is('post')) {\n $data = $this->request->data;\n require APP . 'Vendor/autoload.php';\n require_once APP . 'Vendor' . DS . 'lib/TADFactory.php';\n require_once APP . 'Vendor' . DS . 'lib/TAD.php';\n require_once APP . 'Vendor' . DS . 'lib/TADResponse.php';\n require_once APP . 'Vendor' . DS . 'lib/Providers/TADSoap.php';\n require_once APP . 'Vendor' . DS . 'lib/Providers/TADZKLib.php';\n require_once APP . 'Vendor' . DS . 'lib/Exceptions/ConnectionError.php';\n require_once APP . 'Vendor' . DS . 'lib/Exceptions/FilterArgumentError.php';\n require_once APP . 'Vendor' . DS . 'lib/Exceptions/UnrecognizedArgument.php';\n require_once APP . 'Vendor' . DS . 'lib/Exceptions/UnrecognizedCommand.php';\n $date = date('Y-m-d');\n if (!empty($data['Pointage']['date'])) {\n $date = $data['Pointage']['date'];\n }\n $tad = (new TADFactory(['ip' => '192.168.1.201', 'encoding' => 'utf-8']))->get_instance();\n // list pointage in date [$date]\n $att_logs = $tad->get_att_log();\n $filtered_att_logs = $att_logs->filter_by_date(\n ['start' => $date, 'end' => $date]\n );\n $all_pointages = $filtered_att_logs->to_array();\n // list user pointer\n $list_user_point = array();\n $list_user_point_name = array();\n $list_user_point_id = array();\n// $ap = current($all_pointages);\n $ap = $all_pointages['Row'];\n foreach ($ap as $k => $point):\n if (!in_array($point['PIN'], $list_user_point_id)):\n array_push($list_user_point_id, $point['PIN']);\n $user_info = $tad->get_user_info(['pin' => $point['PIN']]);\n $full_name_xml = simplexml_load_string(\"<?xml version='1.0' encoding='UTF-8'?>\" . utf8_encode($user_info->get_response_body())) or die(\"Error: Cannot create object\");\n $full_name_array = (array) $full_name_xml;\n $full_name_row = (array) $full_name_array['Row'];\n $full_name = $full_name_row['Name'];\n array_push($list_user_point, array('full_name' => $full_name));\n array_push($list_user_point_name, $full_name);\n endif;\n $user_info = $tad->get_user_info(['pin' => $point['PIN']]);\n $full_name_xml = simplexml_load_string(\"<?xml version='1.0' encoding='UTF-8'?>\" . utf8_encode($user_info->get_response_body())) or die(\"Error: Cannot create object\");\n $full_name_array = (array) $full_name_xml;\n $full_name_row = (array) $full_name_array['Row'];\n $full_name = $full_name_row['Name'];\n $point['full_name'] = $full_name;\n $point['isAbsent'] = FALSE;\n $point['date'] = explode(\" \", $point['DateTime'])[0];\n $ap[$k] = $point;\n endforeach;\n $pointage_not_absent = $this->_group_by($ap, 'full_name');\n $pointage_notabsent = array();\n $times = array();\n foreach ($pointage_not_absent as $k => $pointage):\n array_push($pointage_notabsent, array($k => $pointage));\n array_push($times, $pointage);\n endforeach;\n // Get attendance logs for all users;\n $all_user_info = $tad->get_all_user_info();\n $full_user = simplexml_load_string(\"<?xml version='1.0' encoding='UTF-8'?>\" . utf8_encode($all_user_info->get_response_body())) or die(\"Error: Cannot create object\");\n $rowUser = (array) $full_user;\n $all_user = current($rowUser);\n $user_absent_name = array();\n $user_absent = array();\n $pointage_absent = array();\n foreach ($all_user as $user):\n $user_array = (array) $user;\n if (!empty($user_array['Name'])):\n if (!in_array($user_array['Name'], $list_user_point_name)) {\n array_push($user_absent_name, $user_array['Name']);\n array_push($user_absent, array('full_name' => $user_array['Name']));\n array_push($pointage_absent, array($user_array['Name'] => array(\n 'full_name' => ucwords($user_array['Name']),\n 'pin' => NULL,\n 'isAbsent' => TRUE,\n 'datetime' => NULL,\n 'date' => NULL,\n 'verified' => NULL,\n 'status' => NULL,\n 'workCode' => NULL\n )));\n }\n endif;\n endforeach;\n header(\"HTTP/1.1 200 OK\");\n echo json_encode(array(\n 'absent' => $pointage_absent,\n 'notabsent' => $pointage_notabsent,\n 'names' => $list_user_point,\n 'names_absent' => $user_absent,\n 'status' => 200,\n 'times' => $times,\n 'type' => 'success'\n ));\n die();\n }\n }", "public function getAccessionsList(){\n return $this->_get(2);\n }", "public function getAccessionsList(){\n return $this->_get(2);\n }", "function options_init() {\n return array(\n 'layer_type' => 'openlayers_layer_type_openlayers_taxonomy_vector',\n 'layer_handler' => 'openlayers_taxonomy_vector',\n 'vector' => TRUE,\n );\n }", "function sloodle_print_access_level_options($current_config, $show_use_object = true, $show_control_object = true, $show_server = true)\n {\n // Quick-escape: if everything is being suppressed, then do nothing\n if (!($show_use_object || $show_control_object || $show_server)) return;\n \n // Fetch default values from the configuration, if possible\n $sloodleobjectaccessleveluse = sloodle_get_value($current_config, 'sloodleobjectaccessleveluse', SLOODLE_OBJECT_ACCESS_LEVEL_PUBLIC);\n $sloodleobjectaccesslevelctrl = sloodle_get_value($current_config, 'sloodleobjectaccesslevelctrl', SLOODLE_OBJECT_ACCESS_LEVEL_OWNER);\n $sloodleserveraccesslevel = sloodle_get_value($current_config, 'sloodleserveraccesslevel', SLOODLE_SERVER_ACCESS_LEVEL_PUBLIC);\n \n // Define our object access level array\n $object_access_levels = array( SLOODLE_OBJECT_ACCESS_LEVEL_PUBLIC => get_string('accesslevel:public','sloodle'),\n SLOODLE_OBJECT_ACCESS_LEVEL_GROUP => get_string('accesslevel:group','sloodle'),\n SLOODLE_OBJECT_ACCESS_LEVEL_OWNER => get_string('accesslevel:owner','sloodle') );\n // Define our server access level array\n $server_access_levels = array( SLOODLE_SERVER_ACCESS_LEVEL_PUBLIC => get_string('accesslevel:public','sloodle'),\n SLOODLE_SERVER_ACCESS_LEVEL_COURSE => get_string('accesslevel:course','sloodle'),\n SLOODLE_SERVER_ACCESS_LEVEL_SITE => get_string('accesslevel:site','sloodle'),\n SLOODLE_SERVER_ACCESS_LEVEL_STAFF => get_string('accesslevel:staff','sloodle') );\n \n // Display box and a heading\n sloodle_print_box_start('generalbox boxaligncenter');\n echo '<h3>'.get_string('accesslevel','sloodle').'</h3>';\n \n // Print the object settings\n if ($show_use_object || $show_control_object) {\n \n // Object access\n echo '<b>'.get_string('accesslevelobject','sloodle').'</b><br><i>'.get_string('accesslevelobject:desc','sloodle').'</i><br><br>';\n // Use object\n if ($show_use_object) {\n echo get_string('accesslevelobject:use','sloodle').': ';\n choose_from_menu($object_access_levels, 'sloodleobjectaccessleveluse', $sloodleobjectaccessleveluse, '');\n echo '<br><br>';\n }\n // Control object\n if ($show_control_object) {\n echo get_string('accesslevelobject:control','sloodle').': ';\n choose_from_menu($object_access_levels, 'sloodleobjectaccesslevelctrl', $sloodleobjectaccesslevelctrl, '');\n echo '<br><br>';\n }\n }\n \n // Print the server settings\n if ($show_server) {\n // Server access\n echo '<b>'.get_string('accesslevelserver','sloodle').'</b><br><i>'.get_string('accesslevelserver:desc','sloodle').'</i><br><br>';\n echo get_string('accesslevel','sloodle').': ';\n choose_from_menu($server_access_levels, 'sloodleserveraccesslevel', $sloodleserveraccesslevel, '');\n echo '<br>';\n } \n \n sloodle_print_box_end();\n }", "public function showGeoAd()\n {\n }", "function instance_allow_config()\r\n\t\t{\r\n\t\t\r\n\t\t}", "public function config()\n {\n }", "function _gizra_access_rules_defaults() {\n return array(\n 'rule_sets' => array(\n 'rules_show_content' => array(\n 'arguments' => array(\n 'node' => array(\n 'label' => 'Product content',\n 'type' => 'node',\n ),\n 'account' => array(\n 'label' => 'Purchasing account',\n 'type' => 'user',\n ),\n ),\n 'label' => 'Show content',\n 'status' => 'default',\n 'categories' => array(\n 'gizra_access' => 'gizra_access',\n ),\n ),\n ),\n 'rules' => array(\n 'gizra_access_2' => array(\n '#type' => 'rule',\n '#set' => 'rules_show_content',\n '#label' => 'Add purchased user',\n '#active' => 1,\n '#weight' => '0',\n '#categories' => array(\n 'gizra_access' => 'gizra_access',\n ),\n '#status' => 'default',\n '#conditions' => array(),\n '#actions' => array(\n '0' => array(\n '#type' => 'action',\n '#settings' => array(\n 'type' => 'profile',\n '#argument map' => array(\n 'user' => 'account',\n 'profile_node' => 'profile_node',\n ),\n ),\n '#name' => 'content_profile_action_load',\n '#info' => array(\n 'label' => 'Load Purchasing account\\'s Profile',\n 'arguments' => array(\n 'user' => array(\n 'type' => 'user',\n 'label' => 'User, whose profile should be loaded',\n ),\n ),\n 'new variables' => array(\n 'profile_node' => array(\n 'type' => 'node',\n 'label' => 'Content Profile',\n ),\n ),\n 'module' => 'Content Profile',\n ),\n '#weight' => 0,\n ),\n '1' => array(\n '#weight' => 0,\n '#info' => array(\n 'label' => 'Populate Content Profile\\'s field \\'field_purchased_products\\'',\n 'arguments' => array(\n 'node' => array(\n 'type' => 'node',\n 'label' => 'Content',\n ),\n ),\n 'eval input' => array(\n '0' => 'code',\n ),\n 'module' => 'CCK',\n ),\n '#name' => 'content_rules_action_populate_field',\n '#settings' => array(\n 'field_name' => 'field_purchased_products',\n '#argument map' => array(\n 'node' => 'profile_node',\n ),\n 'value' => array(\n '0' => array(\n 'nid' => NULL,\n ),\n ),\n 'code' => 'return _gizra_access_add_purchased_products($node, $profile_node);',\n 'vars' => array(\n '0' => 'profile_node',\n '1' => 'node',\n ),\n ),\n '#type' => 'action',\n ),\n ),\n '#version' => 6003,\n ),\n 'gizra_access_1' => array(\n '#type' => 'rule',\n '#set' => 'rules_show_content',\n '#label' => 'Flag product',\n '#active' => 1,\n '#weight' => '0',\n '#categories' => array(\n 'gizra_access' => 'gizra_access',\n ),\n '#status' => 'default',\n '#conditions' => array(),\n '#actions' => array(\n '0' => array(\n '#type' => 'action',\n '#settings' => array(\n 'flag' => 'show_content',\n 'permission_check' => 0,\n '#argument map' => array(\n 'object' => 'node',\n 'flagging_user' => 'account',\n ),\n ),\n '#name' => 'flag_rules_action_flag_node',\n '#info' => array(\n 'label' => 'Flag Product content, under \"Show content\"',\n 'base' => 'flag_rules_action_flag',\n 'label callback' => 'flag_rules_action_flag_label',\n 'arguments' => array(\n 'flag' => array(\n 'type' => 'flag',\n 'label' => 'Flag',\n 'flag_type' => 'node',\n ),\n 'object' => array(\n 'type' => 'node',\n 'label' => 'Flagged content',\n ),\n 'flagging_user' => array(\n 'type' => 'user',\n 'label' => 'User on whose behalf to flag',\n 'description' => 'For non-global flags, this is the user on whose behalf to flag the object. In addition, if checked below, the access permissions to the flag are checked against this user.',\n ),\n ),\n 'module' => 'Flag',\n ),\n '#weight' => 0,\n ),\n '1' => array(\n '#weight' => 0,\n '#info' => array(\n 'label' => 'Show a configurable message on the site',\n 'module' => 'System',\n 'eval input' => array(\n '0' => 'message',\n ),\n ),\n '#name' => 'rules_action_drupal_message',\n '#settings' => array(\n 'message' => 'You can now see hidden fields.',\n 'error' => 0,\n ),\n '#type' => 'action',\n ),\n ),\n '#version' => 6003,\n ),\n ),\n );\n}", "static function plInfo()\n {\n return array(\n \"plShortName\" => _(\"Argonaut Mirror settings\"),\n \"plDescription\" => _(\"Argonaut Mirror settings\").\" (\"._(\"Services\").\")\",\n \"plIcon\" => \"plugins/argonaut/images/iconMiniMirrorConfig.png\",\n\n \"plProvidedAcls\" => parent::generatePlProvidedAcls(self::getAttributesInfo())\n );\n }", "function admin_custom_config()\n {\n $db = DataAccess::getInstance();\n\n $options = '';\n $current_currency = $this->get('currency');\n if (!$current_currency) {\n $current_currency = 'USD';\n $this->set('currency', 'USD');//default to USD\n }\n $count = 0;\n ksort(self::$_currency);\n foreach (self::$_currency as $key => $currency) {\n $selected = ($current_currency == $key) ? ' selected=\"selected\"' : '';\n $options .= \"\n\t\t\t\t<option value='$key'$selected>$key - $currency</option>\";\n }\n\n $tpl = new geoTemplate('admin');\n $tpl->assign('payment_type', self::gateway_name);\n\n $tooltips['installation_id'] = geoHTML::showTooltip('Worldpay Installation ID', 'This the id you were given by Worldpay. This id will identify a user you submit to Worldpay to collect funds from.');\n $tooltips['callback_password'] = geoHTML::showTooltip('Worldpay Callback Password', 'This is the password that you can optionally set at Worldpay to verify that Worldpay is the one returning an authorization. You can leave this field blank and the password will not be checked on any Worldpay callback procedures.');\n $tpl->assign('tooltips', $tooltips);\n\n $tpl->assign('commonAdminOptions', $this->_showCommonAdminOptions());\n\n $values['installation_id'] = geoString::specialChars($this->get('installation_id'));\n $tpl->assign('currency_options', $options);\n $values['callback_password'] = geoString::specialChars($this->get('callback_password'));\n $tpl->assign('values', $values);\n\n\n return $tpl->fetch('payment_gateways/worldpay.tpl');\n }", "static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }", "protected function setPersonalDictionaryPath() {}", "function map(string $docuri) {\n $map = [\n 'title'=> 'carte '.$this->title,\n 'view'=> ['latlon'=> [47, 3], 'zoom'=> 6],\n ];\n $map['bases'] = [\n 'cartes'=> [\n 'title'=> \"Cartes IGN\",\n 'type'=> 'TileLayer',\n 'url'=> 'https://igngp.geoapi.fr/tile.php/cartes/{z}/{x}/{y}.jpg',\n 'options'=> [ 'minZoom'=> 0, 'maxZoom'=> 18, 'attribution'=> 'ign' ],\n ],\n 'orthos'=> [\n 'title'=> \"Ortho-images\",\n 'type'=> 'TileLayer',\n 'url'=> 'https://igngp.geoapi.fr/tile.php/orthos/{z}/{x}/{y}.jpg',\n 'options'=> [ 'minZoom'=> 0, 'maxZoom'=> 18, 'attribution'=> 'ign' ],\n ],\n 'whiteimg'=> [\n 'title'=> \"Fond blanc\",\n 'type'=> 'TileLayer',\n 'url'=> 'https://visu.gexplor.fr/utilityserver.php/whiteimg/{z}/{x}/{y}.jpg',\n 'options'=> [ 'minZoom'=> 0, 'maxZoom'=> 21 ],\n ],\n ];\n $map['defaultLayers'] = ['whiteimg'];\n \n $request_scheme = isset($_SERVER['REQUEST_SCHEME']) ? $_SERVER['REQUEST_SCHEME']\n : ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS']=='on')) ? 'https' : 'http');\n foreach ($this->layers as $lyrid => $layer) {\n $overlay = [\n 'title'=> $layer['title'],\n 'type'=> 'UGeoJSONLayer',\n 'endpoint'=> \"$request_scheme://$_SERVER[SERVER_NAME]$_SERVER[SCRIPT_NAME]/$docuri/$lyrid\",\n ];\n foreach (['pointToLayer','style','minZoom','maxZoom'] as $key)\n if (isset($layer[$key]))\n $overlay[$key] = $layer[$key];\n elseif ($this->$key !== null)\n $overlay[$key] = $this->$key;\n\n $map['overlays'][$lyrid] = $overlay;\n if (isset($layer['displayedByDefault']))\n $map['defaultLayers'][] = $lyrid;\n }\n \n return new Map($map, \"$docuri/map\");\n }", "public function index()\n {\n $data_url = $this->request->query;\n\n //Obtengo los datos de la tabla\n $mapaConfig = $this->Mapconfig->find('all', [])->first();\n\n\n $action = $data_url['Accion'];\n $categoria = $data_url['Categoria'];\n\n\n $this->set('action', $action);\n $this->set('categoria', $categoria);\n $this->set('mapaConfig', $mapaConfig);\n\n }", "protected function set_accessory() {\n $this->accessory = $this->safe_find_from_id('Accessory');\n }", "public function configuracion()\n {\n $usuarioDato = new UsuarioDatoEntity();\n $usuarioDato->buscarPorPk($this->_userdata->idUser());\n\n $tarifa = new TarifasModel();\n\n $this->_view->_tarifas = $tarifa->getAll();\n\n $this->_view->_social = $usuarioDato;\n $this->_view->paneltitle = \"Configura tu cuenta\";\n $this->_view->titulo = $this->_view->getConfigure()->title;\n $this->_view->meta_descripcion = \"Sistema Perreras\";\n $this->_view->titulo_page = \"Panel principal\";\n $this->_view->renderizar(\"configuracion\", 'index');\n }", "function zarinpalwg_config() {\n $configarray = array(\n \"FriendlyName\" => array(\"Type\" => \"System\", \"Value\"=>\"زرین پال - وب گیت\"),\n \"merchantID\" => array(\"FriendlyName\" => \"merchantID\", \"Type\" => \"text\", \"Size\" => \"50\", ),\n \"Currencies\" => array(\"FriendlyName\" => \"Currencies\", \"Type\" => \"dropdown\", \"Options\" => \"Rial,Toman\", ),\n\t \"MirrorName\" => array(\"FriendlyName\" => \"نود اتصال\", \"Type\" => \"dropdown\", \"Options\" => \"آلمان,ایران,خودکار\", \"Description\" => \"چناانچه سرور شما در ایران باشد ایران دا انتخاب کنید و در غیر اینصورت آلمان و یا خودکار را انتخاب کنید\", ),\n \"afp\" => array(\"FriendlyName\" => \"افزودن کارمزد به قیمت ها\", \"Type\" => \"yesno\", \"Description\" => \"در صورت انتخاب 2.5 درصد به هزینه پرداخت شده افزوده می شود.\", ),\n );\n\treturn $configarray;\n}", "public function configuration()\n {\n if ($this->session->userdata('logged_in') == 1 && $this->session->userdata('user_type') != 'Admin') {\n redirect('home/login_page', 'location');\n }\n \n $data['body'] = \"admin/config/edit_config\";\n $data['time_zone'] = $this->_time_zone_list(); \n $data['language_info'] = $this->_language_list();\n $data[\"themes\"] = $this->_theme_list();\n $data['page_title'] = $this->lang->line('general settings');\n $this->_viewcontroller($data);\n }", "function dl_cadi_settings(){\r\n\r\n}", "protected function getConfigFormCOP()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-user\"></i>',\n 'desc' => $this->l('Ingrese la llave pública'),\n 'name' => 'KUSHKIPAGOS_PUBLIC_KEY',\n 'label' => $this->l('Public key'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-user-secret\"></i>',\n 'desc' => $this->l('Ingrese la llave privada'),\n 'name' => 'KUSHKIPAGOS_PRIVATE_KEY',\n 'label' => $this->l('Private key'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-address-card\"></i>',\n 'desc' => $this->l('Ingrese la razón social'),\n 'name' => 'KUSHKIPAGOS_RAZON_SOCIAL',\n 'label' => $this->l('Razon Social'),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Permitir transferencia'),\n 'name' => 'KUSHKIPAGOS_TRANSFER',\n 'is_bool' => true,\n 'desc' => $this->l('Usar transferencia como forma de pago'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Entorno de pruebas'),\n 'name' => 'KUSHKIPAGOS_DEV',\n 'is_bool' => true,\n 'desc' => $this->l('Usar este módulo en entorno de pruebas'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n ),\n\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n\n ),\n\n );\n }", "private static function access()\n {\n $files = ['Path', 'Url'];\n $folder = static::$root.'Access'.'/';\n\n self::call($files, $folder);\n }", "function _gizra_access_flag_default_flags() {\n$flags = array();\n// Exported flag: \"Show content\".\n$flags[] = array (\n 'content_type' => 'node',\n 'name' => 'show_content',\n 'title' => 'Show content',\n 'global' => '0',\n 'types' => \n array (\n 0 => 'product',\n ),\n 'flag_short' => 'Show privileged content',\n 'flag_long' => 'Show content for privileged users',\n 'flag_message' => '',\n 'unflag_short' => 'Hide privilged content',\n 'unflag_long' => 'Show content from non-privileged users',\n 'unflag_message' => '',\n 'unflag_denied_text' => '',\n 'link_type' => 'normal',\n 'roles' => \n array (\n 'flag' => \n array (\n ),\n 'unflag' => \n array (\n ),\n ),\n 'show_on_page' => 1,\n 'show_on_teaser' => 0,\n 'show_on_form' => 0,\n 'access_author' => '',\n 'i18n' => 0,\n 'module' => 'gizra_access',\n 'locked' => \n array (\n 0 => 'name',\n ),\n 'api_version' => 2,\n);\nreturn $flags;\n}", "protected function configurePermissions()\n {\n Jetstream::defaultApiTokenPermissions(['read']);\n\n Jetstream::role('admin', __('Yonetici'), [\n 'create',\n 'read',\n 'update',\n 'delete',\n ])->description(__('Şirket hakkındaki herşeyi yapabilir'));\n\n Jetstream::role('editor', __('İlan Yöneticisi'), [\n 'read',\n 'create',\n 'update',\n ])->description(__('Sadece ilanları yönetebilir'));\n Jetstream::role('operasyon', __('Operasyon Yöneticisi'), [\n 'read',\n 'create',\n 'update',\n ])->description(__('Sadece operasyonları yönetebilir'));\n\n }", "public function connexionAdminStructureLogin(){\n }", "protected function getImageConfiguration() {}", "function ini()\n \t{\n \t\t$this->inicializarCN();\n \t}", "function getAllAccess() {\n return ['download', 'remoteAccess', 'remoteService', 'enclave','notAvailable'];\n}", "function notation_autoriser(){}", "public function getAcl() {\n\n //throw new \\Exception(\"something\");\n\n\n\n $acl = new AclList();\n\n $acl->setDefaultAction(Acl::DENY);\n\n //Register roles\n $roles = array(\n 'users' => new Role('Users'),\n 'guests' => new Role('Guests'),\n 'operators' => new Role('Operators')\n );\n foreach ($roles as $role) {\n $acl->addRole($role);\n }\n\n //Private area resources\n $privateResources = array(\n 'report' => array('index', 'main', 'operator', 'mjump', 'network', 'statistics', 'getavgdata', 'payoutreport', 'aggSummary', 'reportbyhour', 'notworking', 'getCarrier', 'getCarrier2', 'statisticsNew', 'index2', 'statistics2', 'lpreport'),\n 'reportmb' => array('index', 'main', 'operator', 'mjump', 'network', 'statistics', 'getavgdata', 'payoutreport', 'aggSummary', 'reportbyhour', 'getCarrier', 'getCarrier2', 'statisticsNew', 'index2', 'statistics2'),\n 'operation' => array('index', 'mainstreamsourcenewname', 'getClientInfo', 'jump', 'updateCampaign', 'getCampaignLink', 'createSource', 'createAggregator', 'getAggInfo', 'link_checker', 'campaign_url', 'createCategory', 'findLatestConv', 'copySource'),\n 'slink' => array('index', 'ajaxtable', 'ajaxinsertgroup', 'ajaxgroupcombo', 'ajaxname', 'ajaxclone', 'ajaxdelete', 'ajaxupdatecell', 'ajaxdeleterow', 'ajaxclonerow', 'ajaxinsertmgroup', 'set_country', 'unset_country'),\n 'smlink' => array('index', 'ajaxtable', 'ajaxinsertgroup', 'ajaxgroupcombo', 'ajaxname', 'ajaxclone', 'ajaxdelete', 'ajaxupdatecell', 'ajaxdeleterow', 'ajaxclonerow', 'ajaxinsertmgroup'),\n 'affiliate' => array('index', 'removeAffiliation', 'updatePayout', 'newAffiliation'),\n 'isp' => array('index', 'get_groups', 'get_group', 'create_group', 'create_isp', 'delete_isp'),\n 'mainstream' => array('index', 'main', 'getCountriesWithDomainid', 'getAllCategories', 'getNjumps', 'getMainstreamHistory', 'saveNewRow'),\n 'mainstreambulk' => array('index', 'gallery', 'updateBannerId', 'insertbanners', 'editbanner', 'searchbanners', 'createBulk', 'editBulk', 'cloneBulk', 'downloadZip', 'tableBulk', 'getNjump', 'getCountry', 'getSources', 'getBulk', 'getBanners', 'downloadXlsx'),\n 'alert' => array('index', 'getSourcesAlerts', 'getClientsAlerts', 'getCountriesAlerts', 'getTablesAlerts', 'newAlert', 'editAlert', 'editTables', 'removeAlert', 'newCountryAlert', 'newAggAlert', 'newSrcAlert', 'getSourceTypeAlerts', 'newSourceTypeAlert'),\n 'invest' => array('index', 'upload', 'report', 'setfilter', 'campaigns', 'getReportExcel', 'totalsRow'),\n 'security' => array('index', 'deletei'),\n 'google' => array('index', 'downloadreport', 'addgooglesource'),\n 'vuclipsreport' => array('index', 'addOne', 'removeOne', 'editOne'),\n 'integration' => array('index', 'save_agregator', 'save_source', 'get_excel', 'report_conversion', 'save_user', 'save_domain', 'delete_domain', 'new_domain', 'get_clicksInfo', 'setEditClicks', 'reverse_multiclick', 'save_risqiq', 'delete_risqiq'),\n 'dashboard' => array('index', 'last7Days', 'percentageShift'),\n 'ticketing' => array('index', 'createTicket', 'editTicket'),\n 'jump' => array('index', 'uploadCsv'),\n 'crm' => array('index', 'getClient', 'createClient', 'editClient', 'getClients', 'last7Days'),\n 'autobid' => array('index', 'addcampaign', 'editcampaign', 'deletecampaign', 'refreshTable', 'downloadReport', 'addAccount', 'resetpass'),\n 'ip' => array('index', 'getIps', 'getCustomIPs', 'getcarriers', 'getclientips', 'testphalconshit', 'addNewCarrier', 'addNewCountry'),\n 'freporting' => array('index', 'upload', 'setFilter', 'updateComment', 'downloadCsv', 'getChart', 'uploadMultiAgg', 'getAffs', 'getAggs'),\n 'sourcesapi' => array('index', 'downloadReport'),\n 'permission' => array('index', 'countries', 'srcagr', 'updatecountry', 'updateAgregators', 'updateSources'),\n 'customreport' => array('index', 'getAttributes', 'savecustomreport', 'createcustom', 'getMyCustomReports', 'echoReport', 'deleteSavedReport', 'downloadReport'),\n 'campaignblocker' => array('index', 'getAffected', 'executeblock', 'executerestore', 'getcampaigns', 'executetemprestore', 'blockbyname'),\n 'rates' => array('index', 'getRateThreeMonths'),\n 'offerpack' => array('index', 'getDims', 'getCarriers', 'newOfferpack', 'newOfferpack2', 'offerpackedit', 'getCarriersMultiple', 'getCampaignJumpName', 'setFilter', 'updateCpa', 'addOffersExcel', 'disableOffer', 'getScreenshot', 'getBanners', 'getCM', 'getAccount', 'deletebanner', 'deletescreenshot', 'getofferinfo', 'updateStatus', 'index2', 'offerpackedit2', 'setFilter2'),\n 'ticketsystem' => array('index', 'editTicket', 'createTicket', 'getUsersMultiple', 'create_ticket', 'sendMessage', 'refreshChat', 'downloadFile', 'uploadFile', 'edit_ticket', 'pickTicket', 'closeTicket', 'reopenTicket', 'setFilter', 'downloadExcel'),\n 'ticketsystem2' => array('index', 'editTicket', 'createTicket', 'getUsersMultiple', 'create_ticket', 'sendMessage', 'refreshChat', 'downloadFile', 'uploadFile', 'edit_ticket', 'pickTicket', 'closeTicket', 'reopenTicket', 'setFilter', 'downloadExcel', 'editticket_itsdes', 'editTicket', 'sendToValidation', 'putOnHold', 'putInProgress', 'refuse', 'request', 'assign', 'ticketok', 'ticketnotok', 'closeticket', 'infosent', 'reopenticket', 'changeDeadline'),\n 'njump' => array('index', 'changeGlobalName', 'getStatistics', 'favoriteNjump', 'getNjumps', 'getnjump', 'newnjump', 'njumpedit', 'njumpclone', 'njumpdelete', 'njumpdeleterow', 'njumpnewrow', 'updatecell', 'njumpsortby', 'indexm', 'njumpeditm', 'mreset', 'getnjumpsbycountry', 'njumpclonemultiplelines', 'njumpdeletemultiplerow'),\n 'landingmanager' => array('index', 'createeditlp', 'getDims', 'setFilter', 'getlpinfo', 'newEditLp', 'getFilters', 'getOfferByGeo', 'insertNewLp', 'newlp', 'getLpInformation', 'saveLp', 'deleteLp', 'viewlp', 'getLpInformationView'),\n 'admin' => array('index', 'displayAgregators', 'removeAgregators', 'removeCountries', 'addAgregators', 'getAllAgregatorsUsers', 'displayCountries', 'getAllCountriesUsers', 'addCountries'),\n 'client' => array('index', 'searchAll', 'getData', 'searchData', 'createClient', 'saveClient', 'updateClient', 'getClientUpdated', 'getTotalRows', 'hideClient', 'getGraphData', 'chatSave', 'getHistoryInfo', 'getIssueInfo'),\n 'sales' => array('index', 'getData', 'createExcel', 'getCarriers')\n );\n foreach ($privateResources as $resource => $actions) {\n $acl->addResource(new Resource($resource), $actions);\n }\n //operation area resources\n $operationResources = array(\n 'operation' => array('index', 'jump', 'updateCampaign', 'getCampaignLink', 'createSource', 'createAggregator', 'getAggInfo', 'link_checker', 'campaign_url', 'createCategory', 'findLatestConv', 'copySource'),\n 'report' => array('index', 'statistics', 'getavgdata', 'aggSummary', 'getCarrier', 'index2', 'statistics2', 'getCarrier2'),\n 'reportmb' => array('index', 'statistics', 'getavgdata', 'aggSummary', 'getCarrier', 'index2', 'statistics2', 'getCarrier2'),\n 'security' => array('index', 'deletei'),\n 'mainstream' => array('index', 'main', 'getCountriesWithDomainid', 'getAllCategories', 'getNjumps', 'getMainstreamHistory', 'saveNewRow'),\n 'mainstreambulk' => array('index'),\n 'vuclipsreport' => array('index', 'addOne', 'removeOne', 'editOne'),\n 'integration' => array('index', 'save_agregator', 'save_source', 'get_excel', 'report_conversion', 'save_user', 'save_domain', 'delete_domain', 'new_domain', 'get_clicksInfo', 'setEditClicks', 'reverse_multiclick', 'save_risqiq', 'delete_risqiq'),\n 'dashboard' => array('index', 'chartinfo', 'reportbyhour', 'percentageShift', 'last7Days', 'getRateThreeMonths'),\n 'ticketing' => array('index', 'createTicket', 'editTicket'),\n 'jump' => array('index', 'uploadCsv'),\n 'crm' => array('index', 'getClient', 'createClient', 'editClient', 'getClients', 'last7Days'),\n 'autobid' => array('index', 'addcampaign', 'editcampaign', 'deletecampaign', 'refreshTable', 'downloadReport', 'addAccount', 'resetpass'),\n 'ip' => array('index', 'getIps', 'getCustomIPs', 'getcarriers', 'getclientips', 'addNewCarrier', 'addNewCountry'),\n 'freporting' => array('index', 'upload', 'setFilter', 'updateComment', 'downloadCsv', 'getChart', 'uploadMultiAgg', 'getAffs', 'getAggs'),\n 'sourcesapi' => array('index', 'downloadReport'),\n 'rates' => array('index', 'getRateThreeMonths'),\n 'offerpack' => array('index', 'getDims', 'getCarriers', 'newOfferpack', 'offerpackedit', 'getCarriersMultiple', 'getCampaignJumpName', 'setFilter', 'updateCpa', 'addOffersExcel', 'disableOffer', 'getScreenshot', 'getBanners', 'getCM', 'getAccount', 'deletebanner', 'deletescreenshot', 'getofferinfo', 'updateStatus', 'index2', 'offerpackedit2', 'setFilter2'),\n 'ticketsystem' => array('index', 'editTicket', 'createTicket', 'getUsersMultiple', 'create_ticket', 'sendMessage', 'refreshChat', 'downloadFile', 'uploadFile', 'edit_ticket', 'pickTicket', 'closeTicket', 'reopenTicket', 'setFilter', 'downloadExcel'),\n 'ticketsystem2' => array('index', 'editTicket', 'createTicket', 'getUsersMultiple', 'create_ticket', 'sendMessage', 'refreshChat', 'downloadFile', 'uploadFile', 'edit_ticket', 'pickTicket', 'closeTicket', 'reopenTicket', 'setFilter', 'downloadExcel', 'editticket_itsdes', 'editTicket', 'sendToValidation', 'putOnHold', 'putInProgress', 'refuse', 'request', 'assign', 'ticketok', 'ticketnotok', 'closeticket', 'infosent', 'reopenticket', 'changeDeadline'),\n 'njump' => array('index'),\n 'campaignblocker' => array('index', 'getAffected', 'executeblock', 'executerestore', 'getcampaigns'),\n 'landingmanager' => array('index', 'createeditlp', 'getDims', 'setFilter', 'getlpinfo', 'newEditLp', 'getFilters', 'getOfferByGeo', 'insertNewLp', 'newlp', 'getLpInformation', 'saveLp', 'deleteLp', 'viewlp', 'getLpInformationView'),\n 'admin' => array('index', 'displayAgregators', 'removeAgregators', 'removeCountries', 'addAgregators', 'getAllAgregatorsUsers', 'displayCountries', 'getAllCountriesUsers', 'addCountries'),\n 'client' => array('index', 'searchAll', 'getData', 'searchData', 'createClient', 'saveClient', 'updateClient', 'getClientUpdated', 'getTotalRows', 'hideClient', 'getGraphData', 'chatSave', 'getHistoryInfo', 'getIssueInfo'),\n 'sales' => array('index', 'getData', 'createExcel', 'getCarriers')\n );\n foreach ($operationResources as $resource => $actions) {\n $acl->addResource(new Resource($resource), $actions);\n }\n\n //Public area resources\n $publicResources = array(\n 'index' => array('index'),\n 'errors' => array('show404', 'show500'),\n 'session' => array('index', 'register', 'start', 'end'),\n 'offerpack' => array('getzip')\n );\n foreach ($publicResources as $resource => $actions) {\n $acl->addResource(new Resource($resource), $actions);\n }\n\n //Grant access to public areas to both users and guests\n foreach ($roles as $role) {\n foreach ($publicResources as $resource => $actions) {\n $acl->allow($role->getName(), $resource, '*');\n }\n }\n\n //Grant acess to private area to role Users\n foreach ($privateResources as $resource => $actions) {\n foreach ($actions as $action) {\n $acl->allow('Users', $resource, $action);\n }\n }\n //Grant acess to operations area to role Operations\n foreach ($operationResources as $resource => $actions) {\n foreach ($actions as $action) {\n $acl->allow('Operators', $resource, $action);\n }\n }\n\n //The acl is stored in session, APC would be useful here too\n $this->persistent->acl = $acl;\n\n\n return $this->persistent->acl;\n }", "function ieconfig_autoriser(){}", "private function metodo_privado() {\n }", "public function oneto50kAction(){\r\n\tif($this->_getParam('id',false)){\r\n\t$gazetteers = new Osdata();\r\n\t$this->view->gazetteer = $gazetteers->getGazetteer($this->_getParam('id'));\t\r\n\t} else {\r\n\t\tthrow new Pas_Exception_Param($this->_missingParameter);\t\r\n\t}\r\n\t}", "function xanthia_admin_config()\n{\n\n\t/** Security check - important to do this as early as possible to avoid\n\t * potential security holes or just too much wasted processing. For the\n\t * main function we want to check that the user has at least edit privilege\n\t * for some item within this component, or else they won't be able to do\n\t * anything and so we refuse access altogether. The lowest level of access\n\t * for administration depends on the particular module, but it is generally\n\t * either 'edit' or 'delete'\n\t */\n\tif (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n \t}\n\n\t// Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\n // Load admin API\n\tif (!pnModAPILoad('Xanthia', 'admin')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\n\t// Create output object - this object will store all of our output so that\n\t// we can return it easily when required\n\t$pnRender =& new pnRender('Xanthia');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n // Visual Block Editor\n $pnRender->assign('vba', pnModGetVar('Xanthia', 'vba'));\n \n if (file_exists(\".htaccess\")){ \n\t $pnRender->assign('htaccess', 1); \n } else {\n \t$pnRender->assign('htaccess', 0); \n } \n\n\t// Short urls\n $pnRender->assign('shorturls', pnModGetVar('Xanthia', 'shorturls'));\n\n\t// Short urls\n $pnRender->assign('shorturlsextension', pnModGetVar('Xanthia', 'shorturlsextension'));\n\n // Enable Cache\n $pnRender->assign('enablecache', pnModGetVar('Xanthia', 'enablecache'));\n\n\t// modules not to cache for\n\t$pnRender->assign('modulesnocache', pnModGetVar('Xanthia', 'modulesnocache'));\n\n // Cache templates to Database\n $pnRender->assign('db_cache', pnModGetVar('Xanthia', 'db_cache'));\n \n // Compile Templates to Database (not active yet)\n $pnRender->assign('db_compile', pnModGetVar('Xanthia', 'db_compile'));\n\n // Check for new version of template\n $pnRender->assign('compile_check', pnModGetVar('Xanthia', 'compile_check'));\n\n // Force Check for new version of template\n $pnRender->assign('force_compile', pnModGetVar('Xanthia', 'force_compile'));\n \n // Cache Time\n $pnRender->assign('cache_lifetime', pnModGetVar('Xanthia', 'cache_lifetime'));\n\n // Base Caching on Database Updates\n $pnRender->assign('use_db', pnModGetVar('Xanthia', 'use_db'));\n\n // Use Database for Templates\n $pnRender->assign('db_templates', pnModGetVar('Xanthia', 'db_templates'));\n\n // use of whitespace output filter\n\t$pnRender->assign('trimwhitespace', pnModGetVar('Xanthia', 'trimwhitespace'));\n\n // Return the output that has been generated by this function\n if (ereg('0.8', _PN_VERSION_NUM)) {\n return $pnRender->fetch('xanthiaadminconfig.htm');\n\t} else {\n return $pnRender->fetch('xanthiaadmin726config.htm');\n\t}\n}", "function configure()\n\t{\n\n\t\t$this->setMetaData('provider',\n\t\t\tarray(\n\t\t\t\t'Name' =>\n\t\t\t\t\t'Natural History Museum', \n\t\t\t\t'Implementation'=>\n\t\t\t\t\t'KE Software EMu, \n\t\t\t\t\tPHP KE EMu DiGIR Interface',\n\t\t\t\t'AccessPoint' => 'default',\n\t\t\t)\n\t\t);\n\t\t$this->setMetaData('host',\n\t\t\tarray(\n\t\t\t\t'Name' =>\n\t\t\t\t\t'Natural History Museum (NHM)',\n\t\t\t\t'Code' => 'NHM',\n\t\t\t\t'RelatedInformation' =>\n\t\t\t\t\t'',\n\t\t\t\t'Abstract' =>\n\t\t\t\t\t'Data provider via EMu/DiGIR',\n\t\t\t)\n\t\t);\n\n\t\t// add contacts to host\n\t\t$this->setMetaData('host contact',\n\t\t\tarray(\n\t\t\t\t'Type' => 'Administrative',\n\t\t\t\t'Name' => '',\n\t\t\t\t'Title' => '',\n\t\t\t\t'Email' => '',\n\t\t\t\t'Phone' => '',\n\t\t\t)\n\t\t);\n\n\t\t$this->setMetaData('host contact',\n\t\t\tarray(\n\t\t\t\t'Type' => 'Technical',\n\t\t\t\t'Name' => '',\n\t\t\t\t'Title' => '',\n\t\t\t\t'Email' => '',\n\t\t\t\t'Phone' => '',\n\t\t\t)\n\t\t);\n\n\t\t // add a resource\n\t\t$this->setMetadata('resource',\n\t\t\tarray(\n\t\t\t\t'Name' => 'NHM Collections',\n\t\t\t\t'Code' => 'NhmEMu',\n\t\t\t\t'RelatedInformation' => \n\t\t\t\t\t'',\n\t\t\t\t'Abstract' =>\n\t\t\t\t\t'',\n\t\t\t\t'Keywords' => '',\n\t\t\t\t'Citation' \n\t\t\t\t\t=> 'Not for publication - test data only',\n\t\t\t\t'UseRestrictions' \n\t\t\t\t\t=> '',\n\t\t\t\t'ConceptualSchema' \n\t\t\t\t\t=> 'http://digir.net/schema/conceptual/darwin/2003/1.0',\n\t\t\t\t'SchemaLocation' \n\t\t\t\t\t=> 'http://digir.sourceforge.net/schema/conceptual/darwin/full/2003/1.0/darwin2full.xsd',\n\t\t\t\t'RecordIdentifier' => 'NhmEMu',\n\t\t\t\t'RecordBasis' => '',\n\t\t\t\t'NumberOfRecords' => '23',\n\t\t\t\t'DateLastUpdated' => '1970-01-01 00:00:00.00Z',\n\t\t\t\t'MinQueryTermLength' => '0',\n\t\t\t\t'MaxSearchResponseRecords' => '1000',\n\t\t\t\t'MaxInventoryResponseRecords' => '1000',\n\t\t\t)\n\t\t);\n\n\t\t// add any contacts to this resource\n\t\t$this->setMetaData('resource contact',\n\t\t\tarray(\n\t\t\t\t'Type' => 'Administrative',\n\t\t\t\t'Name' => '',\n\t\t\t\t'Title' => '',\n\t\t\t\t'Email' => '',\n\t\t\t\t'Phone' => '',\n\t\t\t)\n\t\t);\n\t\t$this->setMetaData('resource contact',\n\t\t\tarray(\n\t\t\t\t'Type' => 'Technical',\n\t\t\t\t'Name' => '',\n\t\t\t\t'Title' => '',\n\t\t\t\t'Email' => '',\n\t\t\t\t'Phone' => '',\n\t\t\t)\n\t\t);\n\n\n\t\t// if any simple mappings - specify them here - if here then\n\t\t// not required to write specific translation code for them in\n\t\t// generateValue or generateTexql methods \n\t\t// (these should mostly be purpose built darwin fields in\n\t\t// catalogue)\n\n\t\t$this->setSimpleMapping('Kingdom','DarKingdom');\n\t\t$this->setSimpleMapping('Phylum','DarPhylum');\n\t\t$this->setSimpleMapping('Class','DarClass');\n\t\t$this->setSimpleMapping('Order','DarOrder');\n\t\t$this->setSimpleMapping('Family','DarFamily');\n\t\t$this->setSimpleMapping('Genus','DarGenus');\n\t\t$this->setSimpleMapping('Species','DarSpecies');\n\t\t$this->setSimpleMapping('Subspecies','DarSubspecies');\n\t\t$this->setSimpleMapping('ScientificName','DarScientificName');\n\t\t$this->setSimpleMapping('TypeStatus','DarTypeStatus');\n\t\t$this->setSimpleMapping('IdentifiedBy','DarIdentifiedBy');\n\t\t$this->setSimpleMapping('Collector','DarCollector');\n\t\t$this->setSimpleMapping('Country','DarCountry');\n\t\t$this->setSimpleMapping('StateProvince','DarStateProvince');\n\t\t$this->setSimpleMapping('County','DarCounty');\n\t\t$this->setSimpleMapping('CatalogNumber','DarCatalogNumber');\n\t\t$this->setSimpleMapping('Locality','DarLocality');\n\t\t$this->setSimpleMapping('Latitude','DarLatitude');\n\t\t$this->setSimpleMapping('Longitude','DarLongitude');\n\t\t// any fields NOT specified above should be coded into localised\n\t\t// generateValue and generateTexql methods\n\t\t\n\t}", "public function configure()\n {\n $this->setMethod('GET');\n $this->setFunctionPath('/Api/clusterGetServerStatus');\n $this->setParser(new \\ZendService\\ZendServerAPI\\Adapter\\ServersList());\n }", "private function acl()\n {\n\n $this->acl = [\n '1' =>\n [\n 'admin', 'users', 'providers', 'category', 'farmIndex', 'products', 'questions', 'clients', 'category',\n 'bills', 'orders', 'reports', 'subcategoriesQuery','featuresQuery', 'showUser', 'validateProvider', 'newProduct',\n\n 'agentsGet', 'editProduct', 'deleteProduct', 'updateProduct','newUserAdmin','user',\n 'budgetShow', 'indexProfile', 'userUpdate', 'productAgentPreview', 'productDetailPreview','validateProduct',\n 'payPlan', 'searchUser', 'category', 'products', 'products', 'adminEditProduct', 'farmCategories.create', 'farms.create',\n 'viewProduct'\n\n ],\n '2' =>\n [\n 'admin', 'users', 'providers', 'category', 'farmIndex', 'clients', 'bills',\n 'orders', 'subcategoriesQuery','featuresQuery','agentsGet','newUserAdmin','user', 'indexProfile',\n 'userUpdate', 'payPlan','searchUser',\n 'viewProduct'\n ],\n '3' =>\n [\n 'admin', 'products', 'questions', 'orders', 'registerProvider', 'isValidateProviders', 'questions',\n 'subcategoriesQuery','featuresQuery', 'newProduct', 'insertProvider', 'questionDetail', 'questionNew',\n 'editProduct', 'deleteProduct', 'updateProduct', 'indexProfile','orderShowProvider','updateStateOrder',\n 'productDetailPreview','payPlan', 'productDetailPreview','pay','historyPay', 'inactivePlan', 'callProducts',\n 'newProductProvider', 'updateProductProvider', 'providerUpdate', 'viewProduct','updateStateOrderProvider'\n ],\n\n '4' =>\n [\n 'admin', 'bills', 'orders', 'reports', 'questions', 'questionDetail', 'questionNew',\n 'clientInformationIndex', 'clientInformationStore', 'indexProfile', 'userUpdate','budgetShow','downloadBudget',\n 'orderShow', 'payPlan'\n\n ],\n '5' =>\n [\n 'admin', 'providers', 'clients', 'reports', 'showUser', 'validateProvider', 'indexProfile', 'userUpdate',\n 'productAgentPreview', 'productDetailPreview' , 'validateProduct', 'NotifyIsActive','NotifyAll', 'payPlan',\n 'viewProduct'\n ],\n '6' =>\n [\n 'admin', 'reports', 'indexProfile', 'userUpdate', 'payPlan'\n ],\n ];\n }", "function before_edit_configuration() { }", "function HookResourceConnectAllGenerate_collection_access_key($collection,$k,$userref,$feedback,$email,$access,$expires)\n\t{\n\t$c=sql_value(\"select count(*) value from collection_resource where collection='$collection'\",0);\n\tif ($c>0) {return false;} # Contains resources, key already present\n\t\n\tsql_query(\"insert into external_access_keys(resource,access_key,collection,user,request_feedback,email,date,access,expires) values (-1,'$k','$collection','$userref','$feedback','\" . escape_check($email) . \"',now(),$access,\" . (($expires==\"\")?\"null\":\"'\" . $expires . \"'\"). \");\");\n\t\n\t}", "public function show(Konfigurasi $konfigurasi)\n {\n //\n }", "public\n function show(Kardex $kardex)\n {\n //\n }", "function getAuthMapping(){\n return [\n 'none'=>['dbgap','pdb','geo','lincs','gemma',\n 'arrayexpress','sra','bioproject','dryad',\n 'cvrg','neuromorpho','peptideatlas','cia','mpd',\n 'openfmri','nursadatasets','physiobank','proteomexchange',\n 'yped','cil','gdc','swissprot','retina','emdb','epigenomics',\n 'nitrcir','neurovaultatlases','neurovaultcols','neurovaultnidm',\n 'rgd','datacitebgi','datacitemorphobank','vectorbase','datacitegnd',\n 'datacitepeerj','datacitezenodo','omicsdi','datacitesbgrid','simtk',\n 'datacitecxidb','datacitebils','dataciteada','dataciteukda','dataciteadaptive',\n 'datacitemit','datacitectsi','datacitefdz','datacitembf','datacitenimh','datacitejhu',\n 'datacitecandi','datacitelshtm','datacitedatabrary','immport','datacitesdscsg','datacitecrcns',\n 'nsrr','lsdb','naturedata','genenetwork','datacitethieme','datacitefigshare','dataciteccdc','wormbase',\n 'gtexldacc','metabolomics'#'clinicaltrials','clinvar'\n ],\n 'clickLicense'=>['dataverse'],\n 'registration'=>['niddkcr','cil','icpsr','gdc'],#'ctn',\n 'duaIndividual'=>['ndarpapers'],\n 'duaInstitution'=>['ndarpapers']\n ];\n}", "public function setAcl()\n {\n Zend_Registry::set('acl',$this->acl);\n }", "function _gizra_access_strongarm() {\n $export = array();\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'content_profile_use_profile';\n $strongarm->value = 1;\n\n $export['content_profile_use_profile'] = $strongarm;\n return $export;\n}", "public function frontend_configuration()\n {\n if ($this->session->userdata('logged_in') == 1 && $this->session->userdata('user_type') != 'Admin') {\n redirect('home/login_page', 'location');\n }\n \n $data['body'] = \"admin/config/frontend_config\";\n $data['time_zone'] = $this->_time_zone_list(); \n $data['language_info'] = $this->_language_list();\n $data['page_title'] = $this->lang->line('front-end settings');\n $this->_viewcontroller($data);\n }", "public function connect(){\n $ks = Yii::$app->keyStorage;\n $session = Yii::$app->session;\n //var_dump(Yii::$app->request->get());\n\n // discovery document\n try {\n $discoveryDocument = json_decode(file_get_contents($this->discoveryDocumentUrl), true);\n }\n catch (Exception $e){\n throw new Exception(\"Internet connection problem: \" . $e->getMessage());\n }\n\n // ready the params, just for readability\n\n //სადაც იგზავნება GET პირველ ნაბიჯზე. discovery document-დან მომაქვს\n $authRequestUrl = $discoveryDocument['authorization_endpoint']; //$configs['authorizationRequestUrl'];\n //სადაც იგზავნება POST მეორე ნაბიჯზე, ესეც discovery document-დან მომაქვს\n $tokenEndPointUrl = $discoveryDocument['token_endpoint']; //$configs['tokenEndPointUrl'];\n\n $redirectUri = Yii::getAlias('@frontendUrl') . $ks->get('quickbooks.redirect-url');\n\n // დოკუმენტაციაში წერია, რომ QBO-ს მიმდინარე ვერსიისათვის ყოველთვის იქნება code, მაინც გავიტანე ცვლადში,\n // თუ ოდესმე შეიცვლება, მარტივად მივაგნებ\n $responseType = 'code';\n\n //დოკუმენტაციის მიხედვით აქ უნდა იყოს authorization_code\n $grantType= 'authorization_code';\n\n //თუ არ მოყვა code ესე იგი oauth2-ის პირველ ნაბიჯზე ვარ\n $code = Yii::$app->request->get('code');\n if (!$code)\n {\n //სესიაში შევინახოთ state მეორე ნაბიჯზე მოსულთან შესადარებლად\n $session->set('oauth_state', rand());\n\n $authUrl = $discoveryDocument['authorization_endpoint'] . '?client_id=' . $this->clientId .\n '&response_type=' . $responseType . '&scope=' . $this->oauthScope . '&redirect_uri=' .\n $redirectUri . '&state=' . $session->get('oauth_state');\n header(\"Location: \".$authUrl);\n exit();\n }\n //თუ მოყვა code ესე იგი oauth2-ის მეორე ნაბიჯზე ვარ\n else\n {\n //ამოვიღოთ state და შევადაროთ სესიაში შენახულს, თუ არ დაემთხვა, ესე იგი რაღაცა ნიტოა\n if(strcmp($session->get('oauth_state'), $_GET['state']) != 0){\n throw new Exception(\"The state is not correct from Intuit Server. Consider your app is hacked.\");\n }\n\n // POST and wait for JSON response\n $curl = curl_init();\n $header = [\n 'Accept: application/json',\n 'Authorization: Basic ' . base64_encode($this->clientId . ':' . $this->clientSecret),\n 'Content-Type: application/x-www-form-urlencoded'\n ];\n curl_setopt_array($curl, [\n CURLOPT_POST => 1,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_URL => $tokenEndPointUrl,\n CURLOPT_POSTFIELDS => http_build_query([\n 'grant_type' => $grantType,\n 'code' => $code,\n 'redirect_uri' => $redirectUri\n ]),\n CURLOPT_HTTPHEADER => $header\n ]);\n $result = curl_exec($curl);\n // check for errors, just in case\n if ($curl_error = curl_error($curl)) {\n throw new Exception($curl_error);\n } else {\n $result = json_decode($result, true);\n }\n curl_close($curl);\n\n // მიღებული ტოკენების შენახვა ბაზაში, key_storage_item ცხრილში\n $ks->set('quickbooks.access-token', $result['access_token']);\n $ks->set('quickbooks.access-token-expires-in', $result['expires_in']);\n $ks->set('quickbooks.refresh-token', $result['refresh_token']);\n $ks->set('quickbooks.refresh-token-expires-in', $result['x_refresh_token_expires_in']);\n $ks->set('quickbooks.realm-id', $_GET['realmId']);\n\n // quickbooks connected, no need to display that message\n $ks->set('quickbooks.need-connect', \"\");\n\n //დავხუროთ CONNECT-ზე დაჭერით ამომხტარი ავტორიზაციის ფანჯარა\n echo '<script type=\"text/javascript\">\n // refresh davakomentare, cross-originebis da sxva rameebis gamo jobia im fanjaras\n // postMessage mivce da tviton mixedos tavs\n //window.opener.location.href = window.opener.location.href;\n window.opener.postMessage(\"success\", \"*\");\n window.close();\n </script>';\n }\n }", "function simpleLayerKML($ar){\n $p = new XParam($ar, array('tplentry'=>'br', 'kml'=>0));\n $tpl = $p->get('tplentry');\n $layeroid = $p->get('layeroid');\n $template = $p->get('template');\n $kml = $p->get('kml');\n // lecture de la description de la carte\n $modmap = $this->xset->rdisplay($layeroid);\n if (!is_array($modmap)){\n XLogs::critical(get_class($this), get_class($this).\"::simpleLayerKML layer not found {$layeroid}\");\n return array('Could not find layeroid '.$layeroid);\n }\n // browse sur le module associé avec la clause where specifiée\n //\n $mod = XModule::objectFactory($modmap['ormoid']->raw);\n if (!empty($modmap['orfilter']->raw)){\n $select = $mod->xset->select_query().' and '.$modmap['orfilter']->raw;\n } else {\n $select = '';\n }\n $br = $mod->browse(array('_options'=>array(),\n\t\t\t 'tplentry'=>TZR_RETURN_DATA,\n\t\t\t 'selectedfields'=>'all',\n\t\t\t 'first'=>0,\n\t\t\t 'select'=>$select,\n\t\t\t 'pagesize'=>9999));\n $places = array();\n $fname = $modmap['ofname']->raw;\n foreach($br['lines_oid'] as $i=>$lineoid){\n $coords = $br['lines_o'.$fname][$i]->raw;\n list($lat, $lng, $type, $acc, $upd) = explode(';', $coords);\n $aplace = $this->getPlace($i, $mod, $br, $modmap);\n if (!empty($lat) && !empty($lng)){\n\t$aplace['valid'] = true;\n } else {\n\t$aplace['valid'] = false;\n }\n $places[] = array('oid'=>$lineoid,\n\t\t\t'latlng'=>$lng.','.$lat,\n\t\t\t'name'=>$aplace['name'],\n\t\t\t'valid'=>$aplace['valid'],\n\t\t\t'description'=>$aplace['descr']);\n unset($aplace);\n }\n $ret = array('places'=>$places,\n\t\t 'browse'=>$br,\n\t\t 'modmap'=>$modmap);\n if (!empty($kml)){\n $xt = new XTemplate('file://'.TZR_SHARE_DIR.'xmodmap/simplekml.xml');\n $r3=array();\n $tpldata['br']=$ret;\n $content=$xt->parse($tpldata,$r3,NULL);\n $filename = cleanFileName($modmap['name'].'.kml');\n header('Content-Name: '.$filename);\n header('Content-type: application/vnd.google-earth.kml+xml');\n header('Content-disposition: attachment; filename='.$filename);\n echo($content);\n exit(0); \n } else if ($tpl == TZR_RETURN_DATA){\n return $ret;\n } else if (empty($template)){\n // on genere le kml avec xmodmap/simplelayerkml.xml\n $xt = new XTemplate('file://'.TZR_SHARE_DIR.'xmodmap/simplelayerkml.xml');\n $r3=array();\n $tpldata['br']=$ret;\n $content=$xt->parse($tpldata,$r3,NULL);\n header('Content-type: text/xml');\n header('Content-disposition: inline');\n echo($content);\n exit(0); \n } else {\n XShell::toScreen1('br', $ret);\n }\n }", "public function connect()\r\n\t{\r\n\t\t$wsoOpts = get_option(WSO_OPTIONS);\r\n\t\t\r\n\t\t$wsoOpts[$this->m_options['access_token']] = $_GET['fbt'];\r\n\t\t$wsoOpts[$this->m_options['pages_access_token']] = array('me' => $_GET['fbt']);\r\n\t\t\r\n\t\t$opts = array();\r\n\t\t$opts[self::WSO_OPT_PICTURE] = 1;\r\n\t\t$types = wso_get_post_types();\r\n\t\t$idx = self::WSO_OPT_START_CUSTOM_TYPE;\r\n\t\tforeach($types as $type => $label)\r\n\t\t{\r\n\t\t\t$opts[$idx++] = ($idx == self::WSO_OPT_START_CUSTOM_TYPE+1) ? 1 : 0;\r\n\t\t}\r\n\t\t$wsoOpts[$this->m_options['options']] = implode('|', $opts);\r\n\t\t\t\t\r\n\t\tupdate_option(WSO_OPTIONS, $wsoOpts);\r\n\t\twp_redirect(get_bloginfo('wpurl').\"/wp-admin/options-general.php?page=wordsocial\");\r\n\t}", "function egsr_staff_cap(){\n \n return Array ( \n 'read' => true,\n );\n}", "function __getPrivacyConfig(){\n\t\t$privacy['Asset'][519]=\"<b>Public</b> - are publicly listed and visible to anyone.\";\n\t\t$privacy['Asset'][71]=\"<b>Members only </b> - are NOT publicly listed, and are visible only when shared in Groups or Events, and only by Group members.\";\n\t\t$privacy['Asset'][7]=\"<b>Private</b> - are NOT publicly listed and visible only to me.\";\n\n\t\t// TODO: possibly redundant? isn't it set in Asset????\n\t\t$privacy['Groups'][519]=\"Public - are visible to anyone.\";\n\t\t$privacy['Groups'][79]=\"Members only - visible to all common members.\";\n\t\t$privacy['Groups'][7]=\"Private - visible only to designated Admins.\";\n\n\t\t$privacy['SecretKey'][1]=\"Members - are visible to all site members.\";\n\t\t$privacy['SecretKey'][2]=\"Admins - are visible only to Owners and Admins \";\n\t\t$privacy['SecretKey'][4]=\"Nobody - disable Secret Key sharing\";\n\t\treturn $privacy;\n\t}", "public function kp()\n\t{\n\t\t$data['judul'] = 'Daftar Kenaikan Pangkat';\n\t\t$data['login'] = $this->session->userdata('login');\n\t\t$data['pegawai'] = $this->Pegawai_model->getAllpegawai();\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('templates/nav', $data);\n\t\t$this->load->view('admin/kp/index', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "public function localConfig();", "function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Configuracion',$k,$v); }", "private function _init() {\n\n global $admin_settings;\n global $payment_list;\n\n new KP_Korapay_Shortcode;\n\n $admin_settings = KP_Korapay_Admin_Settings::get_instance();\n $payment_list = KP_Korapay_Payment_List::get_instance();\n\n if ( is_admin() ) {\n KP_Tinymce_Plugin::get_instance();\n }\n\n if ($admin_settings->get_option_value( 'go_live' ) === 'yes' ) {\n $this->api_base_url = 'https://api.korapay.com/merchant';\n }\n\n }", "public function configure ()\n {\n $this->setMethod('GET');\n $this->setFunctionPath('/Api/monitorGetEventGroupDetails');\n $this->setParser(new \\ZendService\\ZendServerAPI\\Adapter\\EventsGroupDetails());\n }", "public function viewAccessCodes() {\n // gather various access codes to pass to view and present to the view\n \n $accessCodes = array(\n 'outerDoorCode' => $this->Meta->getValueFor('access_street_door'),\n 'innerDoorCode' => $this->Meta->getValueFor('access_inner_door'),\n 'wifiSsid' => $this->Meta->getValueFor('access_wifi_ssid'),\n 'wifiPass' => $this->Meta->getValueFor('access_wifi_password'),\n );\n \n \n $this->set('accessCodes', $accessCodes);\n }", "function amap_ma_not_permit_public_access() {\n \n return false;\n}", "function owa_options_page() {\r\n\t\r\n\t$owa = owa_getInstance();\r\n\t\r\n\t$params = array();\r\n\t$params['view'] = 'base.options';\r\n\t$params['subview'] = 'base.optionsGeneral';\r\n\techo $owa->handleRequest($params);\r\n\t\r\n\treturn;\r\n}", "private function config_OSF_PermissionsManagementTool()\n {\n // Get package info\n $configPath = \"{$this->permissions_management_tool_folder}\";\n\n // Configure\n $this->span(\"Configuring...\", 'info');\n // OSF Web Service paths\n $this->setIni(\"config\", \"osfWebServicesFolder\", \"\\\"{$this->osf_web_services_folder}\\\"\",\n \"{$configPath}/pmt.ini\");\n $this->setIni(\"config\", \"osfWebServicesEndpointsUrl\", \"\\\"http://{$this->osf_web_services_domain}/ws/\\\"\",\n \"{$configPath}/pmt.ini\");\n // OSF Web Service credentials\n $this->setIni(\"credentials\", \"application-id\", \"\\\"{$this->application_id}\\\"\",\n \"{$configPath}/pmt.ini\");\n $this->setIni(\"credentials\", \"api-key\", \"\\\"{$this->api_key}\\\"\",\n \"{$configPath}/pmt.ini\");\n $this->setIni(\"credentials\", \"user\", \"\\\"http://{$this->osf_web_services_domain}/wsf/users/admin\\\"\",\n \"{$configPath}/pmt.ini\");\n }", "function jen_panels_book_top_ctools_access_settings($form, &$form_state, $conf) { \n // @todo: do I need any settings?\n return $form;\n}", "private function _setWebConfig()\n {\n $this->map_obj->set(\"name\", \"simplemappr\");\n $this->map_obj->setFontSet($this->font_file);\n $this->map_obj->web->set(\"template\", \"template.html\");\n $this->map_obj->web->set(\"imagepath\", $this->tmp_path);\n $this->map_obj->web->set(\"imageurl\", $this->tmp_url);\n }", "static function plInfo()\n {\n return array(\n 'plShortName' => _('Share service'),\n 'plDescription' => _('Share service').' ('._('Services').')',\n 'plIcon' => 'geticon.php?context=places&icon=folder-network&size=16',\n\n 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo())\n );\n }", "public function admin_country_settings() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n if ($this->checkPrivileges('admin', '2') == TRUE) {\n\t\t\t\tif ($this->lang->line('admin_settings_currency_setting') != '') \n\t\t $this->data['heading']= stripslashes($this->lang->line('admin_settings_currency_setting')); \n\t\t else $this->data['heading'] = 'Currency Settings';\n $this->load->view(ADMIN_ENC_URL.'/adminsettings/country_settings', $this->data);\n } else {\n redirect(ADMIN_ENC_URL);\n }\n }\n }", "function my_acf_json_load_point( $paths ) {\n\t\t\t\tunset($paths[0]);\n\t\t\t\t\n\t\t\t\t// append path\n\t\t\t\t$paths[] = IG_BLOCKS_PLUGIN_PATH . '/ig-faq-json';\n\t\t\t\t\n\t\t\t\t// return\n\t\t\t\treturn $paths;\n\t\t\t\t\n\t\t\t}", "abstract protected function getConfig();", "function show_configuration() {\n\n global $VM_LANG, $sess;\n\t\t$db = new ps_DB;\n\t\t$payment_method_id = vmGet( $_REQUEST, 'payment_method_id', null );\n\n\t\t$VM_LANG->load('arsenalpay');\n\t\t\t\n\t\t// Read current Configuration\n\t\tinclude_once(CLASSPATH .\"payment/ps_arsenalpay.cfg.php\");\n\t\t\t\t\n\t\t?>\n<p style=\"text-align: center;font-weight: bold;\"><?php echo $VM_LANG->_('ARSENALPAY_TITLE') ?></p>\n<p><?php echo $VM_LANG->_('ARSENALPAY_DESC') ?></p><br>\n<table>\t\n\t<tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_UNIQUE_ID') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_UNIQUE_ID\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_UNIQUE_ID') ? AP_UNIQUE_ID : ''?>\"/></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_UNIQUE_ID_DESC')) ?></td>\n\t</tr>\n\t<tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_SIGN_KEY') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_SIGN_KEY\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_SIGN_KEY') ? AP_SIGN_KEY : ''?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_SIGN_KEY_DESC'))?></td>\n\t</tr>\n\t<tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_FRAME_URL') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_FRAME_URL\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_FRAME_URL') ? AP_FRAME_URL : 'https://arsenalpay.ru/payframe/pay.php' ?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_FRAME_URL_DESC'))?></td>\n\t</tr>\t\n\t<tr>\n <td><strong><?php echo $VM_LANG->_('ARSENALPAY_PAYMENT_SRC')?></strong></td>\n <td>\n\t\t\t<select name=\"AP_PAYMENT_SRC\" class=\"inputbox\" >\n <option <?php if (AP_PAYMENT_SRC == 'card') echo \"selected=\\\"selected\\\"\"; ?> value=\"card\">card</option>\n <option <?php if (AP_PAYMENT_SRC == 'mk') echo \"selected=\\\"selected\\\"\"; ?> value=\"mk\">mk</option>\n </select>\n </td>\n <td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_PAYMENT_SRC_DESC')) ?>\n </td>\n </tr>\n <tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_PAYER_CALLBACK_URL') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_PAYER_CALLBACK_URL\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_PAYER_CALLBACK_URL') ? AP_PAYER_CALLBACK_URL : 'http(s)://[joomla-site-domain]/administrator/components/com_virtuemart/arsenalpay_notify.php' ?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_PAYER_CALLBACK_URL_DESC'))?></td>\n\t</tr>\n\t<tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_PAYMENT_CALLBACK_URL') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_PAYMENT_CALLBACK_URL\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_PAYMENT_CALLBACK_URL') ? AP_PAYMENT_CALLBACK_URL : 'http(s)://[joomla-site-domain]/administrator/components/com_virtuemart/arsenalpay_notify.php' ?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_PAYMENT_CALLBACK_URL_DESC'))?></td>\n\t</tr>\n\t<tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_ALLOWED_IP') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_ALLOWED_IP\" class=\"inputbox\" value=\"<?php echo defined('AP_ALLOWED_IP') ? AP_ALLOWED_IP : '' ?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_ALLOWED_IP_DESC'))?></td>\n\t</tr>\n\t<tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_CSS_FILE') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_CSS_FILE\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_CSS_FILE') ? AP_CSS_FILE : '' ?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_CSS_FILE_DESC'))?></td>\n\t</tr>\n\t<tr>\n <td><strong><?php echo $VM_LANG->_('ARSENALPAY_FRAME_MODE')?></strong></td>\n <td>\n\t\t\t<select name=\"AP_FRAME_MODE\" class=\"inputbox\" >\n <option <?php if (AP_FRAME_MODE == '1') echo \"selected=\\\"selected\\\"\"; ?> value=\"1\">YES</option>\n <option <?php if (AP_FRAME_MODE == '0') echo \"selected=\\\"selected\\\"\"; ?> value=\"0\">NO</option>\n </select>\n </td>\n <td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_FRAME_MODE_DESC')) ?>\n </td>\n </tr>\n <tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_FRAME_PARAMS') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_FRAME_PARAMS\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_FRAME_PARAMS') ? AP_FRAME_PARAMS : \"width='700' height='500' frameborder='0' scrolling='auto'\"?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_FRAME_PARAMS_DESC'))?></td>\n\t</tr>\n</table>\n\t\t<?php\n\t\treturn true;\n\t}", "protected function setKeyMapping(): array\n {\n return ['node-meta' => 'node_meta'];\n }", "public function init() {\n\t //UNTUK SETTING GLOBAL BASE PATH\n\t\t$registry = Zend_Registry::getInstance();\n\t\t$this->auth = Zend_Auth::getInstance();\t \n\t\t$this->view->baseData = $registry->get('baseData');\n\t\t$this->view->basePath = $registry->get('basepath');\n\t\t$this->view->procPath = $registry->get('procpath');\t \n\t\t$this->sso_serv = Sso_User_Service::getInstance();\n\t\t$this->penduduk_serv = Data_Penduduk_Service::getInstance();\n\t\t$this->menu_serv = Menu_Service::getInstance();\n\t\t\n\t\t$ssouserpengguna = new Zend_Session_Namespace('ssouserpengguna');\n\t\t$ssouserpassword= new Zend_Session_Namespace('ssouserpassword');\n\t\t$ssouserKodeInstansi= new Zend_Session_Namespace('ssouserKodeInstansi');\n\t\t$ssouserlevel = new Zend_Session_Namespace('ssouserlevel');\n\t\t\n\t\t$this->pengguna =$ssouserpengguna->pengguna;\t\t\t\n\t\t$this->password =$ssouserpassword->password;\n\t\t$this->KodeInstansi =$ssouserKodeInstansi->KodeInstansi;\n\t\t$this->level =$ssouserlevel->level;\n }", "public function init() {\n\t //UNTUK SETTING GLOBAL BASE PATH\n\t\t$registry = Zend_Registry::getInstance();\n\t\t$this->auth = Zend_Auth::getInstance();\t \n\t\t$this->view->baseData = $registry->get('baseData');\n\t\t$this->view->basePath = $registry->get('basepath');\n\t\t$this->view->procPath = $registry->get('procpath');\t \n\t\t$this->sso_serv = Sso_User_Service::getInstance();\n\t\t$this->penduduk_serv = Data_Penduduk_Service::getInstance();\n\t\t$this->menu_serv = Menu_Service::getInstance();\n\t\t\n\t\t$ssouserpengguna = new Zend_Session_Namespace('ssouserpengguna');\n\t\t$ssouserpassword= new Zend_Session_Namespace('ssouserpassword');\n\t\t$ssouserKodeInstansi= new Zend_Session_Namespace('ssouserKodeInstansi');\n\t\t$ssouserlevel = new Zend_Session_Namespace('ssouserlevel');\n\t\t\n\t\t$this->pengguna =$ssouserpengguna->pengguna;\t\t\t\n\t\t$this->password =$ssouserpassword->password;\n\t\t$this->KodeInstansi =$ssouserKodeInstansi->KodeInstansi;\n\t\t$this->level =$ssouserlevel->level;\n }", "public function init() {\n\t //UNTUK SETTING GLOBAL BASE PATH\n\t\t$registry = Zend_Registry::getInstance();\n\t\t$this->auth = Zend_Auth::getInstance();\t \n\t\t$this->view->baseData = $registry->get('baseData');\n\t\t$this->view->basePath = $registry->get('basepath');\n\t\t$this->view->procPath = $registry->get('procpath');\t \n\t\t$this->sso_serv = Sso_User_Service::getInstance();\n\t\t$this->menu_serv = Menu_Service::getInstance();\t\t\n\t\t$this->kegiatan_serv = Kegiatan_Service::getInstance();\t\t\n\t\t\n\t\t$ssouserpengguna = new Zend_Session_Namespace('ssouserpengguna');\n\t\t$ssouserpassword= new Zend_Session_Namespace('ssouserpassword');\n\t\t$ssouserKodeInstansi= new Zend_Session_Namespace('ssouserKodeInstansi');\n\t\t$ssouserlevel = new Zend_Session_Namespace('ssouserlevel');\n\t\t\n\t\t$this->pengguna =$ssouserpengguna->pengguna;\t\t\t\n\t\t$this->password =$ssouserpassword->password;\n\t\t$this->KodeInstansi =$ssouserKodeInstansi->KodeInstansi;\n\t\t$this->level =$ssouserlevel->level;\n }", "function lapizzeria_registrar_opciones(){\n register_setting( 'lapizzeria_opciones_grupo', 'lapizzeria_direccion' );\n register_setting( 'lapizzeria_opciones_grupo', 'lapizzeria_telefono' );\n\n register_setting( 'lapizzeria_opciones_gmaps', 'lapizzeria_gmap_iframe' );\n}", "function access($args, $request) {\n\t\t$templateMgr = TemplateManager::getManager($request);\n\t\t$this->setupTemplate($request);\n\t\t$templateMgr->display('management/settings/access.tpl');\n\t}", "function Access()\n\t{\n\t\t$this->clear_authentication(false);\n\t\t$this->identify();\n\t}", "public function init() {\n\t //UNTUK SETTING GLOBAL BASE PATH\n\t\t$registry = Zend_Registry::getInstance();\n\t\t$this->auth = Zend_Auth::getInstance();\t \n\t\t$this->view->baseData = $registry->get('baseData');\n\t\t$this->view->basePath = $registry->get('basepath');\n\t\t$this->view->procPath = $registry->get('procpath');\t \n\t\t$this->sso_serv = Sso_User_Service::getInstance();\t\n\t\t$this->penduduk_serv = Data_Penduduk_Service::getInstance();\n\t\t$this->menu_serv = Menu_Service::getInstance();\n\n\t\t$ssouserpengguna = new Zend_Session_Namespace('ssouserpengguna');\n\t\t$ssouserpassword= new Zend_Session_Namespace('ssouserpassword');\n\t\t$ssouserKodeInstansi= new Zend_Session_Namespace('ssouserKodeInstansi');\n\t\t$ssouserlevel = new Zend_Session_Namespace('ssouserlevel');\n\t\t\n\t\t$this->pengguna =$ssouserpengguna->pengguna;\t\t\t\n\t\t$this->password =$ssouserpassword->password;\n\t\t$this->KodeInstansi =$ssouserKodeInstansi->KodeInstansi;\n\t\t$this->level =$ssouserlevel->level;\n }", "public function setKaina($x) {\n $this->kaina = $x; //privati reiksme tai kaina\n }", "abstract public function configure_method_settings();", "function json_oauth_api_routes( $data ) {\n\tif (empty($data['authentication'])) {\n\t\t$data['authentication'] = array();\n\t}\n\n\t$data['authentication']['oauth1'] = array(\n\t\t'request' => home_url( 'oauth1/request' ),\n\t\t'authorize' => home_url( 'oauth1/authorize' ),\n\t\t'access' => home_url( 'oauth1/access' ),\n\t\t'version' => '0.1',\n\t);\n\treturn $data;\n}", "public function providePermissions() {\n return array(\n 'CMS_ACCESS_KapostBridgeLogViewer'=>array(\n 'name'=>_t(\n 'CMSMain.ACCESS',\n \"Access to '{title}' section\",\n \"Item in permission selection identifying the admin section. Example: Access to 'Files & Images'\",\n array('title'=>_t('KapostBridgeLogViewer.MENUTITLE', 'Kapost Bridge Logs'))\n ),\n 'category'=>_t('Permission.CMS_ACCESS_CATEGORY', 'CMS Access')\n )\n );\n }", "public function getSourceAccessionsList(){\n return $this->_get(6);\n }", "public function indexAction()\n {\n \t\n \t$this->_helper->layout()->disableLayout();\n \t\n\t\t$this->params = $this->getRequest()->getParams();\n \n\t\t$this->view->params = $this->params;\n\t\t\n\t\tif(!isset($this->params['vizType']))\n\t\t{\n\t\t\t$this->view->vizType = 2;\n\t\t}\n\t\t\n\t\tif(isset($this->params['vizType']))\n\t\t{\n\t\t\t$this->view->vizType = $this->params['vizType'];\n\t\t}\n\n\t\tif(isset($this->params['vizEx']))\n\t\t{\n\t\t\t$this->view->vizEx = $this->params['vizEx'];\n\t\t}\n\n\t if(isset($this->params['vizQu']))\n\t\t{\n\t\t\t$this->view->vizQu = $this->params['vizQu'];\n\t\t}\n\t\t\n\t if(isset($this->params['vizVo']))\n\t\t{\n\t\t\t$this->view->vizVo = $this->params['vizVo'];\n\t\t}\n if(isset($this->params['vizMy']))\n\t\t{\n\t\t\t$this->view->vizMy = $this->params['vizMy'];\n\t\t}\n\t\t\n\t if(isset($this->params['vizCon']) && $this->params['vizCon']==1)\n\t\t{\n\t\t\t$this->view->vizCon = 1;\n\t\t} else {\n\t\t\t$this->view->vizCon = 0;\n\t\t}\n\t\t\n\t if(isset($this->params['conceptId']))\n\t\t{\n\t\t\t$this->view->conceptId = $this->params['conceptId'];\n\t\t} else {\n\t\t\t$this->view->conceptId = array();\n\t\t}\n\t if(isset($this->params['keyW']))\n\t\t{\n\t\t\t$this->view->keyW = $this->params['keyW'];\n\t\t} else {\n\t\t\t$this->view->keyW = \"\";\n\t\t}\n \tif(isset($this->params['valueAA']))\n\t\t{\n\t\t\t$this->view->valueAA = $this->params['valueAA'];\n\t\t} else {\n\t\t\t$this->view->valueAA = \"\";\n\t\t}\n \tif(isset($this->params['valueBB']))\n\t\t{\n\t\t\t$this->view->valueBB = $this->params['valueBB'];\n\t\t} else {\n\t\t\t$this->view->valueBB = \"1325350800\";\n\t\t}\n\t\t\n if(isset($this->params['vizDate']))\n\t\t{\n\t\t\t$this->view->vizDate = $this->params['vizDate'];\n\t\t} else {\n\t\t\t$this->view->vizDate = 0;\n\t\t}\n\t\t\n }", "function redmine_sso_get_setting_keys() {\n return array(\n 'url',\n 'protocol',\n 'api_key',\n 'client_id',\n 'client_secret',\n 'user_filter_mode',\n 'project_id',\n 'group_id',\n 'new_user_access',\n 'role_assigning',\n 'daily_checkup',\n 'disable_login'\n );\n}", "function SetAdminConfiguration() {\n\t\t\tadd_options_page(\"3B Meteo\", \"3B Meteo\", 8, basename(__FILE__), array(\"TreBiMeteo\",'DesignAdminPage'));\n\t\t}", "public function settings()\n {\n }", "function _gizra_access_context_default_contexts() {\n $export = array();\n $context = new stdClass;\n $context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */\n $context->api_version = 3;\n $context->name = 'purchasing_users';\n $context->description = 'Show purchasing users on product content view.';\n $context->tag = 'gizra_access';\n $context->conditions = array(\n 'node' => array(\n 'values' => array(\n 'product' => 'product',\n ),\n 'options' => array(\n 'node_form' => 0,\n ),\n ),\n );\n $context->reactions = array(\n 'block' => array(\n 'blocks' => array(\n 'views-purchasing_users-block_1' => array(\n 'module' => 'views',\n 'delta' => 'purchasing_users-block_1',\n 'region' => 'right',\n 'weight' => 0,\n ),\n ),\n ),\n );\n\n $export['purchasing_users'] = $context;\n return $export;\n}", "public function checkBackendAccessSettingsFromInitPhp() {}", "public function index()\n {\n $this->configuration();\n }", "static function plInfo()\n {\n return (array(\n \"plShortName\" => _(\"Kopano\"),\n \"plDescription\" => _(\"kopano service\").\" (\"._(\"Services\").\")\",\n \"plSelfModify\" => FALSE,\n \"plDepends\" => array(),\n \"plPriority\" => 100,\n \"plSection\" => array(\"administration\"),\n \"plCategory\" => array(\"server\"),\n\n \"plProvidedAcls\"=> array(\n \"start\" => _(\"Start\"),\n \"stop\" => _(\"Stop\"),\n \"restart\" => _(\"Restart\"),\n \"kopanoAccount\" => _(\"Kopano server\"),\n \"kopanoHidden\" => _(\"Kopano hidden\"),\n \"kopanoHttpPort\" => _(\"Kopano HTTP port\"),\n \"kopanoSslPort\" => _(\"Kopano SSL port\"),\n \"kopanoConatinsPublic\" => _(\"Kopano node contains public store\"),\n \"kopanoFilePath\" => _(\"Kopano file path\"),\n \"goKopanoArchiveServer\" => _(\"Kopano Archvie Server\"),\n )\n ));\n }", "abstract public function get_settings();", "abstract protected function configure();", "abstract protected function configure();", "public function init() {\n \n $this->_helper->acl->allow('public',null);\n }", "private function endPointInfo () \n {\n \n $array = array(\n \"endpoints\" => array(\n \"endpoint\" => array(\n \"endp\" => \"new\",\n \"act\" => \"init\",\n \"url\" => \"api.php?endp=new&act=init\",\n \"response_fields\" => array(\n \"message_id\",\n \"source_id\",\n \"poller\",\n \"time\",\n \"type\",\n \"status\",\n \"service\",\n \"alert_id\",\n \"host\",\n \"ip\",\n \"uid\",\n \"gid\",\n \"flg_stat\"\n )\n )\n )\n );\n \n \n header('Content-Type: application/json');\n echo json_encode($array);\n }" ]
[ "0.57187057", "0.5700636", "0.5683706", "0.5589632", "0.55698884", "0.55253017", "0.5430679", "0.53667074", "0.5325516", "0.5294858", "0.52679276", "0.52679276", "0.5187895", "0.5161577", "0.51447964", "0.51394165", "0.5127127", "0.510244", "0.5075373", "0.5068209", "0.50406027", "0.50392073", "0.50249517", "0.50221515", "0.50189024", "0.5016945", "0.5003694", "0.49858224", "0.49810892", "0.49800223", "0.49755824", "0.49721903", "0.49675354", "0.49670842", "0.4964766", "0.49545094", "0.4946925", "0.49455464", "0.4944002", "0.493042", "0.49189365", "0.49154955", "0.4914281", "0.490962", "0.49073526", "0.49047044", "0.49044323", "0.49011528", "0.4896632", "0.48896414", "0.48774448", "0.48767382", "0.48747602", "0.4866952", "0.48641494", "0.48520082", "0.48507905", "0.48481736", "0.48445284", "0.48419493", "0.4840307", "0.48205653", "0.48200658", "0.48194048", "0.48178348", "0.48171413", "0.48122668", "0.48093605", "0.480892", "0.48012286", "0.47937843", "0.47858572", "0.47838268", "0.478073", "0.47798407", "0.4774604", "0.47690362", "0.47690362", "0.47668925", "0.47661093", "0.47624633", "0.47575402", "0.4755723", "0.47511616", "0.4748124", "0.474687", "0.474308", "0.47413078", "0.47356462", "0.4733837", "0.47333613", "0.47303686", "0.472876", "0.4727186", "0.472615", "0.4725803", "0.47253653", "0.47240224", "0.47240224", "0.4718775", "0.4718222" ]
0.0
-1
Fungsi untuk mendapatkan konfigurasi alamat jaringan yg sedang dipakai
function common_get_network_config($net){ $file = '/etc/network/interfaces'; $curr = file_get_contents($file); if($net == 'ip'){ $curr_ip = explode('#ip',$curr); $curr_ip = $curr_ip[1]; $curr_ip = explode(' ', $curr_ip); $curr_ip = trim($curr_ip[1]); return $curr_ip; } else if($net == 'subnet'){ $curr_subnet = explode('#subnet',$curr); $curr_subnet = $curr_subnet[1]; $curr_subnet= explode(' ', $curr_subnet); $curr_subnet = trim($curr_subnet[1]); return $curr_subnet; } else if($net == 'gw'){ $curr_gw = explode('#gw',$curr); $curr_gw = $curr_gw[1]; $curr_gw= explode(' ', $curr_gw); $curr_gw = trim($curr_gw[1]); return $curr_gw; } else if($net == 'dns'){ $curr_dns = explode('#dns',$curr); $curr_dns = $curr_dns[1]; $curr_dns= explode(' ', $curr_dns); $curr_dns = trim($curr_dns[1]); return $curr_dns; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function konfig(){\n\t\t$data['title'] \t\t= \"Konfigurasi Umum\";\n\t\t$data['konfig'] \t= $this->model_konfig->tampil()->row_array();\n\n\t\t$this->view('admin/konfigurasi/kUmum.php', $data, FALSE);\n\t}", "function zarinpalwg_config() {\n $configarray = array(\n \"FriendlyName\" => array(\"Type\" => \"System\", \"Value\"=>\"زرین پال - وب گیت\"),\n \"merchantID\" => array(\"FriendlyName\" => \"merchantID\", \"Type\" => \"text\", \"Size\" => \"50\", ),\n \"Currencies\" => array(\"FriendlyName\" => \"Currencies\", \"Type\" => \"dropdown\", \"Options\" => \"Rial,Toman\", ),\n\t \"MirrorName\" => array(\"FriendlyName\" => \"نود اتصال\", \"Type\" => \"dropdown\", \"Options\" => \"آلمان,ایران,خودکار\", \"Description\" => \"چناانچه سرور شما در ایران باشد ایران دا انتخاب کنید و در غیر اینصورت آلمان و یا خودکار را انتخاب کنید\", ),\n \"afp\" => array(\"FriendlyName\" => \"افزودن کارمزد به قیمت ها\", \"Type\" => \"yesno\", \"Description\" => \"در صورت انتخاب 2.5 درصد به هزینه پرداخت شده افزوده می شود.\", ),\n );\n\treturn $configarray;\n}", "protected function getConfigFormCOP()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-user\"></i>',\n 'desc' => $this->l('Ingrese la llave pública'),\n 'name' => 'KUSHKIPAGOS_PUBLIC_KEY',\n 'label' => $this->l('Public key'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-user-secret\"></i>',\n 'desc' => $this->l('Ingrese la llave privada'),\n 'name' => 'KUSHKIPAGOS_PRIVATE_KEY',\n 'label' => $this->l('Private key'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-address-card\"></i>',\n 'desc' => $this->l('Ingrese la razón social'),\n 'name' => 'KUSHKIPAGOS_RAZON_SOCIAL',\n 'label' => $this->l('Razon Social'),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Permitir transferencia'),\n 'name' => 'KUSHKIPAGOS_TRANSFER',\n 'is_bool' => true,\n 'desc' => $this->l('Usar transferencia como forma de pago'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Entorno de pruebas'),\n 'name' => 'KUSHKIPAGOS_DEV',\n 'is_bool' => true,\n 'desc' => $this->l('Usar este módulo en entorno de pruebas'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n ),\n\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n\n ),\n\n );\n }", "function infographies_edit_config($row){\n\treturn array();\n}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n\n\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'title',\n 'label' => $this->l('Titre'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'description',\n 'label' => $this->l('Description'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'legend',\n 'label' => $this->l('Légende'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'url',\n 'label' => $this->l('Url'),\n ), \n array(\n 'col' => 6,\n 'type' => 'file',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'image',\n 'label' => $this->l('Image_up'),\n ),\n array(\n 'col' => 4,\n 'type' => 'date',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a start date'),\n 'name' => 'debut',\n 'label' => $this->l('Debut'),\n ),\n array(\n 'col' => 4,\n 'type' => 'date',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a end date'),\n 'name' => 'fin',\n 'label' => $this->l('Fin'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "function pegaParametrosLegImg()\n {\n // error_reporting(0);\n $legenda = $this->mapa->legend;\n $height = $legenda->height;\n $width = $legenda->width;\n $keysizex = $legenda->keysizex;\n $keysizey = $legenda->keysizey;\n $keyspacingx = $legenda->keyspacingx;\n $keyspacingy = $legenda->keyspacingy;\n $outlinecolor = corRGB($legenda->outlinecolor); // Color of outline of box, -1 for no outline\n $status = $legenda->status; // MS_ON, MS_OFF, MS_EMBED\n $position = $legenda->position;\n if ($position < 99) {\n $position = \"10\" . $position;\n }\n $transparent = 100;\n $imagecolor = corRGB($legenda->imagecolor);\n $label = $legenda->label;\n $font = $label->font;\n if ($font == MS_BITMAP) {\n $l = $label->size;\n if ($l == MS_TINY) {\n $t = 5;\n }\n if ($l == MS_SMALL) {\n $t = 7;\n }\n if ($l == MS_MEDIUM) {\n $t = 10;\n }\n if ($l == MS_LARGE) {\n $t = 12;\n }\n if ($l == MS_GIANT) {\n $t = 14;\n }\n $labelsize = $t;\n } else\n $labelsize = $label->size;\n\n $tipofonte = $label->type;\n return (array(\n \"tipofonte\" => $tipofonte,\n \"font\" => $font,\n \"imagecolor\" => $imagecolor,\n \"transparent\" => transparent,\n \"position\" => $position,\n \"status\" => $status,\n \"outlinecolor\" => $outlinecolor,\n \"keyspacingy\" => $keyspacingy,\n \"keyspacingx\" => $keyspacingx,\n \"keysizey\" => $keysizey,\n \"keysizex\" => $keysizex,\n \"height\" => $height,\n \"width\" => $width,\n \"labelsize\" => $labelsize\n ));\n }", "function ciag_groupe_auteurs_edit_config($row)\n{\n\tglobal $spip_ecran, $spip_lang, $spip_display;\n\n\t$config = $GLOBALS['meta'];\n\t$config['lignes'] = ($spip_ecran == \"large\")? 8 : 5;\n\t$config['afficher_barre'] = false;\n\t$config['langue'] = $spip_lang;\n\treturn $config;\n}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-user\"></i>',\n 'desc' => $this->l('Ingrese la llave pública'),\n 'name' => 'KUSHKIPAGOS_PUBLIC_KEY',\n 'label' => $this->l('Public key'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-user-secret\"></i>',\n 'desc' => $this->l('Ingrese la llave privada'),\n 'name' => 'KUSHKIPAGOS_PRIVATE_KEY',\n 'label' => $this->l('Private key'),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Entorno de pruebas'),\n 'name' => 'KUSHKIPAGOS_DEV',\n 'is_bool' => true,\n 'desc' => $this->l('Usar este módulo en entorno de pruebas'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n )\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "protected function setParamConfig()\n {\n $this->paramConfig = ArrayManipulation::deepMerge($this->paramConfig, array(\n 'compact' => array(\n 'name' => 'Kompakte Anordnung der Auswahlfelder',\n 'type' => 'radio',\n 'values' => array(\n 'ja' => 'Ja',\n 'nein' => 'Nein'\n )\n ),\n 'multicolumn' => array(\n 'name' => 'Datenspeicher: Trennung in Spalten',\n 'type' => 'radio',\n 'help' => '\n Normalerweise wird für dieses Feld im Datenspeicher eine Spalte erstellt, in welchem die getroffene Auswahl mit Komma separiert wird.\n Sofern diese Einstellung aktiviert wird, erscheint im Datenspeicher und Export eine Spalte pro getroffener Auswahl.\n ',\n 'values' => array(\n 'ja' => 'Ja',\n 'nein' => 'Nein'\n )\n ),\n 'multicolumn_label_prefix' => array(\n 'name' => 'Feld-Beschriftung pro Spalte voranstellen',\n 'type' => 'radio',\n 'help' => 'Damit die Spalten eindeutiger sind, kann der Feldname als Prefix vor jede generierte Spalte im Datenspeicher vorangestellt werden.',\n 'values' => array(\n 'ja' => 'Ja',\n 'nein' => 'Nein'\n )\n ),\n 'content' => array(\n 'name' => 'Auswahlmöglichkeiten',\n 'type' => 'textfieldArray',\n 'help' => 'Bitte geben Sie eine oder mehrere Möglichkeiten an.',\n 'separator' => Base::MULTI_ITEM_VALUES_SEPARATOR\n )\n ));\n\n // Set defaults for new fields\n $this->params['compact'] = 'nein';\n $this->params['multicolumn'] = 'nein';\n }", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 6,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-key\"></i>',\n 'desc' => $this->l('Ingrese un token de empresa - Vea la documentación'),\n 'name' => 'APISFACT_PRESTASHOP_TOKEN',\n 'label' => $this->l('Token'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle text-success\"></i>',\n 'desc' => $this->l('Ingrese la serie para las facturas'),\n 'name' => 'APISFACT_PRESTASHOP_SERIEF',\n 'label' => $this->l('Serie Factura'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle text-success\"></i>',\n 'desc' => $this->l('Ingrese el número inicial para las facturas'),\n 'name' => 'APISFACT_PRESTASHOP_NUMEROF',\n 'label' => $this->l('Numero de Factura'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle\"></i>',\n 'desc' => $this->l('Ingrese la serie para las boletas'),\n 'name' => 'APISFACT_PRESTASHOP_SERIEB',\n 'label' => $this->l('Serie Boleta'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle\"></i>',\n 'desc' => $this->l('Ingrese el número inicial para las boletas'),\n 'name' => 'APISFACT_PRESTASHOP_NUMEROB',\n 'label' => $this->l('Numero de Boleta'),\n )\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "public function kosongkanDataBarang() {\n $this->daftar_barang = [];\n $this->editData();\n }", "function data_prosesan()\n{\n //$jadual['medan'][]='*';\n /*$jadual['medan'][]='newss,ssm,nama,tel,fax,responden,' .\n '(SELECT keterangan FROM msic WHERE msic=msic2000 LIMIT 1,1) as keterangan,' .\n 'msic2000,msicB2000,fe';*/\n $sama='j1.newss,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn, ';\n $sama2='j2.newss,concat(j2.tahun_rujukan,\"-\",j2.siri_kekerapan) as blnthn, ';\n //$jadual['medan'][]=$sama . 'ssm, nama, operator, sv, kekerapan_sv'; \n //$jadual['medan'][]=$sama . 'ng, po, data_anggaran, cara_maklum_balas, cara_terima, sumber_pertubuhan, kategori_sample';\n //$jadual['medan'][]=$sama . 'status_operasi, status_lain_pbb, bil_bulan_bco, siasatan_bermula, siasatan_berakhir';\n //$jadual['medan'][]=$sama . 'no_jln_bgn, tmn_kg, bandar_kawasan, poskod, negeri, daerah, catatan';\n //$jadual['medan'][]=$sama . 'responden, jawatan, email, notel, lamanweb, tarikh';\n //$jadual['medan'][]=$sama . 'responden2, jawatan2, email2, notel2, nofax2';\n //$jadual['medan'][]=$sama . '`no_jln_bgn-lokasi`, `tmn_kg-lokasi`, `bandar_kawasan-lokasi`, ' .\n //'`poskod-lokasi`, `negeri-lokasi` ng, `daerah-lokasi` dp';\n $jadual['medan'][]='j1.newss,j1.ssm,j1.nama,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn ';\n $jadual['medan'][]=$sama . \"\\r\" . 'msic_lama, (SELECT keterangan FROM msic WHERE msic=msic_lama LIMIT 1,1) as keterangan,' . \n 'msic_baru, utama '; \n //$jadual['medan'][]=$sama . \"\\r\\t\" . 'F3001, F3002, catatan_soalan3, ' . 'F5001, F5002, F5003, F5104, catatan_soalan5';\n $jadual['medan'][]=$sama . 'F6001, F6002, F6003, F6004, F6005, F6101, F6102, F6103, F6104, F6105, catatan_soalan6';\n $jadual['medan'][]=$sama . 'F7001, F7002, F7003, catatan_soalan7, ' .\n 'F8001, catatan_soalan8, F9001, catatan_soalan9';\n //$jadual['medan'][]=$sama . 'cara_anggaran, bulan_terakhir_data_sebenar, bil_bulan_data_telah_dianggar';\n\n //$jadual['medan'][]=$sama . 'Deskripsi_Produk_Oleh_Responden, Produk_Tetap, Deskripsi_Produk_Tetap,\n //Produk_Tambahan, Deskripsi_Produk_Tambahan, UnitKuantitiAsal, UnitKuantitiLain'; \n $produk='Deskripsi_Produk_Tetap Nama, Produk_Tetap Kod, ';\n $jadual['medan'][]=$sama . $produk . 'KuantitiPengeluaran, KuantitiJualan, NilaiJualan, ' .\n 'format(NilaiJualan/KuantitiJualan,2) as HargaUnit, UnitKuantitiKini';\n //$jadual['medan'][]=$sama . $produk . 'ProsesanKuantitiPengeluaran, ProsesanKuantitiJualan, ProsesanNilaiJualan, AUP';\n $jadual['medan'][]=$sama . $produk . 'F2497, F2498, F2499, Catatan';\n $jadual['medan'][]=$sama . \"\\r\\t\" . \n 'F3001, F3002, catatan_soalan3, ' .\n 'F5001, F5002, F5003, F5104, catatan_soalan5';\n\n //$jadual['medan'][]=$sama . 'catatan';\n $jadual['medan'][]=$sama . 'F4001, F4002, F4003, F4004';\n $jadual['medan'][]=$sama . 'F4101, F4102, F4103, F4104';\n $jadual['medan'][]=$sama . 'F4201, F4202, F4203, F4204';\n $jadual['medan'][]=$sama . 'catatan \"Nota \", F4302, F4303, F4304';\n\n // bulanan\n //$bulan=($_GET['bln']==null)? '':'AND siri_kekerapan=\"'.bersih($_GET['bln']).'\"';\n $bulan_penuh = array('Januari', 'Februari', 'Mac', 'April', \n 'Mei', 'Jun', 'Julai', 'Ogos', \n 'September', 'Oktober', 'November', 'Disember');\n //$kerap='\"'.$bulan_penuh[0].'\",\"'.$bulan_penuh[1].'\",\"'.$bulan_penuh[2].'\"';\n //$bulan=($_GET['bln']==null)? '':'AND j1.siri_kekerapan in ('.$kerap.')';\n //$myJadual=array('mm_rangka','mm_rangka');\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_info'; } // bil medan = 15\n for($z=1;$z <= 2;$z++) { $jadual['nama'][]='prosesmm_jualan'; }\n $jadual['nama'][]='prosesmm_info';\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_gajistaf'; }\n $join1='prosesmm_info';\n $join2='prosesmm_jualan';\n $join3='prosesmm_gajistaf';\n \n return $jadual;\n}", "public function aksi_tambah_permohonan_suket014()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'kewarganegaraan' => $this->input->post('kewarganegaraan'),\n\t\t\t'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'alamat_asal' => $this->input->post('alamat_asal'),\n\t\t\t'no_kk' => $this->input->post('no_kk'),\n\t\t\t'tanggal_kk' => $this->input->post('tanggal_kk'),\n\t\t\t'alamat_pindah' => $this->input->post('alamat_pindah'),\n\t\t\t'kelurahan_pindah' => $this->input->post('kelurahan_pindah'),\n\t\t\t'kecamatan_pindah' => $this->input->post('kecamatan_pindah'),\n\t\t\t'kabupaten_pindah' => $this->input->post('kabupaten_pindah'),\n\t\t\t'provinsi_pindah' => $this->input->post('provinsi_pindah'),\n\t\t\t'tanggal_pindah' => $this->input->post('tanggal_pindah'),\n\t\t\t'alasan_pindah' => $this->input->post('alasan_pindah'),\n\t\t\t'jumlah_pengikut' => $this->input->post('jumlah_pengikut'),\n\t\t);\n\n\t\t$this->m_warga->tambah_suket($data_surat, 'srt_ket_pindah');\n\n\t\tredirect('warga/list_pengikut_suket014/' . $id_permohonan);\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t}", "public function aksi_tambah_permohonan_suket011()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nik' => $this->input->post('nik'),\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'golongan_darah' => $this->input->post('golongan_darah'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'no_kk' => $this->input->post('no_kk'),\n\t\t\t'alamat' => $this->input->post('alamat'),\n\t\t\t'rt' => $this->input->post('rt'),\n\t\t\t'kelurahan' => $this->input->post('kelurahan'),\n\t\t\t'kecamatan' => $this->input->post('kecamatan'),\n\t\t\t'tanggal_tinggal' => $this->input->post('tanggal_tinggal'),\n\t\t\t'no_surat_pindah' => $this->input->post('no_surat_pindah'),\n\t\t\t'tanggal_surat_pindah' => $this->input->post('tgl_surat_pindah'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_pengantar_ktp');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket011/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function aksi_tambah_pengikut_suket014()\n\t{\n\t\t$id_permohonan = $this->input->post('id_permohonan_surat');\n\n\t\t$data_pengikut = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'umur' => $this->input->post('umur'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n\t\t\t'nama_ortu' => $this->input->post('nama_ortu'),\n\t\t\t'status_hub_kk' => $this->input->post('status_hub_kk'),\n\t\t);\n\n\t\t$this->m_warga->aksi_tambah_pengikut($data_pengikut);\n\n\t\t$this->session->set_flashdata('success', 'ditambahkan');\n\t\tredirect('warga/list_pengikut_suket014/' . $id_permohonan);\n\t}", "public function tambah_pertanahan()\r\n\t{\r\n\t\t$file_path = $this->upload_file_lampiran(\"pertanahan\");\r\n\r\n\t\t$input = $this->input->post();\r\n\r\n\t\t$id_jenis_sertifikat = $this->jenis_sertifikat->get_id_jenis_sertifikat('pertanahan');\r\n\t\t$tanggal_terbit = DateTime::createFromFormat('m/d/Y', $input['tanggal_terbit'])->format('Y-m-d');\r\n\t\t$tanggal_berakhir = DateTime::createFromFormat('m/d/Y', $input['tanggal_berakhir'])->format('Y-m-d');\r\n\r\n\t\tif ($tanggal_berakhir == '0000-00-00')\r\n\t\t\t$tanggal_berakhir = $this->set_tahun_berakhir_forever();\r\n\r\n\t\t$data = array(\r\n\t\t\t'id_lembaga_sertifikat'\t\t=> $input['lembaga'],\r\n\t\t\t'id_jenis_sertifikat'\t\t=> $id_jenis_sertifikat,\r\n\t\t\t'id_dasar_hukum_sertifikat'\t=> $input['jenis_pertanahan'],\r\n\t\t\t'id_distrik_sertifikat'\t\t=> $input['distrik'],\r\n\t\t\t'no_sertifikat'\t\t\t\t=> $input['no_sertifikat'],\r\n\t\t\t'judul_sertifikat'\t\t\t=> $input['lokasi_sertifikat'],\r\n\t\t\t'tanggal_sertifikasi'\t\t=> $tanggal_terbit,\r\n\t\t\t'tanggal_kadaluarsa'\t\t=> $tanggal_berakhir,\r\n\t\t\t'file_sertifikat'\t\t\t=> $file_path['file_path'],\r\n\t\t\t'nama_file'\t\t\t\t\t=> $file_path['file_name'],\r\n\t\t\t'keterangan'\t\t\t\t=> $input['keterangan'],\r\n\t\t\t'jabatan_pic'\t\t\t\t=> $this->authentifier->get_user_detail()['posisi_pegawai'],\r\n\t\t\t'dibuat_oleh'\t\t\t\t=> $this->authentifier->get_user_detail()['id_pegawai'],\r\n\t\t\t'status_sertifikat'\t\t\t=> 3,\r\n\t\t\t'id_remainder_sertifikat'\t=> $input['remainder']\r\n\t\t\t);\r\n\t\t// Status sertifikat masih menggunakan nilai default\r\n\r\n\t\t$result = $this->sertifikat->tambah_data_pertanahan($data);\r\n\t\t\r\n\t\tif ($result)\r\n\t\t{\r\n\t\t\t$id_pegawai = $this->authentifier->get_user_detail()['id_pegawai'];\r\n\t\t\t$id_sertifikat = $this->sertifikat->get_id_sertifikat_latest_by_user($id_pegawai);\r\n\r\n\t\t\t$this->set_status_sertifikat($id_sertifikat);\r\n\r\n\t\t\t$log_data = array(\r\n\t\t\t\t'nama_tabel'\t\t=> 'sertifikat',\r\n\t\t\t\t'id_pegawai'\t\t=> $id_pegawai,\r\n\t\t\t\t'id_status_log'\t\t=> $this->status->get_id_status_by_nama(\"melakukan create\"),\r\n\t\t\t\t'id_data'\t\t\t=> $id_sertifikat\r\n\t\t\t\t);\r\n\t\t\t$id_log = $this->log_database->write_log($log_data);\r\n\t\t\t// Insert data sukses\r\n\t\t\t$this->authentifier->set_flashdata('error_code', 1);\r\n\t\t\t$this->authentifier->set_flashdata('error_msg', \"Data Pertanahan berhasil ditambahkan\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Insert data gagal\r\n\t\t\t$this->authentifier->set_flashdata('error_code', 2);\r\n\t\t\t$this->authentifier->set_flashdata('error_msg', \"Data Pertanahan gagal ditambahkan\");\r\n\t\t}\r\n\r\n\t\treturn redirect('form/pertanahan');\r\n\t}", "public function aksi_tambah_pengikut_suket012()\n\t{\n\t\t$id_permohonan = $this->input->post('id_permohonan_surat');\n\n\t\t$data_pengikut = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'umur' => $this->input->post('umur'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n\t\t\t'nama_ortu' => $this->input->post('nama_ortu'),\n\t\t\t'status_hub_kk' => $this->input->post('status_hub_kk'),\n\t\t);\n\n\t\t$this->m_warga->aksi_tambah_pengikut($data_pengikut);\n\n\t\t$this->session->set_flashdata('success', 'ditambahkan');\n\t\tredirect('warga/list_pengikut_suket012/' . $id_permohonan);\n\t}", "public function aksi_tambah_permohonan_suket012()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'kewarganegaraan' => $this->input->post('kewarganegaraan'),\n\t\t\t'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat' => $this->input->post('alamat'),\n\t\t\t'tanggal_tinggal' => $this->input->post('tanggal_tinggal'),\n\t\t\t'kepindahan_dari' => $this->input->post('kepindahan_dari'),\n\t\t\t'nama_ayah' => $this->input->post('nama_ayah'),\n\t\t\t'nama_ibu' => $this->input->post('nama_ibu'),\n\t\t\t'jml_pengikut' => $this->input->post('jml_pengikut'),\n\t\t);\n\n\t\t$this->m_warga->tambah_suket($data_surat, 'srt_pengantar_kk');\n\n\t\tredirect('warga/list_pengikut_suket012/' . $id_permohonan);\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t}", "public function barang_tambah_proses()\n\t{\n\t\t// define array data for insert\n\t\t$indata = array(\n\t\t'nama_barang' => $_POST['nama_barang'],\n\t\t'harga_barang' => $_POST['harga'],\n\t\t'stok' => $_POST['stok'],\n\t\t'deskripsi' => $_POST['isi'],\n\t\t'kode_kategori' => $_POST['kategori']\n\t\t);\n\t\t\n\t\t// define configuration for upload image\n\t\t$config['upload_path'] = './uploads/';\n\t\t$config['allowed_types'] = 'gif|jpg|png';\n\t\t$config['max_size'] = 2000;\n\t\t$config['max_width'] = 2048;\n\t\t$config['max_height'] = 1024;\n\t\t\n\t\t// set configuration\n\t\t$this->load->library('upload', $config);\n\t\t\n\t\t// if image is can't to uploaded\n\t\tif ( ! $this->upload->do_upload('gambar'))\n\t\t{\n\t\t\techo $this->upload->display_errors();\n\t\t}\n\t\telse // can to upload\n\t\t{\n\t\t\t// define array name for gambar from data uploaded\n\t\t\t$indata['gambar'] = $this->upload->data('file_name');\n\t\t}\n\t\t\n\t\t// insert execution\n\t\t$this->ModelsKedai->insert(\"barang\",$indata);\n\t\t\n\t\t// goto barang page\n\t\tredirect('administrator/barang/1');\n\t}", "public function db_field_config($header = false, $kpiName = \"Users\")\n {\n // ccu\n $percent_or_not = \"(%)\";\n\n $config['user_kpi']['4']['acu1'] = 'ACU';\n $config['user_kpi']['4']['pcu1'] = 'PCU';\n \n $config['user_kpi']['4']['aacu1'] = 'Avegare ACU';\n $config['user_kpi']['4']['pacu1'] = 'Peak ACU';\n $config['user_kpi']['4']['apcu1'] = 'Avegare PCU';\n $config['user_kpi']['4']['ppcu1'] = 'Peak PCU';\n \n $config['user_kpi']['31']['aacu1'] = 'Monthly Avegare ACU';\n $config['user_kpi']['31']['pacu1'] = 'Monthly Peak ACU';\n $config['user_kpi']['31']['apcu1'] = 'Monthly Avegare PCU';\n $config['user_kpi']['31']['ppcu1'] = 'Monthly Peak PCU';\n\n // active user\n $config['user_kpi']['4']['aa1'] = 'Avegare A1';\n $config['user_kpi']['4']['pa1'] = 'Peak A1';\n $config['user_kpi']['4']['a1'] = 'A1';\n $config['user_kpi']['5']['a7'] = 'A7';\n $config['user_kpi']['6']['a30'] = 'A30';\n $config['user_kpi']['7']['am'] = 'Monthly Active ' . $kpiName;\n $config['user_kpi']['8']['a60'] = 'A60';\n $config['user_kpi']['9']['a90'] = 'A90';\n $config['user_kpi']['17']['aw'] = 'Weekly Active ' . $kpiName;\n $config['user_kpi']['31']['am'] = 'Monthly Active ' . $kpiName;\n $config['user_kpi']['3']['a3'] = 'A3';\n $config['user_kpi']['14']['a14'] = 'A14';\n\n // new register user\n $config['user_kpi']['4']['n1'] = 'N1';\n $config['user_kpi']['5']['n7'] = 'N7';\n $config['user_kpi']['6']['n30'] = 'N30';\n $config['user_kpi']['7']['nm'] = 'Monthly New ' . $kpiName;\n $config['user_kpi']['8']['n60'] = 'N60';\n $config['user_kpi']['9']['n90'] = 'N90';\n $config['user_kpi']['17']['nw'] = 'Weekly New ' . $kpiName;\n $config['user_kpi']['31']['nm'] = 'Monthly New ' . $kpiName;\n $config['user_kpi']['3']['n3'] = 'N3';\n $config['user_kpi']['14']['n14'] = 'N14';\n\n // retention login count\n $config['user_kpi']['4']['rlc1'] = 'rlc1';\n $config['user_kpi']['5']['rlc7'] = 'rlc7';\n $config['user_kpi']['6']['rlc30'] = 'rlc30';\n $config['user_kpi']['7']['rlcm'] = 'rlcm';\n $config['user_kpi']['8']['rlc60'] = 'rlc60';\n $config['user_kpi']['9']['rlc90'] = 'rlc90';\n\n // retention login rate\n $config['user_kpi']['4']['rr1'] = 'LR1' . $percent_or_not;\n $config['user_kpi']['3']['rr3'] = 'LR3' . $percent_or_not;\n $config['user_kpi']['14']['rr14'] = 'LR14' . $percent_or_not;\n $config['user_kpi']['5']['rr7'] = 'LR7' . $percent_or_not;\n $config['user_kpi']['6']['rr30'] = 'LR30' . $percent_or_not;\n $config['user_kpi']['7']['rrm'] = 'Monthly LR' . $percent_or_not;\n $config['user_kpi']['8']['rr60'] = 'Login Retention Rate 60days' . $percent_or_not;\n $config['user_kpi']['9']['rr90'] = 'Login Retention Rate 90days' . $percent_or_not;\n $config['user_kpi']['17']['rrw'] = 'Weekly Login Retention Rate' . $percent_or_not;\n $config['user_kpi']['31']['rrm'] = 'Monthly Login Retention Rate' . $percent_or_not;\n\n // new user retention count\n $config['user_kpi']['4']['nrc1'] = 'nrc1';\n $config['user_kpi']['5']['nrc7'] = 'nrc7';\n $config['user_kpi']['6']['nrc30'] = 'nrc30';\n $config['user_kpi']['7']['nrcm'] = 'nrcm';\n $config['user_kpi']['8']['nrc60'] = 'nrc60';\n $config['user_kpi']['9']['nrc90'] = 'nrc90';\n\n // new user retention rate\n $config['user_kpi']['4']['nrr1'] = 'RR1' . $percent_or_not;\n $config['user_kpi']['5']['nrr7'] = 'RR7' . $percent_or_not;\n $config['user_kpi']['6']['nrr30'] = 'RR30' . $percent_or_not;\n $config['user_kpi']['7']['nrrm'] = 'Monthly RR' . $percent_or_not;\n $config['user_kpi']['8']['nrr60'] = 'RR60' . $percent_or_not;\n $config['user_kpi']['9']['nrr90'] = 'RR90' . $percent_or_not;\n $config['user_kpi']['17']['nrrw'] = 'Weekly RR' . $percent_or_not;\n $config['user_kpi']['31']['nrrm'] = 'Monthly RR' . $percent_or_not;\n $config['user_kpi']['3']['nrr3'] = 'RR3' . $percent_or_not;\n $config['user_kpi']['14']['nrr14'] = 'RR14' . $percent_or_not;\n\n // churn login count\n $config['user_kpi']['4']['clc1'] = 'clc1';\n $config['user_kpi']['5']['clc7'] = 'clc7';\n $config['user_kpi']['6']['clc30'] = 'clc30';\n $config['user_kpi']['7']['clcm'] = 'clcm';\n $config['user_kpi']['8']['clc60'] = 'clc60';\n $config['user_kpi']['9']['clc90'] = 'clc90';\n\n // playingtime\n $config['user_kpi']['4']['ptime1'] = 'ptime1';\n $config['user_kpi']['3']['ptime3'] = 'ptime3';\n $config['user_kpi']['5']['ptime7'] = 'ptime7';\n $config['user_kpi']['14']['ptime14'] = 'ptime14';\n $config['user_kpi']['6']['ptime30'] = 'ptime30';\n $config['user_kpi']['8']['ptime60'] = 'ptime60';\n $config['user_kpi']['9']['ptime90'] = 'ptime90';\n $config['user_kpi']['17']['ptimew'] = 'ptimew';\n $config['user_kpi']['31']['ptimem'] = 'ptimem';\n\n // paying user\n $config['revenue_kpi']['4']['pu1'] = 'PU1';\n $config['revenue_kpi']['4']['apu1'] = 'Avegare PU1';\n $config['revenue_kpi']['4']['ppu1'] = 'Peak PU1';\n\n $config['revenue_kpi']['5']['pu7'] = 'PU7';\n $config['revenue_kpi']['6']['pu30'] = 'PU30';\n $config['revenue_kpi']['7']['pum'] = 'Monthly Paying ' . $kpiName;\n $config['revenue_kpi']['8']['pu60'] = 'PU60';\n $config['revenue_kpi']['9']['pu90'] = 'PU90';\n $config['revenue_kpi']['17']['puw'] = 'Weekly Paying ' . $kpiName;\n $config['revenue_kpi']['31']['pum'] = 'Monthly Paying ' . $kpiName;\n $config['revenue_kpi']['3']['pu3'] = 'PU3';\n $config['revenue_kpi']['14']['pu14'] = 'PU14';\n\n // paying user revenue\n // luu y kpi_code cua gross va net dat ten bi lon. se gay hiu lam\n $config['revenue_kpi']['4']['gr1'] = 'Revenue in 1days';\n $config['revenue_kpi']['5']['gr7'] = 'Revenue in 7days';\n $config['revenue_kpi']['6']['gr30'] = 'Revenue in 30days';\n $config['revenue_kpi']['7']['grm'] = 'Monthly Revenue';\n $config['revenue_kpi']['8']['gr60'] = 'Revenue in 60days';\n $config['revenue_kpi']['9']['gr90'] = 'Revenue in 90days';\n $config['revenue_kpi']['17']['grw'] = 'Weekly Revenue';\n $config['revenue_kpi']['31']['grm'] = 'Monthly Revenue';\n $config['revenue_kpi']['3']['gr3'] = 'Revenue in 3days';\n $config['revenue_kpi']['14']['gr14'] = 'Revenue in 14days';\n\n $config['revenue_kpi']['4']['nr1'] = 'Gross revenue in 1days';\n $config['revenue_kpi']['5']['nr7'] = 'Gross revenue in 7days';\n $config['revenue_kpi']['6']['nr30'] = 'Gross revenue in 30days';\n $config['revenue_kpi']['7']['nrm'] = 'Monthly Gross revenue';\n $config['revenue_kpi']['8']['nr60'] = 'Gross revenue in 60days';\n $config['revenue_kpi']['9']['nr90'] = 'Gross revenue in 90days';\n $config['revenue_kpi']['17']['nrw'] = 'Weekly Gross revenue';\n $config['revenue_kpi']['31']['nrm'] = 'Monthly Gross revenue';\n $config['revenue_kpi']['3']['nr3'] = 'Gross revenue in 3days';\n $config['revenue_kpi']['14']['nr14'] = 'Gross revenue in 14days';\n\n\n // retention paying count\n $config['revenue_kpi']['4']['rpc1'] = 'rpc1';\n $config['revenue_kpi']['5']['rpc7'] = 'rpc7';\n $config['revenue_kpi']['6']['rpc30'] = 'rpc30';\n $config['revenue_kpi']['7']['rpcm'] = 'rpcm';\n $config['revenue_kpi']['8']['rpc60'] = 'rpc60';\n $config['revenue_kpi']['9']['rpc90'] = 'rpc90';\n\n // churn paying count\n $config['revenue_kpi']['4']['cpc1'] = 'cpc1';\n $config['revenue_kpi']['5']['cpc7'] = 'cpc7';\n $config['revenue_kpi']['6']['cpc30'] = 'cpc30';\n $config['revenue_kpi']['7']['cpcm'] = 'cpcm';\n $config['revenue_kpi']['8']['cpc60'] = 'cpc60';\n $config['revenue_kpi']['9']['cpc90'] = 'cpc90';\n\n // new paying user\n $config['revenue_kpi']['4']['npu1'] = 'New PU1';\n $config['revenue_kpi']['5']['npu7'] = 'New PU7';\n $config['revenue_kpi']['6']['npu30'] = 'New PU30';\n $config['revenue_kpi']['7']['npum'] = 'Monthly New PU';\n $config['revenue_kpi']['8']['npu60'] = 'New PU60';\n $config['revenue_kpi']['9']['npu90'] = 'New PU90';\n $config['revenue_kpi']['17']['npuw'] = 'Weekly New Paying ' . $kpiName;\n $config['revenue_kpi']['31']['npum'] = 'Monthly New Paying ' . $kpiName;\n $config['revenue_kpi']['3']['npu3'] = 'New PU3';\n $config['revenue_kpi']['14']['npu14'] = 'New PU14';\n\n // new paying user revenue\n $config['revenue_kpi']['4']['npu_gr1'] = 'Revenue of New PU1';\n $config['revenue_kpi']['5']['npu_gr7'] = 'Revenue of New PU7';\n $config['revenue_kpi']['6']['npu_gr30'] = 'Revenue of New PU30';\n $config['revenue_kpi']['7']['npu_grm'] = 'Revenue of Monthly PU';\n $config['revenue_kpi']['8']['npu_gr60'] = 'Revenue of New PU60';\n $config['revenue_kpi']['9']['npu_gr90'] = 'Revenue of New PU90';\n $config['revenue_kpi']['17']['npu_grw'] = 'Weekly Revenue of New Paying ' . $kpiName;\n $config['revenue_kpi']['31']['npu_grm'] = 'Monthly Revenue of New Paying ' . $kpiName;\n $config['revenue_kpi']['3']['npu_gr3'] = 'Revenue of New PU3';\n $config['revenue_kpi']['14']['npu_gr14'] = 'Revenue of New PU14';\n\n $config['revenue_kpi']['4']['npu_nr1'] = 'Gross revenue of New PU1';\n $config['revenue_kpi']['5']['npu_nr7'] = 'Gross revenue of New PU7';\n $config['revenue_kpi']['6']['npu_nr30'] = 'Gross revenue of New PU30';\n $config['revenue_kpi']['7']['npu_nrm'] = 'Gross revenue of Monthly PU';\n $config['revenue_kpi']['8']['npu_nr60'] = 'Gross revenue of New PU60';\n $config['revenue_kpi']['9']['npu_nr90'] = 'Gross revenue of New PU90';\n $config['revenue_kpi']['17']['npu_nrw'] = 'Weekly Gross revenue of New Paying ' . $kpiName;\n $config['revenue_kpi']['31']['npu_nrm'] = 'Monthly Gross revenue of New Paying ' . $kpiName;\n $config['revenue_kpi']['3']['npu_nr3'] = 'Gross revenue of New PU3';\n $config['revenue_kpi']['14']['npu_nr14'] = 'Gross revenue of New PU14';\n\n // new regiser & paying user\n $config['revenue_kpi']['4']['nnpu1'] = 'NNPU1';\n $config['revenue_kpi']['5']['nnpu7'] = 'NNPU7';\n $config['revenue_kpi']['6']['nnpu30'] = 'NNPU30';\n $config['revenue_kpi']['7']['nnpum'] = 'Monthly NNPU';\n $config['revenue_kpi']['8']['nnpu60'] = 'NNPU60';\n $config['revenue_kpi']['9']['nnpu90'] = 'NNPU90';\n $config['revenue_kpi']['17']['nnpuw'] = 'Weekly NNPU';\n $config['revenue_kpi']['31']['nnpum'] = 'Monthly NNPU';\n $config['revenue_kpi']['3']['nnpu3'] = 'NNPU3';\n $config['revenue_kpi']['14']['nnpu14'] = 'NNPU14';\n\n // new register & paying user revenue\n $config['revenue_kpi']['4']['nnpu_gr1'] = 'Revenue of NNPU1';\n $config['revenue_kpi']['5']['nnpu_gr7'] = 'Revenue of NNPU7';\n $config['revenue_kpi']['6']['nnpu_gr30'] = 'Revenue of NNPU30';\n $config['revenue_kpi']['7']['nnpu_grm'] = 'Monthly Revenue of NNPU';\n $config['revenue_kpi']['8']['nnpu_gr60'] = 'Revenue of NNPU60';\n $config['revenue_kpi']['9']['nnpu_gr90'] = 'Revenue of NNPU90';\n $config['revenue_kpi']['17']['nnpu_grw'] = 'Weekly Revenue of NNPU';\n $config['revenue_kpi']['31']['nnpu_grm'] = 'Monthly Revenue of NNPU';\n $config['revenue_kpi']['3']['nnpu_gr3'] = 'Revenue of NNPU3';\n $config['revenue_kpi']['14']['nnpu_gr14'] = 'Revenue of NNPU14';\n\n // new register & paying user revenue\n $config['revenue_kpi']['4']['nnpu_nr1'] = 'Gross revenue of NNPU1';\n $config['revenue_kpi']['5']['nnpu_nr7'] = 'Gross revenue of NNPU7';\n $config['revenue_kpi']['6']['nnpu_nr30'] = 'Gross revenue of NNPU30';\n $config['revenue_kpi']['7']['nnpu_nrm'] = 'Monthly Gross revenue of NNPU';\n $config['revenue_kpi']['8']['nnpu_nr60'] = 'Gross revenue of NNPU60';\n $config['revenue_kpi']['9']['nnpu_nr90'] = 'Gross revenue of NNPU90';\n $config['revenue_kpi']['17']['nnpu_nrw'] = 'Weekly Gross revenue of NNPU';\n $config['revenue_kpi']['31']['nnpu_nrm'] = 'Monthly Gross revenue of NNPU';\n $config['revenue_kpi']['3']['nnpu_nr3'] = 'Gross revenue of NNPU3';\n $config['revenue_kpi']['14']['nnpu_nr14'] = 'Gross revenue of NNPU14';\n\n // paying retention rate\n $config['user_kpi']['4']['prr1'] = 'PU Retention 1day' . $percent_or_not;\n $config['user_kpi']['5']['prr7'] = 'PU Retention 7days' . $percent_or_not;\n $config['user_kpi']['6']['prr30'] = 'PU Retention 30days' . $percent_or_not;\n $config['user_kpi']['7']['prrm'] = 'PRRM' . $percent_or_not;\n $config['user_kpi']['8']['prr60'] = 'PU Retention 60days' . $percent_or_not;\n $config['user_kpi']['9']['prr90'] = 'PU Retention 90days' . $percent_or_not;\n //$config['user_kpi']['17']['prrw'] = 'PRRW' . $percent_or_not;\n //$config['user_kpi']['31']['prrm'] = 'PRRM' . $percent_or_not;\n $config['user_kpi']['3']['prr3'] = 'PU Retention 3day' . $percent_or_not;\n $config['user_kpi']['14']['prr14'] = 'PU Retention 14days' . $percent_or_not;\n\n $config['user_kpi']['4']['retention1'] = 'Daily Retention';\n $config['user_kpi']['17']['retentionw'] = 'Weekly Retention';\n $config['user_kpi']['31']['retentionm'] = 'Monthly Retention';\n\n\n // churn rate\n $config['user_kpi']['4']['cr1'] = 'Churn Rate 1day' . $percent_or_not;\n $config['user_kpi']['5']['cr7'] = 'Churn Rate 7days' . $percent_or_not;\n $config['user_kpi']['6']['cr30'] = 'Churn Rate 30days' . $percent_or_not;\n $config['user_kpi']['3']['cr3'] = 'Churn Rate 3days' . $percent_or_not;\n $config['user_kpi']['14']['cr14'] = 'Churn Rate 14days' . $percent_or_not;\n $config['user_kpi']['31']['crm'] = 'Churn Rate Monthly' . $percent_or_not;\n $config['user_kpi']['8']['cr60'] = 'Churn Rate 60days' . $percent_or_not;\n $config['user_kpi']['9']['cr90'] = 'Churn Rate 90days' . $percent_or_not;\n $config['user_kpi']['17']['crw'] = 'Churn Rate Weekly' . $percent_or_not;\n\n // churn paying rate\n $config['user_kpi']['4']['cpr1'] = 'cpr1';\n $config['user_kpi']['5']['cpr7'] = 'cpr7';\n $config['user_kpi']['6']['cpr30'] = 'cpr30';\n $config['user_kpi']['7']['cprm'] = 'cprm';\n $config['user_kpi']['8']['cpr60'] = 'cpr60';\n $config['user_kpi']['9']['cpr90'] = 'cpr90';\n $config['user_kpi']['17']['cprw'] = 'cprw';\n $config['user_kpi']['31']['cprm'] = 'cprm';\n\n // average playingtime (playingtime / a)\n $config['user_kpi']['4']['avgtime1'] = 'Average Playingtime 1 day';\n $config['user_kpi']['3']['avgtime3'] = 'Average Playingtime 3 days';\n $config['user_kpi']['5']['avgtime7'] = 'Average Playingtime 7 days';\n $config['user_kpi']['14']['avgtime14'] = 'Average Playingtime 14 days';\n $config['user_kpi']['6']['avgtime30'] = 'Average Playingtime 30 days';\n $config['user_kpi']['8']['avgtime60'] = 'Average Playingtime 60 days';\n $config['user_kpi']['9']['avgtime90'] = 'Average Playingtime 90 days';\n $config['user_kpi']['17']['avgtimew'] = 'Average Playingtime Weekly';\n $config['user_kpi']['31']['avgtimem'] = 'Average Playingtime Monthly';\n\n // ARPU\n $config['revenue_kpi']['4']['arpu1'] = 'ARPU1';\n $config['revenue_kpi']['5']['arpu7'] = 'ARPU7';\n $config['revenue_kpi']['6']['arpu30'] = 'ARPU30';\n $config['revenue_kpi']['7']['arpum'] = 'ARPUM';\n $config['revenue_kpi']['8']['arpu60'] = 'ARPU60';\n $config['revenue_kpi']['9']['arpu90'] = 'ARPU90';\n $config['revenue_kpi']['17']['arpuw'] = 'Weekly ARPU';\n $config['revenue_kpi']['31']['arpum'] = 'Monthly ARPU';\n $config['revenue_kpi']['3']['arpu3'] = 'ARPU3';\n $config['revenue_kpi']['14']['arpu14'] = 'ARPU14';\n\n // ARPPU\n $config['revenue_kpi']['4']['arppu1'] = 'ARPPU1';\n $config['revenue_kpi']['5']['arppu7'] = 'ARPPU7';\n $config['revenue_kpi']['6']['arppu30'] = 'ARPPU30';\n $config['revenue_kpi']['8']['arppu60'] = 'ARPPU60';\n $config['revenue_kpi']['9']['arppu90'] = 'ARPPU90';\n $config['revenue_kpi']['17']['arppuw'] = 'Weekly ARPPU';\n $config['revenue_kpi']['31']['arppum'] = 'Monthly ARPPU';\n $config['revenue_kpi']['3']['arppu3'] = 'ARPPU3';\n $config['revenue_kpi']['14']['arppu14'] = 'ARPPU14';\n\n\n // conversion rate (pu / a)\n $config['revenue_kpi']['4']['cvr1'] = 'Conversion Rate 1day' . $percent_or_not;\n $config['revenue_kpi']['5']['cvr7'] = 'Conversion Rate 7days' . $percent_or_not;\n $config['revenue_kpi']['6']['cvr30'] = 'Conversion Rate 30days' . $percent_or_not;\n $config['revenue_kpi']['8']['cvr60'] = 'Conversion Rate 60days' . $percent_or_not;\n $config['revenue_kpi']['9']['cvr90'] = 'Conversion Rate 90days' . $percent_or_not;\n $config['revenue_kpi']['17']['cvrw'] = 'Conversion Rate Weekly' . $percent_or_not;\n $config['revenue_kpi']['31']['cvrm'] = 'Conversion Rate Monthly' . $percent_or_not;\n $config['revenue_kpi']['3']['cvr3'] = 'Conversion Rate 3day' . $percent_or_not;\n $config['revenue_kpi']['14']['cvr14'] = 'Conversion Rate 14days' . $percent_or_not;\n\n\n if ($header == true) {\n // avice user tren\n $config['user_kpi']['4']['a1_trend'] = 'a1_trend';\n $config['user_kpi']['5']['a7_trend'] = 'a7_trend';\n $config['user_kpi']['6']['a30_trend'] = 'a30_trend';\n $config['user_kpi']['7']['am_trend'] = 'am_trend';\n $config['user_kpi']['8']['a60_trend'] = 'a60_trend';\n $config['user_kpi']['9']['a90_trend'] = 'a90_trend';\n $config['user_kpi']['17']['aw_trend'] = 'aw_trend';\n $config['user_kpi']['31']['am_trend'] = 'am_trend';\n $config['user_kpi']['3']['a3_trend'] = 'a3_trend';\n $config['user_kpi']['14']['a14_trend'] = 'a14_trend';\n\n // new register trend\n $config['user_kpi']['4']['n1_trend'] = 'n1_trend';\n $config['user_kpi']['5']['n7_trend'] = 'n7_trend';\n $config['user_kpi']['6']['n30_trend'] = 'n30_trend';\n $config['user_kpi']['7']['nm_trend'] = 'nm_trend';\n $config['user_kpi']['8']['n60_trend'] = 'n60_trend';\n $config['user_kpi']['9']['n90_trend'] = 'n90_trend';\n $config['user_kpi']['17']['nw_trend'] = 'nw_trend';\n $config['user_kpi']['31']['nm_trend'] = 'nm_trend';\n $config['user_kpi']['3']['n3_trend'] = 'n3_trend';\n $config['user_kpi']['14']['n14_trend'] = 'n14_trend';\n\n // retention rate\n $config['user_kpi']['17']['rrw_trend'] = 'rrw_trend';\n $config['user_kpi']['31']['rrm_trend'] = 'rrm_trend';\n\n // new user retention rate\n $config['user_kpi']['17']['nrrw_trend'] = 'nrrw_trend';\n $config['user_kpi']['31']['nrrm_trend'] = 'nrrm_trend';\n\n /* $config['user_kpi']['4']['cvrr1'] = 'cvrr1';\n $config['user_kpi']['5']['cvrr7'] = 'cvrr7';\n $config['user_kpi']['6']['cvrr30'] = 'cvrr30';\n $config['user_kpi']['7']['cvrrm'] = 'cvrrm'; */\n\n // gross revenue trend\n $config['user_kpi']['4']['gr1_n_trend'] = 'rv1_n_trend';\n $config['user_kpi']['5']['gr7_n_trend'] = 'rv7_n_trend';\n $config['user_kpi']['6']['gr30_n_trend'] = 'rv30_n_trend';\n $config['user_kpi']['7']['grm_n_trend'] = 'rvm_n_trend';\n $config['user_kpi']['8']['gr60_n_trend'] = 'rv60_n_trend';\n $config['user_kpi']['9']['gr90_n_trend'] = 'rv90_n_trend';\n $config['user_kpi']['17']['grw_n_trend'] = 'rvw_n_trend';\n $config['user_kpi']['31']['grm_n_trend'] = 'rvm_n_trend';\n $config['user_kpi']['3']['gr3_n_trend'] = 'rv3_n_trend';\n $config['user_kpi']['14']['gr14_n_trend'] = 'rv14_n_trend';\n\n $config['revenue_kpi']['4']['arpu1_trend'] = 'arpu1_trend';\n $config['revenue_kpi']['5']['arpu7_trend'] = 'arpu7_trend';\n $config['revenue_kpi']['6']['arpu30_trend'] = 'arpu30_trend';\n $config['revenue_kpi']['7']['arpum_trend'] = 'arpum_trend';\n $config['revenue_kpi']['8']['arpu60_trend'] = 'arpu60_trend';\n $config['revenue_kpi']['9']['arpu90_trend'] = 'arpu90_trend';\n $config['revenue_kpi']['17']['arpuw_trend'] = 'arpuw_trend';\n $config['revenue_kpi']['31']['arpum_trend'] = 'arpum_trend';\n $config['revenue_kpi']['3']['arpu3_trend'] = 'arpu3_trend';\n $config['revenue_kpi']['14']['arpu14_trend'] = 'arpu14_trend';\n\n $config['revenue_kpi']['4']['arppu1_trend'] = 'arppu1_trend';\n $config['revenue_kpi']['5']['arppu7_trend'] = 'arppu7_trend';\n $config['revenue_kpi']['6']['arppu30_trend'] = 'arppu30_trend';\n $config['revenue_kpi']['8']['arppu60_trend'] = 'arppu60_trend';\n $config['revenue_kpi']['9']['arppu90_trend'] = 'arppu90_trend';\n $config['revenue_kpi']['17']['arppuw_trend'] = 'arppuw_trend';\n $config['revenue_kpi']['31']['arppum_trend'] = 'arppum_trend';\n $config['revenue_kpi']['3']['arppu3_trend'] = 'arppu3_trend';\n $config['revenue_kpi']['14']['arppu14_trend'] = 'arppu14_trend';\n\n $config['revenue_kpi']['4']['cvr1_trend'] = 'cvr1_trend';\n $config['revenue_kpi']['5']['cvr7_trend'] = 'cvr7_trend';\n $config['revenue_kpi']['6']['cvr30_trend'] = 'cvr30_trend';\n $config['revenue_kpi']['8']['cvr60_trend'] = 'cvr60_trend';\n $config['revenue_kpi']['9']['cvr90_trend'] = 'cvr90_trend';\n $config['revenue_kpi']['17']['cvrw_trend'] = 'cvrw_trend';\n $config['revenue_kpi']['31']['cvrm_trend'] = 'cvrm_trend';\n $config['revenue_kpi']['3']['cvr3_trend'] = 'cvr3_trend';\n $config['revenue_kpi']['14']['cvr14_trend'] = 'cvr14_trend';\n\n // paying user trend\n $config['revenue_kpi']['4']['pu1_trend'] = 'pu1_trend';\n $config['revenue_kpi']['5']['pu7_trend'] = 'pu7_trend';\n $config['revenue_kpi']['6']['pu30_trend'] = 'pu30_trend';\n $config['revenue_kpi']['7']['pum_trend'] = 'pum_trend';\n $config['revenue_kpi']['8']['pu60_trend'] = 'pu60_trend';\n $config['revenue_kpi']['9']['pu90_trend'] = 'pu90_trend';\n $config['revenue_kpi']['17']['puw_trend'] = 'puw_trend';\n $config['revenue_kpi']['31']['pum_trend'] = 'pum_trend';\n $config['revenue_kpi']['3']['pu3_trend'] = 'pu3_trend';\n $config['revenue_kpi']['14']['pu14_trend'] = 'pu14_trend';\n\n // gross revenue trend\n $config['revenue_kpi']['4']['gr1_trend'] = 'rv1_trend';\n $config['revenue_kpi']['5']['gr7_trend'] = 'rv7_trend';\n $config['revenue_kpi']['6']['gr30_trend'] = 'rv30_trend';\n $config['revenue_kpi']['7']['grm_trend'] = 'rvm_trend';\n $config['revenue_kpi']['8']['gr60_trend'] = 'rv60_trend';\n $config['revenue_kpi']['9']['gr90_trend'] = 'rv90_trend';\n $config['revenue_kpi']['17']['grw_trend'] = 'rvw_trend';\n $config['revenue_kpi']['31']['grm_trend'] = 'rvm_trend';\n $config['revenue_kpi']['3']['gr3_trend'] = 'rv3_trend';\n $config['revenue_kpi']['14']['gr14_trend'] = 'rv14_trend';\n\n // new paying user trend\n $config['revenue_kpi']['4']['npu1_trend'] = 'npu1_trend';\n $config['revenue_kpi']['5']['npu7_trend'] = 'npu7_trend';\n $config['revenue_kpi']['6']['npu30_trend'] = 'npu30_trend';\n $config['revenue_kpi']['7']['npum_trend'] = 'npum_trend';\n $config['revenue_kpi']['8']['npu60_trend'] = 'npu60_trend';\n $config['revenue_kpi']['9']['npu90_trend'] = 'npu90_trend';\n $config['revenue_kpi']['17']['npuw_trend'] = 'npuw_trend';\n $config['revenue_kpi']['31']['npum_trend'] = 'npum_trend';\n $config['revenue_kpi']['3']['npu3_trend'] = 'npu3_trend';\n $config['revenue_kpi']['14']['npu14_trend'] = 'npu14_trend';\n\n // new paying gross revenue trend\n $config['revenue_kpi']['4']['npu_gr1_trend'] = 'npu_rv1_trend';\n $config['revenue_kpi']['5']['npu_gr7_trend'] = 'npu_rv7_trend';\n $config['revenue_kpi']['6']['npu_gr30_trend'] = 'npu_rv30_trend';\n $config['revenue_kpi']['7']['npu_grm_trend'] = 'npu_rvm_trend';\n $config['revenue_kpi']['8']['npu_gr60_trend'] = 'npu_rv60_trend';\n $config['revenue_kpi']['9']['npu_gr90_trend'] = 'npu_rv90_trend';\n $config['revenue_kpi']['17']['npu_grw_trend'] = 'npu_rvw_trend';\n $config['revenue_kpi']['31']['npu_grm_trend'] = 'npu_rvm_trend';\n $config['revenue_kpi']['3']['npu_gr3_trend'] = 'npu_rv3_trend';\n $config['revenue_kpi']['14']['npu_gr14_trend'] = 'npu_rv14_trend';\n\n // new user & paying user trend\n\n $config['revenue_kpi']['17']['nnpuw_trend'] = 'nnpuw_trend';\n $config['revenue_kpi']['31']['nnpum_trend'] = 'nnpum_trend';\n\n // new user & paying user gross revenue trend\n $config['revenue_kpi']['4']['nnpu_gr1_trend'] = 'nnpu_rv1_trend';\n $config['revenue_kpi']['5']['nnpu_gr7_trend'] = 'nnpu_rv7_trend';\n $config['revenue_kpi']['6']['nnpu_gr30_trend'] = 'nnpu_rv30_trend';\n $config['revenue_kpi']['7']['nnpu_grm_trend'] = 'nnpu_rvm_trend';\n $config['revenue_kpi']['8']['nnpu_gr60_trend'] = 'nnpu_rv60_trend';\n $config['revenue_kpi']['9']['nnpu_gr90_trend'] = 'nnpu_rv90_trend';\n $config['revenue_kpi']['17']['nnpu_grw_trend'] = 'nnpu_rvw_trend';\n $config['revenue_kpi']['31']['nnpu_grm_trend'] = 'nnpu_rvm_trend';\n $config['revenue_kpi']['3']['nnpu_gr3_trend'] = 'nnpu_rv3_trend';\n $config['revenue_kpi']['14']['nnpu_gr14_trend'] = 'nnpu_rv14_trend';\n }\n return $config;\n }", "public function tampilDataGalang(){\n\t\t\n\t}", "public function cetak_dokumen(){\n\t\t$data['ambil_profil_usp']=$this->Tu_model->Select_satu('tbl_profil_usp', 'aktif', 'Ya');\n $id_pemanfaat = base64_decode($this->uri->segment(3));\n $id_pinjaman = base64_decode($this->uri->segment(4));\n $data['id_pemanfaat'] = $id_pemanfaat;\n $data['id_pinjaman'] = $id_pinjaman;\n $data['aksi'] = 'Dokumen Pinjaman';\n $data['target_kembali'] = 'pinjaman/'.$this->uri->segment(3);\n $data['ambil_dokumen_pinjaman']=$this->Tu_model->Select_satu('tbl_dokumen','id_pinjaman',$id_pinjaman);\n $data['ambil_pemanfaat']=$this->Tu_model->Select_satu('tbl_pemanfaat','id_pemanfaat',$id_pemanfaat);\n $data['ambil_pinjaman']=$this->Tu_model->Select_satu('tbl_pinjaman','id_pinjaman',$id_pinjaman);\n $data['ambil_agunan']=$this->Tu_model->Select_satu('tbl_agunan','id_pinjaman',$id_pinjaman);\n $data['ambil_status_pembayaran']=$this->Tu_model->Select_query(\"select max(tanggal_pinjaman) as tanggal, id_pinjaman , status_pembayaran\n from tbl_pinjaman where id_pemanfaat='$id_pemanfaat'\");\n $data['ambil_kades']=$this->Tu_model->Select_satu('tbl_kades','status_kades',\"Aktif\");\n $data['ambil_bpd']=$this->Tu_model->Select_satu('tbl_bpd','status_bpd',\"Aktif\");\n $data['ambil_pendamping']=$this->Tu_model->Select_satu('tbl_pendamping_desa','status_pendamping_desa ',\"Aktif\");\n $data['ambilPengurus']=$this->Tu_model->Select_satu('tbl_pengurus','status_pengurus',\"Aktif\");\n $this->load->view('tu/pemeriksaan_kelengkapan', $data);\n\n }", "public function aksi_tambah_kades()\n {\n $kata_sandi = $this->input->post('row_password');\n $kata_sandi_hash = sha1($kata_sandi);\n $data = array(\n 'nik' => $this->input->post('nik'),\n 'nip' => $this->input->post('nip'),\n 'nama' => $this->input->post('nama'),\n 'alamat' => $this->input->post('alamat'),\n 'rt' => $this->input->post('rt'),\n 'kelurahan' => $this->input->post('kelurahan'),\n 'kecamatan' => $this->input->post('kecamatan'),\n 'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n 'agama' => $this->input->post('agama'),\n 'tempat_lahir' => $this->input->post('tempat_lahir'),\n 'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n 'status_perkawinan' => $this->input->post('status_perkawinan'),\n 'pekerjaan' => $this->input->post('pekerjaan'),\n 'golongan_darah' => $this->input->post('golongan_darah'),\n 'kewarganegaraan' => $this->input->post('kewarganegaraan'),\n 'kata_sandi' => $kata_sandi_hash,\n 'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n 'no_kk' => $this->input->post('no_kk'),\n 'status_hub_kel' => $this->input->post('status_hub_kel'),\n 'no_hp' => $this->input->post('no_hp'),\n );\n\n $this->m_admin->tambah_kades($data);\n $this->session->set_flashdata('success', 'ditambahkan');\n redirect('admin/list_data_kades');\n }", "public function aksi_tambah_permohonan_suket005()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'alamat' => $this->input->post('alamat'),\n\t\t\t'nama_kegiatan' => $this->input->post('nama_kegiatan'),\n\t\t\t'hari_kegiatan' => $this->input->post('hari_kegiatan'),\n\t\t\t'tanggal_kegiatan' => $this->input->post('tanggal_kegiatan'),\n\t\t\t'jam' => $this->input->post('jam'),\n\t\t\t'tempat' => $this->input->post('tempat'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_izin_keramaian');\n\t\tif ($_FILES != null) {\n\t\t\t$this->aksi_upload_lampiran_suket005($id_surat);\n\t\t}\n\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket005/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function loadConfig(){\n\t\t\n\t\t$opt[] = [\n\t\t\t'method' => 'setFormParams',\n\t\t\t'value'=>$this->paramsLoad(3, \\sevian\\s::getReq('command_idx'), \\sevian\\s::getReq('unit_idx'))\n\t\t\t\n\t\t];\n\t\t$this->info = $opt;//$form->getInfo();\n\t}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('Show manufacturer name'),\n 'name' => 'MF_TITLE',\n 'label' => $this->l('Enable Manufacturers Name'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('Show manufacturer description'),\n 'name' => 'MF_DESCRIPTION',\n 'label' => $this->l('Provide a description for the heading'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('Number of manufacturers to display (Enter 0 to display all)'),\n 'name' => 'MF_MAN_NUMBER',\n 'label' => $this->l('Number of Manufacturers'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('How many logo\\'s should be visible on desktops'),\n 'name' => 'MF_PER_ROW_DESKTOP',\n 'label' => $this->l('Logo\\'s per row (Desktop)'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('How many logo\\'s should be visible on tablets'),\n 'name' => 'MF_PER_ROW_TABLET',\n 'label' => $this->l('Logo\\'s per row (Tablet)'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('How many logo\\'s should be visible on mobiles'),\n 'name' => 'MF_PER_ROW_MOBILE',\n 'label' => $this->l('Logo\\'s per row (Mobile)'),\n 'required' => true,\n ),\n array(\n 'type' => 'select',\n 'desc' => 'How the logo\\'s should be sorted',\n 'name' => 'MF_MAN_ORDER',\n 'label' => $this->l('Order by'),\n 'options' => array(\n 'query' => array(\n array(\n 'id_option' => 'name_asc',\n 'name' => $this->l('Name ASC'),\n ),\n array(\n 'id_option' => 'name_desc',\n 'name' => $this->l('Name DESC'),\n ),\n array(\n 'id_option' => 'manu_asc',\n 'name' => $this->l('Manufacturer ID ASC'),\n ),\n array(\n 'id_option' => 'manu_desc',\n 'name' => $this->l('Manufacturer ID DESC'),\n ),\n ),\n 'id' => 'id_option',\n 'name' => 'name',\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Enable Manufacturers Name'),\n 'name' => 'MF_SHOW_MAN_NAME',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => 1,\n 'label' => $this->l('Yes'),\n ),\n array(\n 'id' => 'active_off',\n 'value' => 0,\n 'label' => $this->l('No'),\n )\n ),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "public function set_pengiriman($id){ // untuk membuat database langkah pengiriman\n\t\t$cek = $this->M_biodata->get_biodata($id)->result();\n\t\t$this->load->model('M_transaksi');\n\t\tif (count($cek)>0){\n\t\t\tforeach ($cek as $c){\n\t\t\t\t\n\t\t\t};\n\t\t\t$data = array(\n\t\t\t'nama' => $c->namaAlumni,\n\t\t\t'alamat' => $c->alamat,\n\t\t\t'noHp' => $c->noHp,\n\t\t\t'id_pemesan' => $c->id_alumni\n\t\t\t);\t\n\t\t\t$this->M_transaksi->set_pengiriman($data,'pengiriman');\n\t\t$this->set_pembayaran($id);\n\t\t}\n\t}", "function tambah_mk($SKSMK){\r\n\t\t\t// Format seperti di bawah ini secara otomatis akan\r\n\t\t\t// menambahkan data atau nilai baru ke dalam array\r\n\t\t\t// pada indeks paling belakang.\r\n\t\t\t// Jadi apabila sudah ada 5 data pada array tsb,\r\n\t\t\t// maka data baru akan disimpan pada posisi ke-6.\r\n\t\t\t$this->NamaMataKuliah[] = $SKSMK;\r\n\t\t}", "function exif_admin_settings_form() {\n $forms = array();\n /*$forms['exif_granularity'] = array(\n '#type'\t=>\t'select',\n '#title'=>\tt('Granularity'),\n '#options'=> array(0=>t('Default'),1=>('Day')),\n '#default_value'=>variable_get('exif_granularity',0),\n '#description'=>t('If a timestamp is select (for example the date the picture was taken), you can specify here how granular the timestamp should be. If you select default it will just take whatever is available in the picture. If you select Day, the Date saved will look something like 13-12-2008. This can be useful if you want to use some kind of grouping on the data.'),\n );*/\n\n $all_nodetypes = node_type_get_types();\n $all_nt = array();\n foreach ($all_nodetypes as $item) {\n $all_nt[$item->type] = $item->name;\n }\n $forms['exif_nodetypes'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Nodetypes'),\n '#options' => $all_nt,\n '#default_value' => variable_get('exif_nodetypes', array()),\n '#description' => t('Select nodetypes which should be checked for itpc & exif data. In case the nodetypes contains more than one image field, the module will use the first one.'),\n );\n\n if (module_exists(\"media\")) {\n $all_mt = array();\n // Setup media types\n $types = media_type_get_types();\n foreach ($types as $key) {\n $all_mt[$key->name] = $key->name;\n }\n $forms['exif_mediatypes'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Mediatypes'),\n '#options' => $all_mt,\n '#default_value' => variable_get('exif_mediatypes', array()),\n '#description' => t('Select mediatypes which should be checked for itpc & exif data.'),\n );\n }\n\n\n $forms['exif_update'] = array(\n '#type' => 'checkbox',\n '#title' => t('Refresh on node update'),\n '#default_value' => variable_get('exif_update', TRUE),\n '#description' => t('If you enable this option, Exif data is being updated when the node is being updated.'),\n );\n\n $forms['exif_empty_values'] = array(\n '#type' => 'checkbox',\n '#title' => t('Write empty image data?'),\n '#default_value' => variable_get('exif_empty_values', TRUE),\n '#description' => t(\"If checked all values will be written. So for example if you want to read the creation date from EXIF, but it's not available, it will just write an empty string. If unchecked, empty strings will not be written. This might be the desired behavior, if you have a default value for the CCK field.\"),\n );\n\n $all_vocabularies = taxonomy_get_vocabularies();\n $all_vocs = array();\n $all_vocs[0] = 'None';\n foreach($all_vocabularies as $item){\n $all_vocs[$item->vid] = $item->name;\n }\n $forms['exif_vocabulary'] = array(\n\t\t'#type'\t=>\t'select',\n\t\t'#title'=>\tt('Vocabulary'),\n\t\t'#options'=> $all_vocs,\n\t\t'#default_value'=>variable_get('exif_vocabulary',array()),\n\t\t'#description'=> t('Select vocabulary which should be used for itpc & exif data.'),\n );\n //TODO: add a button to create a vocabulary \"images'metadata\" (exif,iptc and xmp data contains in jpef file)\n //TODO : add a button to create an Photo node with default exif field (title,model,keywords) and default behavior but 'promoted to front'\n //TODO : Check if the media module is install to add automatically the image type active and add active default exif field (title,model,keywords).\n return system_settings_form($forms);\n}", "function data_mhs(){\r\n\t\t\techo \"KodeMataKuliah : \".$this->KodeMataKuliah.\"<br />\";\r\n\t\t\techo \"SKS : \".$this->SKS.\"<br />\";\r\n\t\t\techo \"Daftar matakuliah yang diambil:<br />\";\r\n\t\t\t\r\n\t\t\t$i = 0; // nomor urut daftar SKS matakuliah yang diambil\r\n\t\t\tforeach($this->NamaMataKuliah as $mk){\r\n\t\t\t\techo ++$i.\". \".$mk.\"<br />\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Cuma buat ganti baris aja kok :-)\r\n\t\t\techo \"<br />\";\r\n\t\t}", "public function tambah_toko(){\n\t}", "public function simpanDataPengadilan($post){\n\t\t$connection \t= $this->db;\n\t\t$isNewRecord \t= htmlspecialchars($post['isNewRecord'], ENT_QUOTES);\n\t\t$tingkat \t\t= htmlspecialchars($post['tingkat'], ENT_QUOTES);\n\t\t$propinsi \t\t= htmlspecialchars($post['propinsi'], ENT_QUOTES);\n\t\t$kabupaten \t\t= htmlspecialchars($post['kabupaten'], ENT_QUOTES);\n\t\t$deskripsi \t\t= htmlspecialchars($post['deskripsi'], ENT_QUOTES);\n\t\t$alamat \t\t= htmlspecialchars($post['alamat'], ENT_QUOTES);\n\t\t\n\t\tif($tingkat == \"\" || $propinsi == \"\"){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Tingkat pengadilan, dan provinsi harus diisi\");\n\t\t} else if($tingkat == \"2\" && ($propinsi == \"\" || $kabupaten == \"\")){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Tingkat pengadilan, provinsi, dan kabupaten harus diisi\");\n\t\t} else{\n\t\t\t$transaction = $connection->beginTransaction();\n\t\t\ttry {\n\t\t\t\tif($isNewRecord){\n\t\t\t\t\tif($tingkat == 1){\n\t\t\t\t\t\t$cek1 = \"select deskripsi from datun.m_propinsi where id_prop = '\".$propinsi.\"'\";\n\t\t\t\t\t\t$prop = $connection->createCommand($cek1)->queryScalar();\n\t\t\t\t\t\t$sql1 = \"insert into datun.pengadilan_tk1 values('\".$propinsi.\"', 'Pengadilan Tinggi \".ucwords(strtolower($prop)).\"', '\".$alamat.\"')\";\n\t\t\t\t\t} else if($tingkat == 2){\n\t\t\t\t\t\t$cek1 = \"select deskripsi_kabupaten_kota from datun.m_kabupaten where id_prop = '\".$propinsi.\"' and id_kabupaten_kota = '\".$kabupaten.\"'\";\n\t\t\t\t\t\t$prop = $connection->createCommand($cek1)->queryScalar();\n\t\t\t\t\t\t$sql1 = \"insert into datun.pengadilan_tk2 values('\".$propinsi.\"', '\".$kabupaten.\"', 'Pengadilan Negeri \".ucwords(strtolower($prop)).\"', '\".$alamat.\"')\";\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\tif($kabupaten == '00'){\n\t\t\t\t\t\t$sql1 = \"update datun.pengadilan_tk1 set deskripsi_tk1 = '\".$deskripsi.\"', alamat = '\".$alamat.\"' where kode_pengadilan_tk1 = '\".$propinsi.\"'\";\n\t\t\t\t\t} else{\n\t\t\t\t\t\t$sql1 = \"update datun.pengadilan_tk2 set deskripsi_tk2 = '\".$deskripsi.\"', alamat = '\".$alamat.\"' where kode_pengadilan_tk1 = '\".$propinsi.\"' \n\t\t\t\t\t\t\t\tand kode_pengadilan_tk2 = '\".$kabupaten.\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$connection->createCommand($sql1)->execute();\n\t\t\t\t$transaction->commit();\n\t\t\t\treturn array(\"hasil\"=>true, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t$transaction->rollBack();\n\t\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t}\n\t\t}\n\t}", "function tambah()\n {\n $site = $this->Konfigurasi_model->listing();\n $data = array(\n 'title' => 'Action | ' . $site['nama_website'],\n 'favicon' => $site['favicon'],\n 'site' => $site,\n );\n $this->load->library('form_validation');\n $this->form_validation->set_rules('nama_action', 'Nama Action', 'required');\n if ($this->form_validation->run()) {\n\n $params = array(\n 'nama_action' => $this->input->post('nama_action'),\n );\n $this->Config_model->input_data($params);\n redirect('admin/config/action');\n } else {\n $this->template->load('alayout/template', 'admin/config/add', $data);\n }\n }", "public function aksi_tambah_permohonan_suket010()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama_anak' => $this->input->post('nama_anak'),\n\t\t\t'hari_lahir' => $this->input->post('hari_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'jam_lahir' => $this->input->post('jam_lahir'),\n\t\t\t'kelahiran' => $this->input->post('kelahiran'),\n\t\t\t'kembar_ke' => $this->input->post('kembar_ke'),\n\t\t\t'tempat_persalinan' => $this->input->post('tempat_persalinan'),\n\t\t\t'alamat_persalinan' => $this->input->post('alamat_persalinan'),\n\t\t\t'penolong_persalinan' => $this->input->post('penolong_persalinan'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'nama_ibu' => $this->input->post('nama_ibu'),\n\t\t\t'tanggal_lahir_ibu' => $this->input->post('tanggal_lahir_ibu'),\n\t\t\t'alamat_ibu' => $this->input->post('alamat_ibu'),\n\t\t\t'umur_ibu' => $this->input->post('umur_ibu'),\n\t\t\t'kewarganegaraan_ibu' => $this->input->post('kewarganegaraan_ibu'),\n\t\t\t'nama_ayah' => $this->input->post('nama_ayah'),\n\t\t\t'tanggal_lahir_ayah' => $this->input->post('tanggal_lahir_ayah'),\n\t\t\t'umur_ayah' => $this->input->post('umur_ayah'),\n\t\t\t'kewarganegaraan_ayah' => $this->input->post('kewarganegaraan_ayah'),\n\t\t\t'no_kk' => $this->input->post('no_kk'),\n\t\t\t'no_ktp' => $this->input->post('no_ktp'),\n\t\t\t'nama_pemohon' => $this->input->post('nama_pemohon'),\n\t\t\t'hubungan_dengan_bayi' => $this->input->post('hubungan_dengan_bayi'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_kelahiran');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket010/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function tambah_dok()\n {\n $id_pros = $this->uri->segment(3);\n\n $data = ['aktif' => 'prospektus',\n 'id_pros' => $id_pros\n ];\n\n $this->template->load('template', 'prospektus/V_tambah_dok', $data);\n }", "public function aksi_tambah_permohonan_suket013()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t\t'penghasilan' => $this->input->post('penghasilan'),\n\t\t\t'terbilang' => $this->input->post('terbilang'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_penghasilan');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket013/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function setoran_pokok()\n\t{\n\t\t$data['rembugs'] = $this->model_cif->get_cm_data();\n\t\t$data['container'] = 'transaction/setoran_pokok';\n\t\t$this->load->view('core',$data);\n\t}", "public function karyawan(){\n $this->setActualJadwal(TRUE);\n $this->load->model('jadwal_detail_model', 'jdm');\n $periodeTerpilih = $this->input->post('periode');\n if(empty($periodeTerpilih)){\n $tanggalTerpilih = date('Y-m-d');\n }else{\n $tanggalTerpilih = date($periodeTerpilih.'-01');\n }\n \n $idJadwal = $this->jdm->fields(['jadwal_id'])->get_by(['nik' => $this->getNIK(), 'tanggalabsensi' => $tanggalTerpilih]);\n if(!empty($idJadwal)){\n $this->load->model('User_model', 'um');\n $_POST['key'] = ['id' => $idJadwal->jadwal_id];\n $bawahan = $this->getBawahan();\n $nikBawahan = array_column($this->um->as_array()->fields('ref_nik')->get_many(array_keys($bawahan)),'ref_nik');\n $this->setFilterNik($nikBawahan);\n $this->setMarkToday(TRUE);\n $this->edit();\n }else{\n echo 'Data jadwal tidak ditemukan untuk tanggal '.tglIndonesia($tanggalTerpilih);\n }\n }", "private function inicializa_propiedades(): array\n {\n $identificador = \"cat_sat_tipo_producto_id\";\n $propiedades = array(\"label\" => \"SAT - Tipo\");\n $pr = $this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"cat_sat_division_producto_id\";\n $propiedades = array(\"label\" => \"SAT - División\", \"con_registros\" => false);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n\n $identificador = \"cat_sat_grupo_producto_id\";\n $propiedades = array(\"label\" => \"SAT - Grupo\", \"con_registros\" => false);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"cat_sat_clase_producto_id\";\n $propiedades = array(\"label\" => \"SAT - Clase\", \"con_registros\" => false);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"cat_sat_producto_id\";\n $propiedades = array(\"label\" => \"SAT - Producto\", \"con_registros\" => false, \"cols\" => 12);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"cat_sat_unidad_id\";\n $propiedades = array(\"label\" => \"SAT - Unidad\", \"cols\" => 6);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"cat_sat_obj_imp_id\";\n $propiedades = array(\"label\" => \"Objeto del Impuesto\", \"cols\" => 6);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"com_tipo_producto_id\";\n $propiedades = array(\"label\" => \"Tipo Producto\", \"cols\" => 6);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"cat_sat_conf_imps_id\";\n $propiedades = array(\"label\" => \"Conf Impuestos\", \"cols\" => 12);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"codigo\";\n $propiedades = array(\"place_holder\" => \"Código\", \"cols\" => 6);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"descripcion\";\n $propiedades = array(\"place_holder\" => \"Producto\", \"cols\" => 12);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"precio\";\n $propiedades = array(\"place_holder\" => \"Precio\", \"cols\" => 6);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n return $this->keys_selects;\n }", "public function add_data_mahasiswa()\n\t{\n\t\t$save = $this->input->post('add_mahasiswa');\n\t\t$kelas = 't_kelas';\n\t\t$tahun = 't_tahun_akademik';\n\t\t$prodi = \"t_prodi\";\n\t\t$data['kelas'] = $this->m_aka->get_all($kelas);\n\t\t$data['tahun_aka'] = $this->m_aka->get_all($tahun);\n\t\t$data['prodi'] = $this->m_aka->get_all($prodi);\n\t\t$data['content'] = 'mahasiswa/tambah_mahasiswa';\n\t\t$this->load->view('content', $data);\n\t}", "public function config()\n {\n $errors = [];\n $values = [];\n\n if ($this->request->isPost()) {\n $values = $this->request->getValues();\n\n $validation_errors = $this->validateValues($values);\n\n if (!$validation_errors) {\n $values['human_name'] = $this->fixHumanName($values['human_name']); \n $machine_name = $this->createMachineName($values['human_name']);\n $beauty_name = $this->beautyName($values['human_name']);\n $values['machine_name'] = $machine_name;\n $values['beauty_name'] = $beauty_name;\n $type_id = $this->db->table(MetadataTypeModel::TABLE)->persist($values);\n if ($type_id) {\n $this->flash->success(t('Metadata type created successfully.'));\n } else {\n $this->flash->failure(t('Error saving the metadata type. Retry.'));\n }\n } else {\n $errors = $validation_errors;\n $this->flash->failure(t('There are errors in your submission.'));\n }\n }\n\n $metadataTypes = $this->metadataTypeModel->getAll();\n\n $this->response->html($this->helper->layout->config('MetaMagik:config/metadata_types', [\n 'values' => $values,\n 'errors' => $errors,\n 'types' => $metadataTypes,\n 'title' => t('Settings').' &gt; '.t('Custom Fields'),\n ]));\n }", "function pertek(){\n\t\t$id_pegawai = $this->session->userdata('pegawai_info');\n\t\t$pegawai = $this->m_profil->ini_pegawai_master($id_pegawai);\n\t\t$boleh = $this->session->userdata('boleh');\n\t\t$data['data'] = $this->m_profil->get_pertek($id_pegawai);\n\t\t\n\t\tif(!empty($data['data'])){\n\t\t\t$dok_ref = $this->m_edok->cek_dokumen($pegawai->nip_baru,\"pertek\",$data['data']->id_pertek);\n\t\t\t@$data['thumb'] = (empty($dok_ref))?\"assets/file/foto/photo.jpg\":\"assets/media/file/\".$pegawai->nip_baru.\"/pertek/thumb_\".$dok_ref[0]->file_dokumen;\n\t\t} else {\n\t\t\t$data['thumb'] = \"assets/file/foto/photo.jpg\";\n\t\t}\n\n\t\t$sess = $this->session->userdata('logged_in');\n\t\t$data['editable'] = (($sess['group_name']==\"admin\" || $sess['group_name']==\"pengelola\") && $boleh==\"ya\")?\"yes\":\"no\";\n\t\t$this->load->view('profile/pertek',$data);\n\t}", "public function admin_options(){\r\n echo '<h3>'.__('Netgíró Payment Gateway', 'netgiro').'</h3>';\r\n echo '<p>'.__('Verslaðu á netinu með Netgíró á einfaldan hátt.').'</p>';\r\n echo '<table class=\"form-table\">';\r\n $this -> generate_settings_html();\r\n echo '</table>';\r\n }", "public function aksi_tambah_permohonan_suket008()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama_istri' => $this->input->post('nama_istri'),\n\t\t\t'tempat_lahir_istri' => $this->input->post('tempat_lahir_istri'),\n\t\t\t'tanggal_lahir_istri' => $this->input->post('tanggal_lahir_istri'),\n\t\t\t'pekerjaan_istri' => $this->input->post('pekerjaan_istri'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t\t'nama_suami' => $this->input->post('nama_suami'),\n\t\t\t'tempat_lahir_suami' => $this->input->post('tempat_lahir_suami'),\n\t\t\t'tanggal_lahir_suami' => $this->input->post('tanggal_lahir_suami'),\n\t\t\t'pekerjaan_suami' => $this->input->post('pekerjaan_suami'),\n\t\t\t'alasan' => $this->input->post('alasan'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_janda');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket008/' . $id_surat . '/' . $id_permohonan);\n\t}", "function cpotheme_metadata_showcase()\n{\n $cpotheme_data = array();\n\n $cpotheme_data[] = array(\n 'name' => 'showcase_url',\n 'std' => '',\n 'label' => 'URL',\n 'type' => 'text',\n 'desc' => 'Indica la URL de destino.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'showcase_theme',\n 'std' => '',\n 'label' => 'Theme',\n 'type' => 'select',\n 'option' => cpotheme_metadata_themelist_optional(),\n 'desc' => 'Indica el tema utilizado.'\n );\n\n return $cpotheme_data;\n}", "function aplicaParametrosLegImg($parameters = array(\"font\"=>\"\", \"imagecolor\"=>\"\", \"position\"=>\"\", \"status\"=>\"\", \"outlinecolor\"=>\"\", \"keyspacingy\"=>\"\", \"keyspacingx\"=>\"\", \"keysizey\"=>\"\", \"keysizex\"=>\"\", \"height\"=>\"\", \"width\"=>\"\", \"labelsize\"=>\"\"))\n {\n $legenda = $this->mapa->legend;\n // $legenda->set(\"height\", $parameters[\"height\"]);\n // $legenda->set(\"width\", $parameters[\"width\"]);\n $legenda->set(\"keysizex\", $parameters[\"keysizex\"]);\n $legenda->set(\"keysizey\", $parameters[\"keysizey\"]);\n $legenda->set(\"keyspacingx\", $parameters[\"keyspacingx\"]);\n $legenda->set(\"keyspacingy\", $parameters[\"keyspacingy\"]);\n $corres = $legenda->outlinecolor;\n $cor = explode(\",\", $parameters[\"outlinecolor\"]);\n $corres->setRGB($cor[0], $cor[1], $cor[2]);\n\n if ($parameters[\"status\"] == 3) {\n $legenda->set(\"status\", MS_EMBED);\n } else {\n $legenda->set(\"status\", MS_OFF);\n }\n $verifica = $legenda->position;\n if ($verifica < 100) {\n if ($parameters[\"position\"] > 99) {\n $parameters[\"position\"] = 3;\n }\n }\n $legenda->set(\"position\", $parameters[\"position\"]);\n\n $corres = $legenda->imagecolor;\n $cor = explode(\",\", $parameters[\"imagecolor\"]);\n $corres->setRGB($cor[0], $cor[1], $cor[2]);\n $label = $legenda->label;\n if ($parameters[\"font\"] != \"bitmap\") {\n $label->updatefromstring(\"LABEL TYPE TRUETYPE END\");\n $label->set(\"font\", $parameters[\"font\"]);\n $label->set(\"size\", $parameters[\"labelsize\"]);\n } else {\n $label->updatefromstring(\"LABEL TYPE BITMAP END\");\n $t = MS_TINY;\n if ($parameters[\"labelsize\"] > 5) {\n $t = MS_TINY;\n }\n if ($parameters[\"labelsize\"] >= 7) {\n $t = MS_SMALL;\n }\n if ($parameters[\"labelsize\"] >= 10) {\n $t = MS_MEDIUM;\n }\n if ($parameters[\"labelsize\"] >= 12) {\n $t = MS_LARGE;\n }\n if ($parameters[\"labelsize\"] >= 14) {\n $t = MS_GIANT;\n }\n $label->set(\"size\", $t);\n }\n return true;\n }", "public function display_settings($data,$matrix = false) {\n\n\t\t$conf = (isset($data['config_settings']) && !empty($data['config_settings'])) ? $data['config_settings'] : '';\n\n\t\t// which config file to use\n\t\t$confs = $this->config_file_listing(true);\n\t\t\n\t\t// upload locations\n\t\t$res = $this->resource_type_list();\n\n\t\t// make the drop-down arrays\n\t\t$images = array();\n\t\tif(in_array('Images', $res) && !isset($data['eeck_image_upload']) ) {\n\t\t\t$data['eeck_image_upload'] = 'Images';\n\t\t}\n\t\tforeach($res as $r) {\n\t\t\t$images[$r] = $r;\n\t\t}\n\n\t\t$files = array();\n\t\tif(in_array('Files', $res) && !isset($data['eeck_file_upload']) ) {\n\t\t\t$data['eeck_file_upload'] = 'Files';\n\t\t}\n\t\tforeach($res as $r) {\n\t\t\t$files[$r] = $r;\n\t\t}\n\n\t\t$flash = array();\n\t\tif(in_array('Flash', $res) && !isset($data['eeck_flash_upload']) ) {\n\t\t\t$data['eeck_flash_upload'] = 'Flash';\n\t\t}\n\t\tforeach($res as $r) {\n\t\t\t$flash[$r] = $r;\n\t\t}\n\n\t\t// make the form elements\n\t\t$si = (isset($data['eeck_image_upload']) && !empty($data['eeck_image_upload'])) ? $data['eeck_image_upload'] : '';\n\t\t$sf = (isset($data['eeck_file_upload']) && !empty($data['eeck_file_upload'])) ? $data['eeck_file_upload'] : '';\n\t\t$sv = (isset($data['eeck_flash_upload']) && !empty($data['eeck_flash_upload'])) ? $data['eeck_flash_upload'] : '';\n\n\n\t\t// the output for matrix config\n\t\tif($matrix) {\n\n\t\t\treturn array(\n\t\t\t\tarray($this->EE->lang->line('dm_eeck_config_settings'),form_dropdown('config_settings', $confs, $conf)),\n\t\t\t\tarray($this->EE->lang->line('dm_eeck_image_resource'),form_dropdown('eeck_image_upload', $images, $si)),\n\t\t\t\tarray($this->EE->lang->line('dm_eeck_file_resource'),form_dropdown('eeck_file_upload', $files, $sf)),\n\t\t\t\tarray($this->EE->lang->line('dm_eeck_flash_resource'),form_dropdown('eeck_flash_upload', $flash, $sv))\n\t\t\t);\n\t\t\t\n\t\t// the output for custom field config\n\t\t} else {\n\t\t\t$this->EE->table->add_row(\n\t\t\t\t$this->EE->lang->line('dm_eeck_config_settings'),\n\t\t\t\tform_dropdown('config_settings', $confs, $conf)\n\t\t\t);\n\n\t\t\t$this->EE->table->add_row(\n\t\t\t\t$this->EE->lang->line('dm_eeck_image_resource'),\n\t\t\t\tform_dropdown('eeck_image_upload', $images, $si)\n\t\t\t);\n\n\t\t\t$this->EE->table->add_row(\n\t\t\t\t$this->EE->lang->line('dm_eeck_file_resource'),\n\t\t\t\tform_dropdown('eeck_file_upload', $files, $sf)\n\t\t\t);\n\n\t\t\t$this->EE->table->add_row(\n\t\t\t\t$this->EE->lang->line('dm_eeck_flash_resource'),\n\t\t\t\tform_dropdown('eeck_flash_upload', $flash, $sv)\n\t\t\t);\n\t\t}\n\n\t}", "public function InsertBiodataMahasiswa()\n {\n\t\t$data = array(\n\t\t\t\t\"nama_mahasiswa\",\n\t\t\t\t\"jenis_kelamin\",\n\t\t\t\t\"tempat_lahir\",\n\t\t\t\t\"tanggal_lahir\",\n\t\t\t\t\"id_agama\",\n\t\t\t\t\"nik\",\n\t\t\t\t\"nisn\",\n\t\t\t\t\"npwp\",\n\t\t\t\t\"kewarganegaraan\",\n\t\t\t\t\"jalan\",\n\t\t\t\t\"dusun\",\n\t\t\t\t\"rt\",\n\t\t\t\t\"rw\",\n\t\t\t\t\"kelurahan\",\n\t\t\t\t\"kode_pos\",\n\t\t\t\t\"id_wilayah\",\n\t\t\t\t\"id_jenis_tinggal\",\n\t\t\t\t\"id_alat_transportasi\",\n\t\t\t\t\"telepon\",\n\t\t\t\t\"handphone\",\n\t\t\t\t\"email\",\n\t\t\t\t\"penerima_kps\",\n\t\t\t\t\"nomor_kps\",\n\t\t\t\t\"nik_ayah\",\n\t\t\t\t\"nama_ayah\",\n\t\t\t\t\"tanggal_lahir_ayah\",\n\t\t\t\t\"id_pendidikan_ayah\",\n\t\t\t\t\"id_pekerjaan_ayah\",\n\t\t\t\t\"id_penghasilan_ayah\",\n\t\t\t\t\"nik_ibu\",\n\t\t\t\t\"nama_ibu_kandung\",\n\t\t\t\t\"tanggal_lahir_ibu\",\n\t\t\t\t\"id_pendidikan_ibu\",\n\t\t\t\t\"id_pekerjaan_ibu\",\n\t\t\t\t\"id_penghasilan_ibu\",\n\t\t\t\t\"nama_wali\",\n\t\t\t\t\"tanggal_lahir_wali\",\n\t\t\t\t\"id_pendidikan_wali\",\n\t\t\t\t\"id_pekerjaan_wali\",\n\t\t\t\t\"id_penghasilan_wali\",\n\t\t\t\t\"id_kebutuhan_khusus_mahasiswa\",\n\t\t\t\t\"id_kebutuhan_khusus_ayah\",\n\t\t\t\t\"id_kebutuhan_khusus_ibu\");\t\t\t\n\t\treturn $data;\t\n\t}", "public function aksi_tambah_permohonan_suket006()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_belum_pernah_menikah');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket006/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function aksi_setujui_permohonan_008()\n {\n $data = array(\n 'tgl_persetujuan_admin' => date(\"Y/m/d\"),\n 'notif' => 'Belum Dibaca',\n 'notif_rt' => 'Belum Dibaca',\n );\n\n $data_surat = array(\n 'no_registrasi' => $this->input->post('no_registrasi'),\n 'no_bulan' => $this->input->post('no_bulan'),\n 'no_tahun' => $this->input->post('no_tahun'),\n );\n\n $detailhere = $this->input->post('id_permohonan_surat');\n\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat');\n $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_ket_janda');\n\n if (\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat')\n && $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_ket_janda')\n ); {\n $this->session->set_flashdata('success', 'disetujui');\n redirect('admin/pilih_tanda_tangan/' . $detailhere);\n }\n }", "function setting()\n\t{\n\t\t// Tai cac file thanh phan\n\t\t$this->load->model('currency_model');\n\t\t$this->load->library('form_validation');\n\t\t$this->load->helper('form');\n\t\t\n\t\t// Lay cac bien cai dat\n\t\t$params = array_keys(array_merge($this->setting_default, $this->setting));\n\t \n\t\t// Tu dong kiem tra gia tri cua 1 bien\n\t\t$param = $this->input->post('_autocheck');\n\t\tif ($param)\n\t\t{\n\t\t\t$this->_setting_autocheck($param);\n\t\t}\n\t\t\n\t\t// Xu ly form\n\t\tif ($this->input->post('_submit'))\n\t\t{\n\t\t\t// Gan dieu kien cho cac bien\n\t\t\t$this->_setting_set_rules($params);\n\t\t\t\n\t\t\t// Xu ly du lieu\n\t\t\t$result = array();\n\t\t\tif ($this->form_validation->run())\n\t\t\t{\n\t\t\t // Goi ham xu ly setting cua payment\n\t\t\t $this->_setting_handle();\n\t\t\t \n\t\t\t //lay chiet khau goc cua nha cung cap\n\t\t\t $types = $this->get_types();\n\t\t\t $discount = array();\n\t\t\t \n\t\t\t\t// Lay gia tri setting tu form\n\t\t\t $setting_data = array();\n\t\t\t $default = $this->input->post('default');\n\t\t\t unset($params[0]);\n\t\t\t $total = 0;\n\t\t\t\tforeach ($params as $p => $v)\n\t\t\t\t{\n\t\t\t\t $val = $this->input->post($v);\n\t\t\t\t $total = count($val);\n\t\t\t\t $values[$v] = $val;\n\t\t\t\t}\n\t\t\t\t$keys = array_keys($values);\n\t\t\t\tfor ($i = 1;$i<= $total;$i++)\n\t\t\t\t{\n\t\t\t\t $d = array();\n\t\t\t\t foreach ($keys as $key)\n\t\t\t\t {\n\t\t\t\t if(isset($values[$key][$i]) && $values[$key][$i])\n\t\t\t\t {\n\t\t\t\t $d['default'] = $default;\n\t\t\t\t $d[$key] = $values[$key][$i];\n\t\t\t\t } \n\t\t\t\t }\n\t\t\t\t if(!empty($d))\n\t\t\t\t {\n\t\t\t\t $setting_data[$i] = $d;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t foreach ($types as $type)\n\t\t\t\t {\n\t\t\t\t $discount[$i][$type] = $this->input->post('discount_'.$type.'_'.$i);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmodel('payment_card')->set_setting($this->code, $setting_data);\t\n\t\t\t\tmodel('payment_card')->set_setting('discount_'.$this->code, $discount);\n\t\t\t\t\n\t\t\t\t// Khai bao ket qua tra ve\n\t\t\t\t$result['complete'] = TRUE;\n\t\t\t\t$result['location'] = admin_url('payment_card');\n\t\t\t\tset_message(lang('notice_update_success'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\t$result[$param] = form_error($param);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$output = json_encode($result);\n\t\t\tset_output('json', $output);\n\t\t}\n\t\t\n\t\t// Loai bo cac bien mac dinh ra khoi params truoc khi gui den view\n\t\t/*\n\t\t$params_default = array_keys($this->setting_default);\n\t\tforeach ($params as $k => $p)\n\t\t{\n\t\t\tif (in_array($p, $params_default))\n\t\t\t{\n\t\t\t\tunset($params[$k]);\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t\n\t\t$discounts = model('payment_card')->get_setting('discount_'.$this->code);\n\t\t$this->data['discounts'] = $discounts;\n\t\t\n\t\t// Luu bien gui den view\n\t\t$this->data['action'] \t= current_url();\n\t\t$this->data['params'] \t= $params;\n\t\t\n\t\t$this->data['code'] \t= $this->code;\n\t\t$this->data['setting'] \t= $this->setting_data;\n\t\treturn $this->data;\n\t}", "public function aksi_tambah_permohonan_suket001()\n\t{\n\t\t// $kades = $this->m_warga->cek_kades();\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t// 'id_kades' => $kades['id_kades'],\n\t\t\t'status' => $this->input->post('status'),\n\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat' => $this->input->post('alamat'),\n\t\t\t'nama_usaha' => $this->input->post('nama_usaha'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_usaha');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket001/' . $id_surat . '/' . $id_permohonan);\n\t}", "function select_tb_penduduk(){\n\t\t$this->load->model('mamdani');\n\t\t//$klasifikasi['klasifikasi']=$this->mamdani->getdata();\n\t\t$klasifikasi['jumlah_aset']=$this->mamdani->jumlah_aset();\n\t\t$klasifikasi['tingkat']= $this->mamdani->klasifikasi3();\n\n\t\t$this->load->view('templates/header');\n\t\t$this->load->view('admin/lihatdata/tabel_klasifikasi_penduduk',$klasifikasi);\n\t\t$this->load->view('templates/footer');\n\t\t// var_dump($jml_aset);\n\t\t// die;\n\n\t}", "public function admin_hrd_tambah_karyawan(){\n\t\t\t$nik = Input::get('nik');\n\t\t\t$id_status_karyawan = Input::get('id_status_karyawan');\n\t\t\t$nama = Input::get('nama');\n\t\t\t$alamat = Input::get('alamat');\n\t\t\t$tempat_lahir = Input::get('tempat_lahir'); \n\t\t\t$tanggal_lahir = Input::get('tanggal_lahir');\n\t\t\t$agama = Input::get('agama');\n\t\t\t$jenis_kelamin = Input::get('jenis_kelamin');\n\t\t\t$tanggal_mulai_kerja = Input::get('tanggal_mulai_kerja'); \n\t\t\t$id_golongan = Input::get('id_golongan');\n\t\t\t$id_jabatan = Input::get('id_jabatan');\n\t\t\t$id_jurusan = Input::get('id_jurusan');\n\t\t\t$no_telepon = Input::get('no_telepon');\n\t\t\t$email = Input::get('email');\n\t\t\t$pendidikan = Input::get('pendidikan');\n\t\t\t$status_nikah = Input::get('status_nikah');\n\t\t\t$foto = Input::get('foto');\n\t\t\t$status = Input::get('status');\n\t\t\treturn Karyawan::tambah_karyawan($nik, $id_status_karyawan, $nama, $alamat, $tempat_lahir, $tanggal_lahir, $agama, $jenis_kelamin, $tanggal_mulai_kerja, $id_golongan, $id_jabatan, $id_jurusan, $no_telepon, $email, $pendidikan, $status_nikah, $foto, $status); \n\t\t}", "function edit_with_image\n\t\t(\n\t\t\t$id_karyawan\n\t\t\t,$id_jabatan\n\t\t\t,$no_karyawan\n\t\t\t,$nik_karyawan\n\t\t\t,$nama_karyawan\n\t\t\t,$pnd\n\t\t\t,$tlp\n\t\t\t,$email\n\t\t\t,$avatar\n\t\t\t,$avatar_url\n\t\t\t,$alamat\n\t\t\t,$keterangan\n\t\t\t,$user_updt\n\t\t)\n\t\t{\n\t\t\t\n\t\t\t$query = \"UPDATE tb_karyawan SET \n\t\t\t\t\t\tid_jabatan = '\".$id_jabatan.\"'\n\t\t\t\t\t\t, nik_karyawan = '\".$nik_karyawan.\"'\n\t\t\t\t\t\t, nama_karyawan = '\".$nama_karyawan.\"'\n\t\t\t\t\t\t, pnd = '\".$pnd.\"'\n\t\t\t\t\t\t, tlp = '\".$tlp.\"'\n\t\t\t\t\t\t, email = '\".$email.\"'\n\t\t\t\t\t\t, avatar = '\".$avatar.\"'\n\t\t\t\t\t\t, avatar_url = '\".$avatar_url.\"'\n\t\t\t\t\t\t, alamat = '\".$alamat.\"'\n\t\t\t\t\t\t, ket_karyawan = '\".$ket_karyawan.\"'\n\t\t\t\t\t\t, user_updt = '\".$user_updt.\"'\n\t\t\t\t\t\t, tgl_updt = NOW() \n\t\t\t\t\t\tWHERE id_karyawan = '\".$id_karyawan.\"';\";\n\t\t\t$this->db->query($query);\n\t\t}", "function _add_setting( $data=array() )\n\t{\n\t\t$setting = array();\n\t\t\n\t\t$setting['conf_title'] = $data['conf_title']['VALUE'];\n\t\t$setting['conf_description'] = $data['conf_description']['VALUE'];\n\t\t$setting['conf_group'] = $data['conf_group']['VALUE'];\n\t\t$setting['conf_type'] = $data['conf_type']['VALUE'];\n\t\t$setting['conf_key'] = $data['conf_key']['VALUE'];\n\t\t$setting['conf_default'] = $data['conf_default']['VALUE'];\n\t\t$setting['conf_extra'] = $data['conf_extra']['VALUE'];\n\t\t$setting['conf_evalphp'] = $data['conf_evalphp']['VALUE'];\n\t\t$setting['conf_protected'] = 1;\n\t\t$setting['conf_position'] = $data['conf_position']['VALUE'];\n\t\t$setting['conf_start_group'] = $data['conf_start_group']['VALUE'];\n\t\t$setting['conf_end_group'] = isset( $data['conf_end_group']['VALUE'] ) ? $data['conf_end_group']['VALUE'] : 0;\n\t\t$setting['conf_help_key'] = $data['conf_help_key']['VALUE'];\n\t\t$setting['conf_add_cache'] = 1;\n\t\t\n\t\tif ( !$this->ipsclass->DB->field_exists( 'conf_help_key', 'conf_settings' ) )\n\t\t{\n\t\t\tunset( $setting['conf_help_key'] );\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'conf_settings', $setting );\n\t}", "function EditDataPegawai()\n\t{\n\t\tinclude '../../koneksi/koneksi.php';\n\n\t\t//inisialisasi\n\t\t$id_pegawai = $_POST['id_pegawai'];\n\t\t$nama = $_POST['nama'];\n\t\t$jabatan = $_POST['jabatan'];\n\t\t$username = $_POST['username'];\n\t\t$password = $_POST['password'];\n\t\t$password = md5($password);\n\n\t\t//update ke tabel pegawai\n\t\t$sql = \"UPDATE pegawai SET id_pegawai = ?, nama = ?, jabatan = ? WHERE id = ?\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param('iss', $id_pegawai, $nama, $jabatan);\n\t\tif($stmt->execute()){\n\t\t\techo \"Data berhasil diperbaharui\";\n\t\t}else{\n\t\t\tdie('Error : ('. $db->errno .')'. $db->error);\n\t\t}\n\t\t$stmt->close();\n\t}", "function conf()\n {\n $dato_anio = toba::memoria()->get_parametro('filtro_anio');\n $dato_ua = toba::memoria()->get_parametro('filtro_ua');\n if(isset($dato_anio)){//el anio es filtro obligatorio asi que siempre vuelve con este dato\n $auxiliar['valor']=$dato_anio;\n $auxiliar['condicion']='es_igual_a';\n $auxiliar2['anio']=$auxiliar;\n\n if(isset($dato_ua)){//viene desde informe de estado actual\n $auxiliar['valor']=$dato_ua;\n $auxiliar['condicion']='es_igual_a';\n $auxiliar2['uni_acad']=$auxiliar;\n }\n $this->s__datos_filtro=$auxiliar2;\n }\n }", "function init_extra_fields() {\n $temp = $this->uc->CallMethod('PickupLocations', array(), 'GET', $this->token);\n $pickups = array();\n if (is_array($temp)) {\n foreach ($temp as $t) {\n $pickups[$t['LocationId']] = $t['Name'];\n }\n }\n\n // obtine lista planurilor tarifare\n $temp = $this->uc->CallMethod('PriceTables', array(), 'GET', $this->token);\n\n $prices = array();\n if (is_array($temp)) {\n foreach ($temp as $t) {\n $prices[$t['PriceTableId']] = empty($t['Name']) ? $t['PriceTableId'] : $t['Name'];\n }\n }\n\n $this->form_fields += array(\n 'pickup' => array(\n 'title' => __('Punct de ridicare', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(null => 'Alege punctul de ridicare') + $pickups\n ),\n 'priceplan' => array(\n 'title' => __('Plan tarifar', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(null => 'Alege planul tarifar') + $prices\n ),\n 'insurance' => array(\n 'title' => __('', 'urgentcargus'),\n 'label' => __('Asigurare', 'urgentcargus'),\n 'type' => 'checkbox',\n 'default' => 'no'\n ),\n 'saturday' => array(\n 'title' => __('', 'urgentcargus'),\n 'label' => __('Livrare sambata', 'urgentcargus'),\n 'type' => 'checkbox',\n 'default' => 'no'\n ),\n 'morning' => array(\n 'title' => __('', 'urgentcargus'),\n 'label' => __('Livrare dimineata', 'urgentcargus'),\n 'type' => 'checkbox',\n 'default' => 'no'\n ),\n 'open' => array(\n 'title' => __('', 'urgentcargus'),\n 'label' => __('Deschidere colet', 'urgentcargus'),\n 'type' => 'checkbox',\n 'default' => 'no'\n ),\n 'repayment' => array(\n 'title' => __('Incasare ramburs', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(\n 'cash' => 'Numerar',\n 'bank' => 'Transfer bancar'\n )\n ),\n 'payer' => array(\n 'title' => __('Platitor expeditie', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(\n 'sender' => 'Expeditor',\n 'recipient' => 'Destinatar'\n )\n ),\n 'type' => array(\n 'title' => __('Tip expeditie', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(\n 'parcel' => 'Colet',\n 'envelope' => 'Plic'\n )\n ),\n 'free' => array(\n 'title' => __('Plafon transport gratuit', 'urgentcargus'),\n 'type' => 'text',\n ),\n 'fixed' => array(\n 'title' => __('Cost fix transport', 'urgentcargus'),\n 'type' => 'text',\n ),\n 'height' => array(\n 'title' => __('Inaltime', 'urgentcargus'),\n 'type' => 'number',\n ),\n 'width' => array(\n 'title' => __('Latime', 'urgentcargus'),\n 'type' => 'number',\n ),\n 'length' => array(\n 'title' => __('Lungime', 'urgentcargus'),\n 'type' => 'number',\n ),\n 'service' => array(\n 'title' => __('Serviciu', 'urgentcargus'),\n 'type' => 'select',\n 'class' => 'select_height',\n 'options' => array(\n 0 => 'Inactiv',\n 1 => 'Activ'\n )\n ),\n );\n }", "protected function setupCreateOperation()\n {\n CRUD::setValidation(PenyakitRequest::class);\n\n //CRUD::setFromDb(); // fields\n\n /**\n * Fields can be defined using the fluent syntax or array syntax:\n * - CRUD::field('price')->type('number');\n * - CRUD::addField(['name' => 'price', 'type' => 'number']));\n */\n $this->crud->addField(\n [\n 'name' => 'nama_penyakit',\n 'type' => 'text',\n 'label' => 'Nama Penyakit'\n\n ]\n );\n\n $this->crud->addField(\n [\n 'name' => 'deskripsi',\n 'label' => 'Deskripsi',\n 'type' => 'summernote',\n 'options' => [\n 'toolbar' => [\n ['style', ['style']],\n ['font', ['bold', 'underline', 'clear']],\n ['color', ['color']],\n ['para', ['ul', 'ol', 'paragraph']],\n ['table', ['table']],\n ['insert', ['link', 'picture', 'video']],\n ['view', ['fullscreen', 'codeview', 'help']]\n ]\n ],\n ],\n );\n\n $this->crud->addField(\n [\n 'name' => 'saran',\n 'label' => 'Saran',\n 'type' => 'summernote',\n 'options' => [\n 'toolbar' => [\n ['style', ['style']],\n ['font', ['bold', 'underline', 'clear']],\n ['color', ['color']],\n ['para', ['ul', 'ol', 'paragraph']],\n ['table', ['table']],\n ['insert', ['link', 'picture', 'video']],\n ['view', ['fullscreen', 'codeview', 'help']]\n ]\n ],\n ],\n );\n }", "function getForumCategoryFormCfg() {\n return array(\n 'infoNotification' => __('NOTIFY_FORUM_IMAGE_SIZE'),\n 'items' => array(\n 'htmlForumCategoryImage' => '',\n 'nom' => array(\n 'label' => __('NAME'),\n 'type' => 'text',\n 'size' => 30,\n 'dataType' => 'text',\n 'required' => true\n ),\n 'image' => array(\n 'label' => __('IMAGE'),\n 'type' => 'text',\n 'size' => 42,\n 'uploadField' => 'uploadImage'\n ),\n 'uploadImage' => array(\n 'label' => __('UPLOAD_IMAGE'),\n 'type' => 'file',\n 'allowedExtension' => array('jpg', 'jpeg', 'png', 'gif'),\n 'uploadDir' => 'upload/Forum/cat'\n ),\n 'niveau' => array(\n 'label' => __('LEVEL'),\n 'type' => 'select',\n 'options' => array(\n 0 => 0,\n 1 => 1,\n 2 => 2,\n 3 => 3,\n 4 => 4,\n 5 => 5,\n 6 => 6,\n 7 => 7,\n 8 => 8,\n 9 => 9\n )\n ),\n 'ordre' => array(\n 'label' => __('ORDER'),\n 'type' => 'text',\n 'value' => '0',\n 'size' => 2,\n 'dataType' => 'integer',\n 'required' => true\n )\n ),\n 'itemsFooter' => array(\n 'submit' => array(\n 'type' => 'submit',\n 'value' => array('CREATE_CATEGORY', 'MODIFY_THIS_CATEGORY'),\n 'inputClass' => array('button')\n )\n )\n );\n}", "public function kawasan()\n {\n $data = ['aktif' => 'kawasan',\n 'data_kws' => $this->M_prospektus->get_data_kawasan()->result_array()\n ];\n\n $this->template->load('template', 'prospektus/V_kawasan', $data);\n }", "function berinamateman ($teman) {\n $this->nama_teman=$teman;\n }", "public function setConfig()\n {\n $this->postcode = isset($_POST['postcode']) ? htmlspecialchars($_POST['postcode']) : '000-0000';\n $this->maptype = isset($_POST['maptype']) ? htmlspecialchars($_POST['maptype']) : 'Static MAP';\n $this->unit = isset($_POST['unit']) ? htmlspecialchars($_POST['unit']) : 'CELSIUS';\n $this->apiLocation = isset($_POST['apiLocation']) ? htmlspecialchars($_POST['apiLocation']) : 'Google';\n $this->apiWeather = isset($_POST['apiWeather']) ? htmlspecialchars($_POST['apiWeather']) : 'OpenWeatherMap';\n }", "public function edit_kuota_matkul_pilihan(){\n\t\t$sql = $this->m_aka->edit_kuota_matkul_pilihan();\n\n\t}", "public function aksi_tambah_permohonan_suket003()\n\t{\n\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t\t'keperluan' => $this->input->post('keperluan'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_belum_memiliki_rumah');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket003/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function uploadverhaal() {\n $defaults = array();\n\n $defaults[\"straat\"] = \"straatnaam of de naam van de buurt\";\n $defaults[\"huisnummer\"] = \"huisnummer\";\n $defaults[\"maker\"] = \"maker\";\n $defaults[\"personen\"] = \"namen\";\n $defaults[\"datum\"] = \"datum of indicatie\";\n $defaults[\"titel\"] = \"titel\";\n $defaults[\"naam\"] = \"Je naam\";\n $defaults[\"email\"] = \"Je e-mailadres\";\n $defaults[\"tags\"] = \"\";\n\n $this->set('defaults', $defaults);\n }", "function berinamateman($teman){\n\t\t$this->nama_teman=$teman;\n\t}", "public function diagnosa ()\n {\n \n $name_semua = count($this->input->post('kondisi[]'));\n $inptanggal = date('Y-m-d H:i:s');\n $nama = $this->input->post('nama');\n $gender = $this->input->post('gender');\n $pekerjaan = $this->input->post('pekerjaan');\n // var_dump($name_semua);\n \n $arbobot = array('1.0', '0.9', '0.8', '0.7', '0.6', '0.5', '0.4', '0.3', '0.2', '0.1');\n $arindikator = array();\n $arkondisi = array();\n \n $k = 1;\n for ($i = 0; $i < 26; $i++) {\n $kondisi = explode(\"_\", $_POST['kondisi'][$i]);\n if (strlen($_POST['kondisi'][$i]) > 1) {\n $arindikator += array($kondisi[0] => $kondisi[0]); // array indikator di pilih user\n // var_dump($arindikator);\n $arkondisi += array($kondisi[0] => $kondisi[1]); // array kondisi yang dipilih\n }\n }\n // print_r($arkondisi);\n \n\n $query_strategi = $this->db->query(\"SELECT * FROM strategi order by strategi_id\");\n foreach ($query_strategi->result_array() as $key => $value) {\n $indikator[$key['strategi_id']] = $value['strategi_nama'];\n $detail[$key['strategi_id']] = $value['strategi_detail'];\n $saran[$key['strategi_id']] = $value['strategi_saran'];\n $foto[$key['strategi_id']] = $value['foto'];\n }\n \n \n \n \n /*\n | ------------------------------------------------------------------------\n | PERHITUNGAN NILAI CF\n | ------------------------------------------------------------------------\n |*/\n $sql_strategi = $this->db->query(\"SELECT * FROM strategi order by strategi_id\");\n $array_strategi = array();\n foreach ($sql_strategi->result_array() as $key) {\n // var_dump($rpenyakit);\n \n $cftotal_temp = 0;\n $cf = 0;\n $query_indikator = $this->db->query(\"SELECT * FROM basis_pengetahuan where strategi_id = $key[strategi_id]\");\n $cflama = 0;\n // $rgejala = mysqli_fetch_array($query_indikator);\n \n \n foreach ($query_indikator->result_array() as $key => $value) {\n // var_dump($value['strategi_id']);\n $array_kondisi = explode(\"_\", $_POST['kondisi'][0]);\n $indikator = $array_kondisi[0];\n \n \n \n \n for ($i = 0; $i < 26; $i++) {\n $array_kondisi = explode(\"_\", $_POST['kondisi'][$i]);\n $indikator = $array_kondisi[0];\n // var_dump($array_kondisi);\n if ($value['indikator_id'] == $indikator) {\n $cf = ($value['mb'] - $value['md']) * $arbobot[$array_kondisi[1]];\n if (($cf >= 0) && ($cf * $cflama >= 0)) {\n $cflama = $cflama + ($cf * (1 - $cflama));\n // var_dump($cflama);\n }\n if ($cf * $cflama < 0) {\n $cflama = ($cflama + $cf) / (1 - Min(abs($cflama), abs($cf)));\n // var_dump($cflama);\n }\n if (($cf < 0) && ($cf * $cflama >= 0)) {\n $cflama = $cflama + ($cf * (1 + $cflama));\n // var_dump($cflama);\n \n }\n }\n }\n }\n // var_dump($array_kondisi);\n if ($cflama > 0) {\n $array_strategi += array($value['strategi_id'] => number_format($cflama, 4));\n \n } \n \n }\n \n // if(empty($array_strategi)){\n // echo 'Terjadi Kesalahan';\n // }else{\n arsort($array_strategi);\n\n \n \n\n $input_indikator = serialize($arindikator);\n $input_strategi = serialize($array_strategi);\n\n $np1 = 0;\n foreach ($array_strategi as $key1 => $value1) {\n $np1++;\n $strategi_1[$np1] = $key1;\n $nilai[$np1] = $value1;\n \n }\n\n $this->db->query(\"INSERT INTO hasil(\n strategi,\n indikator,\n tanggal,\n hasil_id,\n hasil_nilai,\n nama,\n gender,\n pekerjaan\n ) \n VALUES(\n '$input_strategi',\n '$input_indikator',\n '$inptanggal',\n '$strategi_1[1]',\n '$nilai[1]',\n '$nama',\n '$gender',\n '$pekerjaan'\n )\");\n \n $data['nama_pengguna'] = $nama;\n $data['jenis_kelamin'] = $gender;\n $data['pekerjaan_pengguna'] = $pekerjaan;\n $data['tanggal'] = $inptanggal;\n $data['hasil'] = round($nilai[1], 3);\n $data['persentasi'] = round($nilai[1]*100);\n $data['strategi'] = $array_strategi;\n $data['strategi_lain'] = $array_strategi;\n $data['kondisi'] = $arkondisi;\n $data['strategi_terpilih'] = $strategi_1[1];\n // var_dump($data['strategi']);\n $data['indikator'] = $arindikator;\n $data['title'] = 'Hasil Analisa';\n $this->load->view('layout/header_user', $data);\n $this->load->view('layout/topbar_user', $data);\n $this->load->view('hasil_analisa', $data);\n $this->load->view('layout/footer_user', $data);\n // }\n \n }", "function add_surat_keputusan_pemutih_penyalur_form() {\n//\t\tif (! $this->get_permission('fill_this')) return $this->intruder();\n\t\tglobal ${$GLOBALS['session_vars']}, ${$GLOBALS['get_vars']};\n\t\t$field_arr = surat_keputusan_pemutih_penyalur::get_field_set();\n\n//\t\t$value_arr = array ();\n\t\t$label_arr = $this->surat_keputusan_pemutih_penyalur_label;\n\t\t$optional_arr = $this->optional_arr;\n\t\t$optional_arr['keputusan_pemutih_penyalur'] = 'user_defined';\n\t\t$value_arr['keputusan_pemutih_penyalur']= '<textarea rows=\"100\" cols=\"75\" name=\"keputusan_pemutih_penyalur\" class=\"text\"></textarea>';\n\n\t\teval($this->save_config);\n\t\t$this->id_cek_pemutih_form($config);\n\t\t\n\n\n//\t\t$label_arr['submit_val'] = 'Submit';\n\t\t$label_arr['form_extra'] = '<input type=hidden name=action value=\"postadd\">'; // default null\n\t\t$label_arr['form_extra'] .= '<input type=hidden name=opener value=\"'.$GLOBALS[$GLOBALS['get_vars']]['opener'].'\">'; // default null\n\t\t$label_arr['form_extra'] .= '<input type=hidden name=opener_sql value=\"'.$GLOBALS[$GLOBALS['get_vars']]['opener_sql'].'\">'; // default null\n\t\t$label_id_cek_pemutiharr['form_extra'] .= '<input type=hidden name=opener_var value=\"'.$GLOBALS[$GLOBALS['get_vars']]['opener_var'].'\">'; // default null\n\t\t$label_arr['form_title'] = __('Form').' '.__('Add').' Surat Keputusan Pemutihan Izin Penyalur'; // default null\n\t\t$label_arr['form_width'] = '100%'; // default 100%\n\t\t$label_arr['form_name'] = 'theform'; // default form\n\n\t\t$_form = new form();\n\t\t$_form->set_config(\n\t\t\tarray (\n\t\t\t\t'field_arr'\t=> $field_arr,\n\t\t\t\t'label_arr'\t=> $label_arr,\n\t\t\t\t'value_arr'\t=> $value_arr,\n\t\t\t\t'optional_arr'\t=> $optional_arr\n\t\t\t)\n\t\t);\n\t\treturn $_form->parse_field();\n\t}", "public function aksi_setujui_permohonan_005()\n {\n $data = array(\n 'tgl_persetujuan_admin' => date(\"Y/m/d\"),\n 'notif' => 'Belum Dibaca',\n 'notif_rt' => 'Belum Dibaca',\n );\n\n $data_surat = array(\n 'no_registrasi' => $this->input->post('no_registrasi'),\n 'no_bulan' => $this->input->post('no_bulan'),\n 'no_tahun' => $this->input->post('no_tahun'),\n );\n\n $detailhere = $this->input->post('id_permohonan_surat');\n\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat');\n $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_izin_keramaian');\n\n if (\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat')\n && $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_izin_keramaian')\n ); {\n $this->session->set_flashdata('success', 'disetujui');\n redirect('admin/pilih_tanda_tangan/' . $detailhere);\n }\n }", "public function aksi_tambah_pejabat_berwenang()\n {\n $data = array(\n 'nip' => $this->input->post('nip'),\n 'nama' => $this->input->post('nama'),\n 'jabatan' => $this->input->post('jabatan'),\n 'pangkat_gol' => $this->input->post('pangkat_gol'),\n );\n\n $this->m_admin->tambah_pejabat($data);\n $this->session->set_flashdata('success', 'ditambahkan');\n redirect('admin/list_data_pejabat_berwenang');\n }", "public function aksi_tambah_permohonan_suket004()\n\t{\n\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama_benar' => $this->input->post('nama_benar'),\n\t\t\t'nama_salah' => $this->input->post('nama_salah'),\n\t\t\t'nama_dokumen_benar' => $this->input->post('nama_dokumen_benar'),\n\t\t\t'nama_dokumen_salah' => $this->input->post('nama_dokumen_salah'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat' => $this->input->post('alamat'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_beda_nama');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket004/' . $id_surat . '/' . $id_permohonan);\n\t}", "private function conf($lab,$place){\n return [\n 'label'=>$lab,\n 'required' => false,\n 'attr'=>[\n 'placeholder'=>$place\n ]\n ];\n }", "function tambah_aksi()\n\t\t{\n\t\t\t$data=array(\n\t\t\t\t// 'tanggal'=>$this->input->post('tanggal'),\n\t\t\t\t'tanggal'=>date('Y-m-d'),\n\t\t\t\t'nama'=>$this->input->post('nama'),\n\t\t\t\t'mail'=>$this->input->post('mail'),\n\t\t\t\t'website'=>$this->input->post('website'),\n\t\t\t\t'comment'=>$this->input->post('comment'),\n\n\t\t\t);\n\t\t\t$this->user_model->tambah_data($data);\n\t\t//untuk balik kehalaman mahasiswa\n\t\t\tredirect(site_url('testimoni'));\n\t\t}", "public function aksi_tambah_permohonan_suket002()\n\t{\n\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t\t'alamat_kk' => $this->input->post('alamat_kk'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_domisili');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket002/' . $id_surat . '/' . $id_permohonan);\n\t}", "public function tambah_produk() {\n $dataInputan = array(\n 'nama' => $this->input->post('nama'),\n 'deskripsi' => $this->input->post('deskripsi'),\n 'harga' => $this->input->post('harga'),\n 'stok' => $this->input->post('stok'),\n 'gambar' => $this->modelToko->_uploadImage('gambar'),\n );\n\n $this->modelToko->masukkan('product', $dataInputan);\n redirect(base_url().\"index.php/admin\");\n }", "public function edit()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'detailfasilitaskesehatan', 'update')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$detailfasilitaskesehatan = array(\n\t\t\t\t'idkategori' => $_POST['idkategori'],\n\t\t\t\t'nama' => $this->postring->valid($_POST['nama'], 'xss'),\n\t\t\t\t'seourl' => $this->postring->seo_title($this->postring->valid($_POST['nama'], 'xss')),\n\t\t\t\t'kodefaskes' => $this->postring->valid($_POST['kodefaskes'], 'xss'),\n\t\t\t\t'kelas' => $this->postring->valid($_POST['kelas'], 'xss'),\n\t\t\t\t'direktur' => $this->postring->valid($_POST['direktur'], 'xss'),\n\t\t\t\t'alamat' => $this->postring->valid($_POST['alamat'], 'xss'),\n\t\t\t\t'kecamatan' => $this->postring->valid($_POST['kecamatan'], 'xss'),\n\t\t\t\t'pemilik' => $this->postring->valid($_POST['pemilik'], 'xss'),\n\t\t\t\t'telpon' => $this->postring->valid($_POST['telpon'], 'xss'),\n\t\t\t\t'email' => $this->postring->valid($_POST['email'], 'xss'),\n\t\t\t\t'website' => $this->postring->valid($_POST['website'], 'xss'),\n\t\t\t\t'fax' => $this->postring->valid($_POST['fax'], 'xss'),\n\t\t\t\t'ugd' => $this->postring->valid($_POST['ugd'], 'xss'),\n\t\t\t\t'vip' => $this->postring->valid($_POST['vip'], 'xss'),\n\t\t\t\t'vvip' => $this->postring->valid($_POST['vvip'], 'xss'),\n\t\t\t\t'kelas1' => $this->postring->valid($_POST['kelas1'], 'xss'),\n\t\t\t\t'kelas2' => $this->postring->valid($_POST['kelas2'], 'xss'),\n\t\t\t\t'kelas3' => $this->postring->valid($_POST['kelas3'], 'xss'),\n\t\t\t\t'jumdokter' => $this->postring->valid($_POST['jumdokter'], 'xss'),\n\t\t\t\t'jumperawat' => $this->postring->valid($_POST['jumperawat'], 'xss'),\n\t\t\t\t'foto' => $this->postring->valid($_POST['foto'], 'xss'),\n\t\t\t\t'seourl' => $this->postring->valid($_POST['seourl'], 'xss'),\n\t\t\t);\n\t\t\t$query = $this->podb->update('detailfasilitaskesehatan')\n\t\t\t\t->set($detailfasilitaskesehatan)\n\t\t\t\t->where('id', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query->execute();\n\t\t\t$this->poflash->success('Detailfasilitaskesehatan has been successfully updated', 'admin.php?mod=detailfasilitaskesehatan');\n\t\t}\n\t\t$id = $this->postring->valid($_GET['id'], 'sql');\n\t\t$current_detailfasilitaskesehatan = $this->podb->from('detailfasilitaskesehatan')\n\t\t\t->select('katfasilitaskesehatan.namakategori AS namakategori')\n\t\t\t->leftJoin('katfasilitaskesehatan ON katfasilitaskesehatan.idkategori = detailfasilitaskesehatan.idkategori')\n\t\t\t->where('id', $id)\n\t\t\t->limit(1)\n\t\t\t->fetch();\n\t\tif (empty($current_detailfasilitaskesehatan)) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\t?>\n\t\t<div class=\"block-content\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<?=$this->pohtml->headTitle('Update Detailfasilitaskesehatan');?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<?=$this->pohtml->formStart(array('method' => 'post', 'action' => 'route.php?mod=detailfasilitaskesehatan&act=edit', 'autocomplete' => 'off'));?>\n\t\t\t\t\t\t<?=$this->pohtml->inputHidden(array('name' => 'id', 'value' => $current_detailfasilitaskesehatan['id']));?>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t<div class=\"input-group\">\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t$kats = $this->podb->from('katfasilitaskesehatan')\n\t\t\t\t\t\t\t\t\t\t\t->orderBy('idkategori DESC')\n\t\t\t\t\t\t\t\t\t\t\t->fetchAll();\n\t\t\t\t\t\t\t\t\t\techo $this->pohtml->inputSelectNoOpt(array('id' => 'idkategori', 'label' => 'Kategori', 'name' => 'idkategori', 'mandatory' => true));\n\t\t\t\t\t\t\t\t\t\techo '<option value=\"'.$current_detailfasilitaskesehatan['idkategori'].'\">'.'Terpilih'.' - '.$current_detailfasilitaskesehatan['namakategori'].'</option>';\n\t\t\t\t\t\t\t\t\t\tforeach($kats as $kat){\n\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"'.$kat['idkategori'].'\">'.$kat['namakategori'].'</option>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo $this->pohtml->inputSelectNoOptEnd();\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<span class=\"input-group-btn\" style=\"padding-top:25px !important;\">\n\t\t\t\t\t\t\t\t\t\t<a href=\"admin.php?mod=katfasilitaskesehatan&act=addnew\" class=\"btn btn-success\"><?=$GLOBALS['_']['addnew'];?></a>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"nama\">Nama</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nama\" class=\"form-control\" id=\"nama\" value=\"<?=(isset($_POST['nama']) ? $_POST['nama'] : $current_detailfasilitaskesehatan['nama']);?>\" placeholder=\"Nama\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"kodefaskes\">Kodefaskes</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kodefaskes\" class=\"form-control\" id=\"kodefaskes\" value=\"<?=(isset($_POST['kodefaskes']) ? $_POST['kodefaskes'] : $current_detailfasilitaskesehatan['kodefaskes']);?>\" placeholder=\"Kodefaskes\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"kelas\">Kelas</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kelas\" class=\"form-control\" id=\"kelas\" value=\"<?=(isset($_POST['kelas']) ? $_POST['kelas'] : $current_detailfasilitaskesehatan['kelas']);?>\" placeholder=\"Kelas\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"direktur\">Direktur</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"direktur\" class=\"form-control\" id=\"direktur\" value=\"<?=(isset($_POST['direktur']) ? $_POST['direktur'] : $current_detailfasilitaskesehatan['direktur']);?>\" placeholder=\"Direktur\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"alamat\">Alamat</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"alamat\" class=\"form-control\" id=\"alamat\" value=\"<?=(isset($_POST['alamat']) ? $_POST['alamat'] : $current_detailfasilitaskesehatan['alamat']);?>\" placeholder=\"Alamat\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"kecamatan\">Kecamatan</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kecamatan\" class=\"form-control\" id=\"kecamatan\" value=\"<?=(isset($_POST['kecamatan']) ? $_POST['kecamatan'] : $current_detailfasilitaskesehatan['kecamatan']);?>\" placeholder=\"Kecamatan\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"pemilik\">Pemilik</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"pemilik\" class=\"form-control\" id=\"pemilik\" value=\"<?=(isset($_POST['pemilik']) ? $_POST['pemilik'] : $current_detailfasilitaskesehatan['pemilik']);?>\" placeholder=\"Pemilik\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"telpon\">Telpon</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"telpon\" class=\"form-control\" id=\"telpon\" value=\"<?=(isset($_POST['telpon']) ? $_POST['telpon'] : $current_detailfasilitaskesehatan['telpon']);?>\" placeholder=\"Telpon\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"email\">Email</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"email\" class=\"form-control\" id=\"email\" value=\"<?=(isset($_POST['email']) ? $_POST['email'] : $current_detailfasilitaskesehatan['email']);?>\" placeholder=\"Email\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"website\">Website</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"website\" class=\"form-control\" id=\"website\" value=\"<?=(isset($_POST['website']) ? $_POST['website'] : $current_detailfasilitaskesehatan['website']);?>\" placeholder=\"Website\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"fax\">Fax</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"fax\" class=\"form-control\" id=\"fax\" value=\"<?=(isset($_POST['fax']) ? $_POST['fax'] : $current_detailfasilitaskesehatan['fax']);?>\" placeholder=\"Fax\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"ugd\">Ugd</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"ugd\" class=\"form-control\" id=\"ugd\" value=\"<?=(isset($_POST['ugd']) ? $_POST['ugd'] : $current_detailfasilitaskesehatan['ugd']);?>\" placeholder=\"Ugd\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"vip\">Vip</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"vip\" class=\"form-control\" id=\"vip\" value=\"<?=(isset($_POST['vip']) ? $_POST['vip'] : $current_detailfasilitaskesehatan['vip']);?>\" placeholder=\"Vip\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"vvip\">Vvip</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"vvip\" class=\"form-control\" id=\"vvip\" value=\"<?=(isset($_POST['vvip']) ? $_POST['vvip'] : $current_detailfasilitaskesehatan['vvip']);?>\" placeholder=\"Vvip\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"kelas1\">Kelas1</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kelas1\" class=\"form-control\" id=\"kelas1\" value=\"<?=(isset($_POST['kelas1']) ? $_POST['kelas1'] : $current_detailfasilitaskesehatan['kelas1']);?>\" placeholder=\"Kelas1\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"kelas2\">Kelas2</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kelas2\" class=\"form-control\" id=\"kelas2\" value=\"<?=(isset($_POST['kelas2']) ? $_POST['kelas2'] : $current_detailfasilitaskesehatan['kelas2']);?>\" placeholder=\"Kelas2\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"kelas3\">Kelas3</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kelas3\" class=\"form-control\" id=\"kelas3\" value=\"<?=(isset($_POST['kelas3']) ? $_POST['kelas3'] : $current_detailfasilitaskesehatan['kelas3']);?>\" placeholder=\"Kelas3\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"jumdokter\">Jumdokter</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"jumdokter\" class=\"form-control\" id=\"jumdokter\" value=\"<?=(isset($_POST['jumdokter']) ? $_POST['jumdokter'] : $current_detailfasilitaskesehatan['jumdokter']);?>\" placeholder=\"Jumdokter\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"jumperawat\">Jumperawat</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"jumperawat\" class=\"form-control\" id=\"jumperawat\" value=\"<?=(isset($_POST['jumperawat']) ? $_POST['jumperawat'] : $current_detailfasilitaskesehatan['jumperawat']);?>\" placeholder=\"Jumperawat\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t<?=$this->pohtml->inputText(array('type' => 'text', 'label' => 'foto', 'name' => 'foto', 'id' => 'picture', 'mandatory' => false, 'options' => '',), $inputgroup = true, $inputgroupopt = array('href' => '../'.DIR_INC.'/js/filemanager/dialog.php?type=0&field_id=picture', 'id' => 'browse-file', 'class' => 'btn-success', 'options' => '', 'title' => $GLOBALS['_']['action_7'].' foto'));?>\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t\t<?=$this->pohtml->formAction();?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?=$this->pohtml->formEnd();?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "function berinamaTeman($teman){\r\n\t\t\t$this->nama_teman = $teman;\r\n\t\t}", "public function admin_options() {\n\n ?>\n <h3>交通银行支付平台</h3>\n \n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "public function barang_keluar()\n {\n $uri = $this->uri->segment(3);\n $where = array( 'id_transaksi' => $uri);\n $data['list_data'] = $this->M_kasir->get_data('tb_barang_masuk',$where);\n $data['list_satuan'] = $this->M_kasir->select('tb_satuan');\n $data['list_bahan'] = $this->M_kasir->select('tb_bahan');\n $data['list_tas'] = $this->M_kasir->select('tb_tas');\n $data['avatar'] = $this->M_kasir->get_data_gambar('tb_upload_gambar_user',$this->session->userdata('name'));\n $this->load->view('kasir/perpindahan_barang/form_update',$data);\n }", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "function cpotheme_metadata_themefeature_options()\n{\n $cpotheme_data = array();\n\n $cpotheme_data[] = array(\n 'name' => 'feature_image',\n 'std' => '',\n 'label' => 'Feature Image',\n 'desc' => '',\n 'type' => 'upload'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'feature_premium',\n 'std' => '',\n 'label' => 'Premium Feature',\n 'desc' => '',\n 'type' => 'checkbox'\n );\n\n return $cpotheme_data;\n}", "function fieldCek()\n {\n $f = array(\n 'noinduk'=>'Nomor Induk' \n );\n return $f;\n }", "function config()\n\t{\n\t\t$rows=$GLOBALS['SITE_DB']->query_select('pstore_customs',array('*'),NULL,'ORDER BY id');\n\t\t$out=array();\n\t\tforeach ($rows as $i=>$row)\n\t\t{\n\t\t\t$fields=new ocp_tempcode();\n\t\t\t$hidden=new ocp_tempcode();\n\t\t\t$fields->attach($this->get_fields('_'.strval($i),get_translated_text($row['c_title']),get_translated_text($row['c_description']),$row['c_enabled'],$row['c_cost'],$row['c_one_per_member']));\n\t\t\t$fields->attach(do_template('FORM_SCREEN_FIELD_SPACER',array('TITLE'=>do_lang_tempcode('ACTIONS'))));\n\t\t\t$fields->attach(form_input_tick(do_lang_tempcode('DELETE'),do_lang_tempcode('DESCRIPTION_DELETE'),'delete_custom_'.strval($i),false));\n\t\t\t$hidden->attach(form_input_hidden('custom_'.strval($i),strval($row['id'])));\n\t\t\t$out[]=array($fields,$hidden,do_lang_tempcode('EDIT_CUSTOM_PRODUCT'));\n\t\t}\n\n\t\treturn array($out,do_lang_tempcode('ADD_NEW_CUSTOM_PRODUCT'),$this->get_fields());\n\t}", "public function settings( &$form )\n\t{\n\t\t$settings = json_decode( $this->settings, TRUE );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Text( 'zarinpal_merchant_id', $this->id ?$settings['merchant_id']:'', TRUE ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\YesNo( 'zarinpal_zarin_gate', $this->id ?$settings['zarin_gate']:'', TRUE ) );\n\t}", "public function aksi_setujui_permohonan_013()\n {\n $data = array(\n 'tgl_persetujuan_admin' => date(\"Y/m/d\"),\n 'notif' => 'Belum Dibaca',\n 'notif_rt' => 'Belum Dibaca',\n );\n\n $data_surat = array(\n 'no_registrasi' => $this->input->post('no_registrasi'),\n 'no_bulan' => $this->input->post('no_bulan'),\n 'no_tahun' => $this->input->post('no_tahun'),\n );\n\n $detailhere = $this->input->post('id_permohonan_surat');\n\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat');\n $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_ket_penghasilan');\n\n if (\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat')\n && $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_ket_penghasilan')\n ); {\n $this->session->set_flashdata('success', 'disetujui');\n redirect('admin/pilih_tanda_tangan/' . $detailhere);\n }\n }", "public function aksi_setujui_permohonan_004()\n {\n $data = array(\n 'tgl_persetujuan_admin' => date(\"Y/m/d\"),\n 'notif' => 'Belum Dibaca',\n 'notif_rt' => 'Belum Dibaca',\n );\n\n $data_surat = array(\n 'no_registrasi' => $this->input->post('no_registrasi'),\n 'no_bulan' => $this->input->post('no_bulan'),\n 'no_tahun' => $this->input->post('no_tahun'),\n );\n\n $detailhere = $this->input->post('id_permohonan_surat');\n\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat');\n $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_ket_beda_nama');\n\n if (\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat')\n && $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_ket_beda_nama')\n ); {\n $this->session->set_flashdata('success', 'disetujui');\n redirect('admin/pilih_tanda_tangan/' . $detailhere);\n }\n }", "public function run()\n {\n $cfg = array(\n array('name' => 'pagina principal titulo','content' => '¿DÓNDE QUIERES TRABAJAR?','is_active' => 1),\n array('name' => 'pagina principal seccion oferta titulo','content' => 'Oferta Académica','is_active' => 1),\n array('name' => 'pagina principal seccion oferta texto1','content' => 'Llevamos más de 25 años formando a los mejores profesionales del sector, en el Centro de Formación San Juan lo tenemos todo preparado para que solo tengas que decidir la carrera de tu vida profesional.\nTú decides.','is_active' => 1),\n array('name' => 'pagina principal seccion oferta texto2','content' => 'Impartimos cursos de formación con preferencia a desempleados de la Comunidad de Madrid orientados a la obtención de la certificación de los principales fabricantes del sector TIC, además de certificados de profesionalidad y cursos de idiomas.','is_active' => 1),\n array('name' => 'pagina principal seccion oferta texto3','content' => 'a calidad se mide en confianza. Por ello nos sentimos más que orgullosos de contar con más de 731 empresas en nuestra bolsa de trabajo, profesionales que confían en la preparación con que nuestros alumnos comienzan sus carreras.','is_active' => 1),\n array('name' => 'pagina principal seccion informacion titulo','content' => 'Información del Centro Académico','is_active' => 1),\n array('name' => 'pagina principal seccion informacion texto','content' => 'Desde que en 1950 ocuparon sus aulas el primer centenar de alumnos, ha ido creciendo hasta su configuración actual, con el paso del tiempo se ha ido reconstruyendo y ampliando sus instalaciones, reabriendo sus puertas a la actividad docente. Desde entonces ha sido un centro educativo que ha pretendido dar respuesta a las diversas necesidades de los jovenes que buscan obtener una formación, la cual será base y clave para poder labrarse un camino en un futuro laboral.','is_active' => 1),\n array('name' => 'pagina principal seccion noticias titulo','content' => 'Ultimas Noticias','is_active' => 1),\n array('name' => 'pagina principal seccion colaboradores titulo','content' => 'Colaboradores','is_active' => 1),\n array('name' => 'footer texto','content' => 'Pide mas información a través del formulario','is_active' => 1),\n array('name' => 'footer boton','content' => 'Contacta','is_active' => 1),\n array('name' => 'footer direccion','content' => 'ContactaDirección: C/San Juan de la Cruz S/N, 28223 Pozuelo de Alarcón, Madrid ','is_active' => 1),\n array('name' => 'footer telefono','content' => 'Tfno: +(34)91 342 23 89 Fax: +(34)91 322 11 23 ','is_active' => 1),\n array('name' => 'rrss email','content' => 'mailto:centrodeformacion.com','is_active' => 1),\n array('name' => 'rrss twitter','content' => 'http://www.twitter.com','is_active' => 1),\n array('name' => 'rrss facebook','content' => 'http://www.facebook.com','is_active' => 1),\n array('name' => 'pagina nuestro centro titulo','content' => 'Nuestro Centro','is_active' => 1),\n array('name' => 'pagina nuestro centro texto1','content' => 'Desde que en 1950 ocuparon sus aulas el primer centenar de alumnos, ha ido creciendo hasta su configuración actual, con el paso del tiempo se ha ido reconstruyendo y ampliando sus instalaciones, reabriendo sus puertas a la actividad docente.','is_active' => 1),\n array('name' => 'pagina nuestro centro texto2','content' => 'Desde entonces ha sido un centro educativo que ha pretendido dar respuesta a las diversas necesidades de los jovenes que buscan obtener una formación, la cual será base y clave para poder labrarse un camino en un futuro laboral.','is_active' => 1),\n array('name' => 'pagina nuestro centro texto3','content' => 'Contamos con diversas instalaciones las cuales cubren las diferentes necesidades de la formación correspondiente, renovadas año tras año para poder ofrecer el mayor servicio junto al personal cuailificado.','is_active' => 1),\n array('name' => 'pagina secretaria titulo','content' => 'Secretaría','is_active' => 1),\n array('name' => 'pagina secretaria subtitulo','content' => 'Información General','is_active' => 1),\n array('name' => 'pagina secretaria texto1','content' => 'Horario de Secretaría: de octubre a junio en días lectivos. Únicamente en horario de mañana','is_active' => 1),\n array('name' => 'pagina secretaria texto2','content' => 'de Lunes a Viernes de 10:00 a 13:00','is_active' => 1),\n array('name' => 'pagina secretaria texto3','content' => 'Los certificados de estudios se solicitarán en Secretaría y se entregarán en un plazo de 72 horas lectivas.','is_active' => 1),\n array('name' => 'pagina noticias titulo','content' => 'Noticias','is_active' => 1),\n array('name' => 'pagina contacto titulo','content' => 'Contacto','is_active' => 1),\n array('name' => 'pagina formacion informatica titulo','content' => 'Formación en Informática','is_active' => 1),\n array('name' => 'pagina formacion sanidad titulo','content' => 'Formación en Sanidad','is_active' => 1),\n array('name' => 'pagina formacion administracion titulo','content' => 'Formación en Administración','is_active' => 1),\n array('name' => 'pagina grado medio informatica titulo','content' => 'Grado Medio de Informática','is_active' => 1),\n array('name' => 'pagina grado medio informatica texto1','content' => 'En esta formación aprenderás a instalar, configurar y mantener sistemas microinformáticos, aislados o en red, así como redes locales en pequeños entornos. Además, estos estudios incluyen los conocimientos necesarios para llevar a cabo las actividades de nivel básico de prevención de riesgos laborales.','is_active' => 1),\n array('name' => 'pagina grado medio informatica texto2','content' => 'Por eso, al finalizar estos estudios, se puede trabajar en empresas del sector servicios que se dediquen a la comercialización, montaje y reparación de equipos, redes y servicios microinformáticos en general, como parte del soporte informático de la organización o en entidades de cualquier tamaño y sector productivo que utilizan sistemas microinformáticos y redes de datos para su gestión o seguir estudiando','is_active' => 1),\n array('name' => 'pagina grado medio informatica texto3','content' => 'Cabe señalar que este Ciclo Formativo Grado Medio en Sistemas Microinformáticos y Redes es uno de los perfiles profesionales más demandados por las empresas: según los datos del Observatorio de las Ocupaciones del Servicio Público de Empleo Estatal (SEPE), esta rama de FP fue una de las tres que registró un mayor número de contrataciones en el 2014, con un total de 25.955 contratos.','is_active' => 1),\n array('name' => 'galeria titulo general','content' => 'Galería de imágenes','is_active' => 1),\n array('name' => 'pagina grado superior informatica titulo','content' => 'Grado Superior de Informática','is_active' => 1),\n array('name' => 'pagina grado superior informatica texto1','content' => 'El mundo del desarrollo web está viviendo su mejor momento. Con una inserción laboral como ningún otro sector profesional, con una oferta de empleo incesante, cada vez son más quienes deciden formarse en esta materia. Por eso, en nuestro centro de formación hemos preparado los programas académicos más avanzados en desarrollo web, para que comiences tu carrera nada más acabar tu formación.','is_active' => 1),\n array('name' => 'pagina grado superior informatica texto2','content' => 'Vas a una entrevista de trabajo, te preguntan qué sabes dominar del diseño web y les dices que tanto el Back como el Front-End. Se quedan boquiabiertos. Y, por supuesto, te fichan. Porque ese es nuestro objetivo: formarte en el perfil más demandado actualmente por las empresas, agencias y estudios, el de Web Developer Full Stack.','is_active' => 1),\n array('name' => 'pagina grado superior informatica texto3','content' => 'En nuestro centro de formación te formarás con un programa especialmente orientado a tu preparación como experto en los lenguajes front-end HTML5 y CSS3, así como en el dominio del lenguaje de programación Javascript y sus dos principales frameworks: jQuery y Angular.','is_active' => 1),\n array('name' => 'pagina grado superior informatica texto4','content' => 'Además, completarás tu preparación con un conocimiento profesional de los lenguajes de programación Back-End PHP y XML, así como de gestores de bases de datos profesionales como MySQL, adentrándote en técnicas de desarrollo web imprescindibles en tu currículum, tales como Ajax.','is_active' => 1),\n array('name' => 'pagina grado medio administracion titulo','content' => 'Grado Medio de Administración','is_active' => 1),\n array('name' => 'pagina grado medio administracion texto1','content' => 'Con esta titulación oficial y homologada podrás trabajar como auxiliar administrativo en cualquier empresa o institución pública.','is_active' => 1),\n array('name' => 'pagina grado medio administracion texto2','content' => 'En el Grado Medio de Gestión Administrativa adquirirás los conocimientos básicos de gestión empresarial, de contabilidad y de confección de los principales modelos oficiales. Fórmate como auxiliar administrativo y elabora, gestiona y tramita documentos y comunicaciones. Y trabajarás también la atención al cliente y el apoyo a distintas áreas de la empresa.','is_active' => 1),\n array('name' => 'pagina grado medio administracion texto3','content' => 'Realizar actividades de apoyo administrativo en el ámbito laboral, contable, comercial, financiero y fiscal, así como de atención al cliente/usuario, tanto en empresas públicas como privadas, aplicando la normativa vigente y protocolos de calidad, asegurando la satisfacción del cliente y actuando según normas de prevención de riesgos laborales y protección ambiental.','is_active' => 1),\n array('name' => 'pagina grado superior administracion titulo','content' => 'Grado Superior de Administración','is_active' => 1),\n array('name' => 'pagina grado superior administracion texto1','content' => 'Obtén directamente y sin pruebas libres la titulación oficial y homologada de Administración y Finanzas y prepárate para trabajar como administrativo en cualquier empresa.','is_active' => 1),\n array('name' => 'pagina grado superior administracion texto2','content' => 'Este Grado Superior te preparará incluso para emprender y trabajar por tu cuenta. Aprende a crear y desarrollar un “business plan” y a interpretar sus proyecciones financieras y todo lo que se necesita para empezar a levantar cualquier negocio.','is_active' => 1),\n array('name' => 'pagina grado superior administracion texto3','content' => 'Este profesional ejerce su actividad tanto en grandes como en medianas y pequeñas empresas, en cualquier sector de actividad, y particularmente en el sector servicios, así como en las administraciones públicas, desempeñando las tareas administrativas en la gestión y el asesoramiento en las áreas laboral, comercial, contable y fiscal de dichas empresas e instituciones, ofreciendo un servicio y atención a los clientes y ciudadanos, realizando trámites administrativos con las administraciones públicas y gestionando el archivo y las comunicaciones de la empresa.','is_active' => 1),\n array('name' => 'pagina grado superior administracion texto4','content' => 'Podría ser trabajador por cuenta propia, efectuando la gestión de su propia empresa, o a través del ejercicio libre de una actividad económica, como en una asesoría financiera, laboral, estudio de proyectos, entre otros.','is_active' => 1),\n array('name' => 'pagina grado medio sanidad titulo','content' => 'Grado Medio de Sanidad','is_active' => 1),\n array('name' => 'pagina grado medio sanidad texto1','content' => 'El principal objetivo de esta formación es que nuestros alumnos puedan prestar atención básica sanitaria y psicológica en el entorno pre-hospitalario, trasladar al paciente al centro sanitario, llevar a cabo actividades de tele-operación y tele-asistencia sanitaria, colaborar en la organización y desarrollo de los planes de emergencia de los dispositivos de riesgo previsibles y de la logística sanitaria ante una emergencia individual, colectiva o catástrofe.','is_active' => 1),\n array('name' => 'pagina grado medio sanidad texto2','content' => 'Con esta profesión serás capaz de evacuar al paciente o víctima utilizando las técnicas de movilización e inmovilización y adecuando la conducción a las condiciones del mismo, para realizar un traslado seguro al centro sanitario de referencia. Aplicar técnicas de soporte vital básico ventilatorio y circulatorio en situación de compromiso y de atención básica inicial en otras situaciones de emergencia, entre otras cosas.','is_active' => 1),\n array('name' => 'pagina grado medio sanidad texto3','content' => 'Podrás trabajar en el sector sanitario relacionado con el traslado de pacientes o víctimas y la prestación de atención sanitaria y psicológica inicial, colaborando en la preparación y desarrollo de la logística sanitaria ante emergencias colectivas o catástrofes, así como participando en la preparación de planes de emergencia y dispositivos de riesgo previsible del ámbito de la protección civil.','is_active' => 1),\n array('name' => 'pagina grado superior sanidad titulo','content' => 'Grado Superior de Sanidad','is_active' => 1),\n array('name' => 'pagina grado superior sanidad texto1','content' => 'El objetivo principal de esta formación superior es la de poder elaborar y tramitar documentos y comunicaciones propias de los servicios sanitarios a partir de las necesidades detectadas y en el ámbito de su responsabilidad, respetando los criterios deontológicos de la profesión.','is_active' => 1),\n array('name' => 'pagina grado superior sanidad texto2','content' => 'El plan de estudio se basará en Realizar la gestión de ingresos, altas, asignación de camas y prestación de otros servicios sanitarios a pacientes/usuarios, asegurando el cumplimiento de los procesos y los niveles de calidad. Reconocer la terminología clínica de los documentos sanitarios en relación con los procesos patológicos y su atención en los servicios sanitarios, entre otras cosas.','is_active' => 1),\n array('name' => 'pagina grado superior sanidad texto3','content' => 'Con este formación se podrá trabajar de Trabajar en el sector sanitario, en organismos e instituciones del ámbito público y en empresas privadas, tanto en atención primaria como en especializada, así como en centros hospitalarios y de investigación. Realizan su trabajo bajo la supervisión del facultativo correspondiente o gerente administrativo en su caso.','is_active' => 1),\n array('name' => 'titulo del centro','content' => 'Centro de Formación San Juan','is_active' => 1),\n );\n\n foreach($cfg as $cf){ Configuration::create($cf); }\n\n }", "public function cetak_pengadaan()\n {\n $data['row'] = $this->Pengadaan_Model->ambil_pengadaan_brg()->result();\n\n\n $this->template->load('template', 'laporan/laporan_pengadaan/form_pengadaan', $data);\n }", "function tambah()\n\t{\n\t\t$data['departemen'] = $this->Mdepartemen->tampil_departemen();\n\t\t//mengambil data dari fungsi tampil_pegawai\n\t\t$data['pegawai'] = $this->Mpegawai->tampil_pegawai();\n\t\t//mengambil data dari fungsi tampil_kategori\n\t\t$data['kategori'] = $this->Mkategori->tampil_kategori();\n\t\t//mengambil data dari fungsi tampil_hardware\n\t\t$data['hardware'] = $this->Mhardware->tampil_hardware();\n\n\t\t$data['judul'] = \"Form Tambah Hardware\";\n\t\t//Menampilkan form tambahhardware\n\t\t$this->theme->set_ui(\"admin/tambahhardware\", $data);\n\n\t\t//menyimpan inputan dari form tambahhardware\n\t\t$inputan = $this->input->post();\n\n\t\t//jika ada inputan dari form\n\t\tif($inputan)\n\t\t{\n\t\t\t//menjalankan fungsi simpan_hardware\n\t\t\t$this->Mhardware->simpan_hardware($inputan);\n\n\t\t\tredirect(\"admin/hardware\");\n\t\t}\n\t\t\n\n\t}", "public function aksi_setujui_permohonan_014()\n {\n $data = array(\n 'tgl_persetujuan_admin' => date(\"Y/m/d\"),\n 'notif' => 'Belum Dibaca',\n 'notif_rt' => 'Belum Dibaca',\n );\n\n $data_surat = array(\n 'no_registrasi' => $this->input->post('no_registrasi'),\n 'no_bulan' => $this->input->post('no_bulan'),\n 'no_tahun' => $this->input->post('no_tahun'),\n );\n\n $detailhere = $this->input->post('id_permohonan_surat');\n\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat');\n $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_ket_pindah');\n\n if (\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat')\n && $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_ket_pindah')\n ); {\n $this->session->set_flashdata('success', 'disetujui');\n redirect('admin/pilih_tanda_tangan/' . $detailhere);\n }\n }", "public function tambah_resources()\n {\n $id_pros = $this->uri->segment(3);\n\n $data = ['id_pros' => $id_pros,\n 'aktif' => 'prospektus',\n 'data_gambar' => $this->M_prospektus->get_file_foto()\n ];\n\n $this->template->load('template', 'prospektus/V_tambah_res', $data);\n\n }", "public function tambah(){\n $this->template->views('crud/tambah_mahasiswa'); //untuk menampilkan view tambah_mahasiswa\n }", "public function tambah_aksi(){\n\t\t$this->simple_login->checkLogin();\n\n\t\t$this->_rule();\n\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t$data['title'] = 'Tambah Pengguna';\n\n\t\t\t$this->view('admin/user/tambah', $data, FALSE);\n\n\t\t}else{\n\t\t\t$data = [\n\t\t\t\t'nama' \t\t\t=> htmlspecialchars($this->input->post('nama', true)),\n\t\t\t\t'email' \t\t=> htmlspecialchars($this->input->post('email', true)),\n\t\t\t\t'username' \t\t=> htmlspecialchars($this->input->post('username', true)),\n\t\t\t\t'password' \t\t=> SHA1($this->input->post('password')),\n\t\t\t\t'alamat' \t\t=> htmlspecialchars($this->input->post('alamat', true)),\n\t\t\t\t'telp' \t\t=> htmlspecialchars($this->input->post('telp', true)),\n\t\t\t\t'akses_level' \t=> 2,\n\t\t\t\t'active'\t\t=> 1,\n\t\t\t\t'tanggal_daftar' => time(),\n\t\t\t\t'tanggal_update' => time(),\n\t\t\t\t'foto' => 'default.jpg'\n\t\t\t];\n\t\t\t$this->user_model->inputDataPengguna('users', $data);\n\t\t\t$this->session->set_flashdata('pesan', '<div class=\"alert alert-success\" role=\"alert\">Data Pelanggan Berhasil Di tambahkan! </div>');\n\t\t\tredirect('admin/user');\n\t\t}\t\n\t}", "public function admin_options() {\n\n\t\t\t?>\n\t\t\t<h3>ATOS</h3>\n\t\t\t<p><?php _e('Acceptez les paiements par carte bleue grâce à Atos.', 'woothemes'); ?></p>\n\t\t\t<p><?php _e('Plugin créé par David Fiaty', 'woothemes'); ?> - <a href=\"http://www.cmsbox.fr\">http://www.cmsbox.fr</a></p>\n\t\t\t<table class=\"form-table\">\n\t\t\t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "public function simpan_data_asuransi()\n {\n $aksi = $this->input->post('aksi');\n $id_asuransi = $this->input->post('id_asuransi');\n $nama_asuransi = $this->input->post('nama_asuransi');\n $kode_asuransi = $this->input->post('kode_asuransi');\n $singkatan = $this->input->post('singkatan');\n $id_tipe_as = $this->input->post('id_tipe_as');\n $id_kategori_as = $this->input->post('id_kategori_as');\n $alamat = $this->input->post('alamat');\n $id_kota = $this->input->post('id_kota');\n $kode_pos = $this->input->post('kode_pos');\n $telp = $this->input->post('telp');\n $fax = $this->input->post('fax');\n $website = $this->input->post('website');\n $email = $this->input->post('email');\n $pic = $this->input->post('pic');\n $alamat_pic = $this->input->post('alamat_pic');\n $telp_pic = $this->input->post('telp_pic');\n $email_pic = $this->input->post('email_pic');\n\n $data = [ 'nama_asuransi' => $nama_asuransi,\n 'kode_asuransi' => $kode_asuransi,\n 'singkatan' => $singkatan,\n 'id_tipe_as' => ($id_tipe_as == '') ? null : $id_tipe_as,\n 'id_kategori_as' => ($id_kategori_as == '') ? null : $id_kategori_as,\n 'alamat' => $alamat,\n 'id_kota' => ($id_kota == '') ? null : $id_kota,\n 'kode_pos' => $kode_pos,\n 'telp' => $telp,\n 'fax' => $fax,\n 'website' => $website,\n 'email' => $email,\n 'pic' => $pic,\n 'alamat_pic' => $alamat_pic,\n 'telp_pic' => $telp_pic,\n 'email_pic' => $email_pic,\n 'add_time' => date(\"Y-m-d H:i:s\", now('Asia/Jakarta')),\n 'add_by' => $this->session->userdata('id_user')\n ];\n\n if ($aksi == 'Tambah') {\n $this->M_master->input_data('m_asuransi', $data);\n } elseif ($aksi == 'Ubah') {\n $this->M_master->ubah_data('m_asuransi', $data, array('id_asuransi' => $id_asuransi));\n } elseif ($aksi == 'Hapus') {\n $this->M_master->hapus_data('m_asuransi', array('id_asuransi' => $id_asuransi));\n }\n\n $cari = $this->M_master->get_data_order('m_asuransi', 'add_time', 'desc')->row_array();\n\n if (!empty($cari)) {\n $a = strpos($cari['kode_asuransi'],\"N\");\n $b = strlen($cari['kode_asuransi']); \n\n $c = substr($cari['kode_asuransi'], $a + 1, $b);\n\n $a = (int) \"$c\" + 1;\n\n $kd = str_pad($a, 4, \"0\", STR_PAD_LEFT);\n } else {\n $kd = str_pad(1, 4, \"0\", STR_PAD_LEFT);\n }\n\n echo json_encode(['kode_asuransi' => \"ASN$kd\"]);\n }", "function defform()\n\t{\n\t\t// Definisi elemen form untuk data teman\n\t\t$noteman = array(\n\t\t\t\t\"name\"\t\t=> \"noteman\",\n\t\t\t\t\"id\"\t\t=> \"noteman\",\n\t\t\t\t\"maxlenght\"\t=> \"4\",\n\t\t\t\t\"size\"\t\t=> \"3\",\n\t\t\t\t\"value\"\t\t=> \"\",\n\t\t\t\t\"style\"\t\t=> \"background:red;\"\n\t\t\t);\n\n\t\t$namateman = array(\n\t\t\t\t\"name\"\t\t=> \"namateman\",\n\t\t\t\t\"id\"\t\t=> \"namateman\",\n\t\t\t\t\"maxlenght\"\t=> \"50\",\n\t\t\t\t\"size\"\t\t=> \"35\",\n\t\t\t\t\"value\"\t\t=> \"\",\n\t\t\t\t\"style\"\t\t=> \"background:cyan;\"\n\t\t\t);\n\n\t\t$notelp = array(\n\t\t\t\t\"name\"\t\t=> \"notelp\",\n\t\t\t\t\"id\"\t\t=> \"notelp\",\n\t\t\t\t\"maxlenght\"\t=> \"15\",\n\t\t\t\t\"size\"\t\t=> \"13\",\n\t\t\t\t\"value\"\t\t=> \"\",\n\t\t\t\t\"style\"\t\t=> \"background:cyan;\"\n\t\t\t);\n\n\t\t$email = array(\n\t\t\t\t\"name\"\t\t=> \"email\",\n\t\t\t\t\"id\"\t\t=> \"email\",\n\t\t\t\t\"maxlenght\"\t=> \"35\",\n\t\t\t\t\"size\"\t\t=> \"25\",\n\t\t\t\t\"value\"\t\t=> \"\",\n\t\t\t\t\"style\"\t\t=> \"background:cayn;\"\n\t\t\t);\n\t\t// end definisi\n\n\t\t$atableteman = [\n\t\t\t\"noteman\"\t=> $noteman,\n\t\t\t\"namateman\"\t=> $namateman,\n\t\t\t\"notelp\"\t=> $notelp,\n\t\t\t\"email\"\t\t=> $email\n\t\t];\n\n\t\treturn $atableteman;\n\t}", "function default_data(){\n $data['content']='';\n $data['title']='Image Crop';\n $data['file_name']='';\n $data['file_type']='';\n $data['file_path']='';\n $data['raw_name']='angela';\n $data['orig_name']='';\n $data['file_ext']='.jpg';\n $data['file_size']='';\n $data['is_image']='';\n $data['image_width']='';\n $data['image_height']='';\n $data['image_type']='';\n $data['image_size']='';\n return $data;\n\n }", "public function aksi_ubah_profil_saya()\n {\n $data = array(\n 'nik' => $this->input->post('nik'),\n 'nip' => $this->input->post('nip'),\n 'nama' => $this->input->post('nama'),\n 'alamat' => $this->input->post('alamat'),\n 'rt' => $this->input->post('rt'),\n 'kelurahan' => $this->input->post('kelurahan'),\n 'kecamatan' => $this->input->post('kecamatan'),\n 'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n 'agama' => $this->input->post('agama'),\n 'tempat_lahir' => $this->input->post('tempat_lahir'),\n 'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n 'status_perkawinan' => $this->input->post('status_perkawinan'),\n 'pekerjaan' => $this->input->post('pekerjaan'),\n 'kewarganegaraan' => $this->input->post('kewarganegaraan'),\n 'golongan_darah' => $this->input->post('golongan_darah'),\n 'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n 'no_kk' => $this->input->post('no_kk'),\n 'status_hub_kel' => $this->input->post('status_hub_kel'),\n 'no_hp' => $this->input->post('no_hp'),\n 'jabatan' => $this->input->post('jabatan'),\n // 'status_kepegawaian' => $this->input->post('status_kepegawaian'),\n );\n\n $detailhere = $this->input->post('id_admin');\n\n $this->m_admin->aksi_ubah_data_profil_saya($detailhere, $data, 'admin');\n\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/profil_saya/' . $detailhere);\n }", "public function aksi_tambah_permohonan_suket007()\n\t{\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t\t'keperluan' => $this->input->post('keperluan'),\n\t\t);\n\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_tidak_mampu');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket007/' . $id_surat . '/' . $id_permohonan);\n\t}" ]
[ "0.69463027", "0.63288045", "0.61572933", "0.6113494", "0.6101078", "0.6064623", "0.5877327", "0.58748806", "0.57240653", "0.5709176", "0.5678646", "0.5660287", "0.564511", "0.5641149", "0.56371635", "0.56283695", "0.5607175", "0.5601835", "0.5601752", "0.55967313", "0.5595301", "0.55706763", "0.5566392", "0.5561267", "0.55479795", "0.55416894", "0.5538493", "0.5524786", "0.5522026", "0.5516584", "0.5514983", "0.5511723", "0.55112207", "0.5507696", "0.55038047", "0.54970306", "0.5485847", "0.54829615", "0.5481048", "0.5475722", "0.5475535", "0.5468877", "0.54648083", "0.5462523", "0.5450064", "0.5445216", "0.54431945", "0.54395276", "0.5439195", "0.5435808", "0.5431444", "0.5430928", "0.54304856", "0.54159105", "0.5412904", "0.5407765", "0.53940266", "0.53904784", "0.5390349", "0.5382619", "0.53804994", "0.5378936", "0.53775746", "0.5375806", "0.5374899", "0.537368", "0.53729993", "0.5367314", "0.5364482", "0.53626066", "0.53621083", "0.53619957", "0.53588665", "0.53577054", "0.5347865", "0.53472847", "0.5346755", "0.534071", "0.53396076", "0.5337976", "0.53356075", "0.53326726", "0.53316027", "0.53209376", "0.53197366", "0.53168", "0.53152007", "0.53149736", "0.5313902", "0.5311049", "0.5307454", "0.53061736", "0.53056926", "0.5302812", "0.52970093", "0.5296799", "0.5294378", "0.5294283", "0.529355", "0.5283352", "0.52825093" ]
0.0
-1
/=== SQL join ===
public function get_books($limit, $offset) { $this->db->select('books.id, books.book_name,books.book_isbn, books.description, books.author, books.publisher, books.price, books.book_image, category.category'); $this->db->from('books'); $this->db->join('category', 'books.categoryId = category.id'); $this->db->order_by('books.id', 'DESC'); $this->db->limit($limit, $offset); $query = $this->db->get(); return $query->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function joinQuery()\n {\n }", "private function joins()\r\n {\r\n /* SELECT* FROM DOCUMENT WHERE DOCUMENT.\"id\" IN ( SELECT ID FROM scholar WHERE user_company_id = 40 )*/\r\n\r\n $query = EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n ->sql();\r\n\r\n $table = EyufDocument::find()\r\n ->where('\"id\" IN ' . $query)\r\n ->all();\r\n\r\n $second = EyufDocument::findAll(EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n );\r\n\r\n vdd($second);\r\n }", "private static function sqlJoining() : string {\n $relations = self::getsRelationsHasOne();\n\n $baseTable = static::tableName();\n $baseProperties = self::getProperties();\n foreach ($baseProperties as &$property) {\n $property = $baseTable . '.' . $property;\n }\n $colsFromBaseTabel = implode(', ', $baseProperties);\n $colsFromJoinedTables = '';\n foreach ($relations as $relation) {\n $modelNamespace = '\\\\' . $relation['model'];\n $modelTableName = $modelNamespace::tableName();\n $modelProperties = $modelNamespace::getProperties();\n foreach ($modelProperties as $key => &$value) {\n $value = $modelTableName . '.' . $value . ' AS ' . $modelTableName . '_' . $value;\n }\n $colsFromJoinedTables .= ', ' . implode(', ', $modelProperties);\n\n }\n $sql = 'SELECT ' . $colsFromBaseTabel . ' ' . $colsFromJoinedTables . ' FROM ' . $baseTable;\n\n foreach ($relations as $relation) {\n $modelNamespace = '\\\\' . $relation['model'];\n $modelTableName = $modelNamespace::tableName();\n $sql .= ' INNER JOIN ' . $modelTableName . ' ON ' . $baseTable . '.' . $relation['column'] . ' = ' . $modelTableName . '.' . $relation['joined-table-column'];\n }\n\n return $sql . ' WHERE ' . $baseTable . '.';\n }", "public function fullOuterJoin($table);", "public function rightOuterJoin($table);", "function joinClause( $join ) {\n\t global $wpdb;\n\t $join .= \" INNER JOIN $wpdb->postmeta dm ON (dm.post_id = $wpdb->posts.ID AND dm.meta_key = '$this->orderby') \";\n\t return $join;\n\t}", "public function joinOrderItemObjects();", "public function _complex_join()\n {\n // LEFT JOIN `%1$sauth_group` on `%1$spro`.`depid` = `%1$sauth_group`.`id`\n // LEFT JOIN (SELECT a.* FROM `%1$sproout` as a INNER JOIN (SELECT max(`id`) as id FROM `%1$sproout` group by `jpid`) as b on a.id = b.id) as `%1$sproout` on `%1$spro`.`id` = `%1$sproout`.`jpid`\n // LEFT JOIN `%1$scust` on `%1$spro`.`cid` = `%1$scust`.`id`', C('DB_PREFIX'));\n\n $join = sprintf('LEFT JOIN `%1$sproin` ON `%1$spro`.`id` = `%1$sproin`.`jpid`\n LEFT JOIN `%1$sauth_group` on `%1$spro`.`depid` = `%1$sauth_group`.`id`\n LEFT JOIN `%1$sproout` on `%1$sproout`.`jpid` = `%1$spro`.`id`\n LEFT JOIN `%1$sproout` tmp_out on tmp_out.`jpid` = `%1$sproout`.`jpid` and tmp_out.`id` > `%1$sproout`.`id`\n LEFT JOIN `%1$scust` on `%1$spro`.`cid` = `%1$scust`.`id`', C('DB_PREFIX'));\n return $join;\n }", "function buildJoin()\n\t{\n\t\tif ($this->table_obj_reference)\n\t\t{\n\t\t\t// Use inner join instead of left join to improve performance\n\t\t\treturn \"JOIN \".$this->table_obj_reference.\" ON \".$this->table_tree.\".child=\".$this->table_obj_reference.\".\".$this->ref_pk.\" \".\n\t\t\t\t \"JOIN \".$this->table_obj_data.\" ON \".$this->table_obj_reference.\".\".$this->obj_pk.\"=\".$this->table_obj_data.\".\".$this->obj_pk.\" \";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Use inner join instead of left join to improve performance\n\t\t\treturn \"JOIN \".$this->table_obj_data.\" ON \".$this->table_tree.\".child=\".$this->table_obj_data.\".\".$this->obj_pk.\" \";\n\t\t}\n\t}", "public function join($id);", "function join($table, &$query) {\r\n $left = $query->get_table_info($this->left_table);\r\n $output = \" $this->type JOIN {\" . $this->table . \"} $table[alias] ON ($this->left_query) = $table[alias].$this->field\";\r\n\r\n // Tack on the extra.\r\n if (isset($this->extra)) {\r\n if (is_array($this->extra)) {\r\n $extras = array();\r\n foreach ($this->extra as $info) {\r\n $extra = '';\r\n // Figure out the table name. Remember, only use aliases provided\r\n // if at all possible.\r\n $join_table = '';\r\n if (!array_key_exists('table', $info)) {\r\n $join_table = $table['alias'] . '.';\r\n }\r\n elseif (isset($info['table'])) {\r\n $join_table = $info['table'] . '.';\r\n }\r\n\r\n // And now deal with the value and the operator. Set $q to\r\n // a single-quote for non-numeric values and the\r\n // empty-string for numeric values, then wrap all values in $q.\r\n $raw_value = $this->db_safe($info['value']);\r\n $q = (empty($info['numeric']) ? \"'\" : '');\r\n\r\n if (is_array($raw_value)) {\r\n $operator = !empty($info['operator']) ? $info['operator'] : 'IN';\r\n // Transform from IN() notation to = notation if just one value.\r\n if (count($raw_value) == 1) {\r\n $value = $q . array_shift($raw_value) . $q;\r\n $operator = $operator == 'NOT IN' ? '!=' : '=';\r\n }\r\n else {\r\n $value = \"($q\" . implode(\"$q, $q\", $raw_value) . \"$q)\";\r\n }\r\n }\r\n else {\r\n $operator = !empty($info['operator']) ? $info['operator'] : '=';\r\n $value = \"$q$raw_value$q\";\r\n }\r\n $extras[] = \"$join_table$info[field] $operator $value\";\r\n }\r\n\r\n if ($extras) {\r\n if (count($extras) == 1) {\r\n $output .= ' AND ' . array_shift($extras);\r\n }\r\n else {\r\n $output .= ' AND (' . implode(' ' . $this->extra_type . ' ', $extras) . ')';\r\n }\r\n }\r\n }\r\n else if ($this->extra && is_string($this->extra)) {\r\n $output .= \" AND ($this->extra)\";\r\n }\r\n }\r\n return $output;\r\n }", "public function naturalJoin($table);", "abstract public function join($alias_from, $rel_name, $alias_to);", "public function crossJoin($table);", "public function join($tabela1 = null, $tabela2 = null, $para=null) {\n \n \n }", "public function joinBookings()\n {\n $this->builder->join('bookings', 'book_id', 'bil_booking');\n }", "function cf_search_join( $join ) {\n\t global $wpdb;\n\n\t if ( is_search() ) { \n\t $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n\t }\n\t \n\t return $join;\n\t}", "function cf_search_join( $join ) {\n\t\tglobal $wpdb;\n\n\t\tif ( is_search() ) {\n\t\t\t$join .= ' LEFT JOIN ' . $wpdb->postmeta . ' ON ' . $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n\t\t}\n\n\t\treturn $join;\n\t}", "function map_joins($join){\n //\n //return field to str\n return $join->to_str();\n }", "public function leftOuterJoin($table);", "function get_join($data,$key=FALSE,$single=FALSE,$column=FALSE){ //Zulmi Adi Rizki 23 Juli 2013\n\t\tforeach($data as $row){\n\t\t\t$this->db->join($row[\"join_table\"],$row[\"table\"].\".\".$row[\"join_key\"].\"=\".$row[\"join_table\"].\".\".$row[\"join_key\"]);\n\t\t}\n\t\tif($key == TRUE){\n\t\t\tif(!is_array($key)){\n\t\t\t\t$this->db->where($key);\n\t\t\t} else {\n\t\t\t\t$key = array_map('htmlentities', $key);\n\t\t\t\t$this->db->where($key);\n\t\t\t}\n\t\t}\n\t\tcount($this->db->ar_orderby) || $this->db->order_by($this->order_by);\n\t\t$this->db->select($column == FALSE ? \"*\" : $column)->from($this->table_name);\n\t\t$single == FALSE || $this->db->limit(1);\n\t\t$method = $single ? 'row_array' : 'result_array';\n\t\treturn $this->db->get()->$method();\n\t}", "function sql_inner_join_select_statement(int $count, array $keys)\n {\n $sql = \"\";\n for($i = 0; $i < $count; $i++ ) {\n\n $t_index = $i + 1;\n $t_name = \"T$t_index\";\n\n $sql .= $t_name . \".value AS \" . $keys[$i];\n $sql .= ($i != $count - 1) ? \", \" : \"\";\n }\n return $sql;\n }", "public function join(\n $table,\n $column1,\n $operator,\n $column2,\n $type\n );", "function GetMultipleDataJoin($table1=false,$table2=false,$filter1=false,$filter2=false)\n\t{\t//echo $table1; echo $table2; echo $filter1; echo $filter2;die;\n\t\t$qry=$this->db->query(\"select $table1.*,$table2.* from $table1,$table2 where $table1.$filter1=$table2.$filter1 \");//print_r($qry);die;\n\t\treturn $qry->result();\n\t}", "public function innerJoin($table);", "public function joinBills()\n {\n $this->builder->join('bills', 'bil_id', 'rc_bill');\n }", "public function join($tb1,$tb2,$on=[],$mod=\"inner\"){\n\n\t\tif($this->name!=\"\"){\n\t\t\t$mod=$on;$on = $tb2;$tb2= $tb1;$tb1 = $this;\n\t\t}\n\n\t\tif(gettype($on)==\"string\") $on = [$on ,$on];\n\t\tif(gettype($mod)!=\"string\") $mod= \"inner\";\n\t\treturn new $this::$tclass($tb1,$tb2,$on,$mod);\n\n\t}", "function yy_r71(){ $this->_retvalue = new Stmt\\Join('INNER', $this->yystack[$this->yyidx + 0]->minor); }", "function return_join_table_data($rt_or_left_or_none,$tableleft,$tableright,$on_a_and_b,$whereby=null,$orderby=null,$returnrows=\"a.*,b.*\") {\n\t$q = \"\n\tSELECT \".$returnrows.\"\n\tFROM \".$tableleft.\" AS a \".$rt_or_left_or_none.\" JOIN \".$tableright.\" AS b ON \".$on_a_and_b.\" \n\t\".$whereby.\" \n\t\".$orderby.\" \n\t\";\n\t//echo $q;\n\t$r = mysql_query($q) or die(\"return_join_table_data($rt_or_left_or_none,$tableleft,$tableright): \".mysql_error());\n\treturn check_results($r);\n}", "function sql_inner_join_statement(string $table_name, string $coloum_name, int $count)\n {\n $sql = \" FROM \" . $table_name . \" AS T1 \";\n for($i = 1; $i < $count; $i++){\n\n $t_index = $i + 1;\n $t_name = \"T$t_index\";\n \n $sql .= \"INNER JOIN $table_name AS $t_name USING ( \" . $coloum_name . \" ) \";\n }\n return $sql;\n }", "function get_join_by($data,$key=FALSE,$single=FALSE,$column=FALSE){ //Zulmi Adi Rizki 23 Juli 2013\n\t\tforeach($data as $row){\n\t\t\t$this->db->join($row[\"join_table\"],$row[\"table\"].\".\".$row[\"join_key\"].\"=\".$row[\"join_table\"].\".\".$row[\"join_key\"]);\n\t\t}\n\t\tif($key == TRUE){\n\t\t\tif(!is_array($key)){\n\t\t\t\t$this->db->where($key);\n\t\t\t} else {\n\t\t\t\t$key = array_map('htmlentities', $key);\n\t\t\t\t$this->db->where($key);\n\t\t\t}\n\t\t}\n\t\tcount($this->db->ar_orderby) || $this->db->order_by($this->order_by);\n\t\t$this->db->select($column == FALSE ? \"*\" : $column)->from($this->table_name);\n\t\t$single == FALSE || $this->db->limit(1);\n\t\t$method = $single ? 'row_array' : 'result_array';\n\t\treturn $this->db->get()->$method();\n\t}", "public function getJoinExpression();", "public function join($table, $key, ?string $operator = null, $foreign = null, string $type = self::INNER_JOIN);", "public function testJoinStmt()\n {\n $join = $this->joinTemplate()();\n return $this->assertEquals($join, \"SELECT blog.blog_text, blog.token_id, tokens.token_id, tokens.token_string FROM blog JOIN tokens ON blog.token_id = tokens.token_id\");\n }", "private function sql_join($filter, $structure) {\n\t\t$sql = \"\";\n\t\t$table = $structure['table'];\n\t\t$class = $structure['class'];\n\t\t$pool_class = $class . 'Pool_Model';\n\t\t$full_structure = $pool_class::get_full_structure();\n\t\tforeach ($structure['relations'] as $relation) {\n\t\t\tlist($foreign_key, $foreign_table, $key) = $relation;\n\t\t\t$foreign_structure = $full_structure[$foreign_table];\n\t\t\t$ftable = $foreign_structure['table'];\n\t\t\t$join_expr = ' LEFT JOIN '.$ftable.' AS '.$key;\n\t\t\t$join_expr .= ' ON '.implode(' AND ',array_map(function($fk,$lk) use($key,$table) {\n\t\t\t\treturn \"$key.$fk = $table.$lk\";\n\t\t\t}, $foreign_structure['key'], $foreign_key));\n\t\t\t$sql .= $join_expr;\n\t\t}\n\t\treturn $sql;\n\t}", "public function join($values);", "function yy_r68(){ $this->_retvalue = new Stmt\\Join('INNER', $this->yystack[$this->yyidx + -1]->minor); }", "public function join($table, $alias = NULL, $condition = NULL, $arguments = []);", "public function join($sql) {\n $this->__join__ = $sql;\n return $this;\n }", "public function join($table, $one, $operator = null, $two = null, $type = 'inner', $where = false)\n {\n throw new NotImplementedException('Joins are not implemented in Crate');\n }", "public function getJoins() {\n\t\t$sql = \"\";\n\t\tif (count($this->join) > 0) {\n\t\t\tforeach ($this->join as $j) {\n\t\t\t\t$sj = $j[2];\n\t\t\t\t$sql .= \" \".$j[0].\" JOIN \".$sj->getFrom().\" ON \".$sj->getTable().\".`\".$j[3].\"`=\".$this->getTable().\".`\".$j[1].\"`\";\n\t\t\t\t$sql .= $sj->getJoins();\n\t\t\t}\n\n\n\t\t}\n\t\treturn $sql;\n\t}", "public function joinOn($tableJoin, $columnJoin, $tableOn, $columnOn);", "private static function join(Table $table1, $rows1, Table $table2, $rows2, array $relation)\n {\n if ($relation[0] === Scheme::HAS_ONE) {\n list($table2, $rows2, $table1, $rows1) = [$table1, $rows1, $table2, $rows2];\n }\n\n foreach ($rows1 as $row) {\n $row->{$table2->getName()} = $table2->createCollection();\n }\n\n foreach ($rows2 as $row) {\n $id = $row->{$relation[1]};\n\n if (isset($rows1[$id])) {\n $rows1[$id]->{$table2->getName()}[] = $row;\n $row->{$table1->getName()} = $rows1[$id];\n } else {\n $row->{$table1->getName()} = null;\n }\n }\n }", "public function groupJoin($values);", "protected function innerJoin() {\n return \" INNER JOIN ImageDetails ON MainPostImage = ImageID\n INNER JOIN Users ON Posts.UserID = Users.UserID\"; }", "function sql_inner_join_where_clause(int $count, array $keys)\n {\n $sql = \" WHERE \";\n for($i = 0; $i < $count; $i++ ) {\n\n $t_index = $i + 1;\n $t_name = \"T$t_index\";\n\n $sql .= \"$t_name.field = '\" . $keys[$i];\n $sql .= ($i != $count - 1) ? \"' AND \" : \"'\";\n }\n $sql .= \") TmpTable\";\n return $sql;\n }", "function xiliml_adjacent_join_filter( $join, $in_same_cat, $excluded_categories ) {\n\t\tglobal $post, $wpdb;\n\t\t$curlang = xiliml_get_lang_object_of_post( $post->ID );\n\n\t\tif ( $curlang ) { // only when language is defined !\n\t\t\t$join .= \" LEFT JOIN $wpdb->term_relationships as xtr ON (p.ID = xtr.object_id) LEFT JOIN $wpdb->term_taxonomy as xtt ON (xtr.term_taxonomy_id = xtt.term_taxonomy_id) \";\n\t\t}\n\t\treturn $join;\n\t}", "public function join($table, $on, $field = null, $comparitor = null);", "public function testWriteJoinSnippets()\n\t{\n\t\t$queryWriter = R::getWriter();\n\t\tasrt( ( $queryWriter instanceof SQLiteT ), TRUE );\n\t\t$snippet = $queryWriter->writeJoin( 'book', 'page' ); //default must be LEFT\n\t\tasrt( is_string( $snippet ), TRUE );\n\t\tasrt( ( strlen( $snippet ) > 0 ), TRUE );\n\t\tasrt( ' LEFT JOIN `page` ON `page`.id = `book`.page_id ', $snippet );\n\t\t$snippet = $queryWriter->writeJoin( 'book', 'page', 'LEFT' );\n\t\tasrt( is_string( $snippet ), TRUE );\n\t\tasrt( ( strlen( $snippet ) > 0 ), TRUE );\n\t\tasrt( ' LEFT JOIN `page` ON `page`.id = `book`.page_id ', $snippet );\n\t\t$snippet = $queryWriter->writeJoin( 'book', 'page', 'RIGHT' );\n\t\tasrt( is_string( $snippet ), TRUE );\n\t\tasrt( ( strlen( $snippet ) > 0 ), TRUE );\n\t\tasrt( ' RIGHT JOIN `page` ON `page`.id = `book`.page_id ', $snippet );\n\t\t$snippet = $queryWriter->writeJoin( 'book', 'page', 'INNER' );\n\t\tasrt( ' INNER JOIN `page` ON `page`.id = `book`.page_id ', $snippet );\n\t\t$exception = NULL;\n\t\ttry {\n\t\t\t$snippet = $queryWriter->writeJoin( 'book', 'page', 'MIDDLE' );\n\t\t}\n\t\tcatch(\\Exception $e) {\n\t\t\t$exception = $e;\n\t\t}\n\t\tasrt( ( $exception instanceof RedException ), TRUE );\n\t\t$errorMessage = $exception->getMessage();\n\t\tasrt( is_string( $errorMessage ), TRUE );\n\t\tasrt( ( strlen( $errorMessage ) > 0 ), TRUE );\n\t\tasrt( $errorMessage, 'Invalid JOIN.' );\n\t}", "function joins() {\n //\n //begin with an empty array of joins \n $joins=[];\n //\n //Clean the array to remove any dublicates\n //\n //Sort the array in order of dependency\n $unsorted_entities=[];\n foreach ($this->join_entities as $enames){\n //\n //Get the entities\n $entty= $this->entity->dbase->entities[$enames];\n array_push($unsorted_entities, $entty);\n }\n \n //loop through the sorted array creating a join from each \n foreach ($unsorted_entities as $entity){\n //\n //get the ands columns\n $foreigns= $this->get_foreigners($entity, $joins);\n //\n //Create a new join \n array_push($joins, new join($entity, $foreigns, 'INNER JOIN'));\n }\n //\n //Return the collection of the joins in an array \n return $joins;\n }", "public function getJoinSql($data, $link) {\n $str = ' ';\n if ($data->joins) {\n foreach ($data->joins as $join) {\n $join['type'] = strtoupper($join['type']);\n if (strncmp('NATURAL', $join['type'], 7) === 0) {\n $str .= $join['type'] . ' JOIN ' . $this->formatTable($join['table']) . $this->parseIndexHint($join['index_hint']);\n } else {\n $str .= $join['type'] . ' JOIN ' . $this->formatTable($join['table']) . $this->parseIndexHint($join['index_hint']) . ($join['cond'] ? ' ON ' . $this->parseWhere($join['cond'], '', $link) : '');\n }\n }\n }\n\n return $str;\n }", "private static function selectAndJoins()\n {\n $sql = \"SELECT * FROM \" . dbPerformance::DBNAME;\n\n $sql .= \" INNER JOIN \" . dbCompetition::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::COMPETITOINID . \" = \" . dbCompetition::DBNAME . \".\" . dbCompetition::ID;\n $sql .= \" INNER JOIN \" . dbDisziplin::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::DISZIPLINID . \" = \" . dbDisziplin::DBNAME . \".\" . dbDisziplin::ID;\n $sql .= \" INNER JOIN \" . dbAthletes::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::ATHLETEID . \" = \" . dbAthletes::DBNAME . \".\" . dbAthletes::ID;\n $sql .= \" LEFT JOIN \" . dbPerformanceDetail::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::ID . \" = \" . dbPerformanceDetail::DBNAME . \".\" . dbPerformanceDetail::PERFORMANCEID;\n\n $sql .= \" INNER JOIN \" . dbCompetitionLocations::DBNAME . \" ON \" . dbCompetition::DBNAME . \".\" . dbCompetition::LOCATIONID . \" = \" . dbCompetitionLocations::DBNAME . \".\" . dbCompetitionLocations::ID;\n $sql .= \" INNER JOIN \" . dbCompetitionNames::DBNAME . \" ON \" . dbCompetition::DBNAME . \".\" . dbCompetition::NAMEID . \" = \" . dbCompetitionNames::DBNAME . \".\" . dbCompetitionNames::ID;\n return $sql;\n }", "function query_main_join( $sql, $engine ) {\n\t\tglobal $wpdb;\n\n\t\tif ( isset( $engine ) ) {\n\t\t\t$engine = null;\n\t\t}\n\n\t\t// if WooCommerce is sorting results we need to tell SearchWP to return them in that order\n\t\tif ( $this->is_woocommerce_search() ) {\n\n\t\t\tif ( ! isset( $this->ordering['wc_orderby'] ) ) {\n\t\t\t\t$this->get_woocommerce_ordering();\n\t\t\t}\n\n\t\t\t// depending on the sorting we need to do different things\n\t\t\tif ( isset( $this->ordering['wc_orderby'] ) ) {\n\t\t\t\tswitch ( $this->ordering['wc_orderby'] ) {\n\t\t\t\t\tcase 'price':\n\t\t\t\t\tcase 'price-desc':\n\t\t\t\t\tcase 'popularity':\n\t\t\t\t\t\t$meta_key = 'price' === $this->ordering['wc_orderby'] ? '_price' : 'total_sales';\n\t\t\t\t\t\t$sql = $sql . $wpdb->prepare( \" LEFT JOIN {$wpdb->postmeta} AS swpwc ON {$wpdb->posts}.ID = swpwc.post_id AND swpwc.meta_key = %s\", $meta_key );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'rating':\n\t\t\t\t\t\t$sql = $sql . \" LEFT OUTER JOIN {$wpdb->comments} swpwpcom ON({$wpdb->posts}.ID = swpwpcom.comment_post_ID) LEFT JOIN {$wpdb->commentmeta} swpwpcommeta ON(swpwpcom.comment_ID = swpwpcommeta.comment_id) \";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// for visibility we always need to join postmeta\n\t\t\tif ( function_exists( 'WC' ) && ! empty( WC()->version ) && version_compare( WC()->version, '2.6.0', '<' ) ) { // Moved to a taxonomy\n\t\t\t\t$sql = $sql . \" INNER JOIN {$wpdb->postmeta} as woovisibility ON {$wpdb->posts}.ID = woovisibility.post_id \";\n\t\t\t}\n\n\t\t}\n\n\t\treturn $sql;\n\t}", "function test_getJoin()\n {\n $question = new MDB_QT(TABLE_QUESTION);\n $joinOn1 = TABLE_QUESTION.'.id='.TABLE_ANSWER.'.question_id';\n $question->setJoin(TABLE_ANSWER, $joinOn1);\n\n $all = array(\n 'default' => array(TABLE_ANSWER => $joinOn1),\n );\n $tables = array(TABLE_ANSWER);\n $right = array();\n $left = array();\n\n $this->assertEqual($all, $question->getJoin());\n $this->assertEqual($tables, $question->getJoin('tables'));\n $this->assertEqual($right, $question->getJoin('right'));\n $this->assertEqual($left, $question->getJoin('left'));\n\n //--------------------------------------------------------\n\n $joinOn2 = TABLE_USER.'.id='.TABLE_ANSWER.'.question_id';\n $question->setRightJoin(TABLE_USER, $joinOn2);\n\n $all = array(\n 'default' => array(TABLE_ANSWER => $joinOn1),\n 'right' => array(TABLE_USER => $joinOn2),\n );\n $tables = array(TABLE_ANSWER, TABLE_USER);\n $right = array(TABLE_USER => $joinOn2);\n $left = array();\n\n $this->assertEqual($all, $question->getJoin());\n $this->assertEqual($tables, $question->getJoin('tables'));\n $this->assertEqual($right, $question->getJoin('right'));\n $this->assertEqual($left, $question->getJoin('left'));\n }", "public function joinResources()\n {\n $this->builder->join('resources', 'rs_id', '=', 'add_resource');\n }", "public function getarchives_join( $join, $r ) {\n\t\tglobal $wpdb;\n\t\t$this->get_archives_where_r = $r;\n\t\tif(isset($r['taxonomy']) && is_array($r['taxonomy']) )\n\t\t$join = $join . \" INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)\";\n\n\t\treturn $join;\n\t}", "public function getJoin()\n {\n return $this->get(self::_JOIN);\n }", "function getJoinFK($col,$tab1,$tab2,$key1,$key2){\n $array=array();\n $conn=connectDB();\n $query=\"SELECT $tab2.$col FROM $tab1 JOIN $tab2 ON $tab1.$key1 = $tab2.$key2\";\n foreach ($conn->query($query)as $row){\n array_push($array,$row[$col]);\n }\n return $array;\n }", "function cf_search_join( $join ) {\n global $wpdb;\n if ( is_search() ) {\n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n return $join;\n}", "public function basic_join_setup()\r\n {\r\n \r\n }", "function cf_search_join( $join ) {\n global $wpdb;\n\n if ( is_search() ) { \n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n\n return $join;\n}", "private static function joinSql($conj, $left, $right) {\n\n $left = trim($left);\n $right = trim($right);\n\n $leftLen = strlen($left);\n $rightLen = strlen($right);\n\n if (!($leftLen || $rightLen)) {\n return '';\n } else if ($leftLen && !$rightLen) {\n return $left;\n } else if ($rightLen && !$leftLen) {\n return $right;\n }\n\n if (!is_array($conj)) {\n return '(' . $left . ') ' . $conj . ' (' . $right . ')';\n }\n\n $left = \"($left) \";\n\n foreach($conj as $c) {\n $left .= \"$c (\";\n $right .= ')';\n }\n\n return $left . $right;\n }", "function contentjoiner($what, $from, $contenttojoin, $rid){\n\t$sql='SELECT ids.*';\n\t//everything is connected to a story\n\tif($what=='all' || $what=='stories' || ($what=='tags' && $from!='story' && $from!='comment') || ($what=='comments' && $from!='story' && $from!='comment')){\n\t\t$sql=<<<SQL\n\t\t\t$sql, stories.CreationTime AS SCreation, stories.LastActionTime AS SAction, stories.URL,\n\t\t\tstories.Title, stories.InternalLink,\tstories.TheText AS SText, stories.Extra,\n\t\t\tstories.Privacy AS SPrivacy, stories.NSFW AS SNSFW, sauth.DisplayName AS SDName, sauth.UserName AS SUName\nSQL;\n\t\tif($rid){\n\t\t\t$sql.=', svotes.Sig AS SSig';\n\t\t\tif($_SESSION['IsFollowing'])$sql.=', sfollow.following AS SF';\n\t\t}//end rid\n\t}//end all stories tags....\n\t//do the comments if we need to \n\tif($what=='all' || $what=='comments'){\n\t\t$sql=<<<SQL\n\t\t\t$sql, comments.CreationTime AS CCreation, comments.LastActionTime AS CAction, commenttext.TheText AS CText,\n\t\t\tcomments.Privacy AS CPrivacy, comments.NSFW AS CNSFW, cauth.DisplayName AS CDName, cauth.UserName AS CUName \nSQL;\n\t\tif($rid){\n\t\t\t$sql.=', cvotes.Sig AS CSig';\n\t\t\tif($_SESSION['IsFollowing'])$sql.=', cfollow.Following AS CF';\n\t\t}//end rid\n\t}//end all comments\n\n\t//We've got the initial select statememt now lets get the from information\n\t$sql.=\" FROM ($contenttojoin) AS ids \";\n\n\tif($what=='all' || $what=='stories' || ($what=='tags' && $from!='story' && $from!='comment') || ($what=='comments' && $from!='story' && $from!='comment')){\n\t\t$sql.=<<<SQL\n\t\t\tLEFT JOIN stories ON stories.ID = ids.SID\n\t\t\tLEFT JOIN users AS sauth ON sauth.ID = stories.UserID \nSQL;\n\t\tif($rid){\n\t\t\t$sql.=<<<SQL\n\t\t\t\tLEFT JOIN (SELECT *\n\t\t\t\tFROM votes\n\t\t\t\tWHERE votes.UserID = $rid AND ContentType=0) AS svotes ON svotes.ContentID = stories.ID \nSQL;\n\t\t\tif($_SESSION['IsFollowing']){\n\t\t\t\t$sql.=<<<SQL\n\t\t\t\t\tLEFT JOIN (\n\t\t\t\t\t\tSELECT FollowedID, 1 AS Following\n\t\t\t\t\t\tFROM following\n\t\t\t\t\t\tWHERE FollowerID = $rid\n\t\t\t\t\t) AS sfollow ON sfollow.FollowedID = stories.UserID \nSQL;\n\t\t\t}//end $_SESSION\n\t\t}//end rid\n\t}//end all stories\n\tif($what=='all' || $what=='comments'){\n\t\t$sql.=<<<SQL\n\t\t\tLEFT JOIN comments ON comments.ID = ids.CID\n\t\t\tLEFT JOIN users AS cauth on cauth.ID = comments.UserID\n\t\t\tLEFT JOIN commenttext ON commenttext.ID = comments.ID \nSQL;\n\t\tif($rid){\n\t\t\t$sql.=<<<SQL\n\t\t\t\tLEFT JOIN (\n\t\t\t\t\tSELECT *\n\t\t\t\t\tFROM votes\n\t\t\t\t\tWHERE votes.UserID = $rid AND ContentType=1) AS cvotes ON cvotes.ContentID = comments.ID \nSQL;\n\t\t\tif($_SESSION['IsFollowing']){\n\t\t\t\t$sql.=<<<SQL\n\t\t\t\t\tLEFT JOIN (\n\t\t\t\t\t\tSELECT FollowedID, 1 AS Following\n\t\t\t\t\t\tFROM following\n\t\t\t\t\t\tWHERE FollowerID = $rid) AS cfollow ON cfollow.FollowedID = comments.UserID \nSQL;\n\t\t\t}//end $_SESSION\n\t\t}//end rid\n\t}//end all comments\n\n\treturn $sql;\n}", "function GetJoins() { return array(); }", "protected function get_join_sql(array $filters=array()) {\n $joinsql = parent::get_join_sql($filters);\n $joinsql[] = 'JOIN {'.clusterassignment::TABLE.'} clstass\n ON clstass.clusterid='.$this->usersetid.'\n AND clstass.userid = element.id';\n return $joinsql;\n }", "public function joinMaker($join) {\n $newJoin = [];\n for ($i = 0; $i < count($join); $i++) {\n $actualJoin = '';\n\n $joinType = $join[$i]['joinType'];\n $joinTable = $join[$i]['joinTable'];\n\n $actualJoin = $joinType.' '.$joinTable.' '.substr($joinTable, 0, 1);\n $actualJoin .= ' On '; \n $actualJoin .= substr($this->table, 0, 1).'.'.$join[$i]['mainTableIdColumn'];\n $actualJoin .= ' = ';\n $actualJoin .= substr($joinTable, 0, 1).'.'.$join[$i]['joinTableIdColumn'];\n \n array_push($newJoin, $actualJoin);\n }\n\n return $newJoin;\n }", "function cf_search_join($join) {\n global $wpdb;\n\n if (is_search()) {\n $join .=' LEFT JOIN ' . $wpdb->postmeta . ' ON ' . $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n\n return $join;\n}", "function to_str(){\n //\n //Get the name of the entity \n $ename= $this->entity->name;\n //\n //The type of the join eg inner join, outer join\n $join_str=\"$this->type\"\n //\n //The on clause\n . \"\\t `$ename` \\tON \\t{$this->get_ons()}\";\n return $join_str;\n }", "public function joinCustomers()\n {\n $this->builder->join('customers', 'cus_id', 'rc_customer');\n }", "public function join()\n {\n $result = array();\n\n if (method_exists($this, 'convert')) {\n $data = $this->convert($this->_data);\n } else {\n $data = $this->_data;\n }\n\n foreach (array_filter($data, function($d) {\n if (is_bool($d) && $d == false) {\n return false;\n } elseif (is_null($d)) {\n return false;\n } else {\n return true;\n }\n }) as $key => $val) {\n $result[] = $this->format($key, $val);\n }\n\n return implode($this->_join, $result);\n }", "public function innerJoin() {\r\n\t\t$args = func_get_args();\r\n\t\t$name = array_shift($args);\r\n\t\t$joined = array_shift($args);\r\n\t\tif (!$name) $name = '___' . $joined;\r\n\t\t//if (count(array_keys(self::$_joinStack, $joined)) > 1) {\r\n\t\tif (get_class($this) == $joined || in_array($joined, self::$_joinStack)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tself::$_joinStack[] = get_class($this);\r\n\t\tself::$_joinStack[] = $joined;\r\n\t\t$model = null;\r\n\t\tif (is_string($joined)) {\r\n\t\t\tif (is_subclass_of($joined, 'Dbi_Model')) {\r\n\t\t\t\t$model = new $joined();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (is_subclass_of($joined, 'Dbi_Model')) {\r\n\t\t\t\t$model = $joined;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarray_pop(self::$_joinStack);\r\n\t\tarray_pop(self::$_joinStack);\r\n\t\tif (is_null($model)) {\r\n\t\t\tthrow new Exception('Queries can only join models.');\r\n\t\t}\r\n\t\t$this->_innerJoins[] = array(\r\n\t\t\t'name' => $name,\r\n\t\t\t'model' => $model,\r\n\t\t\t'args' => $args\r\n\t\t);\r\n\t}", "protected function buildJoinClause() {\r\n\t\t$sql='';\r\n\t\tif (count($this->_salt_joins)>0) {\r\n\t\t\tforeach($this->_salt_joins as $alias => $join) {\r\n\t\t\t\t$sql.=' '.$join['type'].' JOIN '.$join['table'].' ON '.implode(' ', $join['on']);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $sql;\r\n\t}", "public function joinLeasedOutUser() {\n $sqlSelect = $this->tableGateway->getSql()->select();\n\t\t$sqlSelect\n ->columns(array('Id','requestedTime','returnedTime','userId','returnedTime','assetId'));\n $sqlSelect\n ->join('UserInfoTable', 'UserInfoTable.Id = leasedoutuserTable.userId', array('firstname','email'), 'inner');\n $sqlSelect\n ->join('AssetInfoTable', 'AssetInfoTable.AssetId = leasedoutuserTable.assetId', array('AssetName','AssetStatus','AssetDesc'), 'inner');\n $statement \n = $this->tableGateway->getSql()->prepareStatementForSqlObject($sqlSelect);\n\t\t$resultSet = $statement->execute();\n\t\treturn $resultSet;\n\n }", "function get_table_join($select_data, $table, $join_table, $join_data, $join_type, $where_data){\n\t\n\t$this->db->select($select_data);\n\t$this->db->from($table);\n\t$this->db->join($join_table, $join_data, $join_type);\n\t$this->db->where($where_data);\n\t$this->db->order_by(\"sub1_id\",\"asc\");\n\t\n\t$query = $this->db->get();\n\t$result = $query->result_array(); \n\treturn $result;\t\n}", "public static function join() {\n $paths = func_get_args();\n if (count($paths)===1 && is_array($paths[0])) $paths = $paths[0];\n return self::$adapter->join($paths);\n }", "public function add_JOIN($left, $right, $jointset) {\n\t\t$cmp = '';\n\t\t$joint = new QRYjoint($left, $right);\n\t\t$jointset->add($joint);\n\t}", "abstract protected function appendJoins(QueryBuilder $queryBuilder);", "function outerJoin($conditions)\n\t{\n\t\treturn $this->join('OUTER', $conditions);\n\t}", "function innerJoin($conditions)\n\t{\n\t\treturn $this->join('INNER', $conditions);\n\t}", "function dt_core_join_left_filter( $parts ) {\n\tif( isset($parts['join']) && !empty($parts['join']) ) {\n\t\t$parts['join'] = str_replace( 'INNER', 'LEFT', $parts['join']);\n\t}\n\treturn $parts;\n}", "protected function _getFetchJoins() {\n\t\treturn 'LEFT JOIN series se ON se.series_id = s.series_id\n\t\t\tLEFT JOIN series_settings stpl ON (se.series_id = stpl.series_id AND stpl.setting_name = ? AND stpl.locale = ?)\n\t\t\tLEFT JOIN series_settings stl ON (se.series_id = stl.series_id AND stl.setting_name = ? AND stl.locale = ?)\n\t\t\tLEFT JOIN series_settings sapl ON (se.series_id = sapl.series_id AND sapl.setting_name = ? AND sapl.locale = ?)\n\t\t\tLEFT JOIN series_settings sal ON (se.series_id = sal.series_id AND sal.setting_name = ? AND sal.locale = ?)';\n\t}", "function getJoinCondition() ;", "public function addJoin($assocTable, $col1, $col2, $last = true, $type = \"left\") {\n // Joins will always be on selects\n list($this->sql, $this->from) = splitString($this->sql, \"FROM\");\n // Take care of aliased columns\n if (!empty($assocTable->aliases)) {\n $this->sql .= \", \";\n foreach($assocTable->aliases as $c => $a) {\n $this->sql .= $assocTable->name . \".$c as $a,\";\n }\n // Take the comma off the end\n $this->sql = trim($this->sql, \",\");\n }\n $type = strtoupper($type);\n $this->join .= \" $type JOIN \" . $assocTable->name;\n $this->join .= \" ON \" . $this->table->name . \".\" . $col1 . \" = \" . $assocTable->name . \".\" . $col2;\n if ($last) {\n $this->sql .= \" $this->from\";\n $this->sql .= $this->join;\n }\n }", "protected function append_product_sorting_table_join( $sql ) {\n\t\tglobal $wpdb;\n\n\t\tif ( ! strstr( $sql, 'wc_product_meta_lookup' ) ) {\n\t\t\t$sql .= \" LEFT JOIN {$wpdb->wc_product_meta_lookup} wc_product_meta_lookup ON $wpdb->posts.ID = wc_product_meta_lookup.product_id \";\n\t\t}\n\t\treturn $sql;\n\t}", "public static function add_wp_query_join( $join, $wp_query ) {\n\t\tglobal $wpdb;\n\n\t\t$search = $wp_query->get( 'search' );\n\t\tif ( $search ) {\n\t\t\t$join .= \" LEFT JOIN {$wpdb->postmeta} AS attr_search_meta\n\t\t\t\t\t\tON {$wpdb->posts}.ID = attr_search_meta.post_id\n\t\t\t\t\t\tAND attr_search_meta.meta_key LIKE 'attribute_%' \";\n\t\t}\n\n\t\tif ( wc_product_sku_enabled() && ! strstr( $join, 'wc_product_meta_lookup' ) ) {\n\t\t\t$join .= \" LEFT JOIN {$wpdb->wc_product_meta_lookup} wc_product_meta_lookup\n\t\t\t\t\t\tON $wpdb->posts.ID = wc_product_meta_lookup.product_id \";\n\t\t}\n\n\t\treturn $join;\n\t}", "public function cpJoin() {\n $sql=\"select packages.packageName, prices.id, prices.price, products.productName, products.cid, prices.productID, prices.areaID, prices.packageID \"\n . \"from prices\"\n . \" inner join packages on packages.packageID=prices.packageID\"\n . \" inner join products on prices.productID=products.productID where products.cid='9'\";\n $sth=$this->dbh->prepare($sql);\n \n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n}", "public function join()\n {\n $this->defaultjoinsetted = true;\n if (!empty($this->entity_link_list)) {\n foreach ($this->entity_link_list as $entity_link) {\n $this->defaultjoin .= \" left join `\" . strtolower(get_class($entity_link)) . \"` on \" . strtolower(get_class($entity_link)) . \".id = \" . $this->table . \".\" . strtolower(get_class($entity_link)) . \"_id\";\n }\n }\n return $this;\n }", "public function join(string $join);", "public function join($tables, $columnName, $joinType = 'JOIN')\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$totalTables = count($tables);\r\n\t\t\t\r\n\t\t\tif(is_array($columnName)){\r\n\t\t\t\t$colsIsArray = true;\r\n\t\t\t\tif(count($columnName) != $totalTables){\r\n\t\t\t\t\techo \"DB Join error. columnName passed as an array but does not match tables count. \";\r\n\t\t\t\t\techo \"columnName is an array of: \" . count($colsIsArray) . \" while tables is an array of: \" . $totalTables;\r\n\t\t\t\t\tdie();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse $colsIsArray = false;\r\n\t\t\t$c = 0;\r\n\r\n//SELECT column_list\r\n//FROM t1\r\n//INNER JOIN t2 ON join_condition1\r\n//INNER JOIN t3 ON join_condition2\r\n\r\n\t\t\t$joinSQL = \"`{$this->_prefix}{$tables[0]}` \";\r\n\r\n\t\t\tfor($n = 0; $n < $totalTables; $n += 1){\r\n\r\n\t\t\t\tif($n+1 < $totalTables){\r\n\t\t\t\t\t$joinSQL .= \"{$joinType} `{$this->_prefix}{$tables[$n+1]}` \";\r\n\t\t\t\t\tif($colsIsArray) $joinSQL .= \"ON `{$this->_prefix}{$tables[$n]}`.`{$columnName[$c]}` = `{$this->_prefix}{$tables[$n+1]}`.`{$columnName[$c+1]}` \";\r\n\t\t\t\t\telse $joinSQL .= \"ON `{$this->_prefix}{$tables[$n]}`.`{$columnName}` = `{$this->_prefix}{$tables[$n+1]}`.`{$columnName}` \";\r\n\t\t\t\t\t$c += 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//lets prepare our query string\r\n\t\t\t$this->_sql = \"SELECT {$this->_select} FROM \" . $joinSQL . $this->_where . $this->_orderBy . $this->_limit;\r\n\r\n\t\t\t//build an additional query string for our count ready for numRows() method\r\n\t\t\t$this->_sqlCount = \"SELECT COUNT(*) FROM \" . $joinSQL . $this->_where;\r\n\r\n\t\t\t//let the server prepare, execute and check for errors\r\n\t\t\t$this->_query = $this->_prepare($this->_sql);\r\n\t\t\t$this->_execute($this->_query);\r\n\t\t\t$this->_errors($this->_query);\r\n\r\n\t\t\treturn $this;\r\n\t\t}", "function sql_leftJoin(){\n\t\t$dbconnection = $this->db_connect();\n\t\tif($dbconnection !=1)\n\t\t{\n\t\t\t$result=\"MySql Connection Error\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//LIST OF SELECTIONS\n\t\t\t//INSTEAD of a listOfFields I need a listOfSelections like \"db.tbl_1.fld_1\"\n\t\t\t// a_selections = array(\"db.tbl_1.fld_1\",\"db.tbl_1.fld_2\",\"db.tbl_2.fld_1\");\n\t\t\t\n\t\t\tif($this->a_fields !=\" \"){\n\t\t\t\t$a_selections = $this->arraySELECTIONS($this->db,$this->table,$this->a_fields);\n\t\t\t}else{\n\t\t\t\t$a_selections = $this->db.\".\".$this->table.\" \";\n\t\t\t}\n\t\t\t\n\t\t\tif($this->a_fields2 !=\" \"){\n\t\t\t\t$a_selections2 = $this->arraySELECTIONS($this->db2,$this->table2,$this->a_fields2);\n\t\t\t}else{\n\t\t\t\t$a_selections2 = $this->db2.\".\".$this->table2.\" *\";\n\t\t\t}\n\t\t\t\n \t\t\t$listOfSelections = $this->arrayFieldsToList($a_selections);\n\t\t\t$listOfSelections2 = $this->arrayFieldsToList($a_selections2);\n\t\t\t\n \t\t\t$sql = mysql_query(\"SELECT \".$listOfSelections.\",\".$listOfSelections2.\" FROM \".$this->db.\".\".$this->table.\" LEFT JOIN \".$this->db2.\".\".$this->table2.\" ON \".$this->db.\".\".$this->table.\".\".$this->relation.\" = \".$this->db2.\".\".$this->table2.\".\".$this->relation2.\"\");\n\t\t\t\n \t\t\t //echo(\"SELECT \".$listOfSelections.\",\".$listOfSelections2.\" FROM \".$this->db.\".\".$this->table.\" LEFT JOIN \".$this->db2.\".\".$this->table2.\" ON \".$this->db.\".\".$this->table.\".\".$this->relation.\" = \".$this->db2.\".\".$this->table2.\".\".$this->relation2.\"\");\n \t\t\t\tif (mysql_num_rows($sql) > 0) \n\t\t\t \t{\n\t\t\t \twhile ($row = mysql_fetch_assoc($sql)) \n\t\t\t \t{\n\t\t\t \t$a_data[]=$row ;\n\t\t\t \t}\n\t\t \t\t$result= $a_data;\t\n\t\t\t\t}else{\n\t\t\t\t\t$result=\"NO DATA AVAILABLE\";\n\t\t\t\t}\n\t\t}\n\t\treturn $result;\n\t\n\t}", "function getJoin($table,$col,$join){\n $array=array();\n $conn=connectDB();\n $query=\"SELECT $table.$col FROM $join\";\n foreach ($conn->query($query)as $row){\n array_push($array,$row[$col]);\n }\n return $array;\n }", "private function joinWhereIn($query)\n {\n foreach ($this->associativePivots as $basePivot => $mergePivot)\n {\n $query = $query->whereIn($basePivot,$this->mergeCollection->pluck($mergePivot)->toArray());\n }\n\n return $query;\n }", "public function compile()\n {\n if (null !== $this->type) {\n $sql = strtoupper($this->type).' JOIN';\n } else {\n $sql = 'JOIN';\n }\n\n $sql .= ' '.$this->quoter->quoteTable($this->table);\n\n if (!empty($this->using)) {\n $sql .= ' USING ('.implode(', ', array_map(array($this->quoter, 'quoteColumn'), $this->using)).')';\n } else {\n $conditions = array();\n\n foreach ($this->on as $condition) {\n list($c1, $op, $c2) = $condition;\n\n if ($op) {\n $op = ' '.strtoupper($op);\n }\n\n $conditions[] = $this->quoter->quoteColumn($c1).$op.' '.$this->quoter->quoteColumn($c2);\n }\n\n $sql .= ' ON ('.implode(' AND ', $conditions).')';\n }\n\n return $sql;\n }", "function carton_exclude_order_comments_from_feed_join( $join ) {\n\tglobal $wpdb;\n\n if ( ! $join )\n \t$join = \" LEFT JOIN $wpdb->posts ON $wpdb->comments.\\\"comment_post_ID\\\" = $wpdb->posts.\\\"ID\\\" \";\n\n return $join;\n}", "public function makeSearchJoin($join)\n {\n global $wpdb;\n\n if (is_search()) {\n\n $join .= ' LEFT JOIN ' . $wpdb->postmeta . ' ON ' . $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n\n foreach ($this->getAvailableMetaKeysForFilters() as $values) {\n if (isset($_GET[$values]) && !empty($_GET[$values])) {\n $join .= \" LEFT JOIN $wpdb->postmeta as $values ON $wpdb->posts.ID = $values.post_id\";\n\n }\n }\n\n }\n\n return $join;\n }", "private function joinTemplate()\n {\n return $this->getConnection()\n ->join()\n ('blog')\n ('tokens')\n ([\n ['blog_text', 'token_id'],\n ['token_id', 'token_string']\n ]);\n }", "protected function get_join_sql(array $filters=array()) {\n $joinsql = parent::get_join_sql($filters);\n $joinsql[] = 'LEFT JOIN {'.clusterassignment::TABLE.'} clstass\n ON clstass.clusterid='.$this->usersetid.'\n AND clstass.userid = element.id';\n return $joinsql;\n }", "public function testBuildJoinDefaultWithTwoJoinOn()\n {\n $query = $this->getQuery()\n ->table('table1')\n ->join(\n $this->getQuery()\n ->table('table2')\n ->joinOn('id', 'id')\n ->joinOn('user_id', 'type_id')\n )\n ;\n\n $this->assertSame(\n 'LEFT JOIN table2 ON table1.id = table2.id AND table1.user_id = table2.type_id',\n $query->buildJoin()\n );\n }", "public function join($table, $condition = [], $join = '')\n\t{\n\t\tif(count($condition) == 3)\n\t\t\t$this->_query .= strtoupper($join) . // convert $join to upper case (left -> LEFT)\n\t\t\t\t\" JOIN {$table} ON {$condition[0]} {$condition[1]} {$condition[2]}\";\n\n\t\t// that's it now return object from this class\n\t\treturn $this;\n }", "public function join($tables, $overwrite = false);", "function myjoin()\n {\n $this->db\n ->select('puestos.nombre AS pnombre')\n ->select('puestos.id AS pid')\n ->select('entidades.nombre AS enombre')\n ->select('entidades.id AS eid')\n ->select('departamentos.nombre AS dnombre')\n ->select('departamentos.id AS did')\n ->select('ubicaciones.nombre AS unombre')\n ->select('ubicaciones.id AS uid')\n ->join ('puestos', 'users.puesto = puestos.id' , 'left')\n ->join ('entidades', 'users.entidad = entidades.id' , 'left')\n ->join('departamentos', 'users.departamento = departamentos.id' , 'left')\n ->join('ubicaciones', 'users.ubicaciontrabajo = ubicaciones.id' , 'left');\n //$this->db->where('users.id',7);\n return $datosuser = $this->db->get('users')->result_array();\n }" ]
[ "0.7394323", "0.7020029", "0.6679639", "0.653194", "0.6512066", "0.650985", "0.64914477", "0.6445698", "0.64243096", "0.64101064", "0.6384634", "0.6365367", "0.6347408", "0.63431233", "0.63375425", "0.633177", "0.6325582", "0.63186437", "0.63105226", "0.62995535", "0.6270519", "0.6246769", "0.6231833", "0.62110883", "0.62102556", "0.6205446", "0.6190302", "0.61780816", "0.61407447", "0.61304194", "0.612149", "0.61157626", "0.6091063", "0.60891557", "0.60790753", "0.60676324", "0.6042047", "0.6024182", "0.6018634", "0.6000147", "0.59963435", "0.59843516", "0.59713054", "0.59598005", "0.59556717", "0.5941888", "0.59336615", "0.5925076", "0.5916186", "0.59099174", "0.59004796", "0.58999103", "0.58945584", "0.58843833", "0.58839536", "0.5872533", "0.58675796", "0.5864478", "0.5859393", "0.5842906", "0.5842431", "0.5841813", "0.57994807", "0.5792742", "0.57865804", "0.578506", "0.57806504", "0.57764846", "0.5776016", "0.57693124", "0.5767959", "0.57671887", "0.57656336", "0.5759774", "0.5756761", "0.5750284", "0.57491606", "0.57461613", "0.5743622", "0.57355314", "0.5715003", "0.5704863", "0.5699181", "0.5688467", "0.56884474", "0.5671322", "0.56674176", "0.56559914", "0.5653192", "0.56506526", "0.5649758", "0.56407946", "0.5631811", "0.56253046", "0.56240773", "0.5612348", "0.5610964", "0.56091064", "0.55919266", "0.55808824", "0.55794334" ]
0.0
-1
$options = ['cost'=> 12];
public function editadminprofile($id) { //$encripted_pass = password_hash($this->input->post('password'), PASSWORD_BCRYPT, $options); $data = array( 'name' => $this->input->post('name'), 'contact' => $this->input->post('contact'), //'password' => $encripted_pass, ); return $query = $this->db->where('id', $id)->update('users', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getOptions(): array\n {\n return [\n 'cost' => $this->cost\n ];\n }", "function algorithmic_cost()\r\n{\r\n return ['cost' => 10];\r\n}", "public function setCost($cost)\n {\n $this->cost = $cost;\n }", "public function getCost();", "public function cost(){\n\t\t\n\t\treturn 200;\n\t}", "public function purchase($options);", "function getCost(){\n return $this->cost;\n }", "public function deliveryPriceDhaka()\n {\n }", "public function run()\n {\n //\n $commercialCompreheniveCost = [\n [\n 'commercial_class_id'=>1,\n 'sum_insured_from_value'=>0,\n 'sum_insured_to_value'=>3000000, \n 'rate'=>4.50\n ],\n [\n 'commercial_class_id'=>1,\n 'sum_insured_from_value'=>3000001,\n 'sum_insured_to_value'=>0, \n 'rate'=>4.25\n ],\n [\n 'commercial_class_id'=>2,\n 'sum_insured_from_value'=>0,\n 'sum_insured_to_value'=>3000000, \n 'rate'=>5.75\n ],\n [\n 'commercial_class_id'=>2,\n 'sum_insured_from_value'=>3000001,\n 'sum_insured_to_value'=>7000000, \n 'rate'=>5.25\n ],\n [\n 'commercial_class_id'=>2,\n 'sum_insured_from_value'=>7000001,\n 'sum_insured_to_value'=>0, \n 'rate'=>4.25\n ],\n [\n 'commercial_class_id'=>3,\n 'sum_insured_from_value'=>0,\n 'sum_insured_to_value'=>3000000, \n 'rate'=>3\n ],\n [\n 'commercial_class_id'=>3,\n 'sum_insured_from_value'=>3000001,\n 'sum_insured_to_value'=>0, \n 'rate'=>2.5\n ],\n [\n 'commercial_class_id'=>4,\n 'sum_insured_from_value'=>0,\n 'sum_insured_to_value'=>2000000, \n 'rate'=>7.5\n ],\n [\n 'commercial_class_id'=>4,\n 'sum_insured_from_value'=>2000001,\n 'sum_insured_to_value'=>0, \n 'rate'=>6\n ],\n [\n 'commercial_class_id'=>5,\n 'sum_insured_from_value'=>600000,\n 'sum_insured_to_value'=>0, \n 'rate'=>4\n ],\n [\n 'commercial_class_id'=>6,\n 'sum_insured_from_value'=>600000,\n 'sum_insured_to_value'=>0, \n 'rate'=>4\n ],\n [\n 'commercial_class_id'=>7,\n 'sum_insured_from_value'=>600000,\n 'sum_insured_to_value'=>0, \n 'rate'=>4\n ],\n [\n 'commercial_class_id'=>8,\n 'sum_insured_from_value'=>600000,\n 'sum_insured_to_value'=>0, \n 'rate'=>12.5\n ],\n ];\n \n foreach($commercialCompreheniveCost as $key => $value){\n\n CommercialComprehensiveCost::create($value);\n\n }\n }", "function inkpro_create_options() {\r\n\treturn array();\r\n}", "function bi_options_line($arr = array()){\r\n\t$arr_option = bi_options(array(\r\n\t\t\"chartBottomMargin\" => \"25\",\r\n\t\t\"chartTopMargin\" => \"50\",\r\n\t\t\"showValues\" => \"0\",\r\n\t\t\"exportEnabled\" => \"1\"\r\n\t));\r\n\tforeach($arr as $i => $val){\r\n\t\t$arr_option[$i] = $val;\r\n\t}\r\n\treturn $arr_option;\r\n}", "function getShipping()\n {\n return array('name'=>'test','cost'=>4.5);\n }", "function getData($options) \n {\n }", "public function setCost($value)\n {\n return $this->set(self::_COST, $value);\n }", "public function Mytestmethod( $observer )\n {\n $item = $observer->getQuoteItem();\n $qty = $item->getQty();\n $productId = $item->getProductId();\n $helper = Mage::helper( 'catalog/product_configuration' );\n $productModel = Mage::getModel( 'catalog/product' );\n //$attr = $productModel->getResource()->getAttribute('Size');\n $maal = $helper->getOptions( $item );\n $attribute_model = Mage::getModel( 'eav/entity_attribute' );\n $superAttr = array();\n $options = array();\n //Mage::log('all options');\n //Mage::log($item->getItemId());\n\n foreach( $maal as $key ) {\n $count = count( $key );\n if( $count < 2 ) {\n //Mage::log( 'fucker' );\n }\n if( $count > 2 ) {\n $labelcode = $key['option_id'];\n $valuecode = $key['value'];\n //$arr =$arrayName = array( $labelcode =>$valuecode);\n //array_push($superAttr,$arr);\n $options[$labelcode] = $valuecode;\n } else {\n $label = $key['label'];\n $labelcode = $attribute_model->getIdByCode( 'catalog_product', $label );\n $value = $key['value'];\n $attr = $productModel->getResource()->getAttribute( $label );\n if( $attr->usesSource() ) {\n $valuecode = $attr->getSource()->getOptionId( $value );\n //$arr =$arrayName = array( $labelcode =>$valuecode);\n //array_push($options,$arr);\n $superAttr[$labelcode] = $valuecode;\n }\n }\n }\n $final = array(\n 'super_attribute' => $superAttr,\n 'options' => $options \n );\n $final2 = http_build_query( $final );\n $coup = Mage::helper( 'webengage_coup' )->couponPost();\n $final3 = 'qty=' . $qty . '&' . 'product=' . $productId . '&' . $final2;\n //$attr = $productModel->getResource()->getAttribute('Test Custom Options');\n //$valuecode = $attr->getSource()->getOptionId('model 2');\n ////Mage::log($valuecode);\n $_SESSION['raku'] = $final3 . '&coup=' . $coup;\n }", "public function __construct($options) { }", "function yaz_set_option($id, $options)\n{\n}", "public function setAdditionalCostAttribute($value)\n {\n $this->attributes['additional_cost'] = Utils::numbersOnly($value);\n }", "public function setCreateCost($value)\n {\n return $this->set(self::_CREATE_COST, $value);\n }", "public function setCreateCost($value)\n {\n return $this->set(self::_CREATE_COST, $value);\n }", "private function _set_value_cost_context()\n\t{\n\t\tglobal $context, $modSettings, $txt;\n\n\t\tif ($this->_order['flexible'])\n\t\t{\n\t\t\t// Real cost...\n\t\t\t$context['value'] = $this->_order['costs'][$this->_req->post->cur[$this->_id_sub]];\n\t\t\t$context['cost'] = sprintf($modSettings['paid_currency_symbol'], $context['value']) . '/' . $txt[$this->_req->post->cur[$this->_id_sub]];\n\n\t\t\t// The period value for paypal.\n\t\t\t$context['paypal_period'] = strtoupper(substr($this->_req->post->cur[$this->_id_sub], 0, 1));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Real cost...\n\t\t\t$context['value'] = $this->_order['costs']['fixed'];\n\t\t\t$context['cost'] = sprintf($modSettings['paid_currency_symbol'], $context['value']);\n\n\t\t\t// Recur?\n\t\t\tpreg_match('~(\\d*)(\\w)~', $this->_order['real_length'], $match);\n\t\t\t$context['paypal_unit'] = $match[1];\n\t\t\t$context['paypal_period'] = $match[2];\n\t\t}\n\t}", "public function costInstallments(){\n\n\n for($x = 1; $x<=12; $x++){\n\n if($x == 1){\n $cost[$x] = 0;\n }\n $cost[$x] = Mage::getStoreConfig(self::XPATH_CONFIG_INSTALMENT_COST.$x);\n }\n\n\n return $cost;\n }", "abstract function options();", "public function __construct(array $options = []);", "function __construct($option = array());", "function bi_options_pie($arr = array()){\r\n\t$arr_option = bi_options(array(\r\n\t\t\"chartBottomMargin\" => \"25\",\r\n\t\t\"legendPosition\" => \"bottom\",\r\n\t\t\"showLabels\" => \"0\",\r\n\t\t\"showLegend\" => \"1\",\r\n\t\t\"showValues\" => \"1\",\r\n\t\t\"exportEnabled\" => \"1\"\r\n\t));\r\n\tforeach($arr as $i => $val){\r\n\t\t$arr_option[$i] = $val;\r\n\t}\r\n\treturn $arr_option;\r\n}", "public function setQuantite($quantite)\n{\n$this->quantite = $quantite;\n\nreturn $this;\n}", "private function assignZrangeOptions(&$options)\n {\n $options['query_parameters']['options'] = 'withscores';\n\n if (isset($options['limit'])) {\n $options['query_parameters']['limit'] = implode(',', $options['limit']);\n unset($options['limit']);\n }\n }", "public function setCost($cost)\n {\n $this->cost = $cost;\n\n return $this;\n }", "function bi_options_column($arr = array()){\r\n\t$arr_option = bi_options(array(\r\n\t\t\"chartBottomMargin\" => \"25\",\r\n\t\t\"chartTopMargin\" => \"50\",\r\n\t\t\"showLabels\" => \"1\",\r\n\t\t\"showLegend\" => \"1\",\r\n\t\t\"showValues\" => \"1\",\r\n\t\t\"exportEnabled\" => \"1\"\r\n\t));\r\n\tforeach($arr as $i => $val){\r\n\t\t$arr_option[$i] = $val;\r\n\t}\r\n\treturn $arr_option;\r\n}", "abstract protected function options(): array;", "public function setCosts(array $costs)\n {\n $this->_costs = $costs;\n }", "public function __construct($cost, $isbn)\n {\n //assigning the instance variables using constructor\n $this->price = $cost;\n $this->isbnNumber = $isbn;\n }", "public function setModel()\n {\n return Cost::class;\n }", "public function options($opts)\n {\n }", "function form_options($options) {\n }", "function get_cost($from, $to,$weight)\r\n{\r\n require_once 'REST_Ongkir.php';\r\n \r\n $rest = new REST_Ongkir(array(\r\n 'server' =&amp;gt; 'http://api.ongkir.info/'\r\n ));\r\n \r\n//ganti API-Key dibawah ini sesuai dengan API Key yang anda peroleh setalah mendaftar di ongkir.info\r\n $result = $rest-&amp;gt;post('cost/find', array(\r\n 'from' =&amp;gt; $from,\r\n 'to' =&amp;gt; $to,\r\n 'weight' =&amp;gt; $weight.'000',\r\n 'courier' =&amp;gt; 'jne',\r\n'API-Key' =&amp;gt;'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456'\r\n ));\r\n \r\n try\r\n {\r\n $status = $result['status'];\r\n \r\n // Handling the data\r\n if ($status-&amp;gt;code == 0)\r\n {\r\n $prices = $result['price'];\r\n $city = $result['city'];\r\n \r\n echo 'Ongkos kirim dari ' . $city-&amp;gt;origin . ' ke ' . $city-&amp;gt;destination . '&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';\r\n \r\n foreach ($prices-&amp;gt;item as $item)\r\n {\r\n echo 'Layanan: ' . $item-&amp;gt;service . ', dengan harga : Rp. ' . $item-&amp;gt;value . ',- &amp;lt;br /&amp;gt;';\r\n }\r\n }\r\n else\r\n {\r\n echo 'Tidak ditemukan jalur pengiriman dari surabaya ke jakarta';\r\n }\r\n \r\n }\r\n catch (Exception $e)\r\n {\r\n echo 'Processing error.';\r\n }\r\n}", "public function options();", "public function options();", "public function options();", "public function options();", "public function options();", "public function actionDeliveryCost($code){\n //check country\n $city= City::find()->where('Name=\"'.$code.'\"')->one();\n //var_dump($city);\n if($city->CountryCode == 'EGY'){\n //calculate weight\n $sum=0;\n foreach(Shopcart::goods() as $good) {\n $sum+= $good->item->product_weight ;\n\n }\n // return \"the new cost--\".$city->Name .$city->CountryCode;\n //$city->CountryCode;\n $cost= $this->GetCost($city->Name,$sum);\n if($cost =='' or $cost ==0){\n return Setting::get('deliver_cost');\n }else{return $cost ;}\n\n }else{\n return Setting::get('deliver_cost'); //.'-99'. $city->CountryCode;\n }\n\n }", "public function setOptions($options){\n\n\t}", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function run()\n {\n for ($i=1; $i < 4; $i++) {\n switch ($i) {\n case 1:\n CostingOption::create([\n 'name' => 'Shared',\n ]);\n break;\n case 2:\n CostingOption::create([\n 'name' => 'Covered',\n ]);\n break;\n case 3:\n CostingOption::create([\n 'name' => 'Charged',\n ]);\n break;\n default:\n $i = 5;\n }\n }\n }", "public function getCost()\n {\n return $this->get(self::_COST);\n }", "public function __construct()\n {\n $this->_cash = array ( 1 => 25, 2 => 74, 5 => 14, 10 => 18, 20 => 0, 50 => 5, 100 => 30, 200 => 15, 500 => 8, 1000 => 11, 2000 => 8, 5000 => 5, 10000 => 2, 20000 => 0, 50000 => 0 );\n;\n }", "public function getCost()\n {\n return $this->cost;\n }", "public function getCost()\n {\n return $this->cost;\n }", "public function getCost()\n {\n return $this->cost;\n }", "public function getTotalCost()\n\t{\n\t\t$tprice = $this->getPrice();\n\n\t\tforeach ($this->options as $o)\n\t\t{\n\t\t\t$tprice += $o->getPrice() * $o->getQuantity();\n\t\t}\n\n\t\treturn $tprice;\n\t}", "public function __construct($options = null);", "public function __construct($options = null);", "public function getCreateCost()\n {\n return $this->get(self::_CREATE_COST);\n }", "public function getCreateCost()\n {\n return $this->get(self::_CREATE_COST);\n }", "public function getShippingCost();", "public function options() {}", "public function cost()\n {\n return $this->price;\n }", "public function options(array $options);", "public function getPrice(){\n }", "public function getPrice(){\n }", "function populate_options(array $options = array())\n {\n }", "public function getProductOption();", "public function breakdown(): CostBreakdownContract;", "public function optionAction() \n {\n $result = array();\n \n $productIdOrSku = $this->getRequest()->getParam('product');\n $attributeOptionId = $this->getRequest()->getParam('id');\n\n try {\n \n $model = $this->getModel();\n $model->loadOptions($productIdOrSku, $attributeOptionId);\n $options = $model->getApiOptions(); \n \n $result = $options;\n \n \n } catch (Exception $e) {\n \n $result['error'] = true;\n $result['data'] = $e->getMessage();\n } \n \n $this->getResponse()->clearHeaders()->setHeader('Content-type','application/json',true)->setBody(Mage::helper('core')->jsonEncode($result));\n \n }", "public function get_stLight_options($data_options);", "public function showAdCost($args)\n {\n $ad_level = $_REQUEST ['level'];\n $repo = $this->entityManager->getRepository('ZSELEX_Entity_Shop');\n $return_array = array();\n /*\n * $get = ModUtil::apiFunc('ZSELEX', 'user', 'get', $getargs =\n * array('table' => 'zselex_advertise_price',\n * 'where' => \"identifier='\" . $ad_level . \"'\"));\n */\n\n $get = $repo->get(array(\n 'entity' => 'ZSELEX_Entity_AdvertisePrice',\n 'fields' => array(\n 'a.price'\n ),\n 'where' => array(\n 'a.identifier' => $ad_level\n )\n ));\n // return $return_array;\n $data [\"adcost\"] = round($get ['price']).\" \".$this->__('points');\n AjaxUtil::output($data);\n }", "public static function chargeFees($price=1)\n {\n\n }", "function add_option($option, $value = '', $deprecated = '', $autoload = 'yes')\n {\n }", "function tradeoff_option($definition)\n {\n return app(Models\\Problem\\Option::class)->setData($definition);\n }", "public function __construct(array $options = array());", "public function getQuantite()\n{\nreturn $this->quantite;\n}", "function yaz_set_option($id, $name, $value)\n{\n}", "function fn_divido_after_options_calculation(&$mode, &$data)\n{\n if ($mode == 'options' && $product = Tygh::$app['view']->getTemplateVars('product')) {\n if (empty($product['divido_data'])) {\n $product['divido_data'] = array();\n }\n $product['divido_data']['show_calculator'] = !empty($product['divido_data']['price']) && !empty($product['divido_data']['api_key']);\n\n Tygh::$app['view']->assign('product', $product);\n }\n}", "public function salesConvertQuoteItemToOrderItem(Varien_Event_Observer $observer)\n{\n$quoteItem = $observer->getItem();\n if ($additionalOptions = $quoteItem->getOptionByCode('additional_options')) {\n $orderItem = $observer->getOrderItem();\n $options = $orderItem->getProductOptions();\n $options['additional_options'] = unserialize($additionalOptions->getValue());\n$var;\nif (count($options['additional_options'] > 0)) {\n if ($options['additional_options'][0]['value'] != '') \n $i = 0;\n $val = $options['additional_options'][0]['value'];\n\n}\n//Mage::log($val.\" trgy\");\n$orderItem->setCredits($val);\n $orderItem->setProductOptions($options);\n }\n\n}", "public function catalogProductLoadAfter(Varien_Event_Observer $observer)\n{\n // set the additional options on the product\n if(Mage::getStoreConfigFlag('mycustom_section/mycustom_group2/field1')){\n $action = Mage::app()->getFrontController()->getAction();\n if ($action->getFullActionName() == 'checkout_cart_add')\n {\n\n \n $product = $observer->getProduct();\n // Mage::log($product);\n \n$totalCredits = Mage::getModel('kartparadigm_storecredit/creditinfo')->getCreditsOfProduct($product->getId());\n\n if($totalCredits > 0) {\n\n // if ($options = $action->getRequest()->getParam('extra_option'))\n //{\n //$product = $observer->getProduct();\n // Mage::log($product);\n\n // add to the additional options array\n $additionalOptions = array();\n if ($additionalOption = $product->getCustomOption('additional_options'))\n {\n $additionalOptions = (array) unserialize($additionalOption->getValue());\n }\n\n \n $additionalOptions[] = array(\n 'label' => \"Credits\",\n 'value' => $totalCredits,\n );\n\n \n // add the additional options array with the option code additional_options\n $observer->getProduct()\n ->addCustomOption('additional_options', serialize($additionalOptions));\n //}\n }\n }\n }\n}", "function upgrade_230_options_table()\n {\n }", "function add_getfaircoin_settings($settings) {\r\n $getfaircoin_settings = array(\r\n 'faircoin_settings' => array(\r\n 'id' => 'faircoin_settings',\r\n 'name' => '<strong>' . __( 'FAIRCOIN Settings', 'edd-getfaircoin' ) . '</strong>',\r\n 'desc' => __( 'Set the actual Faircoin options', 'edd-getfaircoin' ),\r\n 'type' => 'header'\r\n ),\r\n 'faircoin_price' => array(\r\n 'id' => 'faircoin_price',\r\n 'name' => __( 'Faircoin-Euro Price', 'edd-getfaircoin' ),\r\n 'desc' => __( 'Put manually the actual Faircoin price related Euro: 1 ƒ = n €', 'edd-getfaircoin' ),\r\n 'type' => 'text',\r\n 'size' => 'medium',\r\n 'std' => '100.01'\r\n ),\r\n 'general_settings' => array(\r\n 'id' => 'general_settings',\r\n 'name' => '<strong>' . __( 'GENERAL Settings', 'edd-getfaircoin' ) . '</strong>',\r\n 'desc' => '',\r\n 'type' => 'header'\r\n ),\r\n );\r\n return array_merge($getfaircoin_settings, $settings);\r\n}", "public function getCosto()\n {\n return $this->costo;\n }", "public function getPrice()\n {\n }", "public function getPrice()\n {\n }", "public function __construct(array $options = null) {\n\n }", "function testOppSearchByCostGreaterThan() {\n\t\t$this->setUrl('/search/advanced?r=opp&q[opp_cost][op]=GREATER+THAN&q[opp_cost][value]=500');\n\t\t$this->app->go();\n\t\t$this->assertPattern('/id=\"qb_opp_cost\"/', $this->view->output);\n\t\t$collection = $this->view->get('collection');\n\t\t$this->assertIsA($collection, 'Tactile_OpportunityCollection');\n\t\t$names = $collection->pluck('name');\n\t\t$this->assertEqual($names, array('Build a website'));\n\t}", "public function __construct()\n {\n $this->options = [];\n }", "public function setOptions($options = []);", "public function run()\n {\n Cost::create($this->input(1, 1, 1, 87000, 8700, 0.9));\n Cost::create($this->input(1, 2, 1, 157000, 15700, 0.9));\n Cost::create($this->input(1, 3, 1, 214000, 21400, 0.9));\n Cost::create($this->input(1, 4, 1, 158000, 15800, 0.9));\n Cost::create($this->input(1, 5, 1, 258000, 25800, 0.9));\n Cost::create($this->input(1, 6, 1, 216000, 21600, 0.9));\n Cost::create($this->input(1, 7, 1, 171000, 17100, 0.9));\n Cost::create($this->input(1, 8, 1, 157000, 15700, 0.9));\n Cost::create($this->input(1, 9, 1, 253000, 25300, 0.9));\n Cost::create($this->input(1, 10, 1, 205000, 20500, 0.9));\n Cost::create($this->input(1, 11, 1, 245000, 24500, 0.9));\n Cost::create($this->input(1, 12, 1, 246000, 24600, 0.9));\n Cost::create($this->input(1, 13, 1, 136000, 13600, 0.9));\n }", "public function getPrices()\n {\n }", "function mfcs_get_revenue_generated_list_options($option = NULL, $hidden = FALSE, $disabled = FALSE) {\n $options = array();\n $options_all = array();\n\n if ($hidden) {\n $options_all[MFCS_REQUEST_REVENUE_NONE] = 'None';\n }\n\n $options_all[MFCS_REQUEST_REVENUE_TICKET_SALES] = 'Ticket Sales';\n $options_all[MFCS_REQUEST_REVENUE_MERCHANDISE_SALES] = 'Merchandise Sales';\n $options_all[MFCS_REQUEST_REVENUE_CONCESSION_SALES] = 'Concession Sales';\n\n if ($option == 'select') {\n $options[''] = '- Select -';\n }\n elseif ($option == 'column_name') {\n $options_all[MFCS_REQUEST_REVENUE_TICKET_SALES] = 'ticket';\n $options_all[MFCS_REQUEST_REVENUE_MERCHANDISE_SALES] = 'merchandise';\n $options_all[MFCS_REQUEST_REVENUE_CONCESSION_SALES] = 'concession';\n }\n\n foreach ($options_all as $option_id => $option_name) {\n $options[$option_id] = $option_name;\n }\n\n asort($options);\n\n return $options;\n}", "public function set_options(Array $options);", "public function get_options()\n {\n }", "public function __construct($id, $ProductName, $Extra, $maxExtra , $price, $type) {\n $this->id = $id;\n $this->ProductName = $ProductName;\n $this->Extra = $Extra;\n $this->maxExtra = $maxExtra;\n $this->price = $price;\n $this->type = $type;\n}", "function getOptions() ;", "function add_network_option($network_id, $option, $value)\n {\n }", "function add_allowed_options($new_options, $options = '')\n {\n }" ]
[ "0.68121386", "0.66843766", "0.5954034", "0.5914104", "0.5822168", "0.57798105", "0.5774098", "0.56559455", "0.5622945", "0.5582558", "0.55271786", "0.55089563", "0.5490792", "0.5453431", "0.5396134", "0.53677607", "0.5325965", "0.52877045", "0.5286674", "0.5286674", "0.52426785", "0.523924", "0.52367353", "0.5236314", "0.5233903", "0.5230246", "0.5221373", "0.521654", "0.52001506", "0.5197702", "0.51805675", "0.5174639", "0.51689357", "0.51671416", "0.5163169", "0.51499444", "0.51491606", "0.51420784", "0.51420784", "0.51420784", "0.51420784", "0.51420784", "0.5104758", "0.51001525", "0.50936925", "0.50936925", "0.50936925", "0.50936925", "0.50936925", "0.50936925", "0.50936925", "0.50928295", "0.50886136", "0.5083677", "0.5080901", "0.5080901", "0.5080901", "0.50804985", "0.50755644", "0.50755644", "0.50692815", "0.50692815", "0.5068913", "0.5059575", "0.50440645", "0.50240564", "0.5023881", "0.5023881", "0.5023717", "0.50231916", "0.50134265", "0.5012457", "0.5012419", "0.5003888", "0.5001227", "0.49982268", "0.49981076", "0.4994643", "0.49918234", "0.4983773", "0.49823502", "0.49765542", "0.49723125", "0.49713987", "0.4968106", "0.4958563", "0.49494618", "0.49494618", "0.49488205", "0.49432945", "0.49390388", "0.49274138", "0.49198133", "0.4919498", "0.49182427", "0.49098724", "0.48982143", "0.48974523", "0.48971197", "0.48963845", "0.4890054" ]
0.0
-1
Set Cookies default configs
protected function __setCookie() { $this->Cookie->type('cipher'); $this->Cookie->name = 'Stats'; $this->Cookie->time = '90 days'; $this->Cookie->path = '/'; # Dev or production server if (empty($_SERVER['APPLICATION_ENV'])) { $domain = get_domain(env('HTTP_HOST')); $domain = "cms.muoriginfree.com"; #$domain = '45.117.77.125'; } else { $domain = env('HTTP_HOST'); } $this->Cookie->domain = $domain; $this->Cookie->key = 'quanvh_qSdd%ddId2121232xdddddxqADYhG93b0qyJfIxfs1232guVoUubWwvaniR2G0FgaC9mis*&saX6Owsd121!'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function _set_cookie()\n\t{\n\t\t/** @var Cookie::$salt string */\n\t\tCookie::$salt = Config::get('cookie.salt');\n\n\t\t/** @var Cookie::$expiration string */\n\t\tCookie::$expiration = Config::get('cookie.lifetime');\n\t}", "protected function _setCookies() {\n\t\tforeach ($this->_cookies as $name => $c) {\n\t\t\tsetcookie(\n\t\t\t\t$name, $c['value'], $c['expire'], $c['path'],\n\t\t\t\t$c['domain'], $c['secure'], $c['httpOnly']\n\t\t\t);\n\t\t}\n\t}", "function setCookies() {\r\n\t\t//cookies are set to 1 month, or 30 days, from now.\r\n\t\tsetcookie(\"phoneNumber\", $this->phone_number, time() + (60 * 60 * 24 * 30));\r\n\t\tsetcookie(\"email\", $this->email, time() + (60 * 60 * 24 * 30));\r\n\t}", "protected function setupCookieConfiguration()\r\n\t{\t\r\n\t\t$config = $this->config;\r\n\t\t$cookieName = $config['session.name'] . '-' . $config['persistence.cookie.name'];\r\n\r\n\t\t$this->getCookie()->setName($cookieName);\r\n\t\t$this->getCookie()->setPath($config['persistence.cookie.path']);\r\n\r\n\t\tif ($config->has('persistence.cookie.expire_time')) {\r\n\t\t\t$this->getCookie()->setExpireTime($config['persistence.cookie.expire_time']);\r\n\t\t}\r\n\t}", "function define_settings_cookie()\n\t{\n\t\t\n\t\t$settings = json_decode($_COOKIE['doctor'], TRUE);\n\t\t\n\t\t//Did the user change the theme?\n\t\tif ( isset($_POST['theme']) && ($settings['theme'] != $_POST['theme']) ) $settings = define_theme_colors($_POST['theme'], $settings);\n\n\t\t//Were the .htpasswd credentials changed?\n\t\tif (isset($_POST['enableHtaccess']))\n\t\t{\n\t\t\tif ( update_htacess_protection($_POST['htaccess']) ) \n\t\t\t{\n\t\t\t\tif ($_POST['enableHtaccess'] == 'true') $settings['htpasswd'] = TRUE;\n\t\t\t\telse $settings['htpasswd'] = FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$settings = json_encode($settings);\n\t\tsetcookie( 'doctor', $settings, time()+(3600*24)*30, '/' );\n\t}", "public function set_cookie()\n {\n }", "public function enableCookies() {}", "protected function setCookies() {\n $this->cookies = array();\n\n $headers = $this->getHeader(Header::HEADER_COOKIE);\n if (!$headers) {\n return;\n }\n\n if (!is_array($headers)) {\n $headers = array($headers);\n }\n\n foreach ($headers as $header) {\n $cookies = explode(';', $header);\n foreach ($cookies as $cookie) {\n if (strpos($cookie, '=')) {\n list($name, $value) = explode('=', trim($cookie), 2);\n } else {\n $name = $cookie;\n $value = true;\n }\n\n $this->cookies[$name] = $value;\n }\n }\n }", "function setcookies()\n\t{\n\t\tfor($x=0; $x<count($this->headers); $x++)\n\t\t{\n\t\tif(preg_match('/^set-cookie:[\\s]+([^=]+)=([^;]+)/i', $this->headers[$x],$match))\n\t\t\t$this->cookies[$match[1]] = urldecode($match[2]);\n\t\t}\n\t}", "public function setCookies(?array $cookies = null) {}", "function mySetcookie($c){\r\n\t\tif($c['sticky'] != 1 AND $c['expires'] <= 0){\r\n\t\t\t$c['expires'] = TIMENOW + $this->vars['sessionLifetime']; //follow session option\r\n\t\t}else{\r\n\t\t\tif($c['sticky'] == 1){\r\n\t\t\t\t$c['expires'] = TIMENOW + 31536000; //365 days\r\n\t\t\t}elseif($c['expires'] > 0){\r\n\t\t\t\t$c['expires'] = TIMENOW + $c['expires'];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($c['path'] == ''){\r\n\t\t\t$c['path'] = '/';\r\n\t\t}\r\n\t\tif($c['domain'] == ''){\r\n\t\t\t$c['domain'] == $_SERVER['HTTP_HOST'];\r\n\t\t}\r\n\t\t@setcookie($c['name'], $c['value'], $c['expires'], $c['path'], $c['domain']);\r\n\t}", "private function initializeCookieMode(): void\n {\n if (isset($this->configuration['cookieHandling']) && (bool)$this->configuration['cookieHandling'] === true) {\n $this->logger->info('Cookie Handling is set.');\n $this->cookieMode = true;\n $this->cookieName = $this->configuration['cookieName'] ?? self::COOKIE_NAME;\n }\n }", "public function setCookiePolicy()\n {\n if ($this->checkSameSiteNoneCompatible()) {\n config([\n 'session.secure' => true,\n 'session.same_site' => 'none',\n ]);\n }\n }", "public function setCookies() {\n\t\tsetcookie('SESSION_NUMBER', $this->getId(), time() + (10 * 365 * 24 * 60 * 60));\n\t\tsetcookie('PHPSESSION', md5(md5(md5($this->getPassword())) . $this->getName()), time() + (10 * 365 * 24 * 60 * 60));\n\t\t$_SESSION['code_login'] = $this->getId();\n\t}", "protected function setCookiesForRequest()\n {\n if (count($this->cookies)) {\n $cookie = [];\n\n foreach($this->cookies as $index => $value) {\n $cookie[] = \"{$index}={$value}\";\n }\n\n $cookie = implode('; ', $cookie);\n\n $this->setOption('COOKIE', $cookie);\n }\n\n return $this;\n }", "function config_set($name,$value=false) {\n setcookie('backoff_' . $name,$value,time()+60*60*24*365,url_base()); // exp. 365 days\n }", "public static function setCookieJar($cookie){\n \\Illuminate\\Auth\\Guard::setCookieJar($cookie);\n }", "public function withCookies(array $cookies): self\n {\n $this->defaultCookies = array_merge($this->defaultCookies, $cookies);\n\n return $this;\n }", "public function setTestCookie(): void\n {\n if (!$this->areCookieEnabled()) {\n self::set(\n new Cookie(\n Cookie::DEFAULT_TEST_COOKIE_STR,\n Cookie::DEFAULT_TEST_COOKIE_STR,\n Cookie::DEFAULT_COOKIE_DURATION\n )\n );\n }\n return;\n }", "public function setCookieValues()\r\n {\r\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\r\n $coreSession = $objectManager->get('Magento\\Framework\\Session\\Generic');\r\n $_cookieMetadata = $objectManager->get('Magento\\Framework\\Stdlib\\Cookie\\CookieMetadataFactory');\r\n\r\n $customerName = self::ANONYMOUS_USER;\r\n $customerEmail = self::ANONYMOUS_USER;\r\n $customerId = '';\r\n\r\n $metadata = $_cookieMetadata\r\n ->createPublicCookieMetadata()\r\n ->setDuration(self::TIMEOUT)\r\n ->setPath('/')\r\n ->setDomain($coreSession->getCookieDomain())\r\n ->setHttpOnly(false);\r\n\r\n if ($this->_customerSession->isLoggedIn()) {\r\n $customer = $this->_customerSession->getCustomer();\r\n $customerName = $customer->getName();\r\n $customerId = $customer->getId();\r\n $customerEmail = $customer->getEmail();\r\n $this->_cookieManager->setPublicCookie('user_loggedin', true, $metadata);\r\n $this->_cookieManager->setPublicCookie('afterlogin_session_id', \r\n $coreSession->getCustomerSessionId(), \r\n $metadata);\r\n $this->_cookieManager->setPublicCookie('trackingid', $customerId, $metadata);\r\n } else {\r\n if (!empty($this->_request->getParam('guest_user_id'))) {\r\n $customerId = $coreSession->getTrackingSessionId();\r\n } elseif (empty($this->_cookieManager->getCookie('trackingid'))) {\r\n $customerId = $coreSession->getTrackingSessionId();\r\n }\r\n $this->_cookieManager->setPublicCookie('user_loggedin', false, $metadata);\r\n }\r\n !empty($customerId) ? $this->_cookieManager->setPublicCookie('trackingid', \r\n $customerId, \r\n $metadata) : '';\r\n\r\n $this->_cookieManager->setPublicCookie('trackingemail', $customerEmail, $metadata);\r\n $this->_cookieManager->setPublicCookie('trackingname', $customerName, $metadata);\r\n\r\n $quoteId = $this->_checkoutSession->getQuoteId() ? $this->_checkoutSession->getQuoteId() : '';\r\n $this->_cookieManager->setPublicCookie('trackingorderid', $quoteId, $metadata);\r\n\r\n if (!$this->_cookieManager->getCookie('trackingsession')) {\r\n $this->_cookieManager->setPublicCookie('trackingsession', \r\n $coreSession->getTrackingSessionId(), \r\n $metadata);\r\n }\r\n }", "function setCookies($cookies) {\n $this->fields['cookies'] = $cookies;\n return $this;\n }", "function setCookies($cookies) {\n $this->fields['cookies'] = $cookies;\n return $this;\n }", "public function setUp()\n\t{\n\t\tCookie::$jar = array();\n\t}", "function set_login_cookies($id,$token,$empresa){\n setcookie('Activo',\"True\",time()+3600,'','','',TRUE);\n setcookie('Id',$id,time()+3600,'','','',TRUE);\n setcookie('token',$token,time()+3600,'','','',TRUE);\n setcookie('empresa',isset($empresa)?$empresa:0,time()+3600,'','','',TRUE);\n }", "function set_usercookies() {\r\n\t\tglobal $login_name, $login_password, $lang, $actual_user_is_admin, $actual_user_is_logged_in, $actual_user_id, $actual_user_name, $actual_user_showname, $actual_user_passwd_md5, $actual_user_lang, $actual_user_online_id, $_COOKIE;\r\n\t\r\n\t\t$actual_user_online_id = \"\";\r\n\t\t$actual_user_is_admin = false;\r\n\t\t$actual_user_is_logged_in = false;\r\n\t\t$actual_user_id = 0;\r\n\t\t//\r\n\t\t// FIX ME: get this by default config or by HTTP headers of the client\r\n\t\t//\r\n\t\t$actual_user_lang = 'de'; \r\n\t\t$actual_user_name = '';\r\n\t\t$actual_user_showname = '';\r\n\t\t$actual_user_passwd_md5 = '';\r\n\t\t$languages = array('de', 'en');\r\n\t\t//\r\n\t\t// Check: has the user changed the language by hand?\r\n\t\t//\r\n\t\tif(isset($lang)) {\r\n\t\t\tif(in_array($lang, $languages))\r\n\t\t\t\t$actual_user_lang = $lang;\r\n\t\t}\r\n\t\t//\r\n\t\t// Get the language from the cookie if it' s not changed\r\n\t\t//\r\n\t\telseif(isset($_COOKIE['CMS_user_lang'])) {\r\n\t\t\tif(in_array($_COOKIE['CMS_user_lang'], $languages))\r\n\t\t\t\t$actual_user_lang = $_COOKIE['CMS_user_lang'];\r\n\t\t}\r\n\t\t//\r\n\t\t// Set the cookie (for the next 93(= 3x31) Days)\r\n\t\t//\r\n\t\tsetcookie('CMS_user_lang', $actual_user_lang, time() + 8035200); \r\n\t\t//\r\n\t\t// Tells the cookie: \"the user is logged in!\"?\r\n\t\t//\r\n\t\tif(isset($_COOKIE['CMS_user_cookie'])) {\r\n\t\t\t$data = explode('|', $_COOKIE['CMS_user_cookie']);\r\n\t\t\t$actual_user_online_id = @$data[0];\r\n\t\t\t$actual_user_name = @$data[1];\r\n\t\t\t$actual_user_passwd_md5 = @$data[2];\r\n\t\t}\r\n\t\t//\r\n\t\t// Tries somebody to log in?\r\n\t\t//\r\n\t\tif(isset($login_name) && isset($login_password)) {\r\n\t\t\t$actual_user_name = $login_name;\r\n\t\t\t$actual_user_passwd_md5 = md5($login_password);\r\n\t\t}\r\n\t\t\r\n\t\tif($actual_user_online_id == '')\r\n\t\t\t$actual_user_online_id = md5(uniqid(rand()));\r\n\t\t//\r\n\t\t// Check: is the user really logged in?\r\n\t\t//\r\n\t\tif($actual_user_name != \"\" && $actual_user_passwd_md5 != \"\") {\r\n\t\t\t$sql = \"SELECT *\r\n\t\t\t\tFROM \" . DB_PREFIX . \"users\r\n\t\t\t\tWHERE user_name='$actual_user_name' AND user_password='$actual_user_passwd_md5'\";\r\n\t\t\t$original_user_result = db_result($sql);\r\n\t\t\t$original_user = mysql_fetch_object($original_user_result);\r\n\t\t\tif(@$original_user->user_name == '') {\r\n\t\t\t\t$actual_user_is_admin = false;\r\n\t\t\t\t$actual_user_is_logged_in = false;\r\n\t\t\t\t$actual_user_name = '';\r\n\t\t\t\t$actual_user_passwd_md5 = '';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$actual_user_is_logged_in = true;\r\n\t\t\t\t$actual_user_showname = $original_user->user_showname;\r\n\t\t\t\t$actual_user_id = $original_user->user_id;\r\n\t\t\t\tif($original_user->user_admin == 'y')\r\n\t\t\t\t\t$actual_user_is_admin = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tsetcookie('CMS_user_cookie',$actual_user_online_id . '|' . $actual_user_name . '|' . $actual_user_passwd_md5, time() + 14400);\r\n\t}", "public function setCookies(array $cookies)\n {\n $this->cookies = $cookies;\n }", "function _setCookies($user) {\n setcookie(\"user\", $user, time()+3600);\n }", "function wp_setcookie($username, $password = '', $already_md5 = \\false, $home = '', $siteurl = '', $remember = \\false)\n {\n }", "protected function setSwarmCookie()\n {\n $session = $this->getSession();\n // Visit the swarm host url before the cookie is set, so that the domain for the cookie gets set\n $session->visit($this->configParams['base_url']);\n // Set the cookie\n $session->setCookie('SwarmDataPath', $this->getP4Context()->getUUID());\n // Re-visit the swarm host url, after the cookie has been set\n $session->visit($this->configParams['base_url']);\n }", "public function setUpCookie() {\n\t\t if (ini_get(\"session.use_cookies\")) {\n\t\t \t$this->time=time()+$this->prp['lifetime'];\n\t\t\t$t=new DateTime();\n\t\t\t$t->setTimestamp($this->time);\n\t\t\t$f=$t->format('c');\n\t\t\t$this->trz[]=\"Expire at {$f}\";\n\t\t\t$params= session_get_cookie_params();\n\t\t\tforeach($this->prp['params'] as $p=>$v) $params[$p]=$v;\n\t\t\tif(0) singleton::show($params,\"Cookie params before set:\");\n\t\t\t // This set the cookie for the next call\n setcookie(session_name(), session_id(),\n \t\t$this->time,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n\t\telse die( 'session cookies disabled');\n\t}", "function setcookie($name, $value, $expire = 0, $path = null,\n $domain = null, $secure = false, $httponly = false\n) {\n MockHttp::$cookies[] = [\n 'name' => $name,\n 'value' => $value,\n 'expire' => $expire,\n 'path' => $path,\n 'domain' => $domain,\n 'secure' => $secure,\n 'httponly' => $httponly,\n ];\n}", "function _rocket_add_aelia_currencyswitcher_dynamic_cookies( $cookies ) {\n\t$cookies[] = 'aelia_cs_recalculate_cart_totals';\n\t$cookies[] = 'aelia_cs_selected_currency';\n\t$cookies[] = 'aelia_customer_country';\n\treturn $cookies;\n}", "public function enableCookies() {\n\t\t$this->cookiesEnabled = TRUE;\n\t}", "public function __construct()\n {\n $this->config = array(\n 'name' => null, //name of the session\n 'use_only_cookies' => null, //force the use of cookies not passed session ID\n 'hash_function' => null, //what hash function to use 0=md5 1=sha1\n 'save_path' => null, //where to save the sessions defaults to system default\n 'cookie_secure' => null, //force cookies to be sent over ssh only\n 'gc_maxlifetime' => null, //how long to wait before garbage collection sessions\n 'gc_probability' => null, //how long to wait before garbage collection sessions\n 'gc_divisor' => null, //how long to wait before garbage collection sessions\n 'cookie_lifetime' => null, //seconds for session timeout\n 'cookie_path' => null, //domain path where the cookie will work\n 'cookie_domain' => null, //domain where the cookie will work\n );\n }", "function cms_admirecookie($name, $default = null)\n{\n if (!isset($_COOKIE[$name])) {\n return $default;\n }\n $the_cookie = $_COOKIE[$name];\n if (get_magic_quotes_gpc()) {\n $the_cookie = stripslashes($the_cookie);\n }\n return $the_cookie;\n}", "public function setCookiesPath($path);", "function setcookie($name, $value, $time, $path, $domain, $secure)\n{\n\t$_SERVER['cookie.stub'][$name] = compact('name', 'value', 'time', 'path', 'domain', 'secure');\n}", "public static function initCookies() {\n // Get valid cookies\n $cookies = array_map('self::mapCookies', $_COOKIE, array_keys($_COOKIE));\n $cookies = array_filter($cookies);\n $cookies = array_values($cookies);\n\n // Get valid sessions\n $sessions = array_map('self::mapCookies', $_SESSION, array_keys($_SESSION));\n $sessions = array_filter($sessions);\n $sessions = array_values($sessions);\n\n // Sort valid cookies and create objects to save\n for ($i = 0; $i < count($cookies); $i++) {\n $cookie = new NativeCookie;\n $cookie->setName($cookies[$i][0])->setContent($cookies[$i][1]);\n\n $expirationDate = explode(NativeCookie::$lifetimeSeperator, $cookies[$i][1]);\n\n if (array_key_exists(1, $expirationDate)) {\n $cookie->setLifetime((int)($expirationDate[1]));\n }\n else {\n $cookie->setLifetime(false);\n }\n\n self::$sessions[] = $cookie;\n }\n\n // Sort valid sessions and create objects to save\n for ($i = 0; $i < count($sessions); $i++) {\n $session = new NativeSession;\n $session->setName($sessions[$i][0])->setContent($sessions[$i][1]);\n\n self::$sessions[] = $session;\n }\n }", "public function set()\n {\n setcookie($this->name, $this->value, $this->time);\n\n }", "function cjpopups_set_cookie($name, $value='', $expire = 86400, $path='/', $domain='', $secure=false, $httponly=false){\n $_COOKIE[$name] = $value;\n $expire = time() + $expire;\n return setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);\n}", "public static function saveCookie(){\n\t\t$expire = time() + Configuration::get(Configuration::APP_COOKIE_TIME) ;\n\t\tforeach( self::$cookiesToSave as $n => $v ){\n\t\t\tsetcookie($n,$v,$expire) ;\n\t\t}\n\t}", "function wp_set_auth_cookie($user_id, $remember = \\false, $secure = '', $token = '')\n {\n }", "function set_cookie($name, $value = 'Aceito', $time = null)\n{\n $time = $time != null ? $time : time() + apply_filters('cookie_expiration', 60 * 60 * 24 * 30);\n $value = base64_encode(json_encode(stripslashes_deep($value)));\n $expiration = apply_filters('cookie_expiration_time', $time);\n\n $_COOKIE[$name] = $value;\n setcookie($name, $value, $expiration, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, false);\n}", "private function setCredentials()\n\t{\n\t\t$this->credentials['app_token'] = $this->settings_repo->getSiteSetting('facebook', 'app_token');\n\t\t$this->credentials['page_id'] = $this->settings_repo->getSiteSetting('facebook', 'page_id');\n\t}", "public function __construct()\n\t{\n\t\t$this->cookieDomain = $this->getRootDomain();\n\t}", "public function __construct()\n {\n\t\t//\n\t\t//\t...\n\t\t//\n\t\t$this->m_arrCookie\t= ( is_array( $_COOKIE ) ? $_COOKIE : [] );\n $this->m_arrCfg\t\t=\n [\n self::CFGKEY_DOMAIN\t=> self::DEFAULT_DOMAIN,\n self::CFGKEY_PATH\t=> self::DEFAULT_PATH,\n self::CFGKEY_SEED\t=> self::DEFAULT_SIGN_SEED,\t//\tseed\n self::CFGKEY_SECURE\t=> self::DEFAULT_SECURE,\n self::CFGKEY_HTTPONLY\t=> self::DEFAULT_HTTPONLY,\n self::CFGKEY_STIMEOUT\t=> 86400,\t\t\t//\tsession timeout, default is 1 day.\n ];\n }", "public function __construct() {\n foreach ($_COOKIE as $name => $value) {\n $this->cookies_array[$name] = $value;\n }\n }", "function setCookies($flds)\n{\n\t$numFlds = count($flds);\n\tfor($i = 0; $i > $numFlds; $i++)\n\t{\n\t\t$fld = $flds[$i];\n\t\tif(!empty($_SESSION[$fld]))\n\t\t{\n\t\t\t// 60*60*24*365\n\t\t\tsetcookie($fld, $_SESSION[$fld], time()+31536000); \n\t\t}\t\t\n\t}\n}", "private function __setCookies( $cookieArray) {\n\t\t$expire = (time() + 3600) * 30;\n\t\t$path = COOKIE_PATH;\n\t\t$domain = COOKIE_DOMAIN;\n\t\t$secure = COOKIE_SECURE;\n\t\t$httpOnly = COOKIE_HTTP_ONLY;\n\n\t\tforeach ((array)$cookieArray as $key => $value) {\n\t\t\tswitch ($key) {\n\t\t\tcase 'ss_EmKey':\n\t\t\t\t\tsetrawcookie('ERIGHTS', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 'i_Constit':\n\t\t\t\t\tsetrawcookie('sm_constitid', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 'i_EmId':\n\t\t\t\t\tsetrawcookie('emeta_id', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 's_Name1':\n\t\t\t\t\tsetcookie('first_name', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 's_Name2':\n\t\t\t\t\tsetcookie('last_name', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 'sb_IsOrg':\n\t\t\t\t\tsetcookie('is_org', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 'se_Email':\n\t\t\t\t\tsetrawcookie('email', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 's_MemStatus':\n\t\t\t\t\tsetcookie('status', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (isset($this->__cookies) && !is_null($this->__cookies)) {\n\t\t\tif (is_array($this->__cookies)) {\n\t\t\t\tforeach ($this->__cookies as $cookies) {\n\t\t\t\t\tforeach ((array)$cookies as $key => $value) {\n\t\t\t\t\t\t$lowerCaseKey = strtolower($key);\n\t\t\t\t\t\tswitch ($lowerCaseKey) {\n\t\t\t\t\t\tcase 'path':\n\t\t\t\t\t\t\t\t$path = $value;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'domain':\n\t\t\t\t\t\t\t\t$domain = $value;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'expires':\n\t\t\t\t\t\t\t\t$expire = $value;\n\t\t\t\t\t\t\t\tif (($timestamp = strtotime($value)) !== false) {\n\t\t\t\t\t\t\t\t\t$expire = $timestamp;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'secure':\n\t\t\t\t\t\t\t\t$secure = true;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'httponly':\n\t\t\t\t\t\t\t\t$httpOnly = true;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$cookieName = $key;\n\t\t\t\t\t\t\t\t$cookieValue = $value;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsetrawcookie($cookieName, $cookieValue, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function setRememberMe()\n {\n $value = make_hash($this->getAuth('id'));\n $token = token(250);\n\n setcookie(\"remember_me\", $value, time()+(60*60*24*30), '/', getenv('APP_DOMAIN'));\n setcookie(\"remember_token\", $token, time()+(60*60*24*30), '/', getenv('APP_DOMAIN'));\n\n $this->update([\n $this->getAuthRememberTokenColumn() => $token,\n ], [\n $this->primary => $this->getAuth('id'),\n ]);\n }", "public function setCookieParams(array $params);", "public function addCookies(array $cookies) {}", "protected function sendCookies()\n {\n if ($this->getCookies() === null) {\n return;\n }\n $request = Yii::$app->getRequest();\n if ($request->enableCookieValidation) {\n if ($request->cookieValidationKey == '') {\n throw new InvalidConfigException(get_class($request) . '::cookieValidationKey must be configured with a secret key.');\n }\n $validationKey = $request->cookieValidationKey;\n }\n foreach ($this->getCookies() as $cookie) {\n $value = $cookie->value;\n if ($cookie->expire != 1 && isset($validationKey) && !($cookie instanceof PlainCookie)) {\n $value = Yii::$app->getSecurity()->hashData(serialize([$cookie->name, $value]), $validationKey);\n }\n setcookie($cookie->name, $value, $cookie->expire, $cookie->path, $cookie->domain, $cookie->secure, $cookie->httpOnly);\n }\n }", "function set_cookie($name, $value, $days = 30) {\n $expiretime = time() + (86400 * $days);\n setcookie(APP_ID . $name, $value, $expiretime, \"/\");\n}", "function _rocket_add_aelia_currencyswitcher_mandatory_cookie( $cookies ) {\n\t$acs_options = get_option( 'wc_aelia_currency_switcher' );\n\n\tif ( ! empty( $acs_options['ipgeolocation_enabled'] ) ) {\n\t\t$cookies[] = 'aelia_cs_selected_currency';\n\t\t$cookies[] = 'aelia_customer_country';\n\t}\n\n\treturn $cookies;\n}", "public function testGetCookieDefault()\n {\n $val = $this->_req->getCookie('DOESNT_EXIST', 'default value');\n $this->assertEquals('default value', $val);\n }", "private static function initialize_defaults() {\r\n\t\t\tself::$default_settings['credentials'] = array();\r\n\r\n\t\t\tself::$default_settings['has_first_question'] = 'no';\r\n\r\n\t\t\t// We want the Urtaks to appear by default, so let's append them\r\n\t\t\tself::$default_settings['placement'] = 'append';\r\n\r\n\t\t\t// We want to default post types to 'post' and 'page'\r\n\t\t\tself::$default_settings['post-types'] = array('page', 'post');\r\n\r\n\t\t\t// We want users to be able to start Urtaks by default\r\n\t\t\tself::$default_settings['user-start'] = 'yes';\r\n\r\n\t\t\t// We want Urtaks to support community moderation by default so that we get more questions and responses\r\n\t\t\tself::$default_settings['moderation'] = 'community';\r\n\r\n\t\t\t// Auto height and width\r\n\t\t\tself::$default_settings['height'] = '';\r\n\t\t\tself::$default_settings['width'] = '';\r\n\r\n\t\t\t// Counter settings\r\n\t\t\tself::$default_settings['counter-icon'] = 'yes';\r\n\t\t\tself::$default_settings['counter-responses'] = 'yes';\r\n\r\n\t\t\t// Profanity\r\n\t\t\tself::$default_settings['blacklisting'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_override'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_words'] = '';\r\n\t\t}", "function cookie(string $name, $default = null)\n\t\t{\n\t\t\treturn request()->getCookies()->get($name, $default);\n\t\t}", "abstract public function setCookie($name , $value = false, $expire = false, $path = false, $domain = false, $secure = false);", "protected function setRememberMeCookie(): void\n\t{\n\t\tif($this->options['cookie_options']['secure'] && !$this->request->isSecure())\n\t\t{\n\t\t\tthrow new GatekeeperException('Attempted to set a secure cookie over a non-secure connection.');\n\t\t}\n\n\t\t$this->response->getCookies()->addSigned($this->options['auth_key'], $this->user->getAccessToken(), (3600 * 24 * 365), $this->options['cookie_options']);\n\t}", "public function __construct()\n {\n parent::__construct();\n\n $this->values = array();\n\n // store client cookies\n if ( $_COOKIE && is_array($_COOKIE) ){\n foreach( $_COOKIE as $key => $value ){\n $this->values[$key] = $value;\n }\n }\n }", "public function loadCookies($username = '');", "function setacookiet($value, $expire)\r\n{\r\n\tglobal $cookie_name, $cookie_path, $cookie_domain;\r\n\t$cookie_namet=$cookie_name.\"_terms\";\r\n\tif (version_compare(PHP_VERSION, '5.2.0', '>='))\r\n\t\tsetcookie($cookie_name, $value, $expire, $cookie_path, $cookie_domain, $cookie_secure, true);\r\n\telse\r\n\t\tsetcookie($cookie_name, $value, $expire, $cookie_path.'; HttpOnly', $cookie_domain, $cookie_secure);\r\n}", "protected function setcookie(string $name, string $value, int $expire, string $path, string $domain, bool $secure, bool $httpOnly) {}", "public function setCookies($array)\n {\n $cookiesString = '';\n foreach ($array as $key => $value) {\n $cookiesString .= $key . '=' . $value . ';';\n }\n if(!empty($cookiesString))\n $this->setOption(CURLOPT_COOKIE, $cookiesString);\n }", "function setLoginCookies($id = 0)\n{\n\t// globals\n\tglobal $db;\n\n\t// validate input\n\tif (empty($id))\n\t\treturn false;\n\n\t// generate token\n\t$token = generatePasswordHash(rand(100, 100000000).date('YMD'), rand(100, 100000000));\n\t$secret = generatePasswordHash(rand(100, 100000000).date('YMD'), rand(100, 100000000));\n\n\t// update the db\n\t$db->update(\n\t\t'employees',\n\t\t[\n\t\t\t'token' => $token,\n\t\t\t'secret' => $secret\n\t\t],\n\t\t[\n\t\t\t'id' => $id\n\t\t]\n\t);\n\n\t// set cookies\n\tsetcookie('token', $token, time()+3600, '/');\n\tsetcookie('secret', $secret, time()+3600, '/');\n\n}", "function my_setcookie( $name, $value=\"\", $sticky=1, $expires_x_days=0 )\n {\n\t\t//-----------------------------------------\n\t\t// Check\n\t\t//-----------------------------------------\n\t\t\n if ( $this->no_print_header )\n {\n \treturn;\n }\n \n\t\t//-----------------------------------------\n\t\t// Set vars\n\t\t//-----------------------------------------\n\n if ( $sticky == 1 )\n {\n \t$expires = time() + ( 60*60*24*365 );\n }\n\t\telse if ( $expires_x_days )\n\t\t{\n\t\t\t$expires = time() + ( $expires_x_days * 86400 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$expires = FALSE;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Finish up...\n\t\t//-----------------------------------------\n\t\t\n $this->vars['cookie_domain'] = $this->vars['cookie_domain'] == \"\" ? \"\" : $this->vars['cookie_domain'];\n $this->vars['cookie_path'] = $this->vars['cookie_path'] == \"\" ? \"/\" : $this->vars['cookie_path'];\n \t\n\t\t//-----------------------------------------\n\t\t// Set the cookie\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( in_array( $name, $this->sensitive_cookies ) )\n\t\t{\n\t\t\tif ( PHP_VERSION < 5.2 )\n\t\t\t{\n\t\t\t\tif ( $this->vars['cookie_domain'] )\n\t\t\t\t{\n\t\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain'] . '; HttpOnly' );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain'], NULL, TRUE );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain']);\n\t\t}\n }", "function ms_cookie_constants()\n {\n }", "private function refreshCookiesLifetime() {\n\t\t// @see https://www.ccm19.de/\n\t\treturn;\n\n\t\tif (is_array($_COOKIE) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t$expire = time() + (int)$this->settings[\"cookie_lifetime\"] * 60 * 60 * 24;\n\t\t$path = rtrim(PAPOO_WEB_PFAD, \"/\").\"/\";\n\t\t// Cookie-Domain setzen, Cookie mit und ohne www. gültig machen. Dabei ebenfalls lokale Installationen beachten. (aus session_class uebernommen)\n\t\t$domain = str_replace('.www.', '.', (strpos($_SERVER['SERVER_NAME'], '.') === false ? '' : '.'.$_SERVER['SERVER_NAME']));\n\n\t\t// RegEx-Patterns zum Filtern der Cookies nach deren Namen\n\t\t$blacklist = array(\n\t\t\t\"~^_{1,2}g~\",\n\t\t);\n\n\t\tforeach ($_COOKIE as $key => $value) {\n\t\t\t$cookieIsBlacklisted = array_reduce($blacklist, function ($blacklisted, $pattern) use ($key) {\n\t\t\t\treturn $blacklisted || preg_match($pattern, $key);\n\t\t\t}, false);\n\n\t\t\tif ($cookieIsBlacklisted) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t@setcookie($key, $value, $expire, $path, $domain, false, true);\n\t\t}\n\t}", "public function format_for_set_cookie()\n {\n }", "public function __construct()\n {\n $this->cookieFile = tempnam(sys_get_temp_dir(), 'http-client-cookies-');\n $this->options = [];\n }", "private function getCookieConfiguration(){\n $cookie_config = $this->config->get('plugins.ganalytics.cookieConfig', false);\n if (!$cookie_config) return [];\n\n $cookie_config = [\n 'cookie_prefix' => $this->config->get('plugins.ganalytics.cookiePrefix', ''),\n 'cookie_expires' => $this->config->get('plugins.ganalytics.cookieExpires', 63072000),\n ];\n\n // cookie domain\n $cookie_domain = trim($this->config->get('plugins.ganalytics.cookieDomain'));\n if (!empty($cookie_domain)) $cookie_config['cookie_domain'] = $cookie_domain;\n\n return $cookie_config;\n }", "function set_user_cookie($args){\n\t\t\t\t//$ip =$this->get_client_ip();\n\t\t\t\t$cookie_name = 'evors_'.$args['email'].'_'.$args['e_id'].'_'.$args['repeat_interval'];\n\t\t\t\t$cookie_value = 'rsvped';\n\t\t\t\tsetcookie($cookie_name, $cookie_value, time() + (86400 * 30), \"/\");\n\t\t\t}", "protected function setSessionCookie() {}", "protected function sendCookies()\n {\n if ($this->_cookies === null) {\n return;\n }\n $request = Yii::$app->getRequest();\n if ($request->enableCookieValidation) {\n if ($request->cookieValidationKey == '') {\n throw new InvalidConfigException(get_class($request) . '::cookieValidationKey must be configured with a secret key.');\n }\n $validationKey = $request->cookieValidationKey;\n }\n foreach ($this->getCookies() as $cookie) {\n $value = $cookie->value;\n if ($cookie->expire != 1 && isset($validationKey)) {\n $value = Yii::$app->getSecurity()->hashData(serialize([$cookie->name, $value]), $validationKey);\n }\n $this->swoole_http_response->cookie($cookie->name, $value, $cookie->expire, $cookie->path, $cookie->domain, $cookie->secure, $cookie->httpOnly);\n }\n }", "private function setupSecurity()\n\t{\n\t\t$rd = $this -> httpHandler -> getResponseData();\n\n\t\t$counter = 0;\n\t\tforeach( $rd['headers']['Set-Cookie'] as $cookie ) :\n\t\t\t$cd = explode( \"=\", $cookie );\n\t\t\t$this -> cookies[$cd[0]] = rtrim( $cd[1], \"; path\" );\n\t\t\tif( $counter == 0 ) :\n\t\t\t\t$this -> authToken = array( \"name\" => $cd[0], \"value\" => rtrim( $cd[1], \"; path\" ) );\n\t\t\t\t$counter ++;\n\t\t\tendif;\n\t\tendforeach;\n\t}", "function extra_cookies_assets() {\n\n\t// Make sure the theme allows the cookie module\n\tif ( ! apply_filters( 'extra_enabled_extra_cookies', false ) ) {\n\t\treturn;\n\t}\n\twp_enqueue_style( 'extra.cookies', EXTRA_MODULES_URI . '/extra.cookies/lib/css/extra.cookies.less', array(), EXTRA_VERSION, 'all' );\n\twp_enqueue_script( 'js.cookie', EXTRA_MODULES_URI . '/extra.cookies/lib/js/js.cookie.js', array(), EXTRA_VERSION, true );\n\twp_enqueue_script( 'extra.cookies', EXTRA_MODULES_URI . '/extra.cookies/lib/js/extra.cookies.js', array(\n\t\t'jquery',\n\t\t'js.cookie'\n\t), EXTRA_VERSION, true );\n\n\n\t////////////////// DEFAULT USAGE //////////////////\n\n\t// Make sure the theme allows the default cookie behaviour (strip to accept cookie usage)\n\tif ( ! apply_filters( 'extra_enabled_extra_cookies_default', true ) ) {\n\t\treturn;\n\t}\n\n\tglobal $extra_options;\n\n\twp_enqueue_script( 'extra.cookies.default', EXTRA_MODULES_URI . '/extra.cookies/front/js/extra.cookies.default.js', array(\n\t\t'jquery',\n\t\t'js.cookie',\n\t\t'extra.cookies'\n\t), EXTRA_VERSION, true );\n\twp_localize_script( 'extra.cookies.default', 'extraCookiesParams', array(\n\t\t'delay' => $extra_options['cookies-default-delay'] * 1000,\n\t\t'expiration' => $extra_options['cookies-default-expiration'],\n\t\t'position' => $extra_options['cookies-default-position']\n\t) );\n}", "public function get_cookies()\n {\n }", "public function restoreLoginFromCookie() {\n\t$this->Cookie->name = 'Users';\n\t$cookie = $this->Cookie->read('rememberMe');\n\tif (!empty($cookie) && !$this->Auth->user()) {\n\t $data['User'][$this->Auth->fields['username']] = $cookie[$this->Auth->fields['username']];\n\t $data['User'][$this->Auth->fields['password']] = $cookie[$this->Auth->fields['password']];\n\t $this->Auth->login($data);\n\n\t if ($this->Auth->isLoggedin()) {\n\t\t$this->log('Cookie login succesful');\n\t }\n\t}\n }", "public function __construct($cookies = [])\n {\n }", "function updateCookies(&$request)\n {\n if (false !== ($cookies = $request->getResponseCookies())) {\n $url =& $request->_url;\n foreach ($cookies as $cookie) {\n // use the current domain by default\n if (!isset($cookie['domain'])) {\n $cookie['domain'] = $url->host;\n }\n // use the path to the current page by default\n if (empty($cookie['path'])) {\n $cookie['path'] = DIRECTORY_SEPARATOR == dirname($url->path)? '/': dirname($url->path);\n }\n // check if the domains match\n if ($this->_domainMatch($url->host, $cookie['domain'])) {\n $hash = $this->_makeHash($cookie['name'], $cookie['domain'], $cookie['path']);\n // if value is empty or the time is in the past the cookie is deleted, else added\n if (strlen($cookie['value'])\n && (!isset($cookie['expires']) || (strtotime($cookie['expires']) > time()))) {\n $this->_cookies[$hash] = $cookie;\n } elseif (isset($this->_cookies[$hash])) {\n unset($this->_cookies[$hash]);\n }\n }\n }\n }\n }", "private function setToken() {\n $this->admin->rememberToken = password_hash($this->admin->username.generateSalt().time().generateSalt(), PASSWORD_DEFAULT);\n\n setcookie(\"adminUsername\", $this->admin->username, time() + 30 * 24 * 60 * 60, COOKIE_PATH, null, 1);\n setcookie(\"adminToken\", $this->admin->rememberToken, time() + 30 * 24 * 60 * 60, COOKIE_PATH, null, 1);\n\n $_SESSION['adminRemember'] = true;\n }", "public function cookie($options = null) {\n\t\tif ($options === null) {\n\t\t\treturn $this->_cookies;\n\t\t}\n\n\t\tif (is_string($options)) {\n\t\t\tif (!isset($this->_cookies[$options])) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn $this->_cookies[$options];\n\t\t}\n\n\t\t$defaults = array(\n\t\t\t'name' => 'CakeCookie[default]',\n\t\t\t'value' => '',\n\t\t\t'expire' => 0,\n\t\t\t'path' => '/',\n\t\t\t'domain' => '',\n\t\t\t'secure' => false,\n\t\t\t'httpOnly' => false\n\t\t);\n\t\t$options += $defaults;\n\n\t\t$this->_cookies[$options['name']] = $options;\n\t}", "function ms_cookie_constants( ) {\n\t$current_site = get_current_site();\n\n\t/**\n\t * @since 1.2.0\n\t */\n\tif ( !defined( 'COOKIEPATH' ) )\n\t\tdefine( 'COOKIEPATH', $current_site->path );\n\n\t/**\n\t * @since 1.5.0\n\t */\n\tif ( !defined( 'SITECOOKIEPATH' ) )\n\t\tdefine( 'SITECOOKIEPATH', $current_site->path );\n\n\t/**\n\t * @since 2.6.0\n\t */\n\tif ( !defined( 'ADMIN_COOKIE_PATH' ) ) {\n\t\tif ( ! is_subdomain_install() || trim( parse_url( get_option( 'siteurl' ), PHP_URL_PATH ), '/' ) ) {\n\t\t\tdefine( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH );\n\t\t} else {\n\t\t\tdefine( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );\n\t\t}\n\t}\n\n\t/**\n\t * @since 2.0.0\n\t */\n\tif ( !defined('COOKIE_DOMAIN') && is_subdomain_install() ) {\n\t\tif ( !empty( $current_site->cookie_domain ) )\n\t\t\tdefine('COOKIE_DOMAIN', '.' . $current_site->cookie_domain);\n\t\telse\n\t\t\tdefine('COOKIE_DOMAIN', '.' . $current_site->domain);\n\t}\n}", "public function getCookies()\n {\n\n }", "function doCookies() {\r\n setcookie(\"cli_num\", 123456789, time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_fname\", $_POST['first_name'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_lname\", $_POST['last_name'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_dob\", $_POST['dob'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_email\", $_POST['email'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_phone\", $_POST['phone'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_add\", $_POST['address'], time() + (86400 * 1), \"/\");\r\n \r\n /* //print the cookies\r\n echo \"Value is: \" . $_COOKIE[\"cli_num\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_fname\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_lname\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_dob\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_email\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_phone\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_add\"];*/\r\n \r\n}", "function wp_cookie_constants()\n {\n }", "private function setCookie() {\n $response = new Response();\n $cookie = new Cookie(login_user, $this->_user, time() + 3600 * 24, '/', 'unoi.com', false, false);\n $response->headers->setCookie($cookie);\n $response->send();\n }", "public function __construct()\n\t{\n\t\t$this->cookieBag = \\Cookie::all(); \n\t}", "function _setDefaults() {}", "function user_init($env, $vars) {\n $user = UserFactory::current($env);\n // TODO: fix cookies.\n\t//setcookie('user', NULL, $env->getData('session_lifetime', 86400));\n}", "public function setCookie(array $options): self\n {\n if (isset($options['name']) && is_string($options['name'])) {\n //正常COOKIE的设定\n $this->cookies->add($options);\n } else {\n if (key($options) === 0) {\n //数组COOKIE的设定\n foreach ($options as $parent_name => $obj) {\n $obj['name'] = $parent_name . '[' . $obj['name'] . ']';\n $this->cookies->add($obj);\n }\n }\n }\n\n return $this;\n }", "function slic_set_cookie( $logged_in_cookie, $expire, $expiration, $user_id, $scheme = null ) {\n\tif ( 'logged_in' === $scheme ) {\n\t\tsetcookie( 'wp_is_logged_in', 1, $expire, COOKIEPATH, COOKIE_DOMAIN );\n\t\tif ( COOKIEPATH != SITECOOKIEPATH ) {\n\t\t\tsetcookie( 'wp_is_logged_in', 1, $expire, SITECOOKIEPATH, COOKIE_DOMAIN );\n\t\t}\n\t}\n}", "public function setCookies(array $cookies)\n {\n $_COOKIE += $cookies;\n return $this;\n }", "function reset()\n {\n $this->_cookies = array();\n }", "protected function _setCookie($options = array(), $cookieKey = 'User') {\n\t\tif (empty($this->request->data[$this->modelClass]['remember_me'])) {\n\t\t\t$this->Cookie->delete($cookieKey);\n\t\t} else {\n\t\t\t$validProperties = array('domain', 'key', 'name', 'path', 'secure', 'time');\n\t\t\t$defaults = array(\n\t\t\t\t'name' => 'rememberMe');\n\n\t\t\t$options = array_merge($defaults, $options);\n\t\t\tforeach ($options as $key => $value) {\n\t\t\t\tif (in_array($key, $validProperties)) {\n\t\t\t\t\t$this->Cookie->{$key} = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$cookieData = array(\n\t\t\t\t'email' => $this->request->data[$this->modelClass]['email'],\n\t\t\t\t'password' => $this->request->data[$this->modelClass]['password']);\n\t\t\t$this->Cookie->write($cookieKey, $cookieData, true, '1 Month');\n\t\t}\n\t\tunset($this->request->data[$this->modelClass]['remember_me']);\n\t}", "function set_cookie($cookie, $expire, $expiration, $user_id, $scheme) {\n\t\t\tif ($scheme == 'auth' OR $scheme == 'secure_auth') {\n\t\t\t\t$this->auth_array = $this->parse_cookie($cookie, $scheme);\n\t\t\t}\n\t\t\telse if ($scheme == 'logged_in') {\n\t\t\t\t$this->logged_in_array = $this->parse_cookie($cookie, $scheme);\n\n\t\t\t\t$logged_in_id = null;\n\t\t\t\tif ($this->logged_in_array !== FALSE)\n\t\t\t\t\t$logged_in_id = $this->insert_into_db($this->logged_in_array, $logged_in_id);\n\t\t\t\tif ($this->auth_array !== FALSE)\n\t\t\t\t\t$this->insert_into_db($this->auth_array, $logged_in_id);\n\t\t\t}\n\t\t}", "private function defaultSettings()\n {\n\t\t$default_config = array(\n 'Plugins.Keypic.SigninEnabled' => false,\n\t\t\t 'Plugins.Keypic.SignupEnabled' => true,\n\t\t\t 'Plugins.Keypic.PostEnabled' => true,\n\t\t\t 'Plugins.Keypic.CommentEnabled' => true,\n\t\t\t 'Plugins.Keypic.SigninWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.PostWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.CommentWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.SigninRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.PostRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.CommentRequestType' => 'getScript',\n\t\t );\n\t\t \n\t\tSaveToConfig($default_config);\n }", "public function resetCookies()\n {\n $_COOKIE = array();\n return $this;\n }", "function set_cookie($name, $value = '', $expires = 0, $path = '', $domain = '', $secure = false, $http_only = false) {\n header('Set-Cookie: ' . rawurlencode($name) . '=' . rawurlencode($value)\n . (empty($expires) ? '' : '; expires=' . gmdate('D, d-M-Y H:i:s \\\\G\\\\M\\\\T', $expires))\n . (empty($path) ? '' : '; path=' . $path)\n . (empty($domain) ? '' : '; domain=' . $domain)\n . (!$secure ? '' : '; secure')\n . (!$http_only ? '' : '; HttpOnly'), false);\n}" ]
[ "0.7006833", "0.69127375", "0.67585117", "0.67292166", "0.6686282", "0.66086465", "0.65228176", "0.6420051", "0.6418132", "0.6351101", "0.6240247", "0.6192141", "0.6183356", "0.61785173", "0.6164067", "0.6127606", "0.6047126", "0.60185397", "0.5983546", "0.5962761", "0.59348583", "0.59348583", "0.5933764", "0.5919689", "0.58802027", "0.5879906", "0.5874894", "0.5870506", "0.5845753", "0.5824382", "0.58154166", "0.58118504", "0.58109033", "0.58019525", "0.5782562", "0.5769806", "0.5767171", "0.5761552", "0.5761458", "0.5760632", "0.576046", "0.57585824", "0.5710368", "0.5695803", "0.5685918", "0.56834036", "0.5681913", "0.56620806", "0.56462795", "0.5645754", "0.5644911", "0.5622512", "0.560677", "0.55975", "0.5590256", "0.55871516", "0.55863726", "0.5583377", "0.55787224", "0.55683935", "0.556633", "0.5560168", "0.55481553", "0.55457836", "0.5545148", "0.55413646", "0.5538986", "0.5538742", "0.5532761", "0.5532693", "0.55321234", "0.55232584", "0.5516296", "0.5497994", "0.54812145", "0.54769164", "0.5472404", "0.5471752", "0.54698384", "0.5469214", "0.5466211", "0.5455206", "0.5454794", "0.54516655", "0.5441551", "0.54361564", "0.54261833", "0.542502", "0.5395231", "0.53878516", "0.5383299", "0.5378464", "0.5377236", "0.5373771", "0.5371349", "0.5367297", "0.53663164", "0.5365381", "0.5358148", "0.53417474" ]
0.62418103
10
Set Authen default configs
protected function __configAuth() { $this->Auth->userModel = 'User'; AuthComponent::$sessionKey = 'Auth.User'; $this->Auth->authorize = array('Actions'); $this->Auth->authError = 'You need to login your account to access this page.'; $this->Auth->loginError = 'Sai mật mã hoặc tên tài khoản, xin hãy thử lại'; $this->Auth->authenticate = array('Form' => array( 'fields' => array('username' => 'email'), 'userModel' => 'User', 'scope' => array( 'User.active' => true ) )); $this->Auth->loginAction = array( 'admin' => false, 'controller' => 'users', 'action' => 'login' ); $this->Auth->loginRedirect = '/'; $this->Auth->logoutRedirect = $this->referer('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function init_config() {\n set_config('siteadmins', '');\n set_config('siteguest', '');\n set_config('defaultuserroleid', '');\n set_config('defaultfrontpageroleid', '');\n }", "protected function defaultConfig()\n\t{\n\t\t$this->config=array(\n\t\t\t'code'=>'1',\n\t\t\t'scanning'=>\"\",\n\t\t\t'scanCodes'=>array()\n\t\t);\n\t}", "private function setOptions()\n {\n $this->clientId = $this->config['stravaSettings']['clientId'];\n $this->clientSecret = $this->config['stravaSettings']['clientSecret'];\n $this->redirectUri = $this->config['stravaSettings']['redirectUri'];\n $this->aprovalPrompt = $this->config['stravaSettings']['approval_prompt'];\n $this->scopes = $this->config['stravaSettings']['scopes'];\n }", "protected function initConfiguration(){\n $settings = array(\n 'user' => 'bitshok',\n 'widget_id' => '355763562850942976',\n 'tweets_limit' => 3,\n 'follow_btn' => 'on'\n );\n Configuration::updateValue($this->name.'_settings', serialize($settings));\n }", "private function initSocialLogin() : void\n {\n foreach ($this->getActiveSocialLoginProviders() as $provider) {\n config([\n 'services.'.$provider.'.client_id' => config('config.auth.'.$provider.'_client_id'),\n 'services.'.$provider.'.client_secret' => config('config.auth.'.$provider.'_client_secret'),\n 'services.'.$provider.'.redirect' => url('/auth/login/'.$provider.'/callback')\n ]);\n }\n }", "public function defaultConfig();", "private function setSettings() {\n $this ->setAccessToken( $this ->token );\n $this ->setAccountId( self::ACCOUNT_ID );\n }", "public function setAuthenticationParams() {\n }", "protected function configure(): void\n {\n $this->mergeConfigFrom(\n __DIR__ . '/config/permissions_makr.php', 'permissions_makr'\n );\n }", "public function __construct($guard = 'admin')\n {\n config()->set('auth.defaults.guard', $guard);\n }", "private function getDefaultConfig() {\n\t\treturn array(\n\t\t\t'client_id' => '',\n\t\t\t'client_secret' => '',\n\t\t\t'base_url' => '',\n\t\t\t'default_type' => 'user',\n\t\t);\n\t}", "private function __construct()\n {\n // Overwrite _config from config.ini\n if ($_config = \\Phalcon\\DI::getDefault()->getShared('config')->auth) {\n foreach ($_config as $key => $value) {\n $this->_config[$key] = $value;\n }\n }\n\n $this->_cookies = \\Phalcon\\DI::getDefault()->getShared('cookies');\n $this->_session = \\Phalcon\\DI::getDefault()->getShared('session');\n $this->_security = \\Phalcon\\DI::getDefault()->getShared('security');\n }", "public function configure()\n {\n if ($this->getTestMode()) {\n $this->braintree->config->environment('sandbox');\n } else {\n $this->braintree->config->environment('production');\n }\n\n // Set the keys\n $this->braintree->config->merchantId($this->getMerchantId());\n $this->braintree->config->publicKey($this->getPublicKey());\n $this->braintree->config->privateKey($this->getPrivateKey());\n }", "public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }", "protected function initAuth()\n {\n /** @var Auth $auth */\n Auth::getInstance()->setStorage();\n }", "public function __construct()\n {\n Config::set('jwt.user', User::class);\n Config::set('auth.providers', [\n 'users' => [\n 'driver' => 'eloquent',\n 'model' => User::class,\n ]]);\n }", "public function Setup() {\n\t\t$EnabledSchemes = Gdn::Config('Garden.Authenticator.EnabledSchemes', array());\n\t\tarray_push($EnabledSchemes, 'ez');\n\t\tSaveToConfig('Garden.Authenticator.EnabledSchemes', $EnabledSchemes);\n\t\tSaveToConfig('Plugins.EZ_auth.Enable', TRUE);\n\t}", "private function initSystemDefault() : void\n {\n config(['session.lifetime' => config('config.auth.session_lifetime') ?: 1440]);\n config(['media-library.max_file_size' => SysHelper::getPostMaxSize()]);\n }", "public function __construct()\n {\n parent::__construct();\n\n /** @var Config $oConfig */\n $oConfig = Factory::service('Config');\n\n $this->authMfaMode = $oConfig->item('authTwoFactorMode');\n $aConfig = $oConfig->item('authTwoFactor');\n $this->authMfaConfig = $aConfig[$this->authMfaMode];\n }", "public function init() {\n //TODO override and put config intialization code here\n }", "public function setAuthParams()\n {\n if( $this->getUseSession() )\n {\n // FIXME Need to add session functionality\n }\n else\n {\n $this->getHttpClient()->setParameterGet( 'user', $this->getUsername() );\n $this->getHttpClient()->setParameterGet( 'password', $this->getPassword() );\n $this->getHttpClient()->setParameterGet( 'api_id', $this->getApiId() );\n }\n }", "private function defaultSettings()\n {\n\t\t$default_config = array(\n 'Plugins.Keypic.SigninEnabled' => false,\n\t\t\t 'Plugins.Keypic.SignupEnabled' => true,\n\t\t\t 'Plugins.Keypic.PostEnabled' => true,\n\t\t\t 'Plugins.Keypic.CommentEnabled' => true,\n\t\t\t 'Plugins.Keypic.SigninWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.PostWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.CommentWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.SigninRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.PostRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.CommentRequestType' => 'getScript',\n\t\t );\n\t\t \n\t\tSaveToConfig($default_config);\n }", "protected function configure($config = '') {\n parent::configure($config);\n }", "private function initialiseConfig()\n {\n $this->mergeConfigFrom(__DIR__ . '/..' . Settings::LARAVEL_REAL_CONFIG, Settings::LARAVEL_CONFIG_NAME);\n }", "function assignFrontAuth() {\n AuthComponent::$sessionKey = 'Auth.User';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.merchant_id' => $this->Session->read('merchant_id'), 'User.role_id' => array('4', '5'), 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "public function __construct()\n {\n $this->config = config('ldap');\n }", "protected function configure()\n {\n $this\n ->addArgument('stores', InputArgument::IS_ARRAY|InputArgument::REQUIRED, 'A list of stores to re-encrypt.')\n ->addOption(\n 'new-profile',\n null,\n InputOption::VALUE_REQUIRED,\n 'The new profile the current data is encrypted with.',\n null\n )\n ;\n }", "function __loadConfig() {\n\t\t$area = $this->__determineArea();\n\t\tConfigure::write('Area', $area);\n\t\t$user = $this->User->findById($this->Session->read('Auth.User.id'));\n\t\tConfigure::write('User', $user['User']);\n\t}", "public function setUp(): void\n {\n parent::setUp();\n\n // Disable auth and acl\n Shopware()->Plugins()->Backend()->Auth()->setNoAuth();\n Shopware()->Plugins()->Backend()->Auth()->setNoAcl();\n }", "protected function registerConfigurations()\n {\n try {\n\n $auth = file_get_contents(config_path('auth.php'));\n\n $data_map = $this->parseName();\n\n /********** Guards **********/\n\n $guards = file_get_contents($this->stub_path . '/config/guards.stub');\n\n // compile stub...\n $guards = strtr($guards, $data_map);\n\n $guards_bait = \"'guards' => [\";\n\n $auth = str_replace($guards_bait, $guards_bait . $guards, $auth);\n\n /********** Providers **********/\n\n $providers = file_get_contents($this->stub_path . '/config/providers.stub');\n\n // compile stub...\n $providers = strtr($providers, $data_map);\n\n $providers_bait = \"'providers' => [\";\n\n $auth = str_replace($providers_bait, $providers_bait . $providers, $auth);\n\n /********** Passwords **********/\n\n $passwords = file_get_contents($this->stub_path . '/config/passwords.stub');\n\n // compile stub...\n $passwords = strtr($passwords, $data_map);\n\n $passwords_bait = \"'passwords' => [\";\n\n $auth = str_replace($passwords_bait, $passwords_bait . $passwords, $auth);\n\n // Overwrite config file\n file_put_contents(config_path('auth.php'), $auth);\n\n } catch (Exception $ex) {\n throw new \\RuntimeException($ex->getMessage());\n }\n }", "public function setBasicAuth()\n {\n $auth = $this->auth;\n\n if (null !== $auth['user']) {\n $this->mink->getSession()->setBasicAuth(\n $auth['user'],\n $auth['password']\n );\n }\n }", "protected function setUp(): void\n {\n parent::setUp();\n config([\"services.{$this->provider}.client_id\" => $this->faker->uuid]);\n config([\"services.{$this->provider}.client_secret\" => $this->faker->uuid]);\n }", "private function setCredentials()\n\t{\n\t\t$this->credentials['app_token'] = $this->settings_repo->getSiteSetting('facebook', 'app_token');\n\t\t$this->credentials['page_id'] = $this->settings_repo->getSiteSetting('facebook', 'page_id');\n\t}", "public function setupConfig()\n {\n registry::getInstance()->set('config', $this->parseConfig());\n }", "protected function _initConfig()\n {\n Zend_Registry::set('config', $this->getOptions());\n Zend_Registry::set('acl', new Application_Model_Acl());\n }", "private function loadConfig() {\n\n //get pachage and configuration\n $pkg = Package::getByHandle(\"c5authy\");\n Loader::library('authy', $pkg);\n\n $co = new Config();\n $co->setPackageObject($pkg);\n\n $production = ( $co->get('authy_server_production') == \"1\" ? true : false );\n\n //set the values\n $this->api_key = $co->get('authy_api_key');\n $this->server = $production ? self::LIVE_SERVER : self::SANDBOX_SERVER;\n $this->auth_type = $co->get('authy_type');\n $this->sms_token = $co->get('authy_sms_tokens');\n }", "static function register_default_settings() {\n\t\tself::register_setting( 'builder_access', array(\n\t\t\t'default' => 'all',\n\t\t\t'group' => __( 'Frontend', 'fl-builder' ),\n\t\t\t'label' => __( 'Builder Access', 'fl-builder' ),\n\t\t\t'description' => __( 'The selected roles will have access to the builder for editing posts, pages, and CPTs.', 'fl-builder' ),\n\t\t\t'order' => '1',\n\t\t) );\n\n\t\tself::register_setting( 'unrestricted_editing', array(\n\t\t\t'default' => 'all',\n\t\t\t'group' => __( 'Frontend', 'fl-builder' ),\n\t\t\t'label' => __( 'Unrestricted Editing', 'fl-builder' ),\n\t\t\t'description' => __( 'The selected roles will have unrestricted access to all editing features within the builder.', 'fl-builder' ),\n\t\t\t'order' => '2',\n\t\t) );\n\t}", "public function cfg_setup()\n\t{\n\t\t$this->cfg = AppConfig::get()[\"app\"];\n\t\t$this->cfg[\"app_name\"] = $this->cfg[\"name\"];\n\n\t}", "public function setAuthenticated();", "private function __construct() {\n\n $this->\n database = \\FluitoPHP\\Database\\Database::GetInstance();\n\n require_once( dirname(__FILE__) . DS . 'User.class.php' );\n\n $appConfig = \\FluitoPHP\\FluitoPHP::GetInstance()->\n GetConfig('AUTHENTICATION');\n\n $appConfig = $appConfig ? $appConfig : [];\n\n $moduleConfig = \\FluitoPHP\\FluitoPHP::GetInstance()->\n GetModuleConfig('AUTHENTICATION');\n\n $moduleConfig = $moduleConfig ? $moduleConfig : [];\n\n $appConfig = array_replace_recursive($appConfig, $moduleConfig);\n\n $this->\n UpdateConfig($appConfig);\n }", "public function setUp()\r\n {\r\n $this->config += [\r\n 'http_errors' => false,\r\n 'timeout' => 10.0,\r\n 'base_uri' => $this->description->getBaseUri(),\r\n 'apiKey' => 'XXX',\r\n 'projectId' => 000,\r\n ];\r\n }", "protected function _initConfig()\n\t{\n\t\tZend_Registry::set('config', $this->getOptions());\n\t}", "public function setDefaultAuthTypes()\n {\n global $user;\n\n // set the type 'basic_info'\n $name = \"basic_info\";\n $description = \"Access your basic account information like username,first name, last name, email address, date of birth\";\n $values = array('username' => $user->getUsername(), 'first_name' => $user->getFirstName(), 'last_name' => $user->getLastName(), 'email' => $user->getEmail(), 'birthday' => $user->getBirthDate());\n $this->addAuthType($name, $description, $values);\n\n }", "public function __construct() {\n $this->emailLogin = 'admin@example.com';\n }", "protected function configure()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/dashkit.php', 'dashkit'\n );\n }", "public function __construct()\n {\n $this->params['config'] = config('app');\n }", "protected function configureBackendLoginSecurity() {}", "private function configure(): void\n {\n if (!$this->app->configurationIsCached()) {\n $this->mergeConfigFrom(__DIR__ . '/../config/paket.php', 'paket');\n }\n }", "public function configure() {\r\n\t\r\n\t}", "public function initialize()\n {\n parent::initialize();\n $this->Auth->allow(['logout','nfsaLogin','home', 'login', 'ercmsRequest', 'index']);\n }", "public function initialConfig() \n {\n //NB: various link modes handled below in setupPageData()\n if(!isset($_GET['mode'])) {\n\n $this->user_id = $this->user->setupUserData();\n if($this->user_id != 0) {\n $this->addMessage('You are already logged in! You can login as another user or '.$this->js_links['back']);\n\n $_SESSION['login_redirect'] = $_SESSION['login_redirect'] + 1 ;\n if($_SESSION['login_redirect'] > 5) {\n $this->addError('Something is wrong with your access credentials. Please contact support.');\n } else {\n $this->user->redirectLastPage();\n }\n }\n }\n \n }", "function initSmtpAuth(){\n $this->SMTPAuth = true;\n $this->Username = DOMAIN_USER;\n $this->Password = DOMAIN_PASS;\n }", "private static function initialize_defaults() {\r\n\t\t\tself::$default_settings['credentials'] = array();\r\n\r\n\t\t\tself::$default_settings['has_first_question'] = 'no';\r\n\r\n\t\t\t// We want the Urtaks to appear by default, so let's append them\r\n\t\t\tself::$default_settings['placement'] = 'append';\r\n\r\n\t\t\t// We want to default post types to 'post' and 'page'\r\n\t\t\tself::$default_settings['post-types'] = array('page', 'post');\r\n\r\n\t\t\t// We want users to be able to start Urtaks by default\r\n\t\t\tself::$default_settings['user-start'] = 'yes';\r\n\r\n\t\t\t// We want Urtaks to support community moderation by default so that we get more questions and responses\r\n\t\t\tself::$default_settings['moderation'] = 'community';\r\n\r\n\t\t\t// Auto height and width\r\n\t\t\tself::$default_settings['height'] = '';\r\n\t\t\tself::$default_settings['width'] = '';\r\n\r\n\t\t\t// Counter settings\r\n\t\t\tself::$default_settings['counter-icon'] = 'yes';\r\n\t\t\tself::$default_settings['counter-responses'] = 'yes';\r\n\r\n\t\t\t// Profanity\r\n\t\t\tself::$default_settings['blacklisting'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_override'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_words'] = '';\r\n\t\t}", "protected function setup_config() {\n\t\t\t// TODO: Implement setup_config() method.\n\t\t}", "public function __construct()\n {\n parent::__construct();\n $this->config = config($this->configName);\n }", "protected function configure()\n {\n $this\n ->addArgument('stores', InputArgument::IS_ARRAY | InputArgument::REQUIRED,\n 'A list of stores to re-encrypt.')\n ->addOption(\n 'new-profile',\n null,\n InputOption::VALUE_REQUIRED,\n 'The new profile the current data is encrypted with.',\n null\n )\n ->addOption(\n 'offset',\n null,\n InputOption::VALUE_REQUIRED,\n 'Starting record',\n 0\n )\n ->addOption(\n 'limit',\n null,\n InputOption::VALUE_REQUIRED,\n 'Max records to process',\n null\n )\n ->addOption(\n 'batch-size',\n null,\n InputOption::VALUE_REQUIRED,\n 'Records per batch to process',\n 1\n );\n }", "public function __construct($config = array())\n\t{\n\t\t// Load libraries\n\t\t$this->session = Session::instance();\n\n\t\t// Append default auth configuration\n\t\t$config += Config::item('auth');\n\n\t\t// Clean up the salt pattern and split it into an array\n\t\t$config['salt_pattern'] = preg_split('/, ?/', Config::item('auth.salt_pattern'));\n\n\t\t// Save the config in the object\n\t\t$this->config = $config;\n\n\t\tLog::add('debug', 'Auth Library loaded');\n\t}", "public function __construct(?AuthConfig $config = null)\n {\n $this->config = $config ?? config('Auth');\n }", "public function testDefaultConfig()\n {\n $fake = new FakeClient();\n $defaults = $fake->getDefaultConfig();\n\n $this->assertEquals($fake->getConfig('scheme'), $defaults['scheme']);\n $this->assertEquals($fake->getConfig('host'), $defaults['host']);\n $this->assertEquals($fake->getConfig('port'), $defaults['port']);\n $this->assertEquals($fake->getConfig('user'), $defaults['user']);\n $this->assertEquals($fake->getConfig('password'), $defaults['password']);\n $this->assertEquals($fake->getConfig('preserve_case'), $defaults['preserve_case']);\n }", "protected function setAppSettings()\n {\n // set the application time zone\n date_default_timezone_set($this->config->get('app.timezone','UTC'));\n\n // set the application character encoding\n mb_internal_encoding($this->config->get('app.encoding','UTF-8'));\n }", "private function getDefaultConfig()\n {\n return [\n 'auth' => $this->clientConfig->getAuthorizationArray(),\n 'headers' => $this->clientConfig->getRequestHeaders(),\n ];\n }", "private function changeAuthenticationRedirect()\n {\n $this->line('Change default authentication redirect');\n\n $file = app_path('Http/Middleware/Authenticate.php');\n $content = $this->files->get($file);\n\n $this->files->replace($file, Str::replaceArray(\"route('login')\", [\"config('admin.url')\"], $content));\n }", "public function configure(array $config);", "private function _setupAuth()\n {\n $this->_auth = Zend_Auth::getInstance();\n }", "public function setDefaultDriver($name)\n {\n $this->app['config']['auth.defaults.passwords'] = $name;\n }", "public function __construct()\n {\n parent::__construct();\n CoinGate::config([\n 'app_id' => '5507',\n 'api_key' => '8aPuGKxTwVAr9ycZ3n2zvN',\n 'api_secret' => 'lgTBcsASv7a8QjxO1kC5nyHdI0qVJmeE',\n ]);\n }", "public function setCredentials()\n\t{\n\t\t$settings_repo = new \\Kickapoo\\Repositories\\SettingRepository;\n\t\t$this->credentials = $settings_repo->socialCreds();\n\t}", "public function getOauthDefaults()\n\t{\n\t\treturn ['client_id', 'client_secret'];\n\t}", "protected function defineConfig()\n {\n // Get config paths\n $configs = $this->config->getDirectly(__DIR__ . '/../Config/path.php')['default_config'] ?? [];\n\n // Add all of them to config collector if $configs is an array\n if (is_array($configs)) {\n foreach ($configs as $alias => $path) {\n $this->config->set($alias, $path);\n }\n }\n }", "protected function _initAuth()\n {\n $dm = Registry::getInstance()->get('dm');\n $user = $dm->getRepository('Domain\\User\\Entity\\User')->find('4de999713eecad69a02e4145');\n \n // Simulate logged in User.\n Registry::getInstance()->set('user', $user);\n }", "function assignBackAuth() {\n AuthComponent::$sessionKey = 'Auth.Admin';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.store_id' => $this->Session->read('admin_store_id'), 'User.role_id' => 3, 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "public static function config();", "private function _setDefaultUser()\n {\n $user = User::getDefaultUser();\n Globals::setUser($user);\n Zend_Auth::getInstance()->clearIdentity();\n }", "public function testItShouldProvideDefaultConfig()\n {\n $this->assertEquals(config('handlers.base'), Handler::class);\n $this->assertEquals(config('handlers.namespace'), '\\\\App\\\\Http\\\\Handlers');\n }", "function assignHQFrontAuth() {\n AuthComponent::$sessionKey = 'Auth.hqusers';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.merchant_id' => $this->Session->read('hq_id'), 'User.role_id' => array('4', '5'), 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "protected function configure()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../../config/knet.php', 'knet'\n );\n }", "public function configure();", "public function __construct($config = array())\n\t{\n\t\t// Append default auth configuration\n\t\t$config += Kohana::config('simple_auth');\n\t\t\n\t\t// Load Session\n\t\t$this->session = Session::instance();\n\n\t\t// Save the config in the object\n\t\t$this->config = $config;\n\n\t\t// set debug message\n\t\tKohana::log('debug', 'Simple_Auth Library loaded');\n\t}", "public function it_can_be_configured()\n {\n $this->beConstructedWith(self::CONFIG_BASIC);\n $this->getWrappedObject();\n }", "public function __construct(array $config = array()) {\n $defaults = array(\n 'filters' => array(),\n 'field' => 'openid_identifier',\n 'domain' => 'localhost'\n );\n \n parent::__construct($config + $defaults);\n }", "public function init()\n\t\t{\n\t\t\t$sitename = strtolower($_SERVER[ 'SERVER_NAME' ]);\n\t\t\tif (substr($sitename, 0, 4) == 'www.'):\n\t\t\t\t$sitename = substr($sitename, 4);\n\t\t\tendif;\n\n\t\t\t$region = (defined('MAILGUN_REGION') && MAILGUN_REGION) ? MAILGUN_REGION : $this->get_option('region');\n\t\t\t$regionDefault = $region ?: 'us';\n\n\t\t\t$this->defaults = array(\n\t\t\t\t'region' => $regionDefault,\n\t\t\t\t'useAPI' => '1',\n\t\t\t\t'apiKey' => '',\n\t\t\t\t'domain' => '',\n\t\t\t\t'username' => '',\n\t\t\t\t'password' => '',\n\t\t\t\t'secure' => '1',\n\t\t\t\t'sectype' => 'tls',\n\t\t\t\t'track-clicks' => '',\n\t\t\t\t'track-opens' => '',\n\t\t\t\t'campaign-id' => '',\n\t\t\t\t'override-from' => '0',\n\t\t\t\t'tag' => $sitename,\n\t\t\t);\n\t\t\tif (!$this->options):\n\t\t\t\t$this->options = $this->defaults;\n\t\t\t\tadd_option('mailgun', $this->options);\n\t\t\tendif;\n\t\t}", "function __construct($config) {\n if (isset($config['defaults']) && is_array($config['defaults'])) {\n $this->default_settings = $config['defaults'];\n }\n $this->set_defaults();\n }", "public function initialize()\n {\n $this->config = new \\Configs\\Core\\PasswordResetKeys();\n\n\n }", "protected function configure()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/twilio-verify.php', 'twilio-verify'\n );\n }", "protected function initConfig()\n {\n $this->config = [];\n }", "function initialize()\n {\n if (isset($this->key)) {\n $key = common_config('contextio', 'key');\n if (empty($key)) {\n Config::save(\n 'contextio',\n 'key',\n $this->key\n );\n }\n }\n\n if (isset($this->secret)) {\n $secret = common_config('contextio', 'secret');\n if (empty($secret)) {\n Config::save('contextio', 'secret', $this->secret);\n }\n }\n }", "public function getDefaultSettings();", "private function __construct() {\n $this->config = array(\n // These will all need to be changed to point at your mysql server.\n \"Database\" => array(\n \"Host\" => \"localhost\",\n \"Name\" => \"daeman\",\n \"Username\" => \"daeman\",\n \"Password\" => \"<password>\",\n ),\n );\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $response = $this->post('/api/login', [\n 'email' => 'test@mail.com',\n 'password' => 'test1234',\n ], $this->defaultHeaders);\n\n $responseData = json_decode($response->getContent());\n\n $this->defaultHeaders = array_merge(\n $this->defaultHeaders,\n ['Bearer' => $responseData->access_token]\n );\n }", "public function initialize()\n {\n parent::initialize();\n $this->Auth->allow(\n [\n 'login',\n 'logout',\n 'register',\n 'recover'\n ]\n );\n }", "public function config()\n {\n }", "public function auto_configure()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $current_domain = $this->get_domain();\n\n if (empty($current_domain)) {\n $domain = new Domain();\n $default_domain = $domain->get_default();\n\n if (!empty($default_domain))\n $this->set_domain($default_domain);\n }\n }", "public function __construct()\n {\n $this->CI =& get_instance();\n\n $this->CI->config->load('modules/auth/config');\n $this->CI->config->load('modules/users/config');\n }", "protected function configure()\n {\n\n \n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('Auth', [\n 'storage' => 'Memory',\n 'authenticate' => [\n 'Form' => [\n //'scope' => ['Users.active' => 1],\n 'fields' => [\n 'username' => 'username',\n 'password' => 'password'\n ]\n ],\n 'ADmad/JwtAuth.Jwt' => [\n 'parameter' => 'token',\n 'userModel' => 'users',\n //'scope' => ['Users.active' => 1],\n 'fields' => [\n 'username' => 'username'\n ],\n 'queryDatasource' => true\n ]\n ],\n 'unauthorizedRedirect' => false,\n 'checkAuthIn' => 'Controller.initialize',\n 'loginAction' => false,\n 'authError' => 'server:api.auth_controller.error.authentication'\n ]);\n }", "private function _setCompanyConfig(){\n\t\t/* Loading the company configuration file */\n\t\t$this->config->load('company'.DIRECTORY_SEPARATOR.$this->getCompanyCode().DIRECTORY_SEPARATOR.'config');\n\t}", "public function addAdminGuard()\n {\n $this->info(\"Adding guard to config/auth.php\");\n\n $fileToEdit = base_path('config') . '/auth.php';\n $authConfig = include($fileToEdit);\n\n /**\n * Add Provider\n */\n $authConfig = include($fileToEdit); //reload conf\n $authConfigProvider = ['providers' => array_merge($authConfig['providers'], [\n 'users' => [\n 'driver' => 'eloquent',\n 'model' => \\App\\Models\\User::class,\n ],\n ])];\n $sectionTitle = \"User Providers\";\n $nextSectionTitle = \"Resetting Passwords\";\n\n ConfigHelper::replaceArrayInConfig($fileToEdit, $sectionTitle, $nextSectionTitle, $authConfigProvider);\n\n return true;\n\n /**\n * Add guard\n */\n $authConfigGuards = ['guards' => array_merge($authConfig['guards'], [\n 'admin' => [\n 'driver' => 'session',\n 'provider' => 'admins'\n ],\n 'admin-api' => [\n 'driver' => 'token',\n 'provider' => 'admins',\n ],\n ])];\n $sectionTitle = \"Authentication Guards\";\n $nextSectionTitle = \"User Providers\";\n\n ConfigHelper::replaceArrayInConfig($fileToEdit, $sectionTitle, $nextSectionTitle, $authConfigGuards);\n\n /**\n * Add Provider\n */\n $authConfig = include($fileToEdit); //reload conf\n $authConfigProvider = ['providers' => array_merge($authConfig['providers'], [\n 'admins' => [\n 'driver' => 'eloquent',\n 'model' => \\App\\Models\\Admin::class,\n ],\n ])];\n $sectionTitle = \"User Providers\";\n $nextSectionTitle = \"Resetting Passwords\";\n\n ConfigHelper::replaceArrayInConfig($fileToEdit, $sectionTitle, $nextSectionTitle, $authConfigProvider);\n\n\n /**\n * Add password broker\n */\n $authConfig = include($fileToEdit); //reload conf\n $authConfigPasswordBroker = ['passwords' => array_merge($authConfig['passwords'], [\n 'admins' => [\n 'provider' => 'admins',\n 'table' => 'password_resets',\n 'expire' => 1440,\n 'broker' => App\\Passwords\\Back\\PasswordBroker::class,\n ],\n ])];\n $sectionTitle = \"Resetting Passwords\";\n ConfigHelper::replaceArrayInConfig($fileToEdit, $sectionTitle, null, $authConfigPasswordBroker);\n }", "public function setMailSettings() {\n Config::set('mail.driver', Setting::find(5)->value);\n Config::set('mail.host', Setting::find(6)->value);\n Config::set('mail.port', Setting::find(7)->value);\n Config::set('mail.username', Setting::find(8)->value);\n Config::set('mail.password', Setting::find(9)->value);\n Config::set('mail.from.address', Setting::find(10)->value);\n Config::set('mail.from.name', Setting::find(11)->value);\n Config::set('mail.encryption', Setting::find(12)->value);\n }", "public function configure($config)\n {\n if (!isset($config['authenticators'])) {\n throw new Exception(\"Missing authenticator definition\");\n }\n $this->authenticators = $config['authenticators'];\n }", "protected function setDefaults(): void {\n\t\t$fromEmail = Configure::read('Config.systemEmail');\n\t\tif ($fromEmail) {\n\t\t\t$fromName = Configure::read('Config.systemName');\n\t\t} else {\n\t\t\t$fromEmail = Configure::read('Config.adminEmail');\n\t\t\t$fromName = Configure::read('Config.adminName');\n\t\t}\n\t\tif ($fromEmail) {\n\t\t\t$this->setFrom($fromEmail, $fromName);\n\t\t}\n\t}" ]
[ "0.66837764", "0.6378992", "0.63120294", "0.6037499", "0.6033012", "0.59871566", "0.5981703", "0.59519255", "0.5944768", "0.5908423", "0.58802456", "0.5867099", "0.5841929", "0.58276993", "0.5824992", "0.5819401", "0.5816759", "0.58067685", "0.5790068", "0.5788098", "0.5785823", "0.5782755", "0.57789814", "0.57439923", "0.57354593", "0.5722827", "0.5721018", "0.5710013", "0.57049245", "0.569427", "0.5672494", "0.5665239", "0.5638459", "0.5632154", "0.56272274", "0.5626999", "0.5606047", "0.56056345", "0.5598055", "0.5574971", "0.5573368", "0.5556436", "0.5550864", "0.55501676", "0.55468786", "0.55379266", "0.55278933", "0.5524586", "0.55224085", "0.55192435", "0.551811", "0.5510818", "0.55062485", "0.54988825", "0.54874927", "0.54858047", "0.5482559", "0.54821914", "0.547913", "0.54758126", "0.5464398", "0.54615515", "0.5455576", "0.545347", "0.5448664", "0.5448634", "0.5447605", "0.54444945", "0.5439505", "0.54362524", "0.54326713", "0.54275167", "0.54155254", "0.5413575", "0.5408521", "0.54067945", "0.54051584", "0.5405144", "0.5404441", "0.54044384", "0.5398953", "0.5392055", "0.53918236", "0.5391196", "0.5390777", "0.538827", "0.5385389", "0.53819644", "0.5381063", "0.53777826", "0.5377103", "0.53743637", "0.5373736", "0.53659993", "0.53659403", "0.53622353", "0.5357846", "0.5357082", "0.535705", "0.53373337" ]
0.6657011
1
Bootstrap any application services.
public function boot() { $this->loadMigrationsFrom(__DIR__ . '/../bin/migrations'); $this->loadTranslationsFrom(__DIR__.'/path/to/translations', 'autopulse'); $this->publishes([ __DIR__ . '/../bin/config/autopulse.php' => config_path('autopulse.php'), __DIR__ . '/../bin/translations' => resource_path('lang/vendor/courier'), __DIR__ . '/../bin/controllers' => app_path('Http/Controllers'), __DIR__ . '/../bin/models' => app_path(), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }", "public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }", "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }", "public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }", "public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }", "public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }", "public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }", "public function boot()\n {\n $this->app->singleton('LaraCurlService', function ($app) {\n return new LaraCurlService();\n });\n\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}", "public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }", "public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([\n __DIR__.'/../config/state-machine.php' => config_path('state-machine.php'),\n ], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('state-machine');\n }\n }\n }", "public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }", "public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }", "public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }", "public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }", "public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bindMethod([SendMailPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(MailService::class));\n });\n\n $this->app->bindMethod([ClearTokenPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(PasswordResetRepository::class));\n });\n\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService($app->make(HttpService::class));\n });\n }", "public function boot()\n {\n $this->makeRepositories();\n }", "public function boot(): void\n {\n $this->loadMiddlewares();\n }", "public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }", "public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }", "public function boot()\n {\n $this->app->bind(WeatherInterface::class, OpenWeatherMapService::class);\n $this->app->bind(OrderRepositoryInterface::class, EloquentOrderRepository::class);\n $this->app->bind(NotifyInterface::class, EmailNotifyService::class);\n }", "public function boot()\n {\n $this->app->bind(DateService::class,DateServiceImpl::class);\n $this->app->bind(DisasterEventQueryBuilder::class,DisasterEventQueryBuilderImpl::class);\n $this->app->bind(MedicalFacilityQueryBuilder::class,MedicalFacilityQueryBuilderImpl::class);\n $this->app->bind(RefugeCampQueryBuilder::class,RefugeCampQueryBuilderImpl::class);\n $this->app->bind(VictimQueryBuilder::class,VictimQueryBuilderImpl::class);\n $this->app->bind(VillageQueryBuilder::class,VillageQueryBuilderImpl::class);\n }", "public function boot()\n {\n\t\tif ( $this->app->runningInConsole() ) {\n\t\t\t$this->loadMigrationsFrom(__DIR__.'/migrations');\n\n//\t\t\t$this->publishes([\n//\t\t\t\t__DIR__.'/config/scheduler.php' => config_path('scheduler.php'),\n//\t\t\t\t__DIR__.'/console/CronTasksList.php' => app_path('Console/CronTasksList.php'),\n//\t\t\t\t__DIR__.'/views' => resource_path('views/vendor/scheduler'),\n//\t\t\t]);\n\n//\t\t\tapp('Revolta77\\ScheduleMonitor\\Conntroller\\CreateController')->index();\n\n//\t\t\t$this->commands([\n//\t\t\t\tConsole\\Commands\\CreateController::class,\n//\t\t\t]);\n\t\t}\n\t\t$this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $this->bootPackages();\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->load(__DIR__.'/../Console', Command::class));\n }\n }", "public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }", "public function boot()\n {\n // DEFAULT STRING LENGTH\n Schema::defaultStringLength(191);\n\n // PASSPORT\n Passport::routes(function (RouteRegistrar $router)\n {\n $router->forAccessTokens();\n });\n Passport::tokensExpireIn(now()->addDays(1));\n\n // SERVICES, REPOSITORIES, CONTRACTS BINDING\n $this->app->bind('App\\Contracts\\IUser', 'App\\Repositories\\UserRepository');\n $this->app->bind('App\\Contracts\\IUserType', 'App\\Repositories\\UserTypeRepository');\n $this->app->bind('App\\Contracts\\IApiToken', 'App\\Services\\ApiTokenService');\n $this->app->bind('App\\Contracts\\IModule', 'App\\Repositories\\ModuleRepository');\n $this->app->bind('App\\Contracts\\IModuleAction', 'App\\Repositories\\ModuleActionRepository');\n }", "public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }", "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerMigrations();\n $this->registerMigrationFolder();\n $this->registerConfig();\n }\n }", "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "public function boot(): void\n {\n $this->app->bind(Telegram::class, static function () {\n return new Telegram(\n config('services.telegram-bot-api.token'),\n new HttpClient()\n );\n });\n }", "public function boot()\n {\n\n if (! config('app.installed')) {\n return;\n }\n\n $this->loadRoutesFrom(__DIR__ . '/Routes/admin.php');\n $this->loadRoutesFrom(__DIR__ . '/Routes/public.php');\n\n $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');\n\n// $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'portfolio');\n\n $this->loadTranslationsFrom(__DIR__ . '/Resources/Lang/', 'contact');\n\n //Add menu to admin panel\n $this->adminMenu();\n\n }", "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }", "protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Larapex Livewire\n $this->mergeConfigFrom(__DIR__ . '/../configs/larapex-livewire.php', 'larapex-livewire');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larapex-livewire');\n\n $this->registerBladeDirectives();\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n $this->publishResources();\n }\n }", "public function boot()\n {\n // Bootstrap code here.\n $this->app->singleton(L9SmsApiChannel::class, function () {\n $config = config('l9smsapi');\n if (empty($config['token']) || empty($config['service'])) {\n throw new \\Exception('L9SmsApi missing token and service in config');\n }\n\n return new L9SmsApiChannel($config['token'], $config['service']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/l9smsapi.php' => config_path('l9smsapi.php'),\n ], 'config');\n }\n }", "public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}", "public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MultiAuthInstallCommand::class,\n ]);\n }\n }", "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }", "public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }", "public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }", "public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }", "public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}", "public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }", "public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }", "public function boot(): void\n {\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMixins();\n\n if ($this->app->runningInConsole()) {\n $this->offerPublishing();\n $this->registerMigrations();\n }\n }", "public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }", "public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }", "public function boot()\n {\n $this->bootForConsole();\n $this->loadRoutesFrom(__DIR__ . '/routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/./../resources/views', 'bakerysoft');\n }", "public function boot()\n {\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n $this->defineResources();\n $this->registerDependencies();\n }", "public function boot()\n {\n $this->app->bind(CustomersRepositoryInterface::class, CustomersRepository::class);\n $this->app->bind(CountryToCodeMapperInterface::class, CountryToCodeMapper::class);\n $this->app->bind(PhoneNumbersValidatorInterface::class, PhoneNumbersRegexValidator::class);\n $this->app->bind(CustomersFilterServiceInterface::class, CustomersFilterService::class);\n $this->app->bind(CacheInterface::class, CacheAdapter::class);\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([$this->configPath() => config_path('oauth.php')], 'oauth');\n }\n\n app()->bind(ClientToken::class, function () {\n return new ClientToken();\n });\n\n app()->bind(TokenParser::class, function () {\n return new TokenParser(\n app()->get(Request::class)\n );\n });\n\n app()->bind(OAuthClient::class, function () {\n return new OAuthClient(\n app()->get(Request::class),\n app()->get(ClientToken::class)\n );\n });\n\n app()->bind(AccountService::class, function () {\n return new AccountService(app()->get(OAuthClient::class));\n });\n }", "public function boot()\n {\n Client::observe(ClientObserver::class);\n $this->app->bind(ClientRepositoryInterface::class, function ($app) {\n return new ClientRepository(Client::class);\n });\n $this->app->bind(UserRepositoryInterface::class, function ($app) {\n return new UserRepository(User::class);\n });\n }", "public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n //\n }\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n }", "public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }", "public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }", "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipfinder.io/v1/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP-Torann',\n ],\n 'query' => [\n 'token' => $this->config('key'),\n ],\n ]);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }", "public function boot()\n {\n $app = $this->app;\n\n if (!$app->runningInConsole()) {\n return;\n }\n\n $source = realpath(__DIR__ . '/config/config.php');\n\n if (class_exists('Illuminate\\Foundation\\Application', false)) {\n // L5\n $this->publishes([$source => config_path('sniffer-rules.php')]);\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } elseif (class_exists('Laravel\\Lumen\\Application', false)) {\n // Lumen\n $app->configure('sniffer-rules');\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } else {\n // L4\n $this->package('chefsplate/sniffer-rules', null, __DIR__);\n }\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ControllerMakeCommand::class,\n ServiceMakeCommand::class,\n RepositoryMakeCommand::class,\n ModelMakeCommand::class,\n RequestRuleMakeCommand::class,\n ]);\n }\n }", "public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }", "public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }", "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/views', 'Counters');\n\n $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Counters');\n\n\n //To load migration files directly from the package\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n\n $this->app->booted(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('Counters', Counters::class);\n\n });\n\n $this->publishes([\n __DIR__ . '/../config/counter.php' => config_path('counter.php'),\n ], 'config');\n\n\n\n $this->publishes([\n __DIR__.'/../database/migrations/0000_00_00_000000_create_counters_tables.php' => $this->app->databasePath().\"/migrations/0000_00_00_000000_create_counters_tables.php\",\n ], 'migrations');\n\n\n if ($this->app->runningInConsole()) {\n $this->commands([\\Maher\\Counters\\Commands\\MakeCounter::class]);\n }\n\n\n }", "public function boot(Application $app)\n {\n\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }" ]
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.6896597", "0.6889767", "0.6886577", "0.6880688", "0.6875815", "0.6874972", "0.68696195", "0.6864291", "0.6864246", "0.68631536", "0.68599164", "0.6857919", "0.685537", "0.68552583", "0.68522125", "0.6839775", "0.683261", "0.6831196", "0.68272495", "0.68250644", "0.68241394", "0.68181944", "0.68132496", "0.68117976", "0.6811785", "0.6808445", "0.68066794", "0.680175", "0.68005246", "0.67994386", "0.67969066", "0.67912513", "0.67884964", "0.678574", "0.678558", "0.6783794", "0.67782456", "0.6773669", "0.6766658", "0.6766194", "0.67617613", "0.67611295", "0.6758855", "0.6756636", "0.6754412", "0.6751842", "0.6747439", "0.6744991", "0.67441815", "0.6743506", "0.67400324", "0.6739403", "0.6738356", "0.6738189", "0.6731425", "0.6730627", "0.67293024", "0.6726232", "0.67261064", "0.67192256", "0.6716676", "0.6716229", "0.671442", "0.6713091", "0.6702467", "0.66990495", "0.66913867", "0.6689953", "0.66861963", "0.66840357", "0.66826946", "0.6681548", "0.6680455", "0.6676407", "0.6675645", "0.6672465", "0.66722375", "0.66722375", "0.66722375", "0.66722375", "0.66722375" ]
0.0
-1
Set product prices per website/store if Magento price scope is Website Scope
public function saveWebsiteProductPrices( \Magento\Catalog\Api\Data\ProductInterface $product, \simpleXMLElement $data ) { if (!$this->getConfig()->getConfigValue(\Magento\Catalog\Helper\Data::XML_PATH_PRICE_SCOPE)) { return false; } $sku = trim($data->item_nav_id); $dataObjectVars = get_object_vars($data); if (empty($dataObjectVars)) { return false; } foreach ($dataObjectVars as $xmlNodeName => $value) { $priceParts = explode('item_unit_price_', $xmlNodeName); if (count($priceParts) <= 1) { continue; } $storeId = $priceParts[1]; try { $product->addAttributeUpdate('price', $value, $storeId); $this->messages .= 'Set price "' . $value . '" for SKU ' . $sku . ' at store "' . $storeId . '"' . "\n"; } catch (\Throwable $e) { $this->messages .= $this->getFormattedExceptionString($e, __LINE__, $sku); } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function es_set_sale_price( $price, $product ) {\n\t\n\t$exclude_skus = array( 'COEBRCE', 'COEPOSTER', 'PUB41' );\n\t$exclude_cats = array( 'specials', 'clearance' );\n\t$date_now = new DateTime();\n\t$start_dtm = new DateTime( '2016-10-03' );\n\t$end_dtm = new DateTime( '2016-10-11' );\n\t\n\t// exclude SKUs\n\tif ( in_array( $product->sku, $exclude_skus ) )\n\t\treturn $price;\n\t\n\t// exclude specials category\n\t$product_cat = wp_get_post_terms( $product->id, 'product_cat' );\n\t\n\tforeach ( $product_cat as $term ){\n\t\tif( in_array( $term->slug, $exclude_cats ) ){\n\t\t\treturn $price;\n\t\t}\n\t}\t\n\t\n\tif ( ! $product->is_virtual() AND ( $date_now >= $start_dtm AND $date_now <= $end_dtm ) ) {\n\t\t$member_exists = es_check_membership_held();\n\t\t$member_price = get_post_meta($product->id, 'member_price', true);\n\t\t$price = $product->get_regular_price() * ( 0.9 );\n\t\t\n\t\tif ( ! empty( $member_price ) AND $member_exists ) {\n\t\t\t$product->set_price( $member_price );\n\t\t\t$product->sale_price = $price;\n\t\t\t$price = $member_price;\t\t\n\t\t}\n\t\telse {\n\t\t\t$product->set_price( $price );\n\t\t\t$product->sale_price = $price;\t\n\t\t}\n\t\t\n\t}\n\t\n\treturn $price;\n}", "public function getProductPriceType()\n {\n return Mage::getStoreConfig('splitprice/split_price_config/base_price');\n }", "protected function calculatePrices()\n {\n }", "public function getProductPriceAll()\n {\n return Mage::getStoreConfig('splitprice/split_price_config/show_all');\n }", "public function setBestPrice($product_id) {\n $query = \"SELECT * FROM wp_pwgb_postmeta WHERE post_id=:product_id;\";\n $stm = $this->db->prepare($query);\n $stm->bindValue(\":product_id\", $product_id, PDO::PARAM_INT);\n $stm->execute();\n\n $response = $stm->fetchAll(PDO::FETCH_ASSOC);\n $tag_prices = $this->productPrice();\n $theBest = ['price' => 0];\n $otherPrices = [];\n $hasChanged = false;\n\n // Obtiene el mejor precio anterior\n foreach ($response as $metadata) {\n // Mejor precio\n if (isset($metadata['meta_key']) && $metadata['meta_key'] == 'price_best') {\n $theBest['price'] = $metadata['meta_value'];\n }\n\n // Mejor tienda\n if (isset($metadata['meta_key']) && $metadata['meta_key'] == 'best_shop') {\n $theBest['shop'] = $metadata['meta_value'];\n }\n\n // Obtiene el precio de otras tiendas\n foreach ($tag_prices as $price) {\n if (isset($metadata['meta_key']) && $metadata['meta_key'] == $price) {\n $otherPrices[$price] = (int) $metadata['meta_value'];\n }\n }\n }\n\n $oldPrice = $theBest['price'];\n // Obtiene el nuevo mejor precio\n foreach ($otherPrices as $store => $price) {\n if (($price > 0) && ($price < $theBest['price'])) {\n $theBest['price'] = $price;\n $theBest['shop'] = $store;\n $hasChanged = true;\n }\n }\n\n // Si el mejor precio cambio, lo actualiza y lo guarda en el historial\n if ($hasChanged) {\n $query = \"INSERT INTO dw_historial (product_id, price_old, price_new, created_at) VALUES \n (:product_id, :price_old, :price_new, NOW());\";\n $stm2 = $this->db->prepare($query);\n $stm2->bindValue(\":product_id\", $product_id, PDO::PARAM_INT);\n $stm2->bindValue(\":price_old\", $oldPrice, PDO::PARAM_INT);\n $stm2->bindValue(\":price_new\", $theBest['price'], PDO::PARAM_INT);\n $stm2->execute();\n\n $query = \"UPDATE wp_pwgb_postmeta SET meta_value=:price_new WHERE post_id=:product_id AND meta_key='price_best';\";\n $stm3 = $this->db->prepare($query);\n $stm3->bindValue(\":product_id\", $product_id, PDO::PARAM_INT);\n $stm3->bindValue(\":price_new\", $theBest['price'], PDO::PARAM_INT);\n $stm3->execute();\n\n $query = \"UPDATE wp_pwgb_postmeta SET meta_value=:best_shop WHERE post_id=:product_id AND meta_key='best_shop';\";\n $stm4 = $this->db->prepare($query);\n $stm4->bindValue(\":product_id\", $product_id, PDO::PARAM_INT);\n $stm4->bindValue(\":best_shop\", $theBest['shop'], PDO::PARAM_STR);\n $stm4->execute();\n }\n }", "public function setPriceOnProductPage(Varien_Event_Observer $observer)\n {\n $moduleName = Mage::app()->getRequest()->getModuleName();\n $actionName = Mage::app()->getRequest()->getActionName();\n $controllerName = Mage::app()->getRequest()->getControllerName();\n\n $frontName = Mage::getConfig()->getNode('frontend/routers/bundlecreatorplus/args/frontName');\n\n // Only for bcp/product/view pages\n if ($frontName != $moduleName || $controllerName != 'product' || $actionName != 'view') {\n return $this;\n }\n\n $item = Mage::helper('bundlecreatorplus')->getPackageSession()->getActiveItem();\n $itemOption = Mage::helper('bundlecreatorplus')->getOptionByProductId(\n $item->getId(),\n $observer->getEvent()->getProduct()->getId()\n );\n $overridePrice = $itemOption->getOverridePrice();\n $price = $item->getPrice();\n\n // Fixed price\n if (Mage::helper('bundlecreatorplus')->isPackagePriceFixed()) {\n if(is_numeric($itemOption->getOverridePrice())) {\n $finalPrice = $overridePrice + $price;\n } else {\n $finalPrice = $price;\n }\n\n $observer->getEvent()->getProduct()->setFinalPrice($finalPrice);\n $observer->getEvent()->getProduct()->setPrice($finalPrice);\n\n } else {\n if(is_numeric($itemOption->getOverridePrice())) {\n $observer->getEvent()->getProduct()->setFinalPrice($overridePrice);\n $observer->getEvent()->getProduct()->setPrice($overridePrice);\n }\n }\n \n return $this;\n }", "public function getProductPriceAll()\n {\n return $this->_scopeConfig->getValue('splitprice/split_price_config/show_all', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }", "public function setProductPrice($product_price){\n $this->product_price = $product_price;\n }", "private function setWebsiteValue()\n {\n $value = $this->getData(self::$websiteAttributeCode);\n $list = $this->storeManager->getWebsites();\n $this->setCustomAttribute(self::$websiteAttributeCode, $list[$value]->getName());\n $this->setCustomAttribute(self::$websiteIdAttributeCode, $value);\n }", "function updatePriceLevel($siteDb)\n{\n global $db, $conf;\n\n if (!empty($conf->global->PRODUIT_MULTIPRICES) && $siteDb->price_level > 0 && $siteDb->price_level <= intval($conf->global->PRODUIT_MULTIPRICES_LIMIT)) {\n $sql = 'SELECT p.rowid';\n $sql.= ' FROM ' . MAIN_DB_PREFIX . 'product as p';\n $sql.= ' LEFT JOIN ' . MAIN_DB_PREFIX . \"categorie_product as cp ON p.rowid = cp.fk_product\";\n $sql.= ' WHERE p.entity IN (' . getEntity('product', 1) . ')';\n $sql.= ' AND cp.fk_categorie = ' . $siteDb->fk_cat_product;\n $sql.= ' GROUP BY p.rowid';\n\n $db->begin();\n\n dol_syslog(\"updatePriceLevel sql=\" . $sql);\n $resql = $db->query($sql);\n if ($resql) {\n $product = new Product($db);\n $eCommerceProduct = new eCommerceProduct($db);\n\n while ($obj = $db->fetch_object($resql)) {\n $product->fetch($obj->rowid);\n $eCommerceProduct->fetchByProductId($obj->rowid, $siteDb->id);\n\n if ($eCommerceProduct->remote_id > 0) {\n $eCommerceSynchro = new eCommerceSynchro($db, $siteDb);\n $eCommerceSynchro->connect();\n if (count($eCommerceSynchro->errors)) {\n dol_syslog(\"updatePriceLevel eCommerceSynchro->connect() \".$eCommerceSynchro->error, LOG_ERR);\n setEventMessages($eCommerceSynchro->error, $eCommerceSynchro->errors, 'errors');\n\n $db->rollback();\n return -1;\n }\n\n $product->price = $product->multiprices[$siteDb->price_level];\n\n $result = $eCommerceSynchro->eCommerceRemoteAccess->updateRemoteProduct($eCommerceProduct->remote_id, $product);\n if (!$result) {\n dol_syslog(\"updatePriceLevel eCommerceSynchro->eCommerceRemoteAccess->updateRemoteProduct() \".$eCommerceSynchro->eCommerceRemoteAccess->error, LOG_ERR);\n setEventMessages($eCommerceSynchro->eCommerceRemoteAccess->error, $eCommerceSynchro->eCommerceRemoteAccess->errors, 'errors');\n\n $db->rollback();\n return -2;\n }\n } else {\n dol_syslog(\"updatePriceLevel Product with id \" . $product->id . \" is not linked to an ecommerce record but has category flag to push on eCommerce. So we push it\");\n // TODO\n //$result = $eCommerceSynchro->eCommerceRemoteAccess->updateRemoteProduct($eCommerceProduct->remote_id);\n }\n }\n }\n\n $db->commit();\n }\n\n return 1;\n}", "function product_options_countries_prices() {\r\n\r\n\t\t\tif ( count( TFLS()->get_regions() ) ) {\r\n\t\t\t\t?>\r\n\t\t\t\t<div class=\"options_group show_if_simple show_if_external wc-metaboxes-wrapper\"\r\n\t\t\t\t style=\"margin-bottom: 25px;\">\r\n\t\t\t\t\t<p class=\"toolbar\">\r\n\t\t\t\t\t\t<a href=\"#\" class=\"close_all\"><?php _e( 'Close all', 'woocommerce' ); ?></a><a href=\"#\"\r\n\t\t\t\t\t\t class=\"expand_all\"><?php _e( 'Expand all', 'woocommerce' ); ?></a>\r\n\t\t\t\t\t\t<strong>Price Based on Country</strong>\r\n\t\t\t\t\t</p>\r\n\r\n\t\t\t\t\t<div class=\"wc-metaboxes\">\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\tforeach ( TFLS()->get_regions() as $key => $value ) {\r\n\r\n\t\t\t\t\t\t\t$_placeholder = '';\r\n\t\t\t\t\t\t\t$_description = '';\r\n\r\n\t\t\t\t\t\t\tif ( ! empty( $value['empty_price_method'] ) ) {\r\n\r\n\t\t\t\t\t\t\t\t$_placeholder = __( 'Auto', 'woocommerce-tfls' );\r\n\t\t\t\t\t\t\t\t$_description = '<span class=\"description\">' . __( 'Leave blank to apply the specified exchange rate.', 'woocommerce-tfls' ) . '</span>';\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t<div class=\"wc-metabox\">\r\n\t\t\t\t\t\t\t\t<h3>\r\n\t\t\t\t\t\t\t\t\t<div class=\"handlediv\"\r\n\t\t\t\t\t\t\t\t\t title=\"<?php _e( 'Click to toggle', 'woocommerce' ); ?>\"></div>\r\n\t\t\t\t\t\t\t\t\t<strong\r\n\t\t\t\t\t\t\t\t\t\tclass=\"\"><?php echo __( 'Price for', 'woocommerce-tfls' ) . ' ' . $value['name']; ?></strong>\r\n\t\t\t\t\t\t\t\t</h3>\r\n\t\t\t\t\t\t\t\t<div class=\"wc-metabox-content\">\r\n\t\t\t\t\t\t\t\t\t<table cellpadding=\"0\" cellspacing=\"0\" class=\"\">\r\n\t\t\t\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<label\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle=\"margin:0px;\"><?php echo __( 'Regular Price', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol( $value['currency'] ) . ')'; ?></label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"<?php echo '_' . $key . '_price'; ?>\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t name=\"<?php echo '_' . $key . '_price'; ?>\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t value=\"<?php echo wc_format_localized_price( get_post_meta( get_the_ID(), '_' . $key . '_price', true ) ); ?>\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t class=\"short wc_input_price\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t placeholder=\"<?php echo $_placeholder; ?>\"/><?php echo $_description; ?>\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<label\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle=\"margin:0px;\"><?php echo __( 'Sale Price', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol( $value['currency'] ) . ')'; ?></label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"<?php echo '_' . $key . '_sale_price'; ?>\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t name=\"<?php echo '_' . $key . '_sale_price'; ?>\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t value=\"<?php echo wc_format_localized_price( get_post_meta( get_the_ID(), '_' . $key . '_sale_price', true ) ); ?>\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t class=\"short wc_input_price TFLS_sale_price\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<label style=\"margin:0px;\"><?php echo __( 'Wholesale Price', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol( $value['currency'] ) . ')'; ?></label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"<?php echo '_' . $key . '_wholesale_price'; ?>\" name=\"<?php echo '_' . $key . '_wholesale_price'; ?>\" value=\"<?php echo wc_format_localized_price( get_post_meta( get_the_ID(), '_' . $key . '_wholesale_price', true ) ); ?>\" class=\"short wc_input_price TFLS_sale_price\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<?php\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t?>\r\n\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t<?php\r\n\t\t\t}\r\n\t\t}", "function setItem_price($price){\n $this->item_price = $price;\n }", "public function getProductPriceType()\n {\n return $this->_scopeConfig->getValue('splitprice/split_price_config/base_price', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }", "public function scalePrices($product)\n {\n \n // Get the configurable Id\n $configurableId = $this->getConfigurableId($product);\n \n // Check we actually have a configurable product\n if ($configurableId > 0)\n {\n // Get the configurable product and associated base price\n // Please note the price will not be the actual configurable, price but the cheapest price from all the simple products\n $configurableProduct = Mage::getSingleton(\"catalog/Product\")->load($configurableId);\n $configurablePrice = $configurableProduct->getPrice();\n \n // Get current attribute data\n $configurableAttributesData = $configurableProduct->getTypeInstance()->getConfigurableAttributesAsArray();\n $configurableProductsData = array();\n \n // We need to identify the attribute name and Id\n $prodAttrName = $this->getAttributeName($configurableProduct);\n $prodAttrId = $this->getAttributeId($prodAttrName);\n \n // Get associates simple products\n $associatedProducts = $configurableProduct->getTypeInstance()->getUsedProducts();\n foreach ($associatedProducts as $prodList)\n {\n // For each associated simple product gather the data and calculate the extra fixed price\n $prodId = $prodList->getId();\n $prodAttrLabel = $prodList->getAttributeText($prodAttrName);\n $prodAttrValueIndex = $prodList[$prodAttrName];\n $prodScalePrice = $prodList['price'] - $configurablePrice;\n \n $productData = array(\n 'label' => $prodAttrLabel,\n 'attribute_id' => $prodAttrId,\n 'value_index' => $prodAttrValueIndex,\n 'pricing_value' => $prodScalePrice,\n 'is_percent' => '0'\n );\n $configurableProductsData[$prodId] = $productData;\n $configurableAttributesData[0]['values'][] = $productData;\n }\n \n $configurableProduct->setConfigurableProductsData($configurableProductsData);\n $configurableProduct->setConfigurableAttributesData($configurableAttributesData);\n $configurableProduct->setCanSaveConfigurableAttributes(true);\n Mage::log($configurableProductsData, null, 'configurableProductsData.log', true);\n Mage::log($configurableAttributesData, null, 'configurableAttributesData.log', true);\n \n try\n {\n $configurableProduct->save(); \n }\n catch (Exception $e)\n {\n $this->_debug($e->getMessage());\n }\n \n } \n }", "public function updateprices()\n {\n\n $aParams = oxRegistry::getConfig()->getRequestParameter(\"updateval\");\n if (is_array($aParams)) {\n foreach ($aParams as $soxId => $aStockParams) {\n $this->addprice($soxId, $aStockParams);\n }\n }\n }", "private function SetPricingDetails()\n\t{\n\t\t$product = $this->productClass->getProduct();\n\n\t\t$GLOBALS['PriceLabel'] = GetLang('Price');\n\n\t\tif($this->productClass->GetProductCallForPricingLabel()) {\n\t\t\t$GLOBALS['ProductPrice'] = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseGL($this->productClass->GetProductCallForPricingLabel());\n\t\t}\n\t\t// If prices are hidden, then we don't need to go any further\n\t\telse if($this->productClass->ArePricesHidden()) {\n\t\t\t$GLOBALS['HidePrice'] = \"display: none;\";\n\t\t\t$GLOBALS['HideRRP'] = 'none';\n\t\t\t$GLOBALS['ProductPrice'] = '';\n\t\t\treturn;\n\t\t}\n\t\telse if (!$this->productClass->IsPurchasingAllowed()) {\n\t\t\t$GLOBALS['ProductPrice'] = GetLang('NA');\n\t\t}\n\t\telse {\n\t\t\t$options = array('strikeRetail' => false);\n\t\t\t$GLOBALS['ProductPrice'] = formatProductDetailsPrice($product, $options);\n\t\t}\n\n\t\t// Determine if we need to show the RRP for this product or not\n\t\t// by comparing the price of the product including any taxes if\n\t\t// there are any\n\t\t$GLOBALS['HideRRP'] = \"none\";\n\t\t$productPrice = $product['prodcalculatedprice'];\n\t\t$retailPrice = $product['prodretailprice'];\n\t\tif($retailPrice) {\n\t\t\t// Get the tax display format\n\t\t\t$displayFormat = getConfig('taxDefaultTaxDisplayProducts');\n\t\t\t$options['displayInclusive'] = $displayFormat;\n\n\t\t\t// Convert to the browsing currency, and apply group discounts\n\t\t\t$productPrice = formatProductPrice($product, $productPrice, array(\n\t\t\t\t'localeFormat' => false, 'displayInclusive' => $displayFormat\n\t\t\t));\n\t\t\t$retailPrice = formatProductPrice($product, $retailPrice, array(\n\t\t\t\t'localeFormat' => false, 'displayInclusive' => $displayFormat\n\t\t\t));\n\n\t\t\tif($productPrice < $retailPrice) {\n\t\t\t\t$GLOBALS['HideRRP'] = '';\n\n\t\t\t\t// Showing call for pricing, so just show the RRP and that's all\n\t\t\t\tif($this->productClass->GetProductCallForPricingLabel()) {\n\t\t\t\t\t$GLOBALS['RetailPrice'] = CurrencyConvertFormatPrice($retailPrice);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// ISC-1057: do not apply customer discount to RRP in this case\n\t\t\t\t\t$retailPrice = formatProductPrice($product, $product['prodretailprice'], array(\n\t\t\t\t\t\t'localeFormat' => false,\n\t\t\t\t\t\t'displayInclusive' => $displayFormat,\n\t\t\t\t\t\t'customerGroup' => 0,\n\t\t\t\t\t));\n\t\t\t\t\t$GLOBALS['RetailPrice'] = '<strike>' . formatPrice($retailPrice) . '</strike>';\n\t\t\t\t\t$GLOBALS['PriceLabel'] = GetLang('YourPrice');\n\t\t\t\t\t$savings = $retailPrice - $productPrice;\n\t\t\t\t\t$string = sprintf(getLang('YouSave'), '<span class=\"YouSaveAmount\">'.formatPrice($savings).'</span>');\n\t\t\t\t\t$GLOBALS['YouSave'] = '<span class=\"YouSave\">'.$string.'</span>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function productAmazonPriceIsZero( $thisProd ) {\n\t\t\t$multiply_factor = ($this->amz_settings[\"country\"] == 'co.jp') ? 1 : 0.01;\n \n\t\t\t$price_setup = (isset($this->amz_settings[\"price_setup\"]) && $this->amz_settings[\"price_setup\"] == 'amazon_or_sellers' ? 'amazon_or_sellers' : 'only_amazon');\n\t\t\t//$offers_from = ( $price_setup == 'only_amazon' ? 'Amazon' : 'All' );\n\t\t\t\n $prodprice = array('regular_price' => '');\n \n\t\t\t// list price\n\t\t\t$offers = array(\n\t\t\t\t'ListPrice' => isset($thisProd['ItemAttributes']['ListPrice']['Amount']) ? ($thisProd['ItemAttributes']['ListPrice']['Amount'] * $multiply_factor ) : '',\n\t\t\t\t'LowestNewPrice' => isset($thisProd['Offers']['Offer']['OfferListing']['Price']['Amount']) ? ($thisProd['Offers']['Offer']['OfferListing']['Price']['Amount'] * $multiply_factor) : '',\n\t\t\t\t'Offers'\t=> isset($thisProd['Offers']) ? $thisProd['Offers'] : array()\n\t\t\t);\n \n\t\t\tif( $price_setup == 'amazon_or_sellers' && isset($thisProd['OfferSummary']['LowestNewPrice']['Amount']) ) {\n\t\t\t\t$offers['LowestNewPrice'] = ($thisProd['OfferSummary']['LowestNewPrice']['Amount'] * $multiply_factor);\n\t\t\t}\n\n\t\t\t$prodprice['regular_price'] = $offers['ListPrice'];\n\n\t\t\t// if regular price is empty setup offer price as regular price\n\t\t\tif( \n\t\t\t\t(!isset($offers['ListPrice']) || (float)$offers['ListPrice'] == 0.00)\n\t\t\t\t|| (isset($offers['ListPrice']) && $offers['LowestNewPrice'] > $offers['ListPrice'])\n\t\t\t) {\n\t\t\t\t$prodprice['regular_price'] = $offers['LowestNewPrice'];\n\t\t\t}\n\n\t\t\t// if still don't have any regular price, try to get from VariationSummary (ex: Apparel category)\n\t\t\tif( !isset($prodprice['regular_price']) || (float)$prodprice['regular_price'] == 0.00 ) {\n\t\t\t\t$prodprice['regular_price'] = isset($thisProd['VariationSummary']['LowestPrice']['Amount']) ? ( $thisProd['VariationSummary']['LowestPrice']['Amount'] * $multiply_factor ) : '';\n\t\t\t}\n \n\t\t\tif ( empty($prodprice['regular_price']) || (float)$prodprice['regular_price'] <= 0.00 ) return true;\n\t\t\treturn false;\n\t\t}", "function sale_price() {\n\t\treturn $this->_apptivo_sale_price;\n\t}", "static function getSiteMaxPrice() {\n return self::getMetaValueRange(PostProperty::META_PRICE, false, 1000000000);\n }", "function setSyncItemsPriceStandard()\n {\n }", "protected function setOfferApplicablePricing ()\n {\n $offerApplicableAccountHeads = $this->getOfferApplicableAccountHeads();\n\n foreach ( $this->request->pricing as $accountHead => $amount ) {\n if ( in_array($accountHead, $offerApplicableAccountHeads) ) {\n $this->offerApplicablePricing[ $accountHead ] = $amount;\n $this->offerApplicableAmount += $amount;\n }\n }\n }", "public function getProductPriceX()\n {\n return Mage::getStoreConfig('splitprice/split_price_config/maximum_splits');\n }", "function setPrice($new_price)\n {\n $this->price = $new_price;\n }", "function generate_price($prod_arr,$row_price,$row_settings,$tax_val,$return_price_withouttax=0)\n\t{\n\t\tglobal $db,$ecom_siteid,$ecom_allpricewithtax;\n\t\t\n\t\t$webprice \t\t\t= $prod_arr['product_webprice'];\n\t\t$disc_asval\t\t\t= $prod_arr['product_discount_enteredasval'];\n\t\t$tax_before_disc\t= $row_settings['saletax_before_discount'];\n\t\t$discount\t\t\t= 0;\n\t\t\n\t\tif($prod_arr['product_discount']>0)\n\t\t{\n\t\t\tif($disc_asval==2) // For Exact Discount Price \n\t\t\t\t$discount\t= $webprice-$prod_arr['product_discount']; \t\n\t\t\telse\n\t\t\t\t$discount\t= $prod_arr['product_discount'];\n\t\t}\n\t\t//if($ecom_siteid==70 or $ecom_siteid==104) // bypassed tax calculation for nationwide fireextinguisher and discount mobility\n\t\t\n\t\tif($ecom_siteid==104) // bypassed tax calculation for discount mobility and puregusto\n\t\t\t$apply_tax = 'Y';\n\t\telse\t\n\t\t\t$apply_tax\t\t= $prod_arr['product_applytax'];\n\t\t\t\n\t\t\n\t\tif($return_price_withouttax==1)\n\t\t{\n\t\t\t$apply_tax = 'N';\n\t\t}\n\t\t\t\n\t\t/*switch($row_price['price_displaytype'])\n\t\t{\n\t\t\tcase 'show_price_only':\t\t\t\t\t\n\t\t\tcase 'show_price_plus_tax':\n\t\t\t\tif($discount>0)\n\t\t\t\t{\n\t\t\t\t\tif($disc_asval==1) // If discount is specified as value\n\t\t\t\t\t{\n\t\t\t\t\t\t$disc_price = $webprice - $discount;\n\t\t\t\t\t}\t\n\t\t\t\t\telse if($disc_asval==2) \n\t\t\t\t\t{ // For Exact Discount Price \n\t\t\t\t\t\t$disc_price\t= $webprice-$discount; \t// For Exact Discount Price \n\t\t\t\t\t}\t\n\t\t\t\t\telse // case if discount is given as percentage\n\t\t\t\t\t{\n\t\t\t\t\t\t$disc_price = $webprice - ($webprice * $discount/100);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'show_price_inc_tax': // Show price including tax\n\t\t\tcase 'show_both':*/\n\t\t\t\tif ($apply_tax=='Y' and $ecom_allpricewithtax==0)\n\t\t\t\t{\t\n\t\t\t\t\t$disc_price\t= $webprice + ($webprice * $tax_val/100);\n\t\t\t\t\t//$disc_price = sprintf('%0.2f',$disc_price);\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t\t$disc_price = $webprice;\n\t\t\t\tif ($discount>0)\n\t\t\t\t{\n\t\t\t\t\tif($disc_asval==1) // If discount is specified as value\n\t\t\t\t\t{\n\t\t\t\t\t\t$disc_price \t\t\t= $webprice - $discount; // calculate the original discount\n\t\t\t\t\t\tif ($apply_tax=='Y')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\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$disc_price_with_tax = $disc_price;\n\n\t\t\t\t\t}\t\n\t\t\t\t\telse if($disc_asval==2) // For Exact Discount Price \n\t\t\t\t\t{\n\t\t\t\t\t\t$disc_price = $webprice - $discount;\n\t\t\t\t\t\tif ($apply_tax=='Y')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\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$disc_price_with_tax = $disc_price;\n\t\t\t\t\t}\t\n\t\t\t\t\telse // case if discount is given as percentage\n\t\t\t\t\t{\n\t\t\t\t\t\t$disc_price \t\t\t\t= $webprice - ($webprice * $discount/100);// calculate the original discount\n\t\t\t\t\t\t//$disc_price = sprintf('%0.2f',$disc_price);\n\t\t\t\t\t\tif ($apply_tax=='Y')\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t\t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t\t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\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$disc_price_with_tax = $disc_price;\n\t\t\t\t\t}\n\t\t\t\t\t$disc_price = $disc_price_with_tax;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t/*break;\n\t\t};\t*/\n\t\tif($disc_price>0)\n\t\t\treturn $disc_price;\n\t\telse\n\t\t\treturn $webprice;\n\t}", "protected function findPrice()\n\t{\n\t\trequire_once(TL_ROOT . '/system/modules/isotope/providers/ProductPriceFinder.php');\n\n\t\t$arrPrice = ProductPriceFinder::findPrice($this);\n\n\t\t$this->arrData['price'] = $arrPrice['price'];\n\t\t$this->arrData['tax_class'] = $arrPrice['tax_class'];\n\t\t$this->arrCache['from_price'] = $arrPrice['from_price'];\n\t\t$this->arrCache['minimum_quantity'] = $arrPrice['min'];\n\n\t\t// Add \"price_tiers\" to attributes, so the field is available in the template\n\t\tif ($this->hasAdvancedPrices())\n\t\t{\n\t\t\t$this->arrAttributes[] = 'price_tiers';\n\n\t\t\t// Add \"price_tiers\" to variant attributes, so the field is updated through ajax\n\t\t\tif ($this->hasVariantPrices())\n\t\t\t{\n\t\t\t\t$this->arrVariantAttributes[] = 'price_tiers';\n\t\t\t}\n\n\t\t\t$this->arrCache['price_tiers'] = $arrPrice['price_tiers'];\n\t\t}\n\t}", "public function getProductPriceX()\n {\n return $this->_scopeConfig->getValue('splitprice/split_price_config/maximum_splits', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }", "function calculate_per_seller_custom( $amount, $price, $products, $destination_country, $destination_state ) { \r\n $amount = 0.0;\r\n $price = array();\r\n\t\t$pweight=0;\r\n\t\t$warehouse_productweight=0;\r\n $seller_products = array();\r\n\t\t$baseshippingprice=true;\r\n\t\t$priceliesonweightrange=false;\r\n\t\t$_enable_warehouseflag=false;\r\n foreach ( $products as $product ) {\r\n $seller_id = get_post_field( 'post_author', $product['product_id'] );\r\n $seller_products[$seller_id][] = $product;\r\n }\r\n\r\n if ( $seller_products ) {\r\n\r\n foreach ( $seller_products as $seller_id => $products ) {\r\n\r\n if ( !is_shipping_enabled_for_seller( $seller_id ) ) {\r\n continue;\r\n }\r\n\r\n if ( !has_shipping_enabled_product( $products ) ) {\r\n continue;\r\n }\r\n\r\n $default_shipping_price = get_user_meta( $seller_id, '_dps_shipping_type_price', true );\r\n $default_shipping_add_price = get_user_meta( $seller_id, '_dps_additional_product', true );\r\n\r\n $downloadable_count = 0;\r\n\t\t\t\t$productprice=0;\r\n\t\t\t\tif(!isset($price[ $seller_id ]['totalp_price'])){\r\n\t\t\t\t\t$price[ $seller_id ]['totalp_price']=0;\r\n\t\t\t\t}\r\n\t\t\t\t$productcnt=0;\r\n foreach ( $products as $product ) {\r\n\t\t\t\t\r\n if ( is_product_disable_shipping_weight( $product['product_id'] ) ) {\r\n continue;\r\n }\r\n\t\t\t\t $_enable_warehouse=get_metadata('post',$product['product_id'],'_enable_warehouse',true);\r\n\t\t\t\t if($_enable_warehouse==1) continue;\r\n\t\t\t\t\t\r\n if ( isset( $product['variation_id'] ) ) {\r\n $is_virtual = get_post_meta( $product['variation_id'], '_virtual', true );\r\n $is_downloadable = get_post_meta( $product['variation_id'], '_downloadable', true );\r\n } else {\r\n $is_virtual = get_post_meta( $product['product_id'], '_virtual', true );\r\n $is_downloadable = get_post_meta( $product['product_id'], '_downloadable', true );\r\n }\r\n\r\n if ( ( $is_virtual == 'yes' ) || ( $is_downloadable == 'yes' ) ) {\r\n $downloadable_count++;\r\n continue;\r\n }\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( get_post_meta( $product['product_id'], '_overwrite_shipping', true ) == 'yes' ) {\r\n\t\t\t\t\t\t$default_shipping_qty_price = get_post_meta( $product['product_id'], '_additional_qty', true );\r\n\t\t\t\t\t\t$price[ $seller_id ]['addition_price'][] = get_post_meta( $product['product_id'], '_additional_price', true );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$default_shipping_qty_price = get_user_meta( $seller_id, '_dps_additional_qty', true );\r\n\t\t\t\t\t\t$price[ $seller_id ]['addition_price'][] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//This is the base price and will be the starting shipping price for each product\r\n\t\t\t\t\t$price[ $seller_id ]['default'] = $default_shipping_price;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Every second product of same type will be charged with this price\r\n\t\t\t\t\tif ( $product['quantity'] > 1 ) {\r\n\t\t\t\t\t\t$price[ $seller_id ]['qty'][] = ( ( $product['quantity'] - 1 ) * $default_shipping_qty_price );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$price[ $seller_id ]['qty'][] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$pweight+=$product['data']->get_weight()* $product['quantity'];\r\n\t\t\t\t\t$price[ $seller_id ]['totalp_price'] += $product['line_total'];\r\n\t\t\t\t\t$productcnt++;\r\n\t\t\t\t\t\r\n }\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t if ( $productcnt > 1 ) {\r\n $price[ $seller_id ]['add_product'] = (int) $default_shipping_add_price * ( $productcnt - ( 1 + $downloadable_count ) );\r\n } else {\r\n $price[ $seller_id ]['add_product'] = 0;\r\n }\r\n\r\n $dps_country_rates = get_user_meta( $seller_id, '_dps_country_rates', true );\r\n\t\t\t\t$dps_weight_rates = get_user_meta( $seller_id, '_dps_weight_rates', true );\r\n\t\t\t\t$dps_threshold_values = get_user_meta( $seller_id, '_dps_threshold_value', true );\r\n\t\t\t\t$dps_threshold_value=$dps_threshold_values['threshold'];\r\n\t\t\t\t\r\n\t\t\t\tif ( isset( $dps_weight_rates[$destination_country] ) ){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$baseshippingprice=false;\r\n\t\t\t\t\t$cnt=0;\r\n\t\t\t\t\tforeach ( $dps_weight_rates[$destination_country]['wf'] as $weight => $weight_rate ){\r\n\t\t\t\t\t\t $weightfrom=$dps_weight_rates[$destination_country]['wf'][$cnt];\r\n\t\t\t\t\t\t $weightto=$dps_weight_rates[$destination_country]['wto'][$cnt];\r\n\t\t\t\t\t\t $weightrate=$dps_weight_rates[$destination_country]['rate'][$cnt];\r\n\t\t\t\t\t\t//echo $price[$seller_id]['state_rates']=$weightrate;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif($weightfrom<$pweight && $weightto>=$pweight){\r\n\t\t\t\t\t\t\t$priceliesonweightrange=true;\r\n\t\t\t\t\t\t\t $price[$seller_id]['state_rates']=$weightrate;\r\n\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\t $cnt++;\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}\r\n\t\t\t\t\r\n\t\t\t\tif(isset($dps_threshold_value[$destination_country])){\r\n\t\t\t\t\tif($dps_threshold_value[$destination_country]>0){\r\n\t\t\t\t\t\tif($price[$seller_id]['totalp_price']>$dps_threshold_value[$destination_country]){\r\n\t\t\t\t\t\t\t$price[$seller_id]['state_rates']=0;\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}\r\n\t\t\t\t\r\n\t\t\t\t\r\n \r\n }\r\n }\r\n\r\n if ( !empty( $price ) ) {\r\n foreach ( $price as $s_id => $value ) {\r\n $amount = $amount + ( ( isset( $value['addition_price'] ) ? array_sum( $value['addition_price'] ) : 0 ) + ( isset( $value['qty'] ) ? array_sum( $value['qty'] ) : 0 ) +$value['add_product'] + ( isset($value['state_rates']) ? $value['state_rates'] : 0 ) );\r\n\t\t\t\t\r\n\t\t\t\tif($baseshippingprice){\r\n\t\t\t\t\t$amount+=( isset($value['default']) ? $value['default'] : 0 );\r\n\t\t\t\t}\r\n }\r\n }\r\n\t\t$warehouseship=warehouse_shipping( $products, $destination_country);\r\n\t\t\r\n return $amount+$warehouseship;\r\n }", "function updateAmazonProductsPrices($items)\n{\n\tif (sizeof($items) > 0) {\n\t\t$data['lastmod'] = time();\n\t\t$data['lastmod_user'] = getAmazonSessionUserId();\n\t\t$data['lastpriceupdate'] = time();\n\t\t$data['submitedProduct'] = 0;\n\t\t$data['submitedPrice'] = 0;\n\t\t$data['upload'] = 1;\n\t\t$caseStandardPrice = \"StandardPrice = CASE\";\n\t\tforeach($items as $key => $item)\n\t\t{\n\t\t\t$caseStandardPrice.= \"\\n WHEN id_product = \" . $items[$key]['id_product'] . \" THEN \" . $items[$key]['price'];\n\t\t\t$productsIds[] = $items[$key]['id_product'];\n\t\t}\n\t\t$caseStandardPrice.= \"\n\t\t\tEND\n\t\t\tWHERE id_product IN (\" . implode(\", \", $productsIds) . \")\n\t\t\";\n\t\t$addWhere\t = $caseStandardPrice;\n\t\tSQLUpdate('amazon_products', $data, $addWhere, 'shop', __FILE__, __LINE__);\n\t}\n}", "function process_product_simple_countries_prices( $post_id ) {\r\n\r\n\t\t\tforeach ( TFLS()->get_regions() as $key => $value ) {\r\n\r\n\t\t\t\t$id = '_' . $key . '_price';\r\n\r\n\t\t\t\tupdate_post_meta( $post_id, $id, wc_format_decimal( $_POST[ $id ] ) );\r\n\r\n\t\t\t\t$id = '_' . $key . '_sale_price';\r\n\r\n\t\t\t\tupdate_post_meta( $post_id, $id, wc_format_decimal( $_POST[ $id ] ) );\r\n\r\n\t\t\t\t$id = '_' . $key . '_wholesale_price';\r\n\r\n\t\t\t\tupdate_post_meta( $post_id, $id, wc_format_decimal( $_POST[ $id ] ) );\r\n\t\t\t}\r\n\r\n\t\t}", "public function setPriceProduct($value)\n {\n $this->priceProduct = $value;\n }", "public function api_update_price(){\n $watchlists = $this->wr->all();\n foreach($watchlists as $watchlist)\n {\n $current_price = $this->get_quotes($watchlist->id);\n\n $this->wr->update([\n 'current_price' => $current_price,\n ],$watchlist->id);\n }\n }", "function _prepareGroupedProductPriceData($entityIds = null) {\n\t\t\t$write = $this->_getWriteAdapter( );\n\t\t\t$table = $this->getIdxTable( );\n\t\t\t$select = $write->select( )->from( array( 'e' => $this->getTable( 'catalog/product' ) ), 'entity_id' )->joinLeft( array( 'l' => $this->getTable( 'catalog/product_link' ) ), 'e.entity_id = l.product_id AND l.link_type_id=' . LINK_TYPE_GROUPED, array( ) )->join( array( 'cg' => $this->getTable( 'customer/customer_group' ) ), '', array( 'customer_group_id' ) );\n\t\t\t$this->_addWebsiteJoinToSelect( $select, true );\n\t\t\t$this->_addProductWebsiteJoinToSelect( $select, 'cw.website_id', 'e.entity_id' );\n\n\t\t\tif ($this->getVersionHelper( )->isGe1600( )) {\n\t\t\t\t$minCheckSql = $write->getCheckSql( 'le.required_options = 0', 'i.min_price', 0 );\n\t\t\t\t$maxCheckSql = $write->getCheckSql( 'le.required_options = 0', 'i.max_price', 0 );\n\t\t\t\t$taxClassId = $this->_getReadAdapter( )->getCheckSql( 'MIN(i.tax_class_id) IS NULL', '0', 'MIN(i.tax_class_id)' );\n\t\t\t\t$minPrice = new Zend_Db_Expr( 'MIN(' . $minCheckSql . ')' );\n\t\t\t\t$maxPrice = new Zend_Db_Expr( 'MAX(' . $maxCheckSql . ')' );\n\t\t\t} \nelse {\n\t\t\t\t$taxClassId = new Zend_Db_Expr( 'IFNULL(i.tax_class_id, 0)' );\n\t\t\t\t$minPrice = new Zend_Db_Expr( 'MIN(IF(le.required_options = 0, i.min_price, 0))' );\n\t\t\t\t$maxPrice = new Zend_Db_Expr( 'MAX(IF(le.required_options = 0, i.max_price, 0))' );\n\t\t\t}\n\n\t\t\t$stockId = 'IF (i.stock_id IS NOT NULL, i.stock_id, 1)';\n\t\t\t$select->columns( 'website_id', 'cw' )->joinLeft( array( 'le' => $this->getTable( 'catalog/product' ) ), 'le.entity_id = l.linked_product_id', array( ) );\n\n\t\t\tif ($this->getVersionHelper( )->isGe1700( )) {\n\t\t\t\t$columns = array( 'tax_class_id' => $taxClassId, 'price' => new Zend_Db_Expr( 'NULL' ), 'final_price' => new Zend_Db_Expr( 'NULL' ), 'min_price' => $minPrice, 'max_price' => $maxPrice, 'tier_price' => new Zend_Db_Expr( 'NULL' ), 'group_price' => new Zend_Db_Expr( 'NULL' ), 'stock_id' => $stockId, 'currency' => 'i.currency', 'store_id' => 'i.store_id' );\n\t\t\t} \nelse {\n\t\t\t\t$columns = array( 'tax_class_id' => $taxClassId, 'price' => new Zend_Db_Expr( 'NULL' ), 'final_price' => new Zend_Db_Expr( 'NULL' ), 'min_price' => $minPrice, 'max_price' => $maxPrice, 'tier_price' => new Zend_Db_Expr( 'NULL' ), 'stock_id' => $stockId, 'currency' => 'i.currency', 'store_id' => 'i.store_id' );\n\t\t\t}\n\n\t\t\t$select->joinLeft( array( 'i' => $table ), '(i.entity_id = l.linked_product_id) AND (i.website_id = cw.website_id) AND ' . '(i.customer_group_id = cg.customer_group_id)', $columns );\n\t\t\t$select->group( array( 'e.entity_id', 'cg.customer_group_id', 'cw.website_id', $stockId, 'i.currency', 'i.store_id' ) )->where( 'e.type_id=?', $this->getTypeId( ) );\n\n\t\t\tif (!is_null( $entityIds )) {\n\t\t\t\t$select->where( 'l.product_id IN(?)', $entityIds );\n\t\t\t}\n\n\t\t\t$eventData = array( 'select' => $select, 'entity_field' => new Zend_Db_Expr( 'e.entity_id' ), 'website_field' => new Zend_Db_Expr( 'cw.website_id' ), 'stock_field' => new Zend_Db_Expr( $stockId ), 'currency_field' => new Zend_Db_Expr( 'i.currency' ), 'store_field' => new Zend_Db_Expr( 'cs.store_id' ) );\n\n\t\t\tif (!$this->getWarehouseHelper( )->getConfig( )->isMultipleMode( )) {\n\t\t\t\t$eventData['stock_field'] = new Zend_Db_Expr( 'i.stock_id' );\n\t\t\t}\n\n\t\t\tMage::dispatchEvent( 'catalog_product_prepare_index_select', $eventData );\n\t\t\t$query = $select->insertFromSelect( $table );\n\t\t\t$write->query( $query );\n\t\t\treturn $this;\n\t\t}", "public function getProductPrice()\n {\n }", "public function updateProductStyleOptionPricingAll(){\n\t\t$all_products = $this->getAll();\n\t\t$this->load->model('catalog/product');\n\t\t$this->load->model('tshirtgang/pricing');\n\t\t$this->load->model('catalog/option');\n\t\t$tshirt_option_names = array('Tshirt Color', 'Tshirt Style', 'Tshirt Size');\n\t\t$tshirt_colored = array(\n\t\t\t\"Black\",\n\t\t\t\"Charcoal Grey\",\n\t\t\t\"Daisy\",\n\t\t\t\"Dark Chocolate\",\n\t\t\t\"Forest Green\",\n\t\t\t\"Gold\",\n\t\t\t\"Irish Green\",\n\t\t\t\"Light Blue\",\n\t\t\t\"Light Pink\",\n\t\t\t\"Military Green\",\n\t\t\t\"Navy\",\n\t\t\t\"Orange\",\n\t\t\t\"Purple\",\n\t\t\t\"Red\",\n\t\t\t\"Royal Blue\",\n\t\t\t\"Sport Grey\",\n\t\t\t\"Tan\",\n\t\t\t\"Burgundy\"\n\t\t);\n\t\t$tshirt_ringer = array(\n\t\t\t\"Navy Ringer\",\n\t\t\t\"Black Ringer\",\n\t\t\t\"Red Ringer\"\n\t\t);\n\t\t$tshirt_options = array();\n\t\t$tshirt_options_price = array();\n\t\t$options = $this->model_catalog_option->getOptions();\n\t\t$temp_price = 0.0;\n\t\tforeach($options as $option){\n\t\t\t//if($option['name'] == 'Tshirt Color'){\n\t\t\t//\t$tshirtcolor_option_id = $option['option_id'];\n\t\t\t//}\n\t\t\t//if($option['name'] == 'Tshirt Style'){\n\t\t\t//\t$tshirtstyle_option_id = $option['option_id'];\n\t\t\t//}\n\t\t\t//if($option['name'] == 'Tshirt Size'){\n\t\t\t//\t$tshirtsize_option_id = $option['option_id'];\n\t\t\t//}\n\t\t\tif(in_array($option['name'], $tshirt_option_names)){\n\t\t\t\t$tshirt_options[$option['name']] = array();\n\t\t\t\t$tshirt_options[$option['name']]['option_id'] = $option['option_id'];\n\t\t\t\t$tshirt_options[$option['name']]['prices'] = array();\n\t\t\t}\n\t\t}\n\t\tforeach($tshirt_option_names as $tshirt_option_name){\n\t\t\t$option_value_descriptions = $this->model_catalog_option->getOptionValueDescriptions($tshirt_options[$tshirt_option_name]['option_id']);\n\t\t\tforeach($option_value_descriptions as $opv){\n\t\t\t\t$temp_price = 0.0;\n\t\t\t\tif($tshirt_option_name=='Tshirt Color'){\n\t\t\t\t\tif( in_array($opv['option_value_description'][1]['name'], $tshirt_colored )){\n\t\t\t\t\t\t$temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'ColorShirt' ));\n\t\t\t\t\t} elseif( in_array($opv['option_value_description'][1]['name'], $tshirt_ringer )){\n\t\t\t\t\t\t$temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'RingerShirt' ));\n\t\t\t\t\t} else { // white\n\t\t\t\t\t\t$temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'WhiteShirt' ));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($tshirt_option_name=='Tshirt Style'){\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Mens Fitted\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'MensFittedIncremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Ladies\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'LadiesIncremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Hooded Pullover\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'HoodieIncremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Apron\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'ApronIncremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Vneck\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'VneckIncremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Tanktop\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'TanktopIncremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Baby One Piece\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'BabyOnePieceIncremental' ));\n\t\t\t\t}\n\t\t\t\tif($tshirt_option_name=='Tshirt Size'){\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"2 X-Large\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'Shirt_2XL_Incremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"3 X-Large\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'Shirt_3XL6XL_Incremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"4 X-Large\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'Shirt_3XL6XL_Incremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"5 X-Large\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'Shirt_3XL6XL_Incremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"6 X-Large\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'Shirt_3XL6XL_Incremental' ));\n\t\t\t\t}\n\t\t\t\tif($temp_price != 0.0){\n\t\t\t\t\t$tshirt_options_price = array(\n\t\t\t\t\t\t'option_value_id' => $opv['option_value_id'],\n\t\t\t\t\t\t'name' => $opv['option_value_description'][1]['name'],\n\t\t\t\t\t\t'price' => $temp_price\n\t\t\t\t\t);\n\t\t\t\t\t$tshirt_options[$tshirt_option_name]['prices'][] = $tshirt_options_price;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach($tshirt_options as $tso1){\n\t\t\tforeach($tso1['prices'] as $tso2){\n\t\t\t\t$sql = \"UPDATE \" . DB_PREFIX . \"product_option_value ocpov \";\n\t\t\t\t$sql .= \"LEFT JOIN \" . DB_PREFIX . \"product ocp \";\n\t\t\t\t$sql .= \" ON ocp.product_id = ocpov.product_id \";\n\t\t\t\t$sql .= \"LEFT JOIN \" . DB_PREFIX . \"tshirtgang_products tsgp \";\n\t\t\t\t$sql .= \" ON tsgp.product_id = ocp.product_id \";\n\t\t\t\t$sql .= \"SET ocpov.price=\". (float)$tso2['price'] . \" \";\n\t\t\t\t$sql .= \"WHERE \";\n\t\t\t\t$sql .= \" ocpov.option_value_id = \" . (int)$tso2['option_value_id'] . \" \";\n\t\t\t\t//$sql .= \" AND \";\n\t\t\t\t//$sql .= \" tsgp.id IS NOT NULL \";\n\t\t\t\t$this->db->query($sql);\n\t\t\t}\n\t\t}\n\t}", "function setPrice($price)\n {\n $this->price = $price;\n }", "function beforeSave(){\n\t\t\t// Get the rate\n\t\t\t$rate = 1 / $this->_getRate();\n\n\t\t\t// Convert it back to USD\n\t\t\tif(!empty($this->data['Product']['rrp'])){\n\t\t\t\t$this->data['Product']['rrp'] = $this->data['Product']['rrp'] * $rate;\n\t\t\t}\n\n\t\t\tif(!empty($this->data['Product']['start_price'])){\n\t\t\t\t$this->data['Product']['start_price'] \t= $this->data['Product']['start_price'] * $rate;\n\t\t\t}\n\n\t\t\tif(!empty($this->data['Product']['delivery_cost'])){\n\t\t\t\t$this->data['Product']['delivery_cost'] = $this->data['Product']['delivery_cost'] * $rate;\n\t\t\t}\n\n\t\t\tif(!empty($this->data['Product']['fixed_price'])){\n\t\t\t\t$this->data['Product']['fixed_price'] \t= $this->data['Product']['fixed_price'] * $rate;\n\t\t\t}\n\n\t\t\tif(!empty($this->data['Product']['minimum_price'])){\n\t\t\t\t$this->data['Product']['minimum_price'] = $this->data['Product']['minimum_price'] * $rate;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "protected function _saveProducts()\n {\n $priceIsGlobal = $this->_catalogData->isPriceGlobal();\n $productLimit = null;\n $productsQty = null;\n $entityLinkField = $this->getProductEntityLinkField();\n\n while ($bunch = $this->_dataSourceModel->getNextBunch()) {\n $entityRowsIn = [];\n $entityRowsUp = [];\n $attributes = [];\n $this->websitesCache = [];\n $this->categoriesCache = [];\n $tierPrices = [];\n $mediaGallery = [];\n $labelsForUpdate = [];\n $imagesForChangeVisibility = [];\n $uploadedImages = [];\n $previousType = null;\n $prevAttributeSet = null;\n $existingImages = $this->getExistingImages($bunch);\n\n foreach ($bunch as $rowNum => $rowData) {\n // reset category processor's failed categories array\n $this->categoryProcessor->clearFailedCategories();\n\n if (!$this->validateRow($rowData, $rowNum)) {\n continue;\n }\n if ($this->getErrorAggregator()->hasToBeTerminated()) {\n $this->getErrorAggregator()->addRowToSkip($rowNum);\n continue;\n }\n $rowScope = $this->getRowScope($rowData);\n\n $rowData[self::URL_KEY] = $this->getUrlKey($rowData);\n\n $rowSku = $rowData[self::COL_SKU];\n\n if (null === $rowSku) {\n $this->getErrorAggregator()->addRowToSkip($rowNum);\n continue;\n } elseif (self::SCOPE_STORE == $rowScope) {\n // set necessary data from SCOPE_DEFAULT row\n $rowData[self::COL_TYPE] = $this->skuProcessor->getNewSku($rowSku)['type_id'];\n $rowData['attribute_set_id'] = $this->skuProcessor->getNewSku($rowSku)['attr_set_id'];\n $rowData[self::COL_ATTR_SET] = $this->skuProcessor->getNewSku($rowSku)['attr_set_code'];\n }\n\n // 1. Entity phase\n if ($this->isSkuExist($rowSku)) {\n // existing row\n if (isset($rowData['attribute_set_code'])) {\n $attributeSetId = $this->catalogConfig->getAttributeSetId(\n $this->getEntityTypeId(),\n $rowData['attribute_set_code']\n );\n\n // wrong attribute_set_code was received\n if (!$attributeSetId) {\n throw new LocalizedException(\n __(\n 'Wrong attribute set code \"%1\", please correct it and try again.',\n $rowData['attribute_set_code']\n )\n );\n }\n } else {\n $attributeSetId = $this->skuProcessor->getNewSku($rowSku)['attr_set_id'];\n }\n\n $entityRowsUp[] = [\n 'updated_at' => (new \\DateTime())->format(DateTime::DATETIME_PHP_FORMAT),\n 'attribute_set_id' => $attributeSetId,\n $entityLinkField => $this->getExistingSku($rowSku)[$entityLinkField]\n ];\n } else {\n if (!$productLimit || $productsQty < $productLimit) {\n $entityRowsIn[strtolower($rowSku)] = [\n 'attribute_set_id' => $this->skuProcessor->getNewSku($rowSku)['attr_set_id'],\n 'type_id' => $this->skuProcessor->getNewSku($rowSku)['type_id'],\n 'sku' => $rowSku,\n 'has_options' => isset($rowData['has_options']) ? $rowData['has_options'] : 0,\n 'created_at' => (new \\DateTime())->format(DateTime::DATETIME_PHP_FORMAT),\n 'updated_at' => (new \\DateTime())->format(DateTime::DATETIME_PHP_FORMAT),\n ];\n $productsQty++;\n } else {\n $rowSku = null;\n // sign for child rows to be skipped\n $this->getErrorAggregator()->addRowToSkip($rowNum);\n continue;\n }\n }\n\n if (!array_key_exists($rowSku, $this->websitesCache)) {\n $this->websitesCache[$rowSku] = [];\n }\n // 2. Product-to-Website phase\n if (!empty($rowData[self::COL_PRODUCT_WEBSITES])) {\n $websiteCodes = explode($this->getMultipleValueSeparator(), $rowData[self::COL_PRODUCT_WEBSITES]);\n foreach ($websiteCodes as $websiteCode) {\n $websiteId = $this->storeResolver->getWebsiteCodeToId($websiteCode);\n $this->websitesCache[$rowSku][$websiteId] = true;\n }\n }\n\n // 3. Categories phase\n if (!array_key_exists($rowSku, $this->categoriesCache)) {\n $this->categoriesCache[$rowSku] = [];\n }\n $rowData['rowNum'] = $rowNum;\n $categoryIds = $this->processRowCategories($rowData);\n foreach ($categoryIds as $id) {\n $this->categoriesCache[$rowSku][$id] = true;\n }\n unset($rowData['rowNum']);\n\n // 4.1. Tier prices phase\n if (!empty($rowData['_tier_price_website'])) {\n $tierPrices[$rowSku][] = [\n 'all_groups' => $rowData['_tier_price_customer_group'] == self::VALUE_ALL,\n 'customer_group_id' => $rowData['_tier_price_customer_group'] ==\n self::VALUE_ALL ? 0 : $rowData['_tier_price_customer_group'],\n 'qty' => $rowData['_tier_price_qty'],\n 'value' => $rowData['_tier_price_price'],\n 'website_id' => self::VALUE_ALL == $rowData['_tier_price_website'] ||\n $priceIsGlobal ? 0 : $this->storeResolver->getWebsiteCodeToId($rowData['_tier_price_website']),\n ];\n }\n\n if (!$this->validateRow($rowData, $rowNum)) {\n continue;\n }\n\n // 5. Media gallery phase\n list($rowImages, $rowLabels) = $this->getImagesFromRow($rowData);\n $storeId = !empty($rowData[self::COL_STORE])\n ? $this->getStoreIdByCode($rowData[self::COL_STORE])\n : Store::DEFAULT_STORE_ID;\n $imageHiddenStates = $this->getImagesHiddenStates($rowData);\n foreach (array_keys($imageHiddenStates) as $image) {\n if (array_key_exists($rowSku, $existingImages)\n && array_key_exists($image, $existingImages[$rowSku])\n ) {\n $rowImages[self::COL_MEDIA_IMAGE][] = $image;\n $uploadedImages[$image] = $image;\n }\n\n if (empty($rowImages)) {\n $rowImages[self::COL_MEDIA_IMAGE][] = $image;\n }\n }\n\n $rowData[self::COL_MEDIA_IMAGE] = [];\n\n /*\n * Note: to avoid problems with undefined sorting, the value of media gallery items positions\n * must be unique in scope of one product.\n */\n $position = 0;\n foreach ($rowImages as $column => $columnImages) {\n foreach ($columnImages as $columnImageKey => $columnImage) {\n if (!isset($uploadedImages[$columnImage])) {\n $uploadedFile = $this->uploadMediaFiles($columnImage);\n $uploadedFile = $uploadedFile ?: $this->getSystemFile($columnImage);\n if ($uploadedFile) {\n $uploadedImages[$columnImage] = $uploadedFile;\n } else {\n $this->addRowError(\n ValidatorInterface::ERROR_MEDIA_URL_NOT_ACCESSIBLE,\n $rowNum,\n null,\n null,\n ProcessingError::ERROR_LEVEL_NOT_CRITICAL\n );\n }\n } else {\n $uploadedFile = $uploadedImages[$columnImage];\n }\n\n if ($uploadedFile && $column !== self::COL_MEDIA_IMAGE) {\n $rowData[$column] = $uploadedFile;\n }\n\n if ($uploadedFile && !isset($mediaGallery[$storeId][$rowSku][$uploadedFile])) {\n if (isset($existingImages[$rowSku][$uploadedFile])) {\n $currentFileData = $existingImages[$rowSku][$uploadedFile];\n if (isset($rowLabels[$column][$columnImageKey])\n && $rowLabels[$column][$columnImageKey] !=\n $currentFileData['label']\n ) {\n $labelsForUpdate[] = [\n 'label' => $rowLabels[$column][$columnImageKey],\n 'imageData' => $currentFileData\n ];\n }\n\n if (array_key_exists($uploadedFile, $imageHiddenStates)\n && $currentFileData['disabled'] != $imageHiddenStates[$uploadedFile]\n ) {\n $imagesForChangeVisibility[] = [\n 'disabled' => $imageHiddenStates[$uploadedFile],\n 'imageData' => $currentFileData\n ];\n }\n } else {\n if ($column == self::COL_MEDIA_IMAGE) {\n $rowData[$column][] = $uploadedFile;\n }\n $mediaGallery[$storeId][$rowSku][$uploadedFile] = [\n 'attribute_id' => $this->getMediaGalleryAttributeId(),\n 'label' => isset($rowLabels[$column][$columnImageKey])\n ? $rowLabels[$column][$columnImageKey]\n : '',\n 'position' => ++$position,\n 'disabled' => isset($imageHiddenStates[$columnImage])\n ? $imageHiddenStates[$columnImage] : '0',\n 'value' => $uploadedFile,\n ];\n }\n }\n }\n }\n\n // 6. Attributes phase\n $rowStore = (self::SCOPE_STORE == $rowScope)\n ? $this->storeResolver->getStoreCodeToId($rowData[self::COL_STORE])\n : 0;\n $productType = isset($rowData[self::COL_TYPE]) ? $rowData[self::COL_TYPE] : null;\n if ($productType !== null) {\n $previousType = $productType;\n }\n if (isset($rowData[self::COL_ATTR_SET])) {\n $prevAttributeSet = $rowData[self::COL_ATTR_SET];\n }\n if (self::SCOPE_NULL == $rowScope) {\n // for multiselect attributes only\n if ($prevAttributeSet !== null) {\n $rowData[self::COL_ATTR_SET] = $prevAttributeSet;\n }\n if ($productType === null && $previousType !== null) {\n $productType = $previousType;\n }\n if ($productType === null) {\n continue;\n }\n }\n\n $productTypeModel = $this->_productTypeModels[$productType];\n if (!empty($rowData['tax_class_name'])) {\n $rowData['tax_class_id'] =\n $this->taxClassProcessor->upsertTaxClass($rowData['tax_class_name'], $productTypeModel);\n }\n\n if ($this->getBehavior() == Import::BEHAVIOR_APPEND ||\n empty($rowData[self::COL_SKU])\n ) {\n $rowData = $productTypeModel->clearEmptyData($rowData);\n }\n\n $rowData = $productTypeModel->prepareAttributesWithDefaultValueForSave(\n $rowData,\n !$this->isSkuExist($rowSku)\n );\n $product = $this->_proxyProdFactory->create(['data' => $rowData]);\n\n foreach ($rowData as $attrCode => $attrValue) {\n $attribute = $this->retrieveAttributeByCode($attrCode);\n\n if ('multiselect' != $attribute->getFrontendInput() && self::SCOPE_NULL == $rowScope) {\n // skip attribute processing for SCOPE_NULL rows\n continue;\n }\n $attrId = $attribute->getId();\n $backModel = $attribute->getBackendModel();\n $attrTable = $attribute->getBackend()->getTable();\n $storeIds = [0];\n\n if ('datetime' == $attribute->getBackendType()\n && (\n in_array($attribute->getAttributeCode(), $this->dateAttrCodes)\n || $attribute->getIsUserDefined()\n )\n ) {\n $attrValue = $this->dateTime->formatDate($attrValue, false);\n } elseif ('datetime' == $attribute->getBackendType() && strtotime($attrValue)) {\n $attrValue = gmdate(\n 'Y-m-d H:i:s',\n $this->_localeDate->date($attrValue)->getTimestamp()\n );\n } elseif ($backModel) {\n $attribute->getBackend()->beforeSave($product);\n $attrValue = $product->getData($attribute->getAttributeCode());\n }\n if (self::SCOPE_STORE == $rowScope) {\n if (self::SCOPE_WEBSITE == $attribute->getIsGlobal()) {\n // check website defaults already set\n if (!isset($attributes[$attrTable][$rowSku][$attrId][$rowStore])) {\n $storeIds = $this->storeResolver->getStoreIdToWebsiteStoreIds($rowStore);\n }\n } elseif (self::SCOPE_STORE == $attribute->getIsGlobal()) {\n $storeIds = [$rowStore];\n }\n if (!$this->isSkuExist($rowSku)) {\n $storeIds[] = 0;\n }\n }\n foreach ($storeIds as $storeId) {\n if (!isset($attributes[$attrTable][$rowSku][$attrId][$storeId])) {\n $attributes[$attrTable][$rowSku][$attrId][$storeId] = $attrValue;\n }\n }\n // restore 'backend_model' to avoid 'default' setting\n $attribute->setBackendModel($backModel);\n }\n }\n\n foreach ($bunch as $rowNum => $rowData) {\n if ($this->getErrorAggregator()->isRowInvalid($rowNum)) {\n unset($bunch[$rowNum]);\n }\n }\n\n $this->saveProductEntity(\n $entityRowsIn,\n $entityRowsUp\n )->_saveProductWebsites(\n $this->websitesCache\n )->_saveProductCategories(\n $this->categoriesCache\n )->_saveProductTierPrices(\n $tierPrices\n )->_saveMediaGallery(\n $mediaGallery\n )->_saveProductAttributes(\n $attributes\n )->updateMediaGalleryVisibility(\n $imagesForChangeVisibility\n )->updateMediaGalleryLabels(\n $labelsForUpdate\n );\n\n $this->_eventManager->dispatch(\n 'catalog_product_import_bunch_save_after',\n ['adapter' => $this, 'bunch' => $bunch]\n );\n }\n\n return $this;\n }", "public function wc_epo_product_price_rules( $price = array(), $product ) {\n\t\tif ( $this->is_elex_dpd_enabled() ) {\n\t\t\t$check_price = apply_filters( 'wc_epo_discounted_price', NULL, $product, NULL );\n\t\t\tif ( $check_price ) {\n\t\t\t\t$price['product'] = array();\n\t\t\t\tif ( $check_price['is_multiprice'] ) {\n\t\t\t\t\tforeach ( $check_price['rules'] as $variation_id => $variation_rule ) {\n\t\t\t\t\t\tforeach ( $variation_rule as $rulekey => $pricerule ) {\n\t\t\t\t\t\t\t$price['product'][ $variation_id ][] = array(\n\t\t\t\t\t\t\t\t\"min\" => $pricerule[\"min\"],\n\t\t\t\t\t\t\t\t\"max\" => $pricerule[\"max\"],\n\t\t\t\t\t\t\t\t\"value\" => ( $pricerule[\"type\"] != \"percentage\" ) ? apply_filters( 'wc_epo_product_price', $pricerule[\"value\"], \"\", FALSE ) : $pricerule[\"value\"],\n\t\t\t\t\t\t\t\t\"type\" => $pricerule[\"type\"],\n\t\t\t\t\t\t\t\t'conditions' => isset( $pricerule[\"conditions\"] ) ? $pricerule[\"conditions\"] : array(),\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} else {\n\t\t\t\t\tforeach ( $check_price['rules'] as $rulekey => $pricerule ) {\n\t\t\t\t\t\t$price['product'][0][] = array(\n\t\t\t\t\t\t\t\"min\" => $pricerule[\"min\"],\n\t\t\t\t\t\t\t\"max\" => $pricerule[\"max\"],\n\t\t\t\t\t\t\t\"value\" => ( $pricerule[\"type\"] != \"percentage\" ) ? apply_filters( 'wc_epo_product_price', $pricerule[\"value\"], \"\", FALSE ) : $pricerule[\"value\"],\n\t\t\t\t\t\t\t\"type\" => $pricerule[\"type\"],\n\t\t\t\t\t\t\t'conditions' => isset( $pricerule[\"conditions\"] ) ? $pricerule[\"conditions\"] : array(),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$price['price'] = apply_filters( 'woocommerce_tm_epo_price_compatibility', apply_filters( 'wc_epo_product_price', $product->get_price(), \"\", FALSE ), $product );\n\t\t}\n\n\t\treturn $price;\n\t}", "public function setMagentoWebsites(array $magentoWebsites);", "function product_variable_attributes_countries_prices( $loop, $variation_data, $variation ) {\r\n\r\n\t\t\tforeach ( TFLS()->get_regions() as $key => $value ) {\r\n\r\n\t\t\t\t$_placeholder = '';\r\n\t\t\t\t$_description = '';\r\n\r\n\t\t\t\tif ( ! empty( $value['empty_price_method'] ) ) {\r\n\r\n\t\t\t\t\t$_placeholder = __( 'Auto', 'woocommerce-tfls' );\r\n\t\t\t\t\t$_description = '<span class=\"description\">' . __( 'Leave blank to apply the specified exchange rate.', 'woocommerce-tfls' ) . '</span>';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$_regular_price = wc_format_localized_price( get_post_meta( $variation->ID, '_' . $key . '_variable_price', true ) );\r\n\t\t\t\t$_sale_price = wc_format_localized_price( get_post_meta( $variation->ID, '_' . $key . '_variable_sale_price', true ) );\r\n\r\n\t\t\t\t?>\r\n\r\n\t\t\t\t<div style=\"width:100%; overflow:auto; padding-right:10px;border-top:1px solid #eee;\">\r\n\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t<strong><?php echo __( 'Price for', 'woocommerce-tfls' ) . ' ' . $value['name']; ?></strong>\r\n\t\t\t\t\t</p>\r\n\r\n\t\t\t\t\t<p class=\"form-row form-row-first\">\r\n\t\t\t\t\t\t<label><?php echo __( 'Regular Price:', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol( $value['currency'] ) . ')'; ?></label>\r\n\t\t\t\t\t\t<input type=\"text\" size=\"5\" id=\"<?php echo '_' . $key . '_variable_price_' . $loop; ?>\"\r\n\t\t\t\t\t\t name=\"<?php echo '_' . $key . '_variable_price[' . $loop . ']'; ?>\"\r\n\t\t\t\t\t\t value=\"<?php if ( isset( $_regular_price ) ) {\r\n\t\t\t\t\t\t\t echo esc_attr( $_regular_price );\r\n\t\t\t\t\t\t } ?>\" class=\"wc_input_price\"\r\n\t\t\t\t\t\t placeholder=\"<?php echo $_placeholder; ?>\"/><?php echo $_description; ?>\r\n\t\t\t\t\t</p>\r\n\r\n\t\t\t\t\t<p class=\"form-row form-row-last\">\r\n\t\t\t\t\t\t<label><?php echo __( 'Sale Price:', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol( $value['currency'] ) . ')'; ?></label>\r\n\t\t\t\t\t\t<input type=\"text\" size=\"5\" id=\"<?php echo '_' . $key . '_variable_sale_price_' . $loop; ?>\"\r\n\t\t\t\t\t\t name=\"<?php echo '_' . $key . '_variable_sale_price[' . $loop . ']'; ?>\"\r\n\t\t\t\t\t\t value=\"<?php if ( isset( $_sale_price ) ) {\r\n\t\t\t\t\t\t\t echo esc_attr( $_sale_price );\r\n\t\t\t\t\t\t } ?>\" class=\"wc_input_price TFLS_sale_price\"/>\r\n\t\t\t\t\t</p>\r\n\r\n\t\t\t\t</div>\r\n\r\n\t\t\t<?php\r\n\r\n\t\t\t}\r\n\t\t}", "function tep_get_products_special_price($product_id) {\n\t$product_query = tep_db_query(\"select products_price, products_model from \" . TABLE_PRODUCTS . \" where products_id = '\" . (int)$product_id . \"'\");\n\tif (tep_db_num_rows($product_query)) {\n\t\t$product = tep_db_fetch_array($product_query);\n\t\t$product_price = $product['products_price'];\n\t} else {\n\t\treturn false;\n\t}\n\t// Eversun mod for sppc and qty price breaks\n\t// $specials_query = tep_db_query(\"select specials_new_products_price from \" . TABLE_SPECIALS . \" where products_id = '\" . $product_id . \"' and status\");\n\tglobal $sppc_customer_group_id;\n\tif(!tep_session_is_registered('sppc_customer_group_id')) {\n\t\t$customer_group_id = '0';\n\t} else {\n\t\t$customer_group_id = $sppc_customer_group_id;\n\t}\n\t$specials_query = tep_db_query(\"select specials_new_products_price from \" . TABLE_SPECIALS . \" where products_id = '\" . (int)$product_id . \"' and status and customers_group_id = '\" . (int)$customer_group_id . \"'\");\n\t// Eversun mod for sppc and qty price breaks\n\tif (tep_db_num_rows($specials_query)) {\n\t\t$special = tep_db_fetch_array($specials_query);\n\t\t$special_price = $special['specials_new_products_price'];\n\t} else {\n\t\t$special_price = false;\n\t}\n\tif(substr($product['products_model'], 0, 4) == 'GIFT') { //Never apply a salededuction to Ian Wilson's Giftvouchers\n\t\treturn $special_price;\n\t}\n\n\t$product_to_categories_query = tep_db_query(\"select categories_id from \" . TABLE_PRODUCTS_TO_CATEGORIES . \" where products_id = '\" . (int)$product_id . \"'\");\n\t$product_to_categories = tep_db_fetch_array($product_to_categories_query);\n\t$category = $product_to_categories['categories_id'];\n\t\n\t$sale_query = tep_db_query(\"select sale_specials_condition, sale_deduction_value, sale_deduction_type from \" . TABLE_SALEMAKER_SALES . \" where sale_categories_all like '%,\" . $category . \",%' and sale_status = '1' and (sale_date_start <= now() or sale_date_start = '0000-00-00') and (sale_date_end >= now() or sale_date_end = '0000-00-00') and (sale_pricerange_from <= '\" . $product_price . \"' or sale_pricerange_from = '0') and (sale_pricerange_to >= '\" . $product_price . \"' or sale_pricerange_to = '0')\");\n\tif (tep_db_num_rows($sale_query)) {\n\t\t$sale = tep_db_fetch_array($sale_query);\n\t} else {\n\t\treturn $special_price;\n\t}\n\n\t\tif (!$special_price) {\n\t\t\t$tmp_special_price = $product_price;\n\t\t} else {\n\t\t\t$tmp_special_price = $special_price;\n\t\t}\n\n\t\tswitch ($sale['sale_deduction_type']) {\n\t\t\tcase 0:\n\t\t\t\t$sale_product_price = $product_price - $sale['sale_deduction_value'];\n\t\t\t\t$sale_special_price = $tmp_special_price - $sale['sale_deduction_value'];\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$sale_product_price = $product_price - (($product_price * $sale['sale_deduction_value']) / 100);\n\t\t\t\t$sale_special_price = $tmp_special_price - (($tmp_special_price * $sale['sale_deduction_value']) / 100);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$sale_product_price = $sale['sale_deduction_value'];\n\t\t\t\t$sale_special_price = $sale['sale_deduction_value'];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn $special_price;\n\t\t}\n\n\t\tif ($sale_product_price < 0) {\n\t\t\t$sale_product_price = 0;\n\t\t}\n\t\t\n\t\tif ($sale_special_price < 0) {\n\t\t\t$sale_special_price = 0;\n\t\t}\n\t\t\n\t\tif (!$special_price) {\n\t\t\treturn number_format($sale_product_price, 4, '.', '');\n\t\t} else {\n\t\t\tswitch($sale['sale_specials_condition']){\n\t\t\t\tcase 0:\n\t\t\t\t\treturn number_format($sale_product_price, 4, '.', '');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\treturn number_format($special_price, 4, '.', '');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\treturn number_format($sale_special_price, 4, '.', '');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn number_format($special_price, 4, '.', '');\n\t\t\t}\n\t\t}\n}", "function product_options_wholesale_price() {\r\n\t\t\twoocommerce_wp_text_input(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'id' => '_wholesale_price',\r\n\t\t\t\t\t'label' => __( 'Wholesale Price', 'woocommerce' ),\r\n\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t'desc_tip' => 'true',\r\n\t\t\t\t\t'description' => __( 'Enter a wholesale price.', 'woocommerce' ),\r\n\t\t\t\t\t'data_type' => 'price'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}", "public function getPriceOverrideExpress()\n {\n $value = $this->scopeConfig->getValue(self::XML_PATH_PRICE_OVERRIDE_EXPRESS, ScopeInterface::SCOPE_WEBSITES);\n if (!strlen($value)) {\n return null;\n }\n\n return $this->localeFormat->getNumber($value);\n }", "function show_Price($prod_arr,$price_class_arr,$pagetype ='other_3',$from_combo=false,$speclretn=0)\n\t{ \n\t\tglobal $ecom_siteid,$db,$sitesel_curr,$default_crr,$PriceSettings_arr,$default_Currency_arr,$Settings_arr,$Captions_arr,$ecom_tax_total_arr,$current_currency_details;\n\t\t$show_only_on_login \t= $Settings_arr['hide_price_login'];\n\t\t$tax_before_disc\t\t= $Settings_arr['saletax_before_discount'];\n\t\t// Get the customer id from the session\n\t\t$cust_id \t\t\t\t= get_session_var(\"ecom_login_customer\");\n\t\t$discount_price_only \t= 0;\n\t\t$allow_direct_custdisc_in_group = $allow_direct_proddisc_in_group = 'Y';\n $discount_calculated = false;\n\t\t// Check whether price should be hidden when not logged in\n\t\tif ($show_only_on_login == 1)\n\t\t{\n\t\t\tif (!$cust_id)\n\t\t\t\treturn;\t\n\t\t}\n\t\t$applicable_disc =\t$applicable_direct_disc = $applicable_group_disc = 0;\n\t\t$prod_arr['cust_allow_direct_product_disc'] = 'Y'; // by default product direct discount will be allowed.\n\t\t$cust_disc_group_exists = false;\n\t\t// Start of section to decide whether to show the discount set in the products table or based on the discount set for logged in customer / customer discount\n\t\tif (get_session_var('ecom_cust_group_exists')==1 and $cust_id)\n\t\t{\n\t\t\t$group_prod_arr\t\t\t\t= get_session_var('ecom_cust_group_prod_array');\n\t\t\t$group_arr\t\t\t\t= get_session_var('ecom_cust_group_array');\n\t\t\t$group_allow_direct_arr\t\t\t= get_session_var('ecom_cust_group_allow_direct_array');// allow direct customer discount for group\n\t\t\t$group_allow_direct_product_arr\t\t= get_session_var('ecom_cust_group_allow_direct_product_array'); // allow direct product discount for group\n\t\t\t\n\t\t\t// Check whether current product is mapped with any of the customer discount groups assigned to current customer\n\t\t\tif(count($group_prod_arr))\n\t\t\t{\n\t\t\t\t$pid = $prod_arr['product_id'];\n\t\t\t\tif(array_key_exists($pid,$group_prod_arr))\n\t\t\t\t{\n\t\t\t\t\t$applicable_group_disc \t\t\t\t= $group_prod_arr[$pid];\n\t\t\t\t\t$applicable_group = $group_arr[$pid];\n\t\t\t\t\t$prod_arr['cust_disc_type'] \t\t\t= 'custgroup';\n\t\t\t\t\t$prod_arr['cust_disc_grp_id'] \t\t\t= $applicable_group;\n\t\t\t\t\t$prod_arr['cust_disc_percent'] \t\t\t= $applicable_group_disc;\n\t\t\t\t\t$prod_arr['cust_allow_direct_disc']\t\t= $group_allow_direct_arr[$pid];\n\t\t\t\t\t$prod_arr['cust_allow_direct_product_disc']\t= $group_allow_direct_product_arr[$pid];\n\t\t\t\t\n\t\t\t\t\t$cust_disc_type\t\t\t\t\t= 'GRP';\n\t\t\t\t\t$cust_disc_group_exists\t\t\t\t= true;\n\t\t\t\t}\n\t\t\t\t/*else\n\t\t\t\t{\n\t\t\t\t\t// Check whether any discount group exists for current customer with no product set\n\t\t\t\t\tif($group_prod_arr[0])\n\t\t\t\t\t{\n\t\t\t\t\t\t$applicable_disc \t\t\t\t= $group_prod_arr[0];\n\t\t\t\t\t\t$applicable_group \t\t\t\t= $group_arr[0];\n\t\t\t\t\t\t$prod_arr['cust_disc_type'] \t= 'custgroup';\n\t\t\t\t\t\t$prod_arr['cust_disc_grp_id'] \t= $applicable_group;\n\t\t\t\t\t\t$prod_arr['cust_disc_percent'] \t= $applicable_disc;\n\t\t\t\t\t\t$cust_disc_type\t\t\t\t\t= 'GRP';\n\t\t\t\t\t}\n\t\t\t\t}*/\n\t\t\t}\t\t\t\n\t\t}\n\t\t/*if($applicable_disc==0)\n\t\t{*/\n\t\t\t// Check whether any direct discount is set for current customer\n\t\tif(get_session_var('ecom_cust_direct_exists')== 1 and $cust_id)\n\t\t{\n\t\t\t$applicable_direct_disc\t\t= get_session_var('ecom_cust_direct_disc');\n\t\t\t$cust_disc_type\t\t\t= 'CUST';\n\t\t\t$prod_arr['cust_disc_type'] \t= 'customer';\n\t\t\t//$prod_arr['cust_disc_grp_id'] = 0;\n\t\t\t$prod_arr['cust_disc_percent'] \t= $applicable_direct_disc;\n\t\t}\n\t\t/*}*/\n\t// End of section\n\t\tif ($cust_disc_group_exists)\n\t\t{\n\t\t\tif($prod_arr['cust_allow_direct_disc']=='N')\n\t\t\t{\n\t\t\t\t$applicable_disc\t\t\t= $applicable_group_disc;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$applicable_disc\t\t\t= $applicable_direct_disc + $applicable_group_disc;\n\t\t\t\tif($applicable_disc>100) // in case if total of discount % is > 100 then reset it to 100\n\t\t\t\t\t$applicable_disc = 100;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\t$applicable_disc\t\t\t= $applicable_direct_disc;\t\n\t\t//Get the rate for the current currency\n\t\t$curr_rate = $current_currency_details['curr_rate'] + $current_currency_details['curr_margin'];\n\t\t$curr_sign = $current_currency_details['curr_sign_char'];\n\t\t\n\t\t// Assigning the required values from array to variables and applying conversions if required\n\t\t\n\t\tif($prod_arr['check_comb_price'] == 'YES' and $prod_arr['combination_id']>0) // case coming \n\t\t{\n\t\t\tif($prod_arr['product_variablecomboprice_allowed']=='Y')\n\t\t\t{\n\t\t\t\t// Get the stock of variable combination form the variable combination table\n\t\t\t\t$sql_comb = \"SELECT web_stock,comb_price \n\t\t\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\t\t\tproduct_variable_combination_stock \n\t\t\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t\t\tproducts_product_id =\".$prod_arr['product_id'].\" \n\t\t\t\t\t\t\t\t\tAND comb_id = \".$prod_arr['combination_id'].\" \n\t\t\t\t\t\t\t\tLIMIT \n\t\t\t\t\t\t\t\t\t1\";\n\t\t\t\t$ret_comb = $db->query($sql_comb);\n\t\t\t\tif ($db->num_rows($ret_comb))// case if record found in combination stock table\n\t\t\t\t{\n\t\t\t\t\t$row_comb \t= $db->fetch_array($ret_comb);\n\t\t\t\t\t$webprice \t\t= $row_comb['comb_price']*$curr_rate; \n\t\t\t\t}\n\t\t\t\telse // case if record not found in combination table\n\t\t\t\t\t$webprice = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$webprice = $prod_arr['product_webprice']*$curr_rate; \n\t\t}\n\t\telse\n\t\t\t$webprice = $prod_arr['product_webprice']*$curr_rate; \n\t\t\n\t\t$disc_asval\t\t= $prod_arr['product_discount_enteredasval'];\n\t\t$discount\t\t= 0;\n\t\t$override_yousave\t= false;\n\t\tif($prod_arr['cust_allow_direct_product_disc']=='Y')\n\t\t{\n\t\t\tif ($disc_asval==1)\n\t\t\t{\n\t\t\t\t$discount\t= $prod_arr['product_discount']*$curr_rate; \n\t\t\t\t$override_yousave = true;\n\t\t\t}\t\n\t\t\telse if($disc_asval==2) // For Exact Discount Price\n\t\t\t{\n\t\t\t\t$discount\t= $prod_arr['product_discount']*$curr_rate; \t\n\t\t\t\t$override_yousave = true;\n\t\t\t}\n\t\t\telse\n {\n\t\t\t\t$discount\t= $prod_arr['product_discount'];\n if($applicable_disc>0) // if normal product discount is there and also customer direct discount or customer group exists, then You save option will be displayed instead of % off.\n $override_yousave = true;\n \n } \n\t\t}\t\n\t\t$apply_tax\t\t= $prod_arr['product_applytax'];\n\t\t$tax_val\t\t= 0;\n\t\tif ($apply_tax=='Y')\n\t\t{\n\t\t\t$tax_arr \t\t= $ecom_tax_total_arr;\n\t\t\t$tax_val\t\t= $tax_arr['tax_val'];\n\t\t\tif (is_array($tax_arr['tax_name']))\n\t\t\t{\n\t\t\t\tif (count($tax_arr['tax_name']))\n\t\t\t\t{\n\t\t\t\t\tforeach ($tax_arr['tax_name'] as $k=>$v)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($tax_name)\n\t\t\t\t\t\t\t$tax_name .= $Captions_arr['PRICE_DISPLAY']['TAX_PLUS'];\n\t\t\t\t\t\t$tax_name .= $v;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\t\n\t\t}\n\t\t$br \t= '0';\n\t\t\n\t\tswitch($pagetype)\n\t\t{\n\t\t\tcase 'shelfcenter_1':\n\t\t\t\tif($PriceSettings_arr['price_middleshelf_1_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'shelfcenter_3':\n\t\t\t\tif($PriceSettings_arr['price_middleshelf_3_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'compshelf':\n\t\t\t\tif($PriceSettings_arr['price_compshelf_reqbreak']==1) \n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'search_1':\n\t\t\t\tif($PriceSettings_arr['price_searchresult_1_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'search_3':\n\t\t\t\tif($PriceSettings_arr['price_searchresult_3_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'prod_detail':\n\t\t\t\tif($PriceSettings_arr['price_proddetails_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'cat_detail_1':\n\t\t\t\tif($PriceSettings_arr['price_categorydetails_1_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'cat_detail_3':\n\t\t\t\tif($PriceSettings_arr['price_categorydetails_3_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'combo_1':\n\t\t\t\tif($PriceSettings_arr['price_combodeals_1_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'combo_3':\n\t\t\t\tif($PriceSettings_arr['price_combodeals_3_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'linkprod_1':\n\t\t\t\tif($PriceSettings_arr['price_linkedprod_1_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'linkprod_3':\n\t\t\t\tif($PriceSettings_arr['price_linkedprod_3_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'bestseller_1':\n\t\t\t\tif($PriceSettings_arr['price_best_1_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'bestseller_3':\n\t\t\t\tif($PriceSettings_arr['price_best_3_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'shopbrand_1':\n\t\t\t\tif($PriceSettings_arr['price_shopbrand_1_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'shopbrand_3':\n\t\t\t\tif($PriceSettings_arr['price_shopbrand_3_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'featured':\n\t\t\t\tif($PriceSettings_arr['price_featured_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'other_1':\n\t\t\t\tif($PriceSettings_arr['price_other_1_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'other_3':\n\t\t\t\tif($PriceSettings_arr['price_other_3_reqbreak']==1)\n\t\t\t\t{\n\t\t\t\t\t$br = \"1\";\t\t\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t};\n\t\tif($webprice)// Do the following only in case if the from price is set\n\t\t{\n\t\t\t// Setting the prefix and suffix to respective variables\n\t\t\tif($prod_arr['product_variablesaddonprice_exists']=='Y' or $prod_arr['product_variablecomboprice_allowed']=='Y')\n\t\t\t{\n\t\t\t\t$normal_prefix \t= ($prod_arr['price_fromprefix'])?$prod_arr['price_fromprefix']:$PriceSettings_arr['price_fromprefix'];\n\t\t\t\t$normal_suffix \t= ($prod_arr['price_fromsuffix'])?$prod_arr['price_fromsuffix']:$PriceSettings_arr['price_fromsuffix'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$normal_prefix \t= ($prod_arr['price_normalprefix'])?$prod_arr['price_normalprefix']:$PriceSettings_arr['price_normalprefix'];\n\t\t\t\t$normal_suffix \t= ($prod_arr['price_normalsuffix'])?$prod_arr['price_normalsuffix']:$PriceSettings_arr['price_normalsuffix'];\n\t\t\t}\n\t\t\t\n\t\t\t$discount_prefix\t\t= ($prod_arr['price_discountprefix'])?$prod_arr['price_discountprefix']:$PriceSettings_arr['price_discountprefix'];\t\n\t\t\t$discount_suffix\t\t= ($prod_arr['price_discountsuffix'])?$prod_arr['price_discountsuffix']:$PriceSettings_arr['price_discountsuffix'];\n\t\t\t\n\t\t\t$offer_prefix\t\t\t= ($prod_arr['price_specialofferprefix'])?$prod_arr['price_specialofferprefix']:$PriceSettings_arr['price_specialofferprefix'];\n\t\t\t$offer_suffix\t\t\t= ($prod_arr['price_specialoffersuffix'])?$prod_arr['price_specialoffersuffix']:$PriceSettings_arr['price_specialoffersuffix'];\n\t\t\t\n\t\t\t$yousave_prefix\t\t= ($prod_arr['price_yousaveprefix'])?$prod_arr['price_yousaveprefix']:$PriceSettings_arr['price_yousaveprefix'];\n\t\t\t$yousave_suffix\t\t= ($prod_arr['price_yousavesuffix'])?$prod_arr['price_yousavesuffix']:$PriceSettings_arr['price_yousavesuffix'];\n\t\t\t\n\t\t\t$normal_prefix \t\t= stripslashes($normal_prefix);\n\t\t\t$normal_suffix \t\t= stripslashes($normal_suffix);\n\t\t\t$discount_prefix\t= stripslashes($discount_prefix);\n\t\t\t$discount_suffix\t= stripslashes($discount_suffix);\n\t\t\t$offer_prefix\t\t= stripslashes($offer_prefix);\n\t\t\t$offer_suffix\t\t= stripslashes($offer_suffix);\n\t\t\t$yousave_prefix\t\t= stripslashes($yousave_prefix);\n\t\t\t$yousave_suffix\t\t= stripslashes($yousave_suffix);\n\t\t\t$tax_plus_suffix\t= $PriceSettings_arr['price_tax_plus'];\n\t\t\t$tax_inc_suffix\t\t= $PriceSettings_arr['price_tax_inc'];\n\t\t\t$tax_exc_suffix\t\t= $PriceSettings_arr['price_tax_exc'];\n\t\t\t\n\t\t\t$priceclean_arr\t\t= array();\n\t\t\t$priceclearvalonly_arr = array();\n\t\t\t// Decide how to display the price based on the value of price_displaytype\n\t\t\tswitch($PriceSettings_arr['price_displaytype'])\n\t\t\t{\n\t\t\t\tcase 'show_price_only': // show only price even if tax exists\n\t\t\t\t\t$price_arr['base_price'] \t\t= $normal_prefix.\" \".printcurr($webprice,$curr_sign).\" \".$normal_suffix;\n\t\t\t\t\t$priceclean_arr['base_price'] \t= printcurr($webprice,$curr_sign);\n\t\t\t\t\t$priceclearvalonly_arr['base_price'] = $webprice;\n\t\t\t\t\tif ($discount>0) // case if direct product discount is applicable\n\t\t\t\t\t{\n\t\t\t\t\t\t/*if($cust_disc_type!='') //case if customer logged in and also custdisc or cust group disc exists\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$disc_price \t\t\t\t\t\t= $webprice - ($webprice * $discount/100);\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t\t= $discount_prefix.\" \".remove_Trailing_zeros($discount).\"% \".$discount_suffix;\n\t\t\t\t\t\t\t$priceclean_arr['disc_percent'] \t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_percent'] = remove_Trailing_zeros($discount);\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($disc_asval==1) // If discount is specified as value\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$disc_price = $webprice - $discount;\n\t\t\t\t\t\t\tif($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$more_disc\t= ($disc_price * $applicable_disc)/100;\n\t\t\t\t\t\t\t\t$disc_price = $disc_price - $more_disc;\n\t\t\t\t\t\t\t\t$discount\t+= $more_disc;\n\t\t\t\t\t\t\t}\t \n\t\t\t\t\t\t\tif ($disc_price<0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t\t\t\t= 0;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] \t\t= 0;\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t\t= $discount_prefix.\" \".printcurr($discount,$curr_sign).\" \".$discount_suffix;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] = printcurr($discount,$curr_sign);\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] = $discount;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\telse if($disc_asval==2) \n\t\t\t\t\t\t{ // For Exact Discount Price \n\t\t\t\t\t\t\t//echo 'jj'.$disc_price\t= $prod_arr['product_discount'];// For Exact Discount Price\n\t\t\t\t\t\t\t$disc_price\t= $prod_arr['product_discount']*$curr_rate; \n\t\t\t\t\t\t\tif($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$more_disc\t= ($disc_price * $applicable_disc)/100;\n\t\t\t\t\t\t\t\t$disc_price = $disc_price - $more_disc;\n\t\t\t\t\t\t\t\t$discount\t= $webprice - $disc_price;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($disc_price<0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t\t\t\t= 0;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] \t\t= 0;\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t\t\t\t= $discount_prefix.\" \".printcurr($discount,$curr_sign).\" \".$discount_suffix;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] \t\t= printcurr($discount,$curr_sign);\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t= $discount;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\telse // case if discount is given as percentage\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*if($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$discount += $applicable_disc;\n\t\t\t\t\t\t\t\tif($discount>100)\n\t\t\t\t\t\t\t\t\t$discount = 100;\n\t\t\t\t\t\t\t} */\n\t\t\t\t\t\t\t$disc_price \t\t\t\t\t= $webprice - ($webprice * $discount/100);\n if($applicable_disc>0)\n {\n $disc_price = $disc_price - ($disc_price*$applicable_disc/100);\n //$disc\n }\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t = $discount_prefix.\" \".remove_Trailing_zeros($discount).\"% \".$discount_suffix;\n\t\t\t\t\t\t\t$priceclean_arr['disc_percent'] = remove_Trailing_zeros($discount);\n\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_percent'] = remove_Trailing_zeros($discount);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$price_arr['discounted_price'] \t\t\t\t\t= $offer_prefix.\" \".printcurr($disc_price,$curr_sign).\" \".$offer_suffix;\n\t\t\t\t\t\t$priceclean_arr['discounted_price'] \t\t\t= printcurr($disc_price,$curr_sign);\n\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price'] \t\t= $disc_price;\n\t\t\t\t\t\tif ($PriceSettings_arr['price_show_yousave']==1 or $override_yousave==true)// Check whether you save caption is to be displayed\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t= '';\n\t\t\t\t\t\t\t$price_arr['priceclean_arr'] \t= '';\n\t\t\t\t\t\t\t$price_arr['priceclearvalonly_arr'] = '';\n\t\t\t\t\t\t\tif ($disc_price) // check whether disc_price exists\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$yousave_price \t\t\t\t\t\t= $webprice - $disc_price;\t\n\t\t\t\t\t\t\t\t$price_arr['yousave_price'] \t\t= $yousave_prefix.\" \".printcurr($yousave_price,$curr_sign).\" \".$yousave_suffix;\n\t\t\t\t\t\t\t\t$priceclean_arr['yousave_price'] \t= printcurr($yousave_price,$curr_sign);\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['yousave_price'] = $yousave_price;\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}\n\t\t\t\t\telse // case if direct product discount is not there\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$discount\t= ($webprice * $applicable_disc)/100;\n\t\t\t\t\t\t\t$disc_price = $webprice - $discount;\n\t\t\t\t\t\t\t$discount\t= $applicable_disc; \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t\t\t\t\t= $discount_prefix.\" \".remove_Trailing_zeros($discount).\"% \".$discount_suffix;\n\t\t\t\t\t\t\t$priceclean_arr['disc_percent'] \t\t\t\t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_percent'] \t\t\t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$price_arr['discounted_price'] \t\t\t\t\t= $offer_prefix.\" \".printcurr($disc_price,$curr_sign).\" \".$offer_suffix;\n\t\t\t\t\t\t\t$priceclean_arr['discounted_price'] \t\t\t= printcurr($disc_price,$curr_sign);\n\t\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price'] \t\t= $disc_price;\n\t\t\t\t\t\t\tif ($PriceSettings_arr['price_show_yousave']==1 or $override_yousave==true)// Check whether you save caption is to be displayed\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t= '';\n\t\t\t\t\t\t\t\t$price_arr['priceclean_arr'] \t= '';\n\t\t\t\t\t\t\t\t$price_arr['priceclearvalonly_arr'] = '';\n\t\t\t\t\t\t\t\tif ($disc_price) // check whether disc_price exists\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$yousave_price \t\t\t\t\t\t\t= $webprice - $disc_price;\t\n\t\t\t\t\t\t\t\t\t$price_arr['yousave_price'] \t\t\t= $yousave_prefix.\" \".printcurr($yousave_price,$curr_sign).\" \".$yousave_suffix;\n\t\t\t\t\t\t\t\t\t$priceclean_arr['yousave_price'] \t\t= printcurr($yousave_price,$curr_sign);\n\t\t\t\t\t\t\t\t\t$priceclearvalonly_arr['yousave_price'] = $yousave_price;\n\t\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}\t\n\t\t\t\t\t\telse // case if no type of discount is applicable\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$price_arr['discounted_price'] \t= '';\n\t\t\t\t\t\t\t$price_arr['yousave_price']\t\t= '';\n\t\t\t\t\t\t\t$priceclean_arr['discounted_price'] \t= '';\n\t\t\t\t\t\t\t$priceclean_arr['yousave_price']\t\t= '';\n\t\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price'] = '';\n\t\t\t\t\t\t\t$priceclearvalonly_arr['yousave_price'] = '';\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 'show_price_plus_tax': // show price + Tax\n\t\t\t\t\tif ($tax_val>0)\n\t\t\t\t\t\t$tax_str = ' '.$tax_plus_suffix;//$Captions_arr['PRICE_DISPLAY']['TAX_PLUSTAX'];\n\t\t\t\t\t$price_arr['base_price'] \t\t= $normal_prefix.\" \".printcurr($webprice,$curr_sign).\" \".$normal_suffix.\" \".$tax_str;\n\t\t\t\t\t$priceclean_arr['base_price'] \t= printcurr($webprice,$curr_sign).\" \".$tax_str;\n\t\t\t\t\t$priceclearvalonly_arr['base_price'] \t= $webprice;\n\t\t\t\t\tif ($discount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($disc_asval==1) // If discount is specified as value\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$disc_price = $webprice - $discount;\n\t\t\t\t\t\t\tif($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$more_disc\t= ($disc_price * $applicable_disc)/100;\n\t\t\t\t\t\t\t\t$disc_price = $disc_price - $more_disc;\n\t\t\t\t\t\t\t\t$discount\t+= $more_disc;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\tif ($disc_price<0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t\t\t\t= 0;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] \t\t= 0;\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t\t\t\t\t= $discount_prefix.\" \".printcurr($discount,$curr_sign).\" \".$discount_suffix;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] \t\t\t\t= printcurr($discount,$curr_sign);\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t= $discount;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\telse if($disc_asval==2) // For Exact Discount Price \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$disc_price\t= $prod_arr['product_discount']*$curr_rate; \n\t\t\t\t\t\t\tif($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$more_disc\t= ($disc_price * $applicable_disc)/100;\n\t\t\t\t\t\t\t\t$disc_price = $disc_price - $more_disc;\n\t\t\t\t\t\t\t}\n $discount = $webprice - $disc_price;\n\t\t\t\t\t\t\tif ($disc_price<0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t\t\t= $discount_prefix.\" \".printcurr($discount,$curr_sign).\" \".$discount_suffix;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] \t= printcurr($discount,$curr_sign);\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t= $discount;\n\t\t\t\t\t\t\t}\t\n\n\t\t\t\t\t\t}\t\n\t\t\t\t\t else // case if discount is given as percentage\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*if($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$discount += $applicable_disc;\n\t\t\t\t\t\t\t\tif($discount>100)\n\t\t\t\t\t\t\t\t\t$discount = 100;\n\t\t\t\t\t\t\t} */\n\t\t\t\t\t\t\t$disc_price \t\t\t\t\t\t= $webprice - ($webprice * $discount/100);\n if($applicable_disc>0)\n {\n $disc_price = $disc_price - ($disc_price*$applicable_disc/100);\n }\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t\t= $discount_prefix.\" \".remove_Trailing_zeros($discount).\"% \".$discount_suffix;\n\t\t\t\t\t\t\t$priceclean_arr['disc_percent'] \t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_percent'] \t= $discount;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$price_arr['discounted_price'] \t\t\t\t= $offer_prefix.\" \".printcurr($disc_price,$curr_sign).\" \".$offer_suffix.\" \".$tax_str;\n\t\t\t\t\t\t$priceclean_arr['discounted_price'] \t\t= printcurr($disc_price,$curr_sign).\" \".$tax_str;\n\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price'] \t\t= $disc_price;\n\t\t\t\t\t\tif ($PriceSettings_arr['price_show_yousave']==1 or $override_yousave==true)// Check whether you save caption is to be displayed\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t= '';\n\t\t\t\t\t\t\tif ($disc_price) // check whether disc_price exists\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$yousave_price \t\t\t\t\t\t= $webprice - $disc_price;\t\n\t\t\t\t\t\t\t\t$price_arr['yousave_price'] \t\t= $yousave_prefix.\" \".printcurr($yousave_price,$curr_sign).\" \".$yousave_suffix;\n\t\t\t\t\t\t\t\t$priceclean_arr['yousave_price'] \t= printcurr($yousave_price,$curr_sign);\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['yousave_price'] \t\t= $yousave_price;\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}\n\t\t\t\t\telse // case if direct product discount is not there\n\t\t\t\t\t{\n\t\t\t\t\t\tif($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$discount\t= ($webprice * $applicable_disc/100);\n\t\t\t\t\t\t\t$disc_price = $webprice - $discount;\n\t\t\t\t\t\t\t$discount\t= $applicable_disc;\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t\t\t\t= $discount_prefix.\" \".remove_Trailing_zeros($discount).\"% \".$discount_suffix;\n\t\t\t\t\t\t\t$priceclean_arr['disc_percent'] \t\t\t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_percent'] \t\t= $discount;\n\t\t\t\t\t\t\t$price_arr['discounted_price'] \t\t\t\t= $offer_prefix.\" \".printcurr($disc_price,$curr_sign).\" \".$offer_suffix.\" \".$tax_str;\n\t\t\t\t\t\t\t$priceclean_arr['discounted_price'] \t\t= printcurr($disc_price,$curr_sign).\" \".$tax_str;\n\t\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price'] \t= $disc_price;\n\t\t\t\t\t\t\tif ($PriceSettings_arr['price_show_yousave']==1)// Check whether you save caption is to be displayed\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_percent'] \t= '';\n\t\t\t\t\t\t\t\tif ($disc_price) // check whether disc_price exists\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$yousave_price \t\t\t\t\t\t= $webprice - $disc_price;\t\n\t\t\t\t\t\t\t\t\t$price_arr['yousave_price'] \t\t= $yousave_prefix.\" \".printcurr($yousave_price,$curr_sign).\" \".$yousave_suffix;\n\t\t\t\t\t\t\t\t\t$priceclean_arr['yousave_price'] \t= printcurr($yousave_price,$curr_sign);\n\t\t\t\t\t\t\t\t\t$priceclearvalonly_arr['yousave_price'] \t\t= $yousave_price;\n\t\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\t$price_arr['discounted_price'] \t\t\t\t\t= '';\n\t\t\t\t\t\t\t$price_arr['yousave_price']\t\t\t\t\t\t= '';\n\t\t\t\t\t\t\t$priceclean_arr['discounted_price'] \t\t\t= '';\n\t\t\t\t\t\t\t$priceclean_arr['yousave_price']\t\t\t\t= '';\n\t\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price'] \t\t= '';\n\t\t\t\t\t\t\t$priceclearvalonly_arr['yousave_price'] \t\t= '';\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 'show_price_inc_tax': // Show price including tax\n\t\t\t\t\tif ($tax_val>0 && $Captions_arr['PRICE_DISPLAY']['TAX_INC']!='')\n\t\t\t\t\t{\n\t\t\t\t\t\t$tax_str = ' '.$tax_inc_suffix;//$Captions_arr['PRICE_DISPLAY']['TAX_INC'];//.' '.$tax_name;\n\t\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t\t$price_withtax\t\t\t\t\t\t\t\t= $webprice + ($webprice * $tax_val/100);\n\t\t\t\t\t$price_arr['base_price'] \t\t\t\t\t= $normal_prefix.\" \".printcurr($price_withtax,$curr_sign).\" \".$normal_suffix.\" \".$tax_str;\n\t\t\t\t\t$priceclean_arr['base_price'] \t\t\t\t= printcurr($price_withtax,$curr_sign).\" \".$tax_str;\n\t\t\t\t\t$priceclearvalonly_arr['base_price'] \t\t= $webprice; // considering only the price with out tax;\n\t\t\t\t\t$priceclearvalonly_arr['tax_calc_req'] \t\t= 1; // variable to decide whether tax is to be calculated later\n\t\t\t\t\tif ($discount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($disc_asval==1) // If discount is specified as value\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$disc_price \t\t\t= $webprice - $discount; // calculate the original discount\n\t\t\t\t\t\t\tif($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$more_disc\t= ($disc_price * $applicable_disc)/100;\n\t\t\t\t\t\t\t\t$disc_price = $disc_price - $more_disc;\n\t\t\t\t\t\t\t\t$discount\t+= $more_disc;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\tif ($disc_price<0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t $disc = $price_withtax - $disc_price_with_tax;\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t\t\t\t\t= $discount_prefix.\" \".printcurr($disc,$curr_sign).\" \".$discount_suffix;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] \t\t\t\t= printcurr($disc,$curr_sign);\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t= $disc;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\telse if($disc_asval==2) // For Exact Discount Price \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$disc_price\t= $prod_arr['product_discount']*$curr_rate; \n\t\t\t\t\t\t\tif($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$more_disc\t= ($disc_price * $applicable_disc)/100;\n\t\t\t\t\t\t\t\t$disc_price = $disc_price - $more_disc;\n\t\t\t\t\t\t\t\t//$discount\t= $webprice - $disc_price;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t$discount_with_tax \t= $price_withtax - $disc_price_with_tax;\n\t\t\t\t\t\t\tif ($disc_price<0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t\t\t\t= $discount_prefix.\" \".printcurr($discount_with_tax,$curr_sign).\" \".$discount_suffix;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] \t\t= printcurr($discount_with_tax,$curr_sign);\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t= $discount_with_tax;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\telse // case if discount is given as percentage\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*if($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$discount += $applicable_disc;\n\t\t\t\t\t\t\t\tif($discount>100)\n\t\t\t\t\t\t\t\t\t$discount = 100;\n\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t$disc_price \t\t\t\t= $webprice - ($webprice * $discount/100);// calculate the original discount\n if($applicable_disc>0)\n {\n $disc_price = $disc_price - ($disc_price*$applicable_disc/100);\n }\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t\t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t\t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t\t\t= $discount_prefix.\" \".remove_Trailing_zeros($discount).\"% \".$discount_suffix;\n\t\t\t\t\t\t\t$priceclean_arr['disc_percent'] \t\t\t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_percent'] \t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$price_arr['discounted_price'] \t\t\t\t\t= $offer_prefix.\" \".printcurr($disc_price_with_tax,$curr_sign).\" \".$offer_suffix.\" \".$tax_str;\n\t\t\t\t\t\t$priceclean_arr['discounted_price']\t\t\t\t= printcurr($disc_price_with_tax,$curr_sign).\" \".$tax_str;\n\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price'] \t= $disc_price;// considering only the discount with out tax //$disc_price_with_tax;\n\t\t\t\t\t\tif ($PriceSettings_arr['price_show_yousave']==1 or $override_yousave==true)// Check whether you save caption is to be displayed\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t= '';\n\t\t\t\t\t\t\tif ($disc_price) // check whether disc_price exists\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$yousave_price \t\t\t\t\t\t\t\t= $webprice - $disc_price;\t\n\t\t\t\t\t\t\t\t$price_arr['yousave_price'] \t\t\t\t= $yousave_prefix.\" \".printcurr($yousave_price,$curr_sign).\" \".$yousave_suffix;\n\t\t\t\t\t\t\t\t$priceclean_arr['yousave_price'] \t\t\t= printcurr($yousave_price,$curr_sign);\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['yousave_price'] \t= $yousave_price;\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}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$discount\t= ($webprice * $applicable_disc)/100;\n\t\t\t\t\t\t\t$disc_price = $webprice - $discount;\n\t\t\t\t\t\t\t$discount\t= $applicable_disc;\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t\t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t\t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t\t\t\t= $discount_prefix.\" \".remove_Trailing_zeros($discount).\"% \".$discount_suffix;\n\t\t\t\t\t\t\t$priceclean_arr['disc_percent'] \t\t\t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_percent'] \t\t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t\t$price_arr['discounted_price'] \t\t\t\t= $offer_prefix.\" \".printcurr($disc_price_with_tax,$curr_sign).\" \".$offer_suffix.\" \".$tax_str;\n\t\t\t\t\t\t\t$priceclean_arr['discounted_price']\t\t\t= printcurr($disc_price_with_tax,$curr_sign).\" \".$tax_str;\n\t\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price'] \t= $disc_price;// considering only the discount with out tax //$disc_price_with_tax;\n\t\t\t\t\t\t\tif ($PriceSettings_arr['price_show_yousave']==1)// Check whether you save caption is to be displayed\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_percent'] \t= '';\n\t\t\t\t\t\t\t\tif ($disc_price) // check whether disc_price exists\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$yousave_price \t\t\t\t\t\t\t\t= $webprice - $disc_price;\t\n\t\t\t\t\t\t\t\t\t$price_arr['yousave_price'] \t\t\t\t= $yousave_prefix.\" \".printcurr($yousave_price,$curr_sign).\" \".$yousave_suffix;\n\t\t\t\t\t\t\t\t\t$priceclean_arr['yousave_price'] \t\t\t= printcurr($yousave_price,$curr_sign);\n\t\t\t\t\t\t\t\t\t$priceclearvalonly_arr['yousave_price'] \t= $yousave_price;\n\t\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\t$price_arr['discounted_price'] \t= '';\n\t\t\t\t\t\t\t$price_arr['yousave_price']\t\t= '';\n\t\t\t\t\t\t\t$priceclean_arr['discounted_price'] \t= '';\n\t\t\t\t\t\t\t$priceclean_arr['yousave_price']\t\t= '';\n\t\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price'] \t= '';\n\t\t\t\t\t\t\t$priceclearvalonly_arr['yousave_price'] \t= '';\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 'show_both': // show price value and tax value\n\t\t\t\t\tif ($tax_val>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$tax_str = ' '.$tax_exc_suffix;//$Captions_arr['PRICE_DISPLAY']['TAX_EXC'];//.' '.$tax_name;\n\t\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t\t$price_withtax\t\t\t\t\t\t= $webprice + ($webprice * $tax_val/100);\n\t\t\t\t\t$price_arr['base_price'] \t\t\t= $normal_prefix.\" \".printcurr($price_withtax,$curr_sign).\" \".$normal_suffix;\n\t\t\t\t\t$price_arr['base_price_exc'] \t\t= $normal_prefix.\" \".printcurr($webprice,$curr_sign).\" \".$normal_suffix.\" \".$tax_str;\n\t\t\t\t\t$priceclean_arr['base_price'] \t\t= printcurr($price_withtax,$curr_sign);\n\t\t\t\t\t$priceclean_arr['base_price_exc'] \t= printcurr($webprice,$curr_sign).\" \".$tax_str;\n\t\t\t\t\t$priceclearvalonly_arr['base_price'] \t\t= $webprice; // consider only value with out tax\n\t\t\t\t\t$priceclearvalonly_arr['base_price_exc'] \t= $webprice;\n\t\t\t\t\t$priceclearvalonly_arr['tax_calc_req'] \t\t= 1; // variable to decide whether tax is to be calculated later\n\t\t\t\t\tif ($discount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($disc_asval==1) // If discount is specified as value\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$disc_price \t\t\t= $webprice - $discount; // calculate the original discount\n\t\t\t\t\t\t\tif($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$more_disc\t= ($disc_price * $applicable_disc)/100;\n\t\t\t\t\t\t\t\t$disc_price = $disc_price - $more_disc;\n\t\t\t\t\t\t\t\t$discount\t+= $more_disc;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\tif ($disc_price<0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t= 0;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t $disc = $price_withtax - $disc_price_with_tax;\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t\t\t\t\t\t= $discount_prefix.\" \".printcurr($disc,$curr_sign).\" \".$discount_suffix;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] \t\t\t\t\t= printcurr($disc,$curr_sign);\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t\t= $disc;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t else if($disc_asval==2) // For Exact Discount Price \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$disc_price\t= $prod_arr['product_discount']*$curr_rate; \n\t\t\t\t\t\t\tif($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$more_disc\t= ($disc_price * $applicable_disc)/100;\n\t\t\t\t\t\t\t\t$disc_price = $disc_price - $more_disc;\n\t\t\t\t\t\t\t\t//$discount\t= $webprice - $disc_price;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t$discount_with_tax \t= $price_withtax - $disc_price_with_tax;\n\t\t\t\t\t\t\tif ($disc_price<0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t\t= 0;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val'] = 0;\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] = 0;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_val'] \t\t\t\t\t\t= $discount_prefix.\" \".printcurr($discount_with_tax,$curr_sign).\" \".$discount_suffix;\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_val']\t\t\t \t\t= printcurr($discount_with_tax,$curr_sign);\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_val'] \t\t= $disc_price_with_tax;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\t\n\n\t\t\t\t\t\telse // case if discount is given as percentage\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/*if($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$discount += $applicable_disc;\n\t\t\t\t\t\t\t\tif($discount>100)\n\t\t\t\t\t\t\t\t\t$discount = 100;\n\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t$disc_price \t\t\t\t= $webprice - ($webprice * $discount/100);// calculate the original discount\n if($applicable_disc>0)\n {\n $disc_price = $disc_price - ($disc_price*$applicable_disc/100);\n }\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t\t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t\t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t\t\t\t= $discount_prefix.\" \".remove_Trailing_zeros($discount).\"% \".$discount_suffix;\n\t\t\t\t\t\t\t$priceclean_arr['disc_percent'] \t\t\t\t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_percent'] \t\t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$price_arr['discounted_price'] \t\t\t\t= $offer_prefix.\" \".printcurr($disc_price_with_tax,$curr_sign).\" \".$offer_suffix;\n\t\t\t\t\t\t$price_arr['discounted_price_exc'] \t\t\t= $offer_prefix.\" \".printcurr($disc_price,$curr_sign).\" \".$offer_suffix.\" \".$tax_str;\n\t\t\t\t\t\t$priceclean_arr['discounted_price'] \t\t= printcurr($disc_price_with_tax,$curr_sign);\n\t\t\t\t\t\t$priceclean_arr['discounted_price_exc'] \t= printcurr($disc_price,$curr_sign).\" \".$tax_str;\n\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price'] \t\t= $disc_price; // considering only the value with out tax\n\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price_exc'] \t\t= $disc_price;\n\t\t\t\t\t\tif ($PriceSettings_arr['price_show_yousave']==1 or $override_yousave==true)// Check whether you save caption is to be displayed\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t= '';\n\t\t\t\t\t\t\t$priceclean_arr['disc_percent'] = '';\n\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_percent'] = '';\n\t\t\t\t\t\t\tif ($disc_price) // check whether disc_price exists\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$yousave_price \t\t\t\t\t\t= $webprice - $disc_price;\t\n\t\t\t\t\t\t\t\t$price_arr['yousave_price']\t\t\t= $yousave_prefix.\" \".printcurr($yousave_price,$curr_sign).\" \".$yousave_suffix;\n\t\t\t\t\t\t\t\t$priceclean_arr['yousave_price'] \t= printcurr($yousave_price,$curr_sign);\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['yousave_price'] \t\t= $yousave_price;\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}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif($applicable_disc>0)// case if customer group disc and / or customer direct discount exists. so apply that also\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$discount\t= ($webprice * $applicable_disc)/100;\n\t\t\t\t\t\t\t$disc_price = $webprice - $discount;\n\t\t\t\t\t\t\t$discount\t= $applicable_disc;\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t\t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t\t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t\t\t\t= $discount_prefix.\" \".remove_Trailing_zeros($discount).\"% \".$discount_suffix;\n\t\t\t\t\t\t\t$priceclean_arr['disc_percent'] \t\t\t\t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_percent'] \t\t= remove_Trailing_zeros($discount);\n\t\t\t\t\t\t\t$price_arr['discounted_price'] \t\t\t\t= $offer_prefix.\" \".printcurr($disc_price_with_tax,$curr_sign).\" \".$offer_suffix;\n\t\t\t\t\t\t\t$price_arr['discounted_price_exc'] \t\t\t= $offer_prefix.\" \".printcurr($disc_price,$curr_sign).\" \".$offer_suffix.\" \".$tax_str;\n\t\t\t\t\t\t\t$priceclean_arr['discounted_price'] \t\t= printcurr($disc_price_with_tax,$curr_sign);\n\t\t\t\t\t\t\t$priceclean_arr['discounted_price_exc'] \t= printcurr($disc_price,$curr_sign).\" \".$tax_str;\n\t\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price'] \t\t= $disc_price; // considering only the value with out tax\n\t\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price_exc'] \t\t= $disc_price;\n\t\t\t\t\t\t\tif ($PriceSettings_arr['price_show_yousave']==1)// Check whether you save caption is to be displayed\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$price_arr['disc_percent'] \t\t= '';\n\t\t\t\t\t\t\t\t$priceclean_arr['disc_percent'] = '';\n\t\t\t\t\t\t\t\t$priceclearvalonly_arr['disc_percent'] = '';\n\t\t\t\t\t\t\t\tif ($disc_price) // check whether disc_price exists\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$yousave_price \t\t\t\t\t\t= $webprice - $disc_price;\t\n\t\t\t\t\t\t\t\t\t$price_arr['yousave_price']\t\t\t= $yousave_prefix.\" \".printcurr($yousave_price,$curr_sign).\" \".$yousave_suffix;\n\t\t\t\t\t\t\t\t\t$priceclean_arr['yousave_price'] \t= printcurr($yousave_price,$curr_sign);\n\t\t\t\t\t\t\t\t\t$priceclearvalonly_arr['yousave_price'] \t\t= $yousave_price;\n\t\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\t$price_arr['discounted_price'] \t\t\t\t\t= '';\n\t\t\t\t\t\t\t$price_arr['yousave_price']\t\t\t\t\t\t= '';\n\t\t\t\t\t\t\t$priceclean_arr['discounted_price'] \t\t\t= '';\n\t\t\t\t\t\t\t$priceclean_arr['yousave_price']\t\t\t\t= '';\n\t\t\t\t\t\t\t$priceclearvalonly_arr['discounted_price'] \t\t= '';\n\t\t\t\t\t\t\t$priceclearvalonly_arr['yousave_price'] \t\t= '';\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t};\n\t\t\t//print_r($price_arr);\n\t\t\t$returnval = prepare_price($price_arr,$price_class_arr,$br);\n\t\t\t$retval = $returnval['html'];\n\t\t}\n\t\telse // case of price is not set\n\t\t{\n\t\t\t$noprice = ($prod_arr['price_noprice'])?$prod_arr['price_noprice']:$PriceSettings_arr['price_noprice'];\n\t\t\tif($br==0)// case if no break required is selected\n\t\t\t\t$retval = \"<span class='\".$price_class_arr['normal_class'].\"'>\".$noprice.\"</span>\";\n\t\t\telse // case if break required is selected\n\t\t\t{\n\t\t\t\tif($price_class_arr['ul_class'])// place <ul> only if the class for ul is present\n\t\t\t\t\t$retval = '<ul class=\"'.$price_class_arr['ul_class'].'\">';\n\t\t\t\t$retval .= \"<li class='\".$price_class_arr['normal_class'].\"'>\".$noprice.\"</li>\";\n\t\t\t\tif($price_class_arr['ul_class'])// place </ul> only if the class for ul is present\n\t\t\t\t\t$retval .= \"</ul>\";\n\t\t\t}\t\n\t\t}\t\n\t\tif($priceclean_arr['disc_val']!='')\n\t\t\t$priceclean_arr['disc'] = $priceclean_arr['disc_val'];\n\t\tif($priceclean_arr['disc_percent']!='')\n\t\t\t$priceclean_arr['disc'] = $priceclean_arr['disc_percent'].'%';\n\t\tif($speclretn==1)\n\t\t{\n\t\t\treturn $returnval['values'];\n\t\t}\n\t\telseif($speclretn==2) // case to be used with the variables price (full price show option)\n\t\t{\n\t\t\t$returnval['disc_price_only'] = $webprice; \n\t\t\treturn $returnval['disc_price_only'];\n\t\t}\t\n\t\telseif($speclretn==3) // case if returning each of the prices with prefix and suffix in an associate array\n\t\t{\n\t\t\treturn $price_arr;\n\t\t}\n\t\telseif($speclretn==4) // case of returning prices with out prefix and suffix in an associate array\n\t\t{\n\t\t\treturn $priceclean_arr;\n\t\t}\n\t\telseif($speclretn==5) // case if returning each of the prices with prefix and suffix in an associate array\n\t\t{\n\t\t\t$retvals['prince_without_captions'] \t= $priceclean_arr;\n\t\t\t$retvals['price_with_captions']\t= $price_arr; \n\t\t\treturn $retvals;\n\t\t}\n\t\telseif($speclretn==6) // case of returning prices with out prefix and suffix in an associate array\n\t\t{\n\t\t\treturn $priceclearvalonly_arr;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $retval;\n\t\t}\n\t}", "public function get_prices()\n\t{\n\t\t$product_price_old = 0;\n\t\t$product_price_sale = 0;\n\t\t$price = 0;\n\t\t$eco = 0;\n\t\t$taxes = 0;\n\t\t$dataoc = isset($this->request->post['dataoc']) ? $this->request->post['dataoc'] : '';\n\n\t\tif (!empty($dataoc)) {\n\t\t\t$dataoc = str_replace('&quot;', '\"', $dataoc);\n\t\t\t$json = @json_decode($dataoc, true);\n\t\t\t$product_quantity = isset($json['quantity']) ? $json['quantity'] : 0;\n\t\t\t$product_id_oc = isset($json['product_id_oc']) ? $json['product_id_oc'] : 0;\n\t\t\tif ($product_id_oc == 0) $product_id_oc = isset($json['_product_id_oc']) ? $json['_product_id_oc'] : 0;\n\n\t\t\t// get options\n\t\t\t$options = isset($json['option_oc']) ? $json['option_oc'] : array();\n\t\t\tforeach ($options as $key => $value) {\n\t\t\t\tif ($value == null || empty($value)) unset($options[$key]);\n\t\t\t}\n\n\t\t\t// get all options of product\n\t\t\t$options_temp = $this->get_options_oc($product_id_oc);\n\n\t\t\t// Calc price for ajax\n\t\t\tforeach ($options_temp as $value) {\n\t\t\t\tforeach ($options as $k => $option_val) {\n\t\t\t\t\tif ($k == $value['product_option_id']) {\n\t\t\t\t\t\tif ($value['type'] == 'checkbox' && is_array($option_val) && count($option_val) > 0) {\n\t\t\t\t\t\t\tforeach ($option_val as $val) {\n\t\t\t\t\t\t\t\tforeach ($value['product_option_value'] as $op) {\n\t\t\t\t\t\t\t\t\t// calc price\n\t\t\t\t\t\t\t\t\tif ($val == $op['product_option_value_id']) {\n\t\t\t\t\t\t\t\t\t\tif ($op['price_prefix'] == $this->minus) $price -= isset($op['price_no_tax']) ? $op['price_no_tax'] : 0;\n\t\t\t\t\t\t\t\t\t\telse $price += isset($op['price_no_tax']) ? $op['price_no_tax'] : 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif ($value['type'] == 'radio' || $value['type'] == 'select') {\n\t\t\t\t\t\t\tforeach ($value['product_option_value'] as $op) {\n\t\t\t\t\t\t\t\tif ($option_val == $op['product_option_value_id']) {\n\t\t\t\t\t\t\t\t\tif ($op['price_prefix'] == $this->minus) $price -= isset($op['price_no_tax']) ? $op['price_no_tax'] : 0;\n\t\t\t\t\t\t\t\t\telse $price += isset($op['price_no_tax']) ? $op['price_no_tax'] : 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}\n\t\t\t\t\t\t// the others have not price, so don't need calc\n\t\t\t\t\t}\n\t\t\t\t\t// if not same -> return.\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$product_prices = $this->get_product_price($product_id_oc, $product_quantity);\n\t\t\t$product_price_old = isset($product_prices['price_old']) ? $product_prices['price_old'] : 0;\n\t\t\t$product_price_sale = isset($product_prices['price_sale']) ? $product_prices['price_sale'] : 0;\n\t\t\t$enable_taxes = $this->config->get('tshirtecommerce_allow_taxes');\n\t\t\tif ($enable_taxes === null || $enable_taxes == 1) {\n\t\t\t\t$taxes = isset($product_prices['taxes']) ? $product_prices['taxes'] : 0;\n\t\t\t\t$eco = isset($product_prices['eco']) ? $product_prices['eco'] : 0;\n\t\t\t} else {\n\t\t\t\t$taxes = 0;\n\t\t\t\t$eco = 0;\n\t\t\t}\n\t\t\t\n\t\t} // do nothing when empty/blank\n\n\t\t// return price for ajax\n\t\techo @json_encode(array(\n\t\t\t'price' => $price, \n\t\t\t'price_old' => $product_price_old, \n\t\t\t'price_sale' => $product_price_sale, \n\t\t\t'taxes' => $taxes,\n\t\t\t'eco' => $eco\n\t\t));\n\t\treturn;\n\t}", "static function getSiteMinPrice() {\n return self::getMetaValueRange(PostProperty::META_PRICE);\n }", "public function setPrice(float $price) : void\n {\n $this->set('price', $price, 'products');\n }", "private function mapPrices(ProductInterface $magentoProduct, SkyLinkProduct $skyLinkProduct)\n {\n $magentoProduct->setPrice($skyLinkProduct->getPricingStructure()->getRegularPrice()->toNative());\n\n $magentoProduct->unsetData('special_price');\n $magentoProduct->unsetData('special_from_date');\n $magentoProduct->unsetData('special_to_date');\n\n if (false === $skyLinkProduct->getPricingStructure()->hasSpecialPrice()) {\n $this->removeSpecialPrices($magentoProduct);\n return;\n }\n\n $skyLinkSpecialPrice = $skyLinkProduct->getPricingStructure()->getSpecialPrice();\n\n // If the end date is before now, we do not need to put a new special price on at all, as\n // it cannot end in the past. In fact, Magento will let you save it, but won't let\n // subsequent saves from the admin interface occur.\n $now = new DateTimeImmutable();\n if ($skyLinkSpecialPrice->hasEndDate() && $skyLinkSpecialPrice->getEndDate() < $now) {\n $this->removeSpecialPrices($magentoProduct);\n return;\n }\n\n $magentoProduct->setCustomAttribute('special_price', $skyLinkSpecialPrice->getPrice()->toNative());\n\n // If there's a start date at least now or in the future, we'll use that...\n if ($skyLinkSpecialPrice->hasStartDate() && $skyLinkSpecialPrice->getStartDate() >= $now) {\n $magentoProduct->setCustomAttribute(\n 'special_from_date',\n $this->dateTimeToLocalisedAttributeValue($skyLinkSpecialPrice->getStartDate())\n );\n\n // Otherwise, we'll use a start date from now\n } else {\n $magentoProduct->setCustomAttribute('special_from_date', $this->dateTimeToLocalisedAttributeValue($now));\n }\n\n // If there's an end date, we'll just use that\n if ($skyLinkSpecialPrice->hasEndDate()) {\n $magentoProduct->setCustomAttribute(\n 'special_to_date',\n $this->dateTimeToLocalisedAttributeValue($skyLinkSpecialPrice->getEndDate())\n );\n\n // Otherwise, it's indefinite\n } else {\n $distantFuture = new DateTimeImmutable('2099-01-01');\n $magentoProduct->setCustomAttribute('special_to_date', $this->dateTimeToLocalisedAttributeValue($distantFuture));\n }\n }", "public function testSetPriceProduct()\n {\n $product = new Product();\n $value = 10.99;\n $product->setPrice($value);\n $this->assertEquals($value, $product->getPrice());\n }", "function wc_marketplace_product() {\n global $wmp;\n $wmp->output_report_product();\n }", "function init() {\r\n\r\n\t\t\tadd_filter( 'woocommerce_get_settings_pages', array( &$this, 'settings_tfls' ) );\r\n\r\n\t\t\t// Add wholesale price field to product\r\n\t\t\tadd_action( 'woocommerce_product_options_general_product_data', array(\r\n\t\t\t\t&$this,\r\n\t\t\t\t'product_options_wholesale_price'\r\n\t\t\t));\r\n\r\n\t\t\t// Save wholesale prices\r\n\t\t\tadd_action( 'woocommerce_process_product_meta', array(\r\n\t\t\t\t&$this,\r\n\t\t\t\t'process_product_simple_wholesale_price'\r\n\t\t\t));\r\n\r\n\t\t\t// Add international and wholesale prices to products\r\n\t\t\tadd_action( 'woocommerce_product_options_general_product_data', array(\r\n\t\t\t\t&$this,\r\n\t\t\t\t'product_options_countries_prices'\r\n\t\t\t) );\r\n\r\n\t\t\tadd_action( 'woocommerce_process_product_meta_simple', array(\r\n\t\t\t\t&$this,\r\n\t\t\t\t'process_product_simple_countries_prices'\r\n\t\t\t) );\r\n\r\n\t\t\tif ( WC()->version < '2.3' ) {\r\n\t\t\t\t//Deprecated\r\n\t\t\t\tadd_action( 'woocommerce_product_after_variable_attributes', array(\r\n\t\t\t\t\t&$this,\r\n\t\t\t\t\t'product_variable_attributes_countries_prices_wc2_2'\r\n\t\t\t\t), 10, 3 );\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tadd_action( 'woocommerce_product_after_variable_attributes', array(\r\n\t\t\t\t\t&$this,\r\n\t\t\t\t\t'product_variable_attributes_countries_prices'\r\n\t\t\t\t), 10, 3 );\r\n\t\t\t}\r\n\r\n\r\n\t\t\tadd_action( 'woocommerce_process_product_meta_variable', array(\r\n\t\t\t\t&$this,\r\n\t\t\t\t'process_product_variable_countries_prices'\r\n\t\t\t) );\r\n\r\n\t\t\tadd_action( 'woocommerce_save_product_variation', array(\r\n\t\t\t\t&$this,\r\n\t\t\t\t'save_product_variation_countries_prices'\r\n\t\t\t), 10, 2 );\r\n\r\n\t\t\tadd_filter( 'woocommerce_currency', array( &$this, 'order_currency' ) );\r\n\r\n\t\t\tadd_action( 'admin_notices', array( &$this, 'check_database_file' ) );\r\n\r\n\t\t}", "public function getPrices()\n {\n }", "function process_product_variable_countries_prices( $post_id ) {\r\n\r\n\t\t}", "public function getComparePrice($productId) {\n $productCollection = Mage::getModel ( static::CAT_PRO )->getCollection ()->addAttributeToSelect ( '*' )->addAttributeToFilter ( 'is_assign_product', array (\n 'eq' => 1 \n ) )->addAttributeToFilter ( static::STATUS, array (\n 'eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED \n ) );\n \n $productCollection->addFieldToFilter ( 'assign_product_id', array (\n 'eq' => $productId \n ) );\n $productCollection->setOrder ( 'price', 'ASC' );\n return $productCollection;\n }", "function ppom_get_product_price( $product ) {\n\t\n\t$product_price = $product->get_price();\n\t\n\tif( has_filter('woocs_exchange_value') ) {\n\t\tglobal $WOOCS;\n\t\t\n\t\tif($WOOCS->current_currency != $WOOCS->default_currency ) {\n\t\t\tif($WOOCS->is_multiple_allowed) {\n\t\t\t\t$product_price = apply_filters('woocs_raw_woocommerce_price', $product_price);\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$product_price = apply_filters('woocs_exchange_value', $product_price);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn apply_filters('ppom_product_price', $product_price, $product);\n}", "function calculatePrice( &$item ) {\r\n\t\r\n\tglobal $db, $site;\r\n\t\r\n\t$resultPrice = $basePrice = $item['price'];\r\n\t\r\n\t$pricing = $db->getAll( 'select * from '. ATTRPRICING_TABLE.\" where product_id='$item[id]' and site_key='$site'\" );\r\n\t\r\n\tforeach ( $pricing as $pidx=>$price ) {\r\n\t\t\r\n\t\t$match = true;\r\n\t\t\r\n\t\tif ( $item['attributes'] )\r\n\t\tforeach( $item['attributes'] as $attr_id=>$attr ) {\r\n\t\t\t\r\n\t\t\t$values = $db->getRow( 'select value1, value2 from '. ATTRPRICEVALUES_TABLE.\" where price_id='$price[id]' and attr_id='$attr_id'\" );\r\n\t\t\t\r\n\t\t\tif ( !$values )\r\n\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t$value1 = $values['value1'];\r\n\t\t\t$value2 = $values['value2'];\r\n\t\t\t$value = $attr['value'];\r\n\t\t\r\n\t\t\tswitch( $attr['type'] ) {\r\n\t\t\t\tcase 'number':\r\n/*\t\t\t\t\tif ( strlen( $value1 ) )\r\n\t\t\t\t\t\t$match &= $value >= $value1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ( strlen( $value2 ) )\r\n\t\t\t\t\t\t$match &= $value <= $value2;\r\n\t\t\t\t\tbreak;\r\n*/\t\t\t\t\t\r\n\t\t\t\tcase 'single-text':\r\n\t\t\t\tcase 'multi-text':\r\n\t\t\t\tcase 'date':\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$match &= $value == $value1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ( $match ) {\r\n\t\t\t$resultPrice = getPriceValue( $price, $basePrice );\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $resultPrice;\r\n\t\r\n}", "function setSyncProdWeight()\n {\n }", "function generate_price_refined($prod_arr,$row_price,$row_settings,$tax_val,$return_price_withouttax=0)\n\t{\n\t\tglobal $db,$ecom_siteid,$ecom_allpricewithtax;\n\t\t\n\t\t$webprice \t\t\t= $prod_arr['product_webprice'];\n\t\t$disc_asval\t\t\t= $prod_arr['product_discount_enteredasval'];\n\t\t$tax_before_disc\t= $row_settings['saletax_before_discount'];\n\t\t$discount\t\t\t= 0;\n\t\t$additional_price = 0;\n\t\tif($prod_arr['cur_var_value_id'] and $prod_arr['product_variablecomboprice_allowed']=='N')\n\t\t{\n\t\t\t$additional_price = calculat_special_price_new($prod_arr);\n\t\t\n\t\t\t$webprice = $webprice + $additional_price; // done to add the additional price for variable for special cases\n\t\t}\t\n\t\t\n\t\tif($prod_arr['product_discount']>0)\n\t\t{\n\t\t\tif($disc_asval==2) // For Exact Discount Price \n\t\t\t\t$discount\t= $webprice-($prod_arr['product_discount']+$additional_price); \t\n\t\t\telse\n\t\t\t\t$discount\t= $prod_arr['product_discount'];\n\t\t}\n\t\t//if($ecom_siteid==70 or $ecom_siteid==104) // bypassed tax calculation for nationwide fireextinguisher and discount mobility\n\t\t\n\t\tif($ecom_siteid==104) // bypassed tax calculation for discount mobility and puregusto\n\t\t\t$apply_tax = 'Y';\n\t\telse\t\n\t\t\t$apply_tax\t\t= $prod_arr['product_applytax'];\n\t\t\t\n\t\t\n\t\tif($return_price_withouttax==1)\n\t\t{\n\t\t\t$apply_tax = 'N';\n\t\t}\n\t\t\n\t\t\t\t\t\n\t\t/*switch($row_price['price_displaytype'])\n\t\t{\n\t\t\tcase 'show_price_only':\t\t\t\t\t\n\t\t\tcase 'show_price_plus_tax':\n\t\t\t\tif($discount>0)\n\t\t\t\t{\n\t\t\t\t\tif($disc_asval==1) // If discount is specified as value\n\t\t\t\t\t{\n\t\t\t\t\t\t$disc_price = $webprice - $discount;\n\t\t\t\t\t}\t\n\t\t\t\t\telse if($disc_asval==2) \n\t\t\t\t\t{ // For Exact Discount Price \n\t\t\t\t\t\t$disc_price\t= $webprice-$discount; \t// For Exact Discount Price \n\t\t\t\t\t}\t\n\t\t\t\t\telse // case if discount is given as percentage\n\t\t\t\t\t{\n\t\t\t\t\t\t$disc_price = $webprice - ($webprice * $discount/100);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\tbreak;\n\t\t\tcase 'show_price_inc_tax': // Show price including tax\n\t\t\tcase 'show_both':*/\n\t\t\t\tif ($apply_tax=='Y' and $ecom_allpricewithtax==0)\t\n\t\t\t\t{\n\t\t\t\t\t$disc_price\t= $webprice + ($webprice * $tax_val/100);\n\t\t\t\t\t$disc_price = sprintf('%0.2f',$disc_price);\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t\t$disc_price = $webprice;\n\t\t\t\tif ($discount>0)\n\t\t\t\t{\n\t\t\t\t\tif($disc_asval==1) // If discount is specified as value\n\t\t\t\t\t{\n\t\t\t\t\t\t$disc_price \t\t\t= $webprice - $discount; // calculate the original discount\n\t\t\t\t\t\tif ($apply_tax=='Y')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\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$disc_price_with_tax = $disc_price;\n\n\t\t\t\t\t}\t\n\t\t\t\t\telse if($disc_asval==2) // For Exact Discount Price \n\t\t\t\t\t{\n\t\t\t\t\t\t$disc_price = $webprice - $discount;\n\t\t\t\t\t\t//$disc_price = $discount;\n\t\t\t\t\t\tif ($apply_tax=='Y')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\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$disc_price_with_tax = $disc_price;\n\t\t\t\t\t}\t\n\t\t\t\t\telse // case if discount is given as percentage\n\t\t\t\t\t{\n\t\t\t\t\t\t$disc_price \t\t\t\t= $webprice - ($webprice * $discount/100);// calculate the original discount\n\t\t\t\t\t\t$disc_price = sprintf('%0.2f',$disc_price);\n\t\t\t\t\t\tif ($apply_tax=='Y')\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($tax_before_disc==1)// case of apply tax before discount\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t\t= $disc_price + ($webprice * $tax_val/100); // apply tax to it\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$disc_price_with_tax \t\t= $disc_price + ($disc_price * $tax_val/100); // apply tax to it\n\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$disc_price_with_tax = $disc_price;\n\t\t\t\t\t}\n\t\t\t\t\t$disc_price = $disc_price_with_tax;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t/*break;\n\t\t};\t*/\n\t\tif($disc_price>0)\n\t\t\treturn $disc_price;\n\t\telse\n\t\t\treturn $webprice;\n\t}", "public function getWebsites()\n {\n if (!is_null($this->_websites)) {\n return $this->_websites;\n }\n $websites = array();\n $websites[0] = array(\n 'name' => $this->__('All Websites'),\n 'currency' => Mage::app()->getBaseCurrencyCode()\n );\n\n if (!Mage::app()->isSingleStoreMode() && !$this->getElement()->getEntityAttribute()->isScopeGlobal()) {\n if ($storeId = $this->getProduct()->getStoreId()) {\n $website = Mage::app()->getStore($storeId)->getWebsite();\n $websites[$website->getId()] = array(\n 'name' => $website->getName(),\n 'currency' => $website->getConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE),\n );\n } else {\n foreach (Mage::app()->getWebsites() as $website) {\n if (!in_array($website->getId(), $this->getProduct()->getWebsiteIds())) {\n continue;\n }\n $websites[$website->getId()] = array(\n 'name' => $website->getName(),\n 'currency' => $website->getConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE),\n );\n }\n }\n }\n $this->_websites = $websites;\n return $this->_websites;\n }", "public function the_item_price($product_id){\n\t\treturn get_post_meta($product_id, \"_lms_price\", true);\n\t}", "protected function setPricing($display) {\r\n\t\t\tswitch($display) {\r\n\t\t\t\tcase 0 : $this->_pricing = 'emptyStore';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1 : $this->_pricing = 'newStore';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2 : $this->_pricing = 'greenStore';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3 : $this->_pricing = 'completeStore';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault: $this->_pricing = 'emptyStore';\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}", "public function getProductPrice(){\n return $this->product_price;\n }", "public function setPrice($price)\n {\n $this->price = $price;\n }", "public function setPricecomparisonProductView(Varien_Event_Observer $observer)\n\t{\n\t\t$helper = Mage::helper('pricecomparison');\n\t\t$product = $observer->getEvent()->getProduct();\n\t\t$productId = $product->getId();\n\t\t$cookieKey = $helper->getCookieKey();\n\t\t\n\t\t$pcsCookie = Mage::getModel('core/cookie')->get($cookieKey);\n\t\t$pcsId = Mage::app()->getRequest()->getParam('pcs', false);\n\t\t\n\t\tif ($pcsId) {\n\t\t\t$helper->captureReferral($pcsId, $productId, $cookieKey);\n\t\t\t\n\t\t\tif ($pcsPrice = $product->getData($pcsId)) {\n\t\t\t\t$product->setFinalPrice($pcsPrice);\n\t\t\t}\n\t\t}\n\t\telse if ($pcsCookie) {\n\t\t\t$cookieData = explode('|', $pcsCookie);\n\t\t\t$pcsId = $cookieData[0];\n\t\t\t$pcsProductId = $cookieData[1];\n\t\t\t\n\t\t\tif ($pcsProductId !== $productId) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif ($pcsPrice = $product->getData($pcsId)) {\n\t\t\t\t$product->setFinalPrice($pcsPrice);\n\t\t\t}\n\t\t}\n\t}", "public function getPriceMode();", "function es_product_bulk_price($price, $quantity, $sku) {\n\t/*\n\t* PUB41 - Your child’s first year at school Bulk discount\n\t* For orders of x >= 20 $12.95, x >= 50 $9.90\n\t*/\n\tif ($sku == 'PUB41') {\n\t\tif ($quantity >= 20 AND $quantity < 50) {\n\t\t\t$price = 12.95;\n\t\t}\n\t\telseif ($quantity >= 50) {\n\t\t\t$price = 9.95;\n\t\t}\n\t}\n\telseif($sku == 'SUND507') {\n\t\tif ($quantity >= 3)\n\t\t\t$price = 10.95;\n\t}\n\telseif($sku == 'SUND621') {\n\t\tif ($quantity >= 3)\n\t\t\t$price = 16.95;\n\t}\n\telseif($sku == 'SUND620') {\n\t\tif ($quantity >= 5)\n\t\t\t$price = 14.95;\n\t}\n\t\n\treturn $price;\n}", "public function getPriceNet();", "public function getPriceModel()\n {\n return Mage::getSingleton('catalog/product_type')->priceFactory($this->getTypeId());\n }", "function product_variable_attributes_countries_prices_wc2_2( $loop, $variation_data, $variation ) {\r\n\r\n\t\t\tif ( count( TFLS()->get_regions() ) ) {\r\n\r\n\t\t\t\t?>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\"2\"><strong>Price Based on Country<strong></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<?php\r\n\r\n\t\t\t\tforeach ( TFLS()->get_regions() as $key => $value ) {\r\n\r\n\t\t\t\t\t$placeholder = ( $value['empty_price_method'] == 'exchange_rate' ? __( 'Apply a exchange rate' ) : '' );\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\"2\"><?php echo __( 'Price for', 'woocommerce-tfls' ) . ' ' . $value['name']; ?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<?php\r\n\r\n\t\t\t\t\t\t\t$id = '_' . $key . '_variable_price';\r\n\r\n\t\t\t\t\t\t\t$price = wc_format_localized_price( isset( $variation_data[ $id ] ) ? esc_attr( $variation_data[ $id ][0] ) : '' );\r\n\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t<label><?php echo __( 'Regular Price', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol( $value['currency'] ) . ')'; ?></label>\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"<?php echo $id . '[' . $loop . ']'; ?>\"\r\n\t\t\t\t\t\t\t value=\"<?php echo $price; ?>\" class=\"wc_input_price\"\r\n\t\t\t\t\t\t\t placeholder=\"<?php echo $placeholder; ?>\"/>\r\n\t\t\t\t\t\t</td>\r\n\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<?php\r\n\r\n\t\t\t\t\t\t\t$id = '_' . $key . '_variable_sale_price';\r\n\r\n\t\t\t\t\t\t\t$price = wc_format_localized_price( isset( $variation_data[ $id ] ) ? esc_attr( $variation_data[ $id ][0] ) : '' );\r\n\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t<label><?php echo __( 'Sale Price', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol( $value['currency'] ) . ')'; ?></label>\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"<?php echo $id . '[' . $loop . ']'; ?>\"\r\n\t\t\t\t\t\t\t value=\"<?php echo $price; ?>\" class=\"wc_input_price\"/>\r\n\t\t\t\t\t\t</td>\r\n\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<?php\r\n\r\n\t\t\t\t\t\t\t$id = '_' . $key . '_variable_wholesale_price';\r\n\r\n\t\t\t\t\t\t\t$price = wc_format_localized_price( usset( $variation_data[$id] ) ? esc_attr( $variation_data[$id][0] ) : '' );\r\n\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t<label><?php echo __( 'Wholesale Price', 'woocommerce' ) . ' )' . get_woocommerce_currency_symbol( $value['currency'] ) . ')'; ?></label>\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"<?php echo $id . '[' . $loop .']'; ?>\" value=\"<?php echo $price; ?>\" class=\"wc_input_price\" />\r\n\t\t\t\t\t\t</td>\r\n\r\n\t\t\t\t\t</tr>\r\n\r\n\t\t\t\t<?php\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}", "public function setPricing($id_ressource, $id_pricing, $price_day, $price_night, $price_we){\n\t\t\n\t\tif ($this->isPricing($id_ressource, $id_pricing)){\n\t\t\t$this->editPricing($id_ressource, $id_pricing, $price_day, $price_night, $price_we);\n\t\t}\n\t\telse{\n\t\t\t$this->addPricing($id_ressource, $id_pricing, $price_day, $price_night, $price_we);\n\t\t}\n\t}", "public function setOptions_values_price( $options_values_price ) {\n\t\t$this->options_values_price = $options_values_price;\n\t}", "protected function priceUsedDefault()\n {\n $scope = (int)$this->scopeConfig->getValue(\n \\Magento\\Store\\Model\\Store::XML_PATH_PRICE_SCOPE,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n if ($scope == \\Magento\\Store\\Model\\Store::PRICE_SCOPE_WEBSITE && $this->locator->getProduct()->getStoreId()) {\n $linkPricePath = $this->arrayManager->findPath('container_link_price', $this->meta, null, 'children');\n $checkboxPath = $linkPricePath . '/children/use_default_price/arguments/data/config';\n $useDefaultConfig = [\n 'componentType' => Form\\Element\\Checkbox::NAME,\n 'formElement' => Form\\Field::NAME,\n 'component' => 'Magento_Downloadable/js/components/use-price-default-handler',\n 'description' => __('Use Default Value'),\n 'dataScope' => 'use_default_price',\n 'valueMap' => [\n 'false' => '0',\n 'true' => '1',\n ],\n 'imports' => [\n 'linksPurchasedSeparately' => '${$.provider}:data.product.links_purchased_separately',\n ],\n ];\n $this->meta = $this->arrayManager->set($checkboxPath, $this->meta, $useDefaultConfig);\n }\n\n return $this;\n }", "public function pricing() { \n $data['page'] = 'Pricing';\n $data['page_title'] = 'Pricing';\n $data['page_module'] = 'setting';\n $price_list= $this->Setting_Model-> getPurchaseTransactionById($this->session->userdata('user_id'));\n for($i=0;$i<count($price_list);$i++){\n\t\t\tif($price_list[$i]->stock_group_id == 3){\n\t\t\t\tif($price_list[$i]->category_id == 13){\n\t\t\t\t\t$price_list[$i]->product_name = $this->Masterdata_Model->getFarmImplementsModelById($price_list[$i]->sub_category_id, $price_list[$i]->product_id)->name.\" - \".$price_list[$i]->classification;\n\t\t\t\t} else {\n\t\t\t\t\t$price_list[$i]->product_name = $this->Masterdata_Model->getProductByCategoryAndSubcategory($price_list[$i]->category_id, $price_list[$i]->sub_category_id, $price_list[$i]->product_id)->name.\" - \".$price_list[$i]->classification;\n\t\t\t\t}\t\t\t\t\n\t\t\t} else if($price_list[$i]->stock_group_id == 2){\n $price_list[$i]->product_name = $this->Masterdata_Model->cropNameById($price_list[$i]->category_id, $price_list[$i]->sub_category_id, $price_list[$i]->product_id)->name.\" - \".$price_list[$i]->classification;\n\t\t\t} else {\t\t\t\t\t\t\t\t\n\t\t\t\tif($price_list[$i]->category_id == 3 || $price_list[$i]->category_id == 4 || $price_list[$i]->category_id == 5){\n\t\t\t\t\t$price_list[$i]->product_name = $this->Masterdata_Model->brandListBySuppliersById($price_list[$i]->category_id, $price_list[$i]->sub_category_id, $price_list[$i]->product_id)->name.\" - \".$price_list[$i]->classification;\n\t\t\t\t} else {\n\t\t\t\t\t$price_list[$i]->product_name = $this->Masterdata_Model->getProductByCategoryAndSubcategory($price_list[$i]->category_id, $price_list[$i]->sub_category_id, $price_list[$i]->product_id)->name.\" - \".$price_list[$i]->classification;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n $data['price_list']=$price_list;\n $this->load->view('setting/pricinglist', $data); \t \n\t}", "public function setPriceAttribute($value)\n {\n if ( ! is_array($value)) {\n return;\n }\n foreach ($value as $currency => $price) {\n ProductPrice::updateOrCreate([\n 'product_id' => $this->id,\n 'currency_id' => Currency::where('code', $currency)->firstOrFail()->id,\n ], [\n 'price' => $price,\n ]);\n }\n }", "function es_save_custom_quickedit_product( $product ) {\n\tif ( isset( $_REQUEST['member_price'] ) AND ! empty( $_REQUEST['member_price'] ) ) {\n\t\tupdate_post_meta( $product->id, 'member_price', wc_clean( $_REQUEST['member_price'] ) );\n\t}\n\telse \n\t\tdelete_post_meta( $product->id, 'member_price' );\n}", "public function applyCartDiscount(Varien_Event_Observer $observer)\n { \n try\n { \n $bundle_product_ids = [];\n $quote_product_ids = [];\n $cookieValue = Mage::getModel('core/cookie')->get('ivid');\n $userBundleCollection = Mage::getModel('increasingly_analytics/bundle')->getCollection()->addFieldToFilter('increasingly_visitor_id',$cookieValue);\n $items = $observer->getEvent()->getQuote()->getAllItems();\n $eligibleProducts = [];\n $discount = 0;\n foreach ($items as $item) {\n array_push($quote_product_ids, $item->getProductId());\n }\n foreach ($userBundleCollection as $bundle) {\n //First Bundle products\n $bundle_product_ids = explode(',', $bundle->getProductIds()); \n $productsIds = array_intersect($quote_product_ids, $bundle_product_ids);\n if(count($productsIds) == count($bundle_product_ids) )\n $discount += $bundle->getDiscountPrice();\n }\n\n if($discount > 0){\n $quote=$observer->getEvent()->getQuote();\n $quoteid=$quote->getId();\n $discountAmount=$discount;\n if($quoteid) { \n if($discountAmount>0) {\n $total=$quote->getBaseSubtotal();\n $quote->setSubtotal(0);\n $quote->setBaseSubtotal(0);\n\n $quote->setSubtotalWithDiscount(0);\n $quote->setBaseSubtotalWithDiscount(0);\n\n $quote->setGrandTotal(0);\n $quote->setBaseGrandTotal(0);\n \n\n $canAddItems = $quote->isVirtual()? ('billing') : ('shipping'); \n foreach ($quote->getAllAddresses() as $address) {\n\n $address->setSubtotal(0);\n $address->setBaseSubtotal(0);\n\n $address->setGrandTotal(0);\n $address->setBaseGrandTotal(0);\n\n $address->collectTotals();\n\n $quote->setSubtotal((float) $quote->getSubtotal() + $address->getSubtotal());\n $quote->setBaseSubtotal((float) $quote->getBaseSubtotal() + $address->getBaseSubtotal());\n\n $quote->setSubtotalWithDiscount(\n (float) $quote->getSubtotalWithDiscount() + $address->getSubtotalWithDiscount()\n );\n $quote->setBaseSubtotalWithDiscount(\n (float) $quote->getBaseSubtotalWithDiscount() + $address->getBaseSubtotalWithDiscount()\n );\n\n $quote->setGrandTotal((float) $quote->getGrandTotal() + $address->getGrandTotal());\n $quote->setBaseGrandTotal((float) $quote->getBaseGrandTotal() + $address->getBaseGrandTotal());\n\n $quote ->save(); \n\n $quote->setGrandTotal($quote->getBaseSubtotal()-$discountAmount)\n ->setBaseGrandTotal($quote->getBaseSubtotal()-$discountAmount)\n ->setSubtotalWithDiscount($quote->getBaseSubtotal()-$discountAmount)\n ->setBaseSubtotalWithDiscount($quote->getBaseSubtotal()-$discountAmount)\n ->save(); \n\n\n if($address->getAddressType()==$canAddItems) {\n //echo $address->setDiscountAmount; exit;\n $address->setSubtotalWithDiscount((float) $address->getSubtotalWithDiscount()-$discountAmount);\n $address->setGrandTotal((float) $address->getGrandTotal()-$discountAmount);\n $address->setBaseSubtotalWithDiscount((float) $address->getBaseSubtotalWithDiscount()-$discountAmount);\n $address->setBaseGrandTotal((float) $address->getBaseGrandTotal()-$discountAmount);\n if($address->getDiscountDescription()){\n $address->setDiscountAmount(-($address->getDiscountAmount()-$discountAmount));\n $address->setDiscountDescription($address->getDiscountDescription().', Custom Discount');\n $address->setBaseDiscountAmount(-($address->getBaseDiscountAmount()-$discountAmount));\n }else {\n $address->setDiscountAmount(-($discountAmount));\n $address->setDiscountDescription('Custom Discount');\n $address->setBaseDiscountAmount(-($discountAmount));\n }\n $address->save();\n }//end: if\n } //end: foreach\n //echo $quote->getGrandTotal();\n\n foreach($quote->getAllItems() as $item){\n //We apply discount amount based on the ratio between the GrandTotal and the RowTotal\n $rat=$item->getPriceInclTax()/$total;\n $ratdisc=$discountAmount*$rat;\n $item->setDiscountAmount(($item->getDiscountAmount()+$ratdisc) * $item->getQty());\n $item->setBaseDiscountAmount(($item->getBaseDiscountAmount()+$ratdisc) * $item->getQty())->save(); \n }\n } \n }\n }\n }\n catch(Exception $e)\n {\n Mage::log(\"Remove from cart tracking - \" . $e->getMessage(), null, 'Increasingly_Analytics.log');\n }\n\n }", "private function __processPrice($domains)\r\n\t{\r\n\t\t$rupiah = $this->__getRupiah();\r\n\t\tif (!empty($this->data['price_add'][$domains['tld']])) {\r\n\t\t\t$domains['price'] = (float)$domains['price'] + (float)$this->data['price_add'][$domains['tld']];\r\n\t\t}\r\n\r\n\t\t$domains['price'] = (float)$domains['price'] * (float)$rupiah['usd']['buy'];\r\n\t\treturn number_format($domains['price'], 2);\r\n\t}", "protected function _setCollection(){\n $storeId = Mage::app()->getStore()->getId();\n $products = Mage::getResourceModel('reports/product_collection')\n ->addOrderedQty()\n ->addAttributeToSelect(array('name', 'price', 'small_image', 'short_description', 'description'))\n ->setStoreId($storeId)\n ->addStoreFilter($storeId)\n ->setPageSize($this->getProductsCount())\n ->setOrder('ordered_qty', 'desc');\n\n Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);\n Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);\n\n $this->_topsellerCollection = $products;\n }", "protected function _getProductCollection(){\n \n\n $cpBlock = $this->getLayout()->getBlockSingleton('Mage_Catalog_Block_Product_List_Toolbar');\n//echo //getCurrentMode();\n\nif( $_REQUEST['mode']!='grid' ) {\n\n \n $this->_itemPerPage = Mage::getStoreConfig('catalog/frontend/list_per_page_values');\n \n \n}\nelse {\n $this->_itemPerPage = Mage::getStoreConfig('catalog/frontend/grid_per_page');\n} \n\nif($_REQUEST['limit']!='')\n{\n \n $this->_itemPerPage = $_REQUEST['limit'];\n \n}\nif( $_REQUEST['mode']=='grid' && $_REQUEST['limit']!='') {\n \n\n if(!in_array($this->_itemPerPage,explode(\",\",Mage::getStoreConfig('catalog/frontend/grid_per_page_values'))))\n {\n \n $new_size = explode(\",\",Mage::getStoreConfig('catalog/frontend/grid_per_page_values'));\n $sizes = $new_size[0];\n $this->_itemPerPage = $sizes; \n }\n\n}else\n{\n if(!in_array($this->_itemPerPage,explode(\",\",Mage::getStoreConfig('catalog/frontend/list_per_page_values'))))\n {\n \n $new_size = explode(\",\",Mage::getStoreConfig('catalog/frontend/list_per_page_values'));\n $sizes = $new_size[0];\n $this->_itemPerPage = $cpBlock->getLimit(); \n }\n\n}\n\nif( $_REQUEST['mode']!='grid' && $_REQUEST['limit']=='') {\n \n \n $this->_itemPerPage = $cpBlock->getLimit(); \n \n\n}\n\n$page_id = $this->getRequest()->getParam('id');\n\n$result = Mage::helper('percentagepricing')->getcate_pages($page_id);\n\n\n\n$this->_productCollection = Mage::getModel('catalog/product')->getCollection();\n$this->_productCollection->addAttributeToSelect('*');\nif(count($result) > 0)\n{\nforeach($result as $key => $val)\n{\n if($key == 'category_ids')\n {\n $cate = $val;\n }else\n {\n $val = explode(',',$val);\n $this->_productCollection->addAttributeToFilter($key, array('in' => $val));\n }\n // $this->_productCollection->addFieldToFilter($key,$val);\n \n}\n//$newcates = '';\n//\n//if(count($cate) > 0)\n//{\n// $newcates = $this->getCategories().\",\".$cate; \n// \n//}else\n//{\n// $newcates = $this->getCategories();\n//}\n\nif(count($cate) > 0)\n$this->_productCollection->addCategoriesFilter($cate);\n\n}\n$this->_productCollection->addAttributeToSort($_REQUEST['order'],$_REQUEST['dir']);\n//echo $this->_productCollection->getSelect()->__toString();\n$page = $this->getRequest()->getParam('p');\n if($page) $this->_curPage = $page;\n \n $this->_productCollection->setCurPage($this->_curPage);\n $this->_productCollection->setPageSize($this->_itemPerPage);\n//$this->_productCollection->setPageSize($_REQUEST['limit']);\n//echo $this->_productCollection->getSelect()->__toString();\nreturn $this->_productCollection;\n\n}", "public function getMagentoWebsites();", "public function SetPanelSettings()\r\n\t\t{\r\n\t\t\t$products = $this->getProducts();\r\n\t\t\t$GLOBALS['ProductsOffersList'] = \"\";\r\n\r\n\t\t\t// Should we hide the comparison button?\n\t\t\tif(GetConfig('EnableProductComparisons') == 0 || count($products) < 2) {\n\t\t\t\t$GLOBALS['HideCompareItems'] = \"none\";\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(GetConfig('ShowProductRating') == 0) {\r\n\t\t\t\t$GLOBALS['HideProductRating'] = \"display: none\";\r\n\t\t\t}\r\n\r\n\t\t\t$display_mode = ucfirst(GetConfig(\"CategoryDisplayMode\"));\r\n\t\t\tif ($display_mode == \"Grid\") {\r\n\t\t\t\t$display_mode = \"\";\r\n\t\t\t}\r\n\t\t\t$GLOBALS['DisplayMode'] = $display_mode;\r\n\r\n\t\t\tif ($display_mode == \"List\") {\r\n\t\t\t\tif (GetConfig('ShowAddToCartLink') && count($products) > 0) {\r\n\t\t\t\t\t$GLOBALS['HideAddButton'] = '';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$GLOBALS['HideAddButton'] = 'none';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$GLOBALS['ListJS'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"ListCheckForm\");\r\n\t\t\t}\r\n\r\n\t\t\t$GLOBALS['CompareButton'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CompareButton\" . $display_mode);\r\n\r\n\t\t\tif (GetConfig('CategoryProductsPerPage') > 0) {\n\t\t\t\t$this->_numpages = ceil(count($products) / GetConfig('CategoryProductsPerPage'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_numpages = 0;\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ($display_mode == \"List\" && $this->_numpages > 1) {\r\n\t\t\t\t$GLOBALS['CompareButtonTop'] = $GLOBALS['CompareButton'];\r\n\t\t\t}\r\n\r\n\t\t\t$GLOBALS['AlternateClass'] = '';\r\n\t\t\tforeach($products as $row) {\r\n\t\t\t\t$this->setProductGlobals($row);\r\n\r\n\t\t\t\t// for list style\r\n\t\t\t\tif ($display_mode == \"List\") {\r\n\t\t\t\t\t// get a small chunk of the product description\r\n\t\t\t\t\t$desc = isc_substr(strip_tags($row['proddesc']), 0, 225);\r\n\t\t\t\t\tif (isc_strlen($row['proddesc']) > 225) {\r\n\t\t\t\t\t\t// trim the description back to the last period or space so words aren't cut off\r\n\t\t\t\t\t\t$period_pos = isc_strrpos($desc, \".\");\r\n\t\t\t\t\t\t$space_pos = isc_strrpos($desc, \" \");\r\n\t\t\t\t\t\t// find the character that we should trim back to. -1 on space pos for a space that follows a period, so we dont end up with 4 periods\r\n\t\t\t\t\t\tif ($space_pos - 1 > $period_pos) {\r\n\t\t\t\t\t\t\t$pos = $space_pos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$pos = $period_pos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$desc = isc_substr($desc, 0, $pos);\r\n\t\t\t\t\t\t$desc .= \"...\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$GLOBALS['ProductDescription'] = $desc;\r\n\r\n\t\t\t\t\t$GLOBALS['AddToCartQty'] = \"\";\r\n\r\n\t\t\t\t\tif (CanAddToCart($row) && GetConfig('ShowAddToCartLink')) {\r\n\t\t\t\t\t\tif (isId($row['prodvariationid']) || trim($row['prodconfigfields'])!='' || $row['prodeventdaterequired']) {\r\n\t\t\t\t\t\t\t$GLOBALS['AddToCartQty'] = '<a href=\"' . $GLOBALS[\"ProductURL\"] . '\">' . $GLOBALS['ProductAddText'] . \"</a>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$GLOBALS['CartItemId'] = $GLOBALS['ProductId'];\r\n\t\t\t\t\t\t\t// If we're using a cart quantity drop down, load that\r\n\t\t\t\t\t\t\tif (GetConfig('TagCartQuantityBoxes') == 'dropdown') {\r\n\t\t\t\t\t\t\t\t$GLOBALS['Quantity0'] = \"selected=\\\"selected\\\"\";\r\n\t\t\t\t\t\t\t\t$GLOBALS['QtyOptionZero'] = '<option %%GLOBAL_Quantity0%% value=\"0\">'.GetLang('Quantity').'</option>';\r\n\t\t\t\t\t\t\t\t$GLOBALS['QtySelectStyle'] = 'width: auto;';\r\n\t\t\t\t\t\t\t\t$GLOBALS['AddToCartQty'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CartItemQtySelect\");\r\n\t\t\t\t\t\t\t// Otherwise, load the textbox\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$GLOBALS['ProductQuantity'] = 0;\r\n\t\t\t\t\t\t\t\t$GLOBALS['AddToCartQty'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CartItemQtyText\");\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} // for grid style\r\n\t\t\t\telse {\r\n\t\t\t\t\t$GLOBALS[\"CompareOnSubmit\"] = \"onsubmit=\\\"return compareProducts(config.CompareLink)\\\"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$GLOBALS['ProductsOffersList'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"HomeProductsOfferItem\" . $display_mode);\r\n\t\t\t}\r\n\r\n\t\t\tif(count($products) == 0) {\r\n\t\t\t\t// There are no products in this category\r\n\t\t\t\t$GLOBALS['ProductsOffersList'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CategoryNoProductsMessage\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t// Paging\r\n\t\tif(count($products) <= GetConfig('CategoryProductsPerPage')) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Workout the paging data\n\t\t$GLOBALS['SNIPPETS']['PagingData'] = \"\";\n\t\t\n\t\t$maxPagingLinks = 5;\n\t\tif($GLOBALS['ISC_CLASS_TEMPLATE']->getIsMobileDevice()) {\n\t\t\t$maxPagingLinks = 3;\n\t\t}\n\t\t\n\t\t$start = max($this->_page-$maxPagingLinks,1);\n\t\t$end = min($this->_page+$maxPagingLinks, $this->_numpages);\n\t\t\n\t\t$queryStringAppend = array(\n\t\t\t\t'sort' => $this->_sort,\n\t\t);\n\t\t\n\t\tif(!empty($_GET['price_min'])) {\n\t\t\t$queryStringAppend['price_min'] = (float)$_GET['price_min'];\n\t\t}\n\t\t\n\t\tif(!empty($_GET['price_max'])) {\n\t\t\t$queryStringAppend['price_max'] = (float)$_GET['price_max'];\n\t\t}\n\t\t\n\t\t\n\t\tfor ($page = $start; $page <= $end; $page++) {\n\t\t\tif($page == $this->_page) {\n\t\t\t\t$snippet = \"CategoryPagingItemCurrent\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$snippet = \"CategoryPagingItem\";\n\t\t\t}\n\t\t\n\t\t\t$pageQueryStringAppend = $queryStringAppend;\n\t\t\t$pageQueryStringAppend['page'] = $page;\r\n\t\t\t$GLOBALS['PageLink'] = $this->getPageLink($pageQueryStringAppend);\n\t\t\t$GLOBALS['PageNumber'] = $page;\n\t\t\t$GLOBALS['SNIPPETS']['PagingData'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet($snippet);\n\t\t}\n\t\t\n\t\t// Parse the paging snippet\n\t\tif($this->_page > 1) {\n\t\t\t// Do we need to output a \"Previous\" link?\n\t\t\t$pageQueryStringAppend = $queryStringAppend;\n\t\t\t$pageQueryStringAppend['page'] = $this->_page- 1;\n\t\t\t$GLOBALS['PrevLink'] = $this->getPageLink($pageQueryStringAppend);\n\t\t\t$GLOBALS['SNIPPETS']['CategoryPagingPrevious'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CategoryPagingPrevious\");\n\t\t}\n\t\t\n\t\tif($this->_page < $this->_numpages) {\n\t\t\t// Do we need to output a \"Next\" link?\n\t\t\t$pageQueryStringAppend = $queryStringAppend;\n\t\t\t$pageQueryStringAppend['page'] = $this->_page + 1;\r\n\t\t\t$GLOBALS['NextLink'] = $this->getPageLink($pageQueryStringAppend);\n\t\t\t$GLOBALS['SNIPPETS']['CategoryPagingNext'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CategoryPagingNext\");\n\t\t}\n\t\t\n\t\t$output = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CategoryPaging\");\n\t\t$output = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseSnippets($output, $GLOBALS['SNIPPETS']);\n\t\t$GLOBALS['SNIPPETS']['CategoryPaging'] = $output;\r\n\t\t}", "public function setMaxPrice($maxPrice);", "public function setSalePriceAttribute($value)\n {\n $this->attributes['sale_price'] = Utils::numbersOnly($value);\n }", "protected function _getCatalogProductPriceData($productIds = null)\n {\n $connection = $this->getConnection();\n $catalogProductIndexPriceSelect = [];\n\n foreach ($this->dimensionCollectionFactory->create() as $dimensions) {\n if (!isset($dimensions[WebsiteDimensionProvider::DIMENSION_NAME]) ||\n $this->websiteId === null ||\n $dimensions[WebsiteDimensionProvider::DIMENSION_NAME]->getValue() === $this->websiteId) {\n $select = $connection->select()->from(\n $this->tableResolver->resolve('catalog_product_index_price', $dimensions),\n ['entity_id', 'customer_group_id', 'website_id', 'min_price']\n );\n if ($productIds) {\n $select->where('entity_id IN (?)', $productIds);\n }\n $catalogProductIndexPriceSelect[] = $select;\n }\n }\n\n $catalogProductIndexPriceUnionSelect = $connection->select()->union($catalogProductIndexPriceSelect);\n\n $result = [];\n foreach ($connection->fetchAll($catalogProductIndexPriceUnionSelect) as $row) {\n $result[$row['website_id']][$row['entity_id']][$row['customer_group_id']] = round($row['min_price'], 2);\n }\n\n return $result;\n }", "protected function _getProductData() {\n\n\n $cat_id = Mage::getModel('catalog/layer')->getCurrentCategory()->getId();\n $category = Mage::getModel('catalog/category')->load($cat_id);\n $data['event'] = 'product';\n\n $finalPrice = $this->getFinalPriceDiscount();\n if($finalPrice):\n $google_tag_params = array();\n $google_tag_params['ecomm_prodid'] = $this->getProduct()->getSku();\n $google_tag_params['name'] = $this->getProduct()->getName();\n $google_tag_params['brand'] = $this->getProduct()->getBrand();\n $google_tag_params['ecomm_pagetype'] = 'product';\n $google_tag_params['ecomm_category'] = $category->getName();\n $google_tag_params['ecomm_totalvalue'] = (float)$this->formatNumber($finalPrice);\n \n $customer = Mage::getSingleton('customer/session');\n if ($customer->getCustomerId()){\n $google_tag_params['user_id'] = (string) $customer->getCustomerId(); \n }\n if($this->IsReturnedCustomer()){\n $google_tag_params['returnCustomer'] = 'true';\n }\n else {\n $google_tag_params['returnCustomer'] = 'false';\n }\n\n $data['google_tag_params'] = $google_tag_params;\n\n /* Facebook Conversion API Code */\n $custom_data = array(\n \"content_name\" => $this->getProduct()->getName(),\n \"content_ids\" => [$this->getProduct()->getSku()],\n \"content_category\" => $category->getName(),\n \"content_type\" => \"product\",\n \"value\" => (float)$this->formatNumber($finalPrice),\n \"currency\" => \"BRL\"\n );\n $this->createFacebookRequest(\"ViewContent\", [], [], $custom_data);\n /* End Facebook Conversion API Code */\n\n endif;\n\n return $data;\n }", "function process_product_simple_wholesale_price( $post_id ) {\r\n\t\t\tupdate_post_meta( $post_id, '_wholesale_price', wc_format_decimal( $_POST['_wholesale_price'] ) );\r\n\t\t}", "private function setStockOptions() {\n // Reset the settings if this is a recrawl\n if ($this->getSaverData()->isRecrawl()) {\n // Set the stock quantity\n $this->product->set_stock_quantity(null);\n\n // Set backorders\n $this->product->set_backorders('no');\n\n // Set the low stock amount if it exists\n $this->product->set_low_stock_amount('');\n }\n\n // If the stock is not managed, set the stock status and stop.\n if (!$this->wcData->isManageStock()) {\n $this->product->set_manage_stock(false);\n $this->product->set_stock_status($this->wcData->getStockStatus());\n return;\n }\n\n // Stock is managed\n $this->product->set_manage_stock(true);\n\n // Set the stock quantity\n $this->product->set_stock_quantity($this->wcData->getStockQuantity());\n\n // Set backorders\n $this->product->set_backorders($this->wcData->getBackorders());\n\n // Set the low stock amount if it exists\n $this->product->set_low_stock_amount($this->wcData->getLowStockAmount());\n }", "public function listProductprices(){\n try{\n $sql = \"Select * from productforsale pr inner join product p on pr.id_product = p.id_product inner join categoryp c on p.id_categoryp = c.id_categoryp inner join medida m on p.product_unid_type = m.medida_id\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $result = $stm->fetchAll();\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), 'Inventory|listProductprices');\n $result = 2;\n }\n\n return $result;\n }", "public function addPriceIndexToProduct($product)\n {\n $websiteId = $product->getStore()->getWebsiteId();\n $groupId = Mage::getSingleton('customer/session')\n ->getCustomerGroupId();\n $prices = $this->_getResource()\n ->loadPriceIndex($product->getId(), $websiteId, $groupId);\n if (isset($prices[$product->getId()])) {\n $product->setData('_price_index', true)\n ->setData('_price_index_min_price', $prices[$product->getId()]['min_price'])\n ->setData('_price_index_max_price', $prices[$product->getId()]['max_price']);\n }\n return $this;\n }", "public static function init() {\r\n\t\tif( class_exists( 'WC_Name_Your_Price_Helpers' ) ) {\r\n\t\t\tadd_filter( 'woocommerce_cart_id', array( __CLASS__, 'force_sold_individually' ), 10, 5 );\r\n\t\t}\r\n\t}", "public function testCustomerSystemAttributePerWebsite(): void\n {\n $systemAttributeCode = 'taxvat';\n $entityType = CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER;\n $currentStore = $this->storeManager->getStore();\n $config = Bootstrap::getObjectManager()->get(Config::class);\n\n $attribute = $config->getAttribute($entityType, $systemAttributeCode);\n $attribute->setData('scope_is_visible', '0');\n $attribute->save();\n\n $secondWebsite = $this->storeManager->getWebsite('test');\n $attribute->setWebsite($secondWebsite->getId());\n $attribute->setData('scope_is_visible', '1');\n $attribute->save();\n\n $this->storeManager->setCurrentStore('fixture_second_store');\n $config = Bootstrap::getObjectManager()->create(Config::class);\n $scopeAttribute = $config->getAttribute($entityType, $systemAttributeCode);\n $this->assertEquals(\n 1,\n $scopeAttribute->getData('scope_is_visible'),\n 'Attribute visibility doesn\\'t correspond the scope'\n );\n\n $this->storeManager->setCurrentStore($currentStore);\n $config = Bootstrap::getObjectManager()->create(Config::class);\n $scopeAttribute = $config->getAttribute($entityType, $systemAttributeCode);\n $this->assertEquals(\n 0,\n $scopeAttribute->getData('scope_is_visible'),\n 'Attribute visibility doesn\\'t correspond the scope'\n );\n }", "public function getShowInProduct()\n {\n return Mage::getStoreConfig('splitprice/split_price_presentation/show_product');\n }", "public function setPrice($price)\n {\n return $this->set('price', $price);\n }", "function sale_regular_price_html() {\n\t\t$price = '';\n\t\t\n\t\tif( $this->_apptivo_sale_price <= 0)\n\t\t{\n\t\t\t $price .= 'This product is not ready for sale';\n\t\t\t $price = apply_filters('apptivo_ecommerce_empty_price_html', $price, $this);\n\t\t\t return $price;\t\t\n\t\t}\n\t\t\tif ($this->_apptivo_sale_price) :\n\t\t\t\tif (isset($this->_apptivo_regular_price)) :\n\t\t\t\t if($this->_apptivo_regular_price == '' ) { $this->_apptivo_regular_price = '0.00'; } \t\t\t\t\n\t\t\t\t\t$price .= '<del>'.apptivo_ecommerce_price( $this->_apptivo_regular_price ).'</del> <ins>'.apptivo_ecommerce_price($this->_apptivo_sale_price).'</ins>';\n\t\t\t\t\t$price = apply_filters('apptivo_ecommerce_sale_price_html', $price, $this);\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\telse :\t\n\t\t\t\t $price .= apptivo_ecommerce_price($this->sale_price());\t\t\t\t\t\n\t\t\t\t\t$price = apply_filters('apptivo_ecommerce_price_html', $price, $this);\t\t\t\t\t\n\t\t\t\tendif;\n\t\t\telseif ($this->_apptivo_sale_price === '' ) :\n\t\t\t $price .= 'This product is not ready for sale';\n\t\t\t $price = apply_filters('apptivo_ecommerce_empty_price_html', $price, $this);\t\t\t\t\n\t\t\telseif ($this->_apptivo_sale_price === '0' ) :\t\t\t\n\t\t\t\t$price = __('Free!', 'apptivo_ecommerce'); \n\t\t\t\t$price = apply_filters('apptivo_ecommerce_free_price_html', $price, $this);\n\t\t\t\t\n\t\t\tendif;\n\t\n\t\t\n\t\treturn $price;\n\t}", "static public function adjustLowestPriceForProducts( $items = false, $verbose = false ) {\n\n $items = $items ? $items : WPLA_ListingQueryHelper::getItemsWithMinMaxAndLowestPrice();\n $changed_product_ids = array();\n $repricing_margin = floatval( get_option('wpla_repricing_margin') );\n $lowest_offer_mode = get_option('wpla_repricing_use_lowest_offer',0);\n $repricing_snh_fee = floatval( get_option('wpla_repricing_shipping') ); // shipping and handling\n\n // loop found listings\n foreach ( $items as $item ) {\n\n // make sure there is a product - and min/max prices are set (0 != NULL)\n if ( ! $item->post_id ) continue;\n if ( ! $item->min_price ) continue;\n if ( ! $item->max_price ) continue;\n if ( ! $item->buybox_price && ! $item->compet_price ) continue;\n \n WPLA()->logger->debug( 'adjustLowestPrice for '. $item->sku );\n\n // build target price from BuyBox and/or competitor price\n if ( $item->buybox_price && ! $item->has_buybox ) {\n \n // decide based on uppricing mode\n if ( $lowest_offer_mode && ( $item->buybox_price != $item->compet_price ) ) {\n\n // apply undercut to competitor price - if competitor price is different from BuyBox price\n $target_price = $item->compet_price - $repricing_margin;\n if ( $verbose ) wpla_show_message( $item->sku.': Other seller has BuyBox at '.$item->buybox_price.', lowest offer at '.$item->compet_price.' - your target price: '.$target_price );\n WPLA()->logger->debug( $item->sku.': Other seller has BuyBox at '.$item->buybox_price.', lowest offer at '.$item->compet_price.' - your target price: '.$target_price );\n\n } else {\n\n // apply undercut to BuyBox price - if there is a BuyBox price and it's not the seller's\n $target_price = $item->buybox_price - $repricing_margin;\n if ( $verbose ) wpla_show_message( $item->sku.': Other seller has BuyBox at '.$item->buybox_price.' - your target price: '.$target_price );\n WPLA()->logger->debug( $item->sku.': Other seller has BuyBox at '.$item->buybox_price.' - your target price: '.$target_price );\n\n }\n \n } elseif ( $item->buybox_price && $item->has_buybox && $item->compet_price ) {\n\n // decide based on uppricing mode\n if ( $lowest_offer_mode && ( $item->buybox_price != $item->compet_price ) ) {\n\n // seller has BuyBox and there is competition - apply undercut to competitor price (beta)\n $target_price = $item->compet_price - $repricing_margin;\n if ( $verbose ) wpla_show_message( $item->sku.': You have the BuyBox, but there is a competitor at '.$item->compet_price.' - new target price: '.$target_price );\n WPLA()->logger->debug( $item->sku.': You have the BuyBox, but there is a competitor at '.$item->compet_price.' - new target price: '.$target_price );\n\n } else {\n\n // seller has BuyBox and there is competition - keep price for now\n $target_price = $item->buybox_price;\n if ( $verbose ) wpla_show_message( $item->sku.': You have the BuyBox - keeping current price: '.$target_price );\n WPLA()->logger->debug( $item->sku.': You have the BuyBox - keeping current price: '.$target_price );\n\n }\n\n } elseif ( $item->buybox_price && $item->has_buybox && ! $item->compet_price ) {\n \n // seller has BuyBox and NO competition - fall back to max_price\n $target_price = $item->max_price;\n if ( $verbose ) wpla_show_message( $item->sku.': You have the BuyBox but there is no competitor - falling back to Max Price: '.$target_price );\n WPLA()->logger->debug( $item->sku.': You have the BuyBox but there is no competitor - falling back to Max Price: '.$target_price );\n\n } elseif ( $item->compet_price ) {\n \n $target_price = $item->compet_price - $repricing_margin;\n if ( $verbose ) wpla_show_message( $item->sku.': No BuyBox price - falling back to next competitor at '.$item->compet_price.' - new target price: '.$target_price );\n WPLA()->logger->debug( $item->sku.': No BuyBox price - falling back to next competitor at '.$item->compet_price.' - new target price: '.$target_price );\n\n } else {\n\n $target_price = $item->max_price;\n if ( $verbose ) wpla_show_message( $item->sku.': No BuyBox price, no competitor - falling back to Max Price: '.$target_price );\n WPLA()->logger->debug( $item->sku.': No BuyBox price, no competitor - falling back to Max Price: '.$target_price );\n\n }\n\n $target_price = apply_filters( 'wpla_before_reprice_item', $target_price, $item );\n\n $target_price = round( $target_price, 2 );\n\n\n // update price\n $price_was_changed = self::updateAmazonPrice( $item, $target_price, $verbose );\n if ( $price_was_changed ) {\n $changed_product_ids[] = $item->post_id;\n WPLA()->logger->info('adjustLowestPriceForProducts() - new price for #'.$item->sku.': '.$target_price);\n }\n\n } // foreach item\n\n // echo \"<pre>\";print_r($changed_product_ids);echo\"</pre>\";#die();\n // echo \"<pre>\";print_r($items);echo\"</pre>\";die();\n\n return $changed_product_ids;\n }", "function tep_get_productPrice($product_id){\n\tif ($product_id){\n\t\tglobal $languages_id,$pf;\n\t\t$product_query = tep_db_query(\"select p.products_id,p.products_price,products_discount from \" . TABLE_PRODUCTS . \" p where p.products_id=\".(int)$product_id );\n\t\tif (tep_db_num_rows($product_query)) {\n\t\t\t$product = tep_db_fetch_array($product_query);\n\t\t\t$product_price = $product['products_price'];\n\t\t\t$rata = $product['products_discount'] > 0 ? number_format((1/(1-$product['products_discount']/100)),2,'.','') : PRODUCTS_RATE;//( $product['products_discount'] > 0 )? number_format( (1 - ($product['products_discount'] / 100)) , 2) : PRODUCTS_RATE;\n\t\t\t//$retail_price = $product['products_price'] * PRODUCTS_RATE;// * $rata;//\n\t\t\t//echo $rata;\n\t\t\t$pf -> loadProduct($product['products_id'],$languages_id);\n\t\t\t$result = array();\n\t\t\t$result['rsPrice'] = $pf -> getRetailSinglePrice($rata);\n\t\t\t$result['sPrice'] = $pf -> getSinglePrice();\n\t\t\treturn $result;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}else{\n\t\treturn false;\n\t}\n}", "function column_price($item){\n if ( $item['post_id'] && WPLA_ProductWrapper::hasVariations( $item['post_id'] ) ) {\n\n $variations = $this->getProductVariations( $item['post_id'] );\n if ( ! is_array($variations) || ! sizeof($variations) ) return '';\n\n $price_min = PHP_INT_MAX;\n $price_max = 0;\n foreach ($variations as $var) {\n $price = $var['price'];\n if ( $price > $price_max ) $price_max = $price;\n if ( $price < $price_min ) $price_min = $price;\n }\n\n if ( $price_min == $price_max ) {\n return $this->number_format( $price_min, 2 );\n } else {\n return $this->number_format( $price_min, 2 ) . ' - ' . $this->number_format( $price_max, 2 );\n }\n } // parent variation\n\n\n // get prices\n $regular_price = $this->getPriceForItem( $item );\n $sale_price = $this->getSalePriceForItem( $item );\n\n $profile = $this->getProfile( $item['profile_id'] );\n\n // check for profile prices (standard_price or price) and run the prices through WPLA_FeedDataBuilder::parseProfileShortcode()\n // to substitute shortcodes with actual values #20263\n if ( !empty( $profile->fields['standard_price'] ) ) {\n $price = WPLA_FeedDataBuilder::parseProfileShortcode( $profile->fields['standard_price'], $profile->fields['standard_price'], $item, wc_get_product( $item['post_id'] ), $item['post_id'], $profile );\n return $this->number_format( $price, 2 );\n } elseif ( !empty( $profile->fields['price'] ) ) {\n $price = WPLA_FeedDataBuilder::parseProfileShortcode( $profile->fields['price'], $profile->fields['price'], $item, wc_get_product( $item['post_id'] ), $item['post_id'], $profile );\n return $this->number_format( $price, 2 );\n }\n\n // no sale price\n if ( ! $sale_price )\n return $this->number_format( $regular_price, 2 );\n\n // show sale price\n return sprintf('<span style=\"%1$s\">%2$s</span> <br><span style=\"\">%3$s</span>',\n /*$1%s*/ 'text-decoration: line-through;color:silver',\n /*$2%s*/ $this->number_format( $regular_price, 2 ),\n /*$3%s*/ $this->number_format( $sale_price, 2 )\n ); \n\n }", "function shop_variable_product_price( $price, $product ) {\n\tif( ! is_product() ) :\n\t $variation_min_reg_price \t= $product->get_variation_regular_price('min', true);\n\t $variation_min_sale_price \t= $product->get_variation_sale_price('min', true);\n\t if ( $product->is_on_sale() && ! empty( $variation_min_sale_price ) ) {\n\t if ( ! empty( $variation_min_sale_price ) )\n\t $price = '<ins>' . woocommerce_price($variation_min_sale_price) . '</ins><del>' . woocommerce_price($variation_min_reg_price) . '</del>';\n\t } else {\n\t if( ! empty($variation_min_reg_price ) )\n\t $price = '<ins>'. woocommerce_price( $variation_min_reg_price ) .'</ins>';\n\t else\n\t $price = '<ins>'. woocommerce_price( $product->regular_price ) .'</ins>';\n\t }\n\tendif;\n return $price;\n}", "function setPrice($price, $taxPercentage = 25)\n {\n $this->taxPercentage = $taxPercentage;\n $this->taxA = $price / 100 * 100;\n $this->price = $price;\n }", "public function LoadProductsForPrice()\n\t\t{\n\t\t\t$query = \"\n\t\t\t\tSELECT\n\t\t\t\t\tp.*,\n\t\t\t\t\tFLOOR(prodratingtotal / prodnumratings) AS prodavgrating,\n\t\t\t\t\timageisthumb,\n\t\t\t\t\timagefile,\n\t\t\t\t\t\" . GetProdCustomerGroupPriceSQL() . \"\n\t\t\t\tFROM\n\t\t\t\t\t(\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\tDISTINCT ca.productid,\n\t\t\t\t\t\t\tFLOOR(prodratingtotal / prodnumratings) AS prodavgrating\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t[|PREFIX|]categoryassociations ca\n\t\t\t\t\t\t\tINNER JOIN [|PREFIX|]products p ON p.productid = ca.productid\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tp.prodvisible = 1 AND\n\t\t\t\t\t\t\tca.categoryid IN (\" . $this->GetProductCategoryIds() . \") AND\n\t\t\t\t\t\t\tp.prodcalculatedprice >= '\".(int)$this->GetMinPrice().\"' AND\n\t\t\t\t\t\t\tp.prodcalculatedprice <= '\".(int)$this->GetMaxPrice().\"'\n\t\t\t\t\t\tORDER BY\n\t\t\t\t\t\t\t\" . $this->GetSortField() . \", p.prodname ASC\n\t\t\t\t\t\t\" . $GLOBALS['ISC_CLASS_DB']->AddLimit($this->GetStart(), GetConfig('CategoryProductsPerPage')) . \"\n\t\t\t\t\t) AS ca\n\t\t\t\t\tINNER JOIN [|PREFIX|]products p ON p.productid = ca.productid\n\t\t\t\t\tLEFT JOIN [|PREFIX|]product_images pi ON (pi.imageisthumb = 1 AND p.productid = pi.imageprodid)\n\t\t\t\";\n\n\t\t\t//$query .= $GLOBALS['ISC_CLASS_DB']->AddLimit($this->GetStart(), GetConfig('CategoryProductsPerPage'));\n\t\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\twhile ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\t\t$row['prodavgrating'] = (int)$row['prodavgrating'];\n\t\t\t\t$this->_priceproducts[] = $row;\n\t\t\t}\n\t\t}" ]
[ "0.64156604", "0.61360854", "0.6067605", "0.60607415", "0.5984113", "0.5926932", "0.592599", "0.59089583", "0.58561635", "0.5833393", "0.5816058", "0.5812597", "0.5743408", "0.569839", "0.56597686", "0.56530654", "0.5633322", "0.5620477", "0.55639225", "0.55502", "0.55469126", "0.5522029", "0.5509941", "0.5508293", "0.5505226", "0.5503209", "0.5480876", "0.5476286", "0.5470095", "0.54630625", "0.5462442", "0.54591066", "0.54533887", "0.54507977", "0.5421548", "0.5418922", "0.54132634", "0.54075634", "0.5397552", "0.5384634", "0.5375764", "0.5349808", "0.5347581", "0.5343464", "0.53347075", "0.5328056", "0.532155", "0.53215015", "0.5321135", "0.53175384", "0.5306813", "0.5303104", "0.52943766", "0.5289152", "0.52884907", "0.528743", "0.52749306", "0.52735543", "0.52726936", "0.5269822", "0.52649826", "0.526109", "0.5256326", "0.5255776", "0.5252057", "0.52444357", "0.52426606", "0.52419984", "0.5233521", "0.52313274", "0.52285093", "0.52240515", "0.5220503", "0.5219976", "0.52176696", "0.5215741", "0.52149725", "0.5209158", "0.51905125", "0.51832825", "0.5163233", "0.51612407", "0.5161115", "0.5154376", "0.51532453", "0.5152347", "0.5152239", "0.5150922", "0.5147063", "0.51443887", "0.5143979", "0.5135874", "0.51194227", "0.5112671", "0.5109884", "0.51078755", "0.510076", "0.5099304", "0.5098917", "0.5085101" ]
0.60232365
4
Get always set product name from NAV
public function getAlwaysSetProductNameFromNAV($websiteId = null) { if (!$this->hasAlwaysSetProductNameFromNAV()) { $this->setAlwaysSetProductNameFromNAV($this->config->isAlwaysSetProductNameFromNAV($websiteId)); } return (bool)parent::getAlwaysSetProductNameFromNAV(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProduct_name () {\n\t$preValue = $this->preGetValue(\"product_name\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->product_name;\n\treturn $data;\n}", "public function getProductName(){\n return $this->product_name;\n }", "public function getProductName()\n {\n return $this->product_name;\n }", "public function getProductName()\n {\n return $this->product_name;\n }", "public function getName_product()\n {\n return $this->name_product;\n }", "public function getProductName() {\n //return the value product name\n return $this->ProductName;\n }", "public function getProdName()\n {\n return $this->prod_name;\n }", "public function setItemName()\n {\n if ($product = $this->product) {\n $name = $product->productPrint->name;\n $name = $product->mailingOption->name . ' ' . $name;\n $name = $name . ' ' . $product->stockOption->name;\n $this->name = $name;\n $this->save();\n }\n }", "public function getProdName() {\n return $this->ProductName;\n}", "public function getProductName()\n {\n if (!isset($this->name))\n {\n if (!$this->name = $this->getHelper()->getName($this->getSlug()))\n {\n $this->name = $this->getHelper()->getNameFromPath($this->getPathname());\n }\n }\n\n return $this->name;\n }", "public static function get_name() {\n $type = static::get_type();\n return util::string(\"product:{$type}\");\n }", "public function get_title() {\n return esc_html__( 'Onsale Product', 'Alita-extensions' );\n }", "public function productName(): string\n{\n return $this->get_productName();\n}", "public function getTabTitle()\n {\n return Mage::helper('chirpify_seller')->__('Product');\n }", "public function get_title() {\n return esc_html__( 'Onsale Product', 'electro-extensions' );\n }", "public function getDocumentProductName()\n {\n return (string) $this->document_product_name;\n }", "public function getProductName(): ?string\n {\n return $this->productName;\n }", "public function getProductName(): ?string\n {\n return $this->productName;\n }", "public function getProductName(): ?string\n {\n return $this->productName;\n }", "public function getProdTitle()\n {\n return $this->prod_title;\n }", "public function get_productName(): string\n {\n // $res is a string;\n // $dev is a YDevice;\n if ($this->_cacheExpiration == 0) {\n $dev = $this->_getDev();\n if (!($dev == null)) {\n return $dev->getProductName();\n }\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::PRODUCTNAME_INVALID;\n }\n }\n $res = $this->_productName;\n return $res;\n }", "function GetProductName ( $whichProduct )\n{\n\n\tmysql_select_db ( 'products' );\n\t$query = 'SELECT * FROM products where ID like '.$whichProduct;\n\n\t$result = mysql_query($query );\n\n\tif ( $result )\n\t{\n\t\t$num_results = mysql_num_rows ( $result );\n\t\tif ( $num_results == 1 )\n\t\t{\n\t\t\t$row = mysql_fetch_object ( $result );\n\t\t\t$productName = $row->name;\n\t\t}\n\t\telse\n\t\t\t$productName = 'General';\n\t}\n\n\treturn $productName;\n}", "public function getFullname(): string\n {\n return $this->product->lang->title . ' ' . $this->lang->title;\n }", "function lb_get_seo_title($product) {\n //$price = lb_format_price($product['finalprice'], true, true);\n $price = round((float)$product['finalprice']/100, 0) . ':-';\n \n $seo_title = 'Köp ' . $product['name'] . (isset($product['merchant'])?' från ' . $product['merchant']:'') . ' för ' . $price . (true == (bool)$product['onsale']?' (' . $product['salediscount'] . '% rabatt!)':'');\n \n error_log('lb_get_seo_title - product[finalprice]=' . $product['finalprice'] . ', price=' . $price . ', product: ' . print_r($product, true));\n\n return wpts_spin($seo_title);\n}", "public function getProdName(){\n\t\treturn array_keys($this->_products);\n\t}", "public function getMarket_name () {\n\t$preValue = $this->preGetValue(\"market_name\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->market_name;\n\treturn $data;\n}", "public function setProductName($product_name){\n $this->product_name = $product_name;\n }", "public function getBrand_name () {\n\t$preValue = $this->preGetValue(\"brand_name\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->brand_name;\n\treturn $data;\n}", "public function getName() : string\n {\n return $this->get('name', 'products');\n }", "function setSyncProdName()\n {\n }", "function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}", "public function getShopName()\n {\n return 'oscommerce-2.3.4';\n }", "public function get_name() : array {\n\t\t$name = $this->dom->find( 'h1.product-name' );\n\t\tif ( ! $name ) {\n\t\t\treturn [ 'product_name' => '' ];\n\t\t}\n\n\t\treturn [ 'product_name' => sanitize_text_field( $name[0]->text() ) ];\n\t}", "public function getNombreProducto()\n {\n return $this->nombreProducto;\n }", "public function fullname()\n\t{\n\t\treturn $this->product->name .' - '. $this->name();\n\t}", "public function getProduct() {\n return $this->_registry->registry ( 'current_product' );\n }", "public function getNameBase()\n {\n if ($this->nameBase === false) {\n $this->setNameBase($this->product->getNameBase());\n }\n return $this->nameBase;\n }", "protected function getShopName()\n {\n return $this->shopName;\n }", "public function getProduct()\r\n {\r\n return $this->_params['product'];\r\n }", "public function getStoreFrontName();", "public function website_name(){\r\n\r\n echo ISSET($this->globalSettings->website_name)?$this->globalSettings->website_name:'';\r\n\r\n }", "public function getProduct(){\r\n return Mage::registry('current_product');\r\n }", "function getNombreProducto()\n {\n return $this->NombreProducto;\n }", "function getVendorname(){\r\n return $this->vendorname;\r\n }", "public function getProductIdentifier()\n {\n $value = $this->_config->get('dataprocessing/products/identifier');\n\n if ($value === null) {\n $value = 'sku';\n }\n\n return $value;\n }", "function tep_get_products_name($product_id, $language = '') {\n global $languages_id;\n\n if (empty($language)) $language = $languages_id;\n\n $product_query = tep_db_query(\"select products_name from \" . TABLE_PRODUCTS_DESCRIPTION . \" where products_id = '\" . (int)$product_id . \"' and language_id = '\" . (int)$language . \"'\");\n $product = tep_db_fetch_array($product_query);\n\n return $product['products_name'];\n }", "function getManufacturerTitle() {\n \tif ($this->getManufacturerUid()) {\n \t\treturn $this->conn_db->getManufacturerTitle($this->getManufacturerUid());\n \t}\n \t\n }", "public function getOrderStoreName()\n {\n\n if ($this->getOrder()) {\n\t\t\t\t\n\t\t\t\t$name = array();\n\t\t\t\tif($this->getOrder()->getAmazonOrderId()){\n\t\t\t\t\t$name = array(\n\t\t\t\t\t\tMage::helper('amazonOrders')->__('Imported from Amazon'),\n\t\t\t\t\t\t\"#\" . $this->getOrder()->getAmazonOrderId()\n\t\t\t\t\t);\n\t\t\t\t}\n\n \tif (count($name)) {\n \treturn implode('<br/>', $name);\n \t} else {\n \t\treturn parent::getOrderStoreName();\n \t}\n }\n return null;\n }", "public function getProduct();", "public function getAssignProduct() {\n return $this->scopeConfig->getValue ( static::XML_ASSIGN_PRODUCT, ScopeInterface::SCOPE_STORE );\n }", "protected function getProductName(): ?string\n\t{\n\t\tstatic $cache = [];\n\n\t\t$productId = $this->getProductId();\n\t\tif (!$productId)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!array_key_exists($productId, $cache))\n\t\t{\n\t\t\tLoader::includeModule('iblock');\n\n\t\t\t$row = ElementTable::getRow([\n\t\t\t\t'select' => [\n\t\t\t\t\t'NAME',\n\t\t\t\t],\n\t\t\t\t'filter' => [\n\t\t\t\t\t'=ID' => $productId,\n\t\t\t\t],\n\t\t\t]);\n\t\t\t$cache[$productId] = $row ? (string)$row['NAME'] : null;\n\t\t}\n\n\t\treturn $cache[$productId];\n\t}", "public function getTitle()\n {\n return Mage::helper('ddg')->__(\"Engagement Cloud Account Information\");\n }", "public function getProduct()\n {\n return Mage::registry('current_product');\n }", "public function getProduct() {\n return $this->getValueOrDefault('Product');\n }", "public function get_name()\n\t\t{\n\t\t\treturn \"Item is present/not present in the shopping cart\";\n\t\t}", "public function getShopName()\n {\n return $this->shopName;\n }", "public function getItemName();", "function get_product_name($pid){\n\t\tglobal $connection;\n\t\t\n\t\t\t$query = \"SELECT name FROM products WHERE id=\" .$pid;\n\t\t\t$result = mysql_query($query, $connection);\n\t\t\tconfirm_query($result);\n\t\t\t$row = mysql_fetch_array($result);\n\t\t\n\t\treturn $row['name'];\n\t}", "public function getProduct()\n\t{\n\t\treturn $this->getKeyValue('product'); \n\n\t}", "private function getManufacturer($product)\n { \n $manufacturers= $product->manufacturers;\n\n if(!$manufacturers->isEmpty())\n {\n $manufacturerName=NULL;\n\n foreach ($manufacturers as $manufacturer) {\n\n $manufacturerName .= $manufacturer->manufacturer_name. '+';\n }\n return trim($manufacturerName,'+');\n }\n else\n {\n return NULL;\n }\n }", "public function getProductName($id=''){\r\n if($id != ''){\r\n $res = $this->CI->DatabaseModel->access_database('ts_products','select','',array('prod_id'=>$id));\r\n if(!empty($res)) {\r\n $prodd = $res[0]['prod_urlname'] != '' ? $res[0]['prod_urlname'] : $res[0]['prod_name'] ;\r\n $p = strtolower($prodd);\r\n $p = str_replace(' ','-',$p);\r\n $p = preg_replace('!-+!', '-', $p);\r\n return $p.'/';\r\n }\r\n else {\r\n return '/';\r\n }\r\n }\r\n else {\r\n return '/';\r\n }\r\n die();\r\n\t}", "function productNameHint()\n{\n\t$query = $_POST['query'];\n\t$productManager = new productManager();\n\treturn $productManager->getNameHint($query);\n}", "public function displayName()\n {\n return Settings::get(\n 'octoshop_products_label',\n trans('offline.sitesearch::lang.settings.octoshop_itemurl_badge')\n );\n }", "function title() {\n ?>\n <h2><?php _e(SCLNG_PUBLIC_PRODUCT_INFO, SC_DOMAIN); ?></h2>\n <?php\n }", "function prodname()\r\n {\r\n //left join oc_product as op on opd.product_id=op.product_id \");\r\n\r\n //return $query->rows; \r\n \r\n $query = $this->db->query(\"SELECT product_id,model,sku FROM `oc_product` WHERE `status`='1'\");\r\n \r\n return $query->rows;\r\n }", "public function getProduct_code () {\n\t$preValue = $this->preGetValue(\"product_code\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->product_code;\n\treturn $data;\n}", "function getProductCode()\n {\n return $this->productCode;\n }", "public function getProduct()\n {\n return $this->coreRegistry->registry('product');\n }", "public function getName()\n {\n if (array_key_exists('name', $this->data)) {\n return $this->data['name'];\n }\n\n if ($this->getType() == Reader\\Reader::TYPE_YML) {\n $name = $this->xpath->evaluate('string(/yml_catalog/shop/name)');\n }\n\n if (! $name) {\n $name = null;\n }\n\n $this->data['name'] = $name;\n return $this->data['name'];\n }", "public function actionWalmartproductinfo()\n {\n $sku = false;\n $productdata = \"add sku on url like ?sku=product_sku\";\n if (isset($_GET['sku'])) {\n $sku = $_GET['sku'];\n }\n $merchant_id = MERCHANT_ID;\n $config = Data::getConfiguration($merchant_id);\n $walmartHelper = new Walmartapi($config['consumer_id'], $config['secret_key']);\n if ($sku) {\n $productdata = $walmartHelper->getItem($sku);\n }\n print_r($productdata);\n die;\n }", "public function getProductSKU()\n {\n }", "public function getProduct() {\n return Mage::registry('product');\n }", "public function getFrontendTitle()\n {\n return Mage::getStoreConfig(\"fontis_masterpass/settings/title\");\n }", "function carton_get_formatted_product_name( $product ) {\n\tif ( ! $product || ! is_object( $product ) )\n\t\treturn;\n\n\tif ( $product->get_sku() )\n\t\t$identifier = $product->get_sku();\n\telseif ( $product->is_type( 'variation' ) )\n\t\t$identifier = '#' . $product->variation_id;\n\telse\n\t\t$identifier = '#' . $product->id;\n\n\tif ( $product->is_type( 'variation' ) ) {\n\t\t$attributes = $product->get_variation_attributes();\n\t\t$extra_data = ' &ndash; ' . implode( ', ', $attributes ) . ' &ndash; ' . carton_price( $product->get_price() );\n\t} else {\n\t\t$extra_data = '';\n\t}\n\n\treturn sprintf( __( '%s &ndash; %s%s', 'carton' ), $identifier, $product->get_title(), $extra_data );\n}", "public function getProductOption();", "public function get_name() {\n if(get_config(constants::M_COMPONENT,'customname')){\n return get_config(constants::M_COMPONENT,'customname');\n }else {\n return get_string('pluginname', constants::M_COMPONENT);\n }\n }", "public function getTitle()\n {\n return static::t('Set the sale price');\n }", "public abstract function get_amd_name();", "public function getTitle()\n {\n if ($this->isPermit()) {\n $addresses = $this->getField('objectaddresses');\n if ($addresses != false) {\n $location = $addresses[0]['zipcode'];\n $location .= ' ' . $addresses[0]['addressnumber'];\n $location .= $addresses[0]['addressnumberadditional'];\n $location .= ' ' . $addresses[0]['city'];\n $result = sprintf(\n '%s %s %s',\n $this->getField('producttype'),\n $this->getField('productactivities'),\n $location\n );\n } else {\n $result = sprintf(\n '%s %s',\n $this->getField('producttype'),\n $this->getField('productactivities')\n );\n }\n } else {\n $result = $this->getField('title');\n }\n return $result;\n }", "public function get_name() {\n return 'electro_elementor_product_onsale_block';\n }", "public function getVendorName(): string\n {\n return 'local';\n }", "public function getVendorName(): string;", "public static function getSoftwareName()\n\t\t{\n\t\t\treturn 'Wordpress 3.9.1 en WooCommerce 3.0.0+';\n\t\t}", "public function findNameProd($id){\n return Product::where('id',$id)->first()->name;\n }", "public function getShowInProduct()\n {\n return Mage::getStoreConfig('splitprice/split_price_presentation/show_product');\n }", "public function getProductID()\n {\n }", "public function getTitle()\n {\n return $this->getProduct()->getTitle();\n }", "function getProductuuid()\n {\n return $this->product_uuid;\n }", "public function show_product_name()\n {\n $data['all_value'] = $this->Common_model->get_all_info_orderby('create_product_name',\"record_id\",\"DESC\");\n $result=$this->load->view('admin/show_product_name', $data,true);\n echo $result;\n exit;\n }", "public function getSiteName();", "public function getProduct()\n {\n return Mage::registry('product');\n }", "public function getProduct()\n {\n return Mage::registry('product');\n }", "public function getProduct()\n {\n return Mage::registry('product');\n }", "function GetTitle() {\r\n global $PageTitle;\r\n if (isset($PageTitle)){echo $PageTitle;}else{echo 'BHM Accessories';}\r\n }", "public function code_name()\n {\n $this->from('/')\n ->get('/compraproducto', [\n 'product_code' => '',\n ])\n ->assertRedirect('/')\n ->assertSessionHasErrors(['product_code']);\n }", "protected function getProduct() {\n return $this->registry->registry('product');\n }", "public function getEntityName()\n {\n return CacheKeys::PRODUCT_VARCHAR;\n }", "static function getProductProperty($prob_name,$prod_id, $wid){\n $vdo = vpdo::getVdo(DB_PREFIX.$wid) ;\n return $vdo->fetchOne(\"select ov.name from options o \n inner join options_values ov on o.id = ov.option_id where o.name = ? and product_id = ?\", array($prob_name, $prod_id));\n }", "public function get_name() {\n return 'Alita_elementor_product_onsale_block';\n }", "public function get_title() {\r\n\t\treturn esc_html__( 'Price Plan: 02', 'aapside-master' );\r\n\t}" ]
[ "0.7648904", "0.7456926", "0.73895746", "0.72849447", "0.7252189", "0.7203492", "0.69328845", "0.67816114", "0.6676107", "0.66721725", "0.6520974", "0.6445973", "0.64332193", "0.64125854", "0.6397219", "0.6374378", "0.63495326", "0.63495326", "0.63495326", "0.6338242", "0.6301251", "0.6252254", "0.6210068", "0.61841774", "0.6183187", "0.61761606", "0.6174374", "0.61417866", "0.61295265", "0.61077625", "0.61039746", "0.61026084", "0.60881895", "0.6081934", "0.6080319", "0.6074034", "0.60567516", "0.6054732", "0.60318786", "0.6017074", "0.6015993", "0.5999151", "0.5993045", "0.5951703", "0.59327793", "0.59294295", "0.5910588", "0.5906497", "0.5902248", "0.59009725", "0.5894895", "0.5860551", "0.5857386", "0.5852105", "0.58419216", "0.58285886", "0.5825217", "0.5812961", "0.5795499", "0.5778638", "0.57712436", "0.57697624", "0.57630926", "0.5745233", "0.5743854", "0.5723603", "0.572317", "0.5718235", "0.56991667", "0.5695144", "0.56916213", "0.5690274", "0.56872493", "0.56845844", "0.5680567", "0.5677836", "0.56741035", "0.5672645", "0.5656243", "0.5654143", "0.56520236", "0.5649943", "0.5633526", "0.5630168", "0.5622413", "0.5618979", "0.5610319", "0.5607503", "0.55990016", "0.559729", "0.5588804", "0.5588804", "0.5588804", "0.5574496", "0.55718756", "0.55653054", "0.5565296", "0.55639327", "0.55575544", "0.55545807" ]
0.5720259
67
Currently a modulecatalog\Model\ProductRepository.php is utilized to add/update product in Magento. But it seems that the store id is retrieved from the current store on save, and not the one set via Product::setStoreId(). Thus current store needed to be set to default store in multistore mode or to admin store in singlestore mode before saving product.
protected function setCurrentStore($websiteId = 0) { if (!$this->storeManager->hasSingleStore()) { $storeIsSet = false; if (!empty($websiteId)) { $website = $this->storeManager->getWebsite($websiteId); if ($website && $website->getId()) { $storeId = $this->storeManager->getGroup($website->getDefaultGroupId())->getDefaultStoreId(); $this->storeManager->setCurrentStore($this->storeManager->getStore($storeId)->getCode()); $storeIsSet = true; } } if (!$storeIsSet) { $this->storeManager->setCurrentStore($this->storeManager->getDefaultStoreView()->getCode()); } } else { $this->storeManager->setCurrentStore(\Magento\Store\Model\Store::ADMIN_CODE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getDefaultStoreId()\r\n {\r\n return Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID;\r\n }", "public function getStoreId()\n {\n return Mage::app()->getStore()->getId();\n }", "public function getStoreId() {\r\n return Mage::app()->getStore()->getId();\r\n }", "protected function getStoreId()\n {\n return Mage::app()->getStore(true)->getId();\n }", "public function getStoreId(){\n $this->getStore()->getId();\n }", "public function getStoreId()\n {\n if ($this->hasData('store_id')) {\n return $this->getData('store_id');\n }\n return Mage::app()->getStore()->getId();\n }", "public function getStoreId()\n {\n return $this->getStore()->getId();\n }", "function commerce_store_post_update_4() {\n /** @var \\Drupal\\Core\\Config\\ConfigFactoryInterface $config_factory */\n $config_factory = \\Drupal::service('config.factory');\n $uuid = $config_factory->get('commerce_store.settings')->get('default_store');\n if ($uuid) {\n $store_storage = \\Drupal::entityTypeManager()->getStorage('commerce_store');\n /** @var \\Drupal\\commerce_store\\Entity\\StoreInterface[] $stores */\n $stores = $store_storage->loadByProperties(['uuid' => $uuid]);\n $store = reset($stores);\n if ($store) {\n $store->setDefault(TRUE);\n $store->save();\n }\n }\n $config_factory->getEditable('commerce_store.settings')->delete();\n}", "public function setStoreId($store);", "public function getStoreId()\n {\n $storeId = $this->_getData('store_id');\n if (is_null($storeId)) {\n $storeId = Mage::app()->getStore()->getId();\n }\n return $storeId;\n }", "public function getStoreId()\n {\n return $this->store_id;\n }", "public function getStoreId()\n {\n return $this->store_id;\n }", "public function getStoreId()\n {\n return $this->store_id;\n }", "public function getStoreId()\n {\n return $this->store_id;\n }", "private function _getCurrentStoreId()\n {\n $storeName = Mage::app()->getRequest()->getParam('store');\n\n if (!$storeName) {\n $website = Mage::app()->getRequest()->getParam('website');\n return $this->_getHelper()->getStoreIdByWebsite($website);\n }\n return $this->_getHelper()->getStoreIdByStoreCode($storeName);\n }", "public function getStoreId()\n\t{\n\t\treturn $this->_storeId;\n\t}", "public function getStoreId() {\n if (!$this->hasStoreId()) {\n $this->setStoreId((int) Mage::app()->getStore(true)->getId());\n }\n\n return (int) $this->_getData('store_id');\n }", "protected function getStoreID() {\n\t\treturn $this->store_id;\n\t}", "private function _getStoreId() {\n $store_id = 1;\n return $store_id;\n }", "public function getStoreId()\n {\n return $this->_storeId;\n }", "public function getStoreId() {\n return $this->item->getStoreId();\n }", "public function getStoreId()\n {\n // Use mail preview configuration in admin mode\n if (Mage::app()->getStore()->isAdmin()) {\n return Mage::getStoreConfig('mailpreview/admin_settings/preview_store');\n }\n\n return parent::getStoreId();\n }", "public function setStoreId($storeId);", "public function setStoreId($storeId);", "public function getStoreId()\n {\n return $this->getRequest()->getParam('store_id');\n }", "public function getStoreId(){\n return $this->_getData(self::STORE_ID);\n }", "public function setStoreId($id);", "public function getStoreId();", "public function getStoreId();", "public function getStoreId();", "public function getStoreId(){\r\n\t\t$this->store_id = getValue(\"SELECT store_id FROM tbl_car_to_store WHERE car_id = \".$this->car_id.\" AND store_id!=0\");\r\n\t\treturn $this->store_id;\t\r\n\t}", "public function get_default_store() {\r\n\t\tif(count($this->stores)>1)\r\n\t\t\treturn(0);\r\n\t\telse\r\n\t\t\treturn($this->stores[0]->get_id());\r\n\t}", "public function attach_store(data_store &$store)\n\t{\n\t\t$id = $this->generate_store_identifier($store);\n\t\t$store->set_identifier($id);\n\t\t\n\t\t$this->_attached_stores[$id] = $store;\n\t\treturn $id;\n\t}", "public function getStoreId(): int\n {\n return (int)$this->options['store_id'];\n }", "public function addCurrentStore()\r\n {\r\n $this->addFieldToFilter(\"main_table.store_id\", 0);\r\n \r\n $labelExpr = $this->getSelect()->getAdapter()\r\n ->getIfNullSql('store.value', 'main_table.value');\r\n $joinCondition = $this->getConnection()\r\n ->quoteInto(\r\n 'main_table.attribute_id = store.attribute_id AND store.store_id = ?', \r\n (int)Mage::app()->getStore()->getId());\r\n $this->getSelect()->joinLeft(\r\n array('store' => $this->getMainTable()),\r\n $joinCondition,\r\n array('store_value' => $labelExpr)\r\n );\r\n \r\n return $this;\r\n }", "public function setStoreName($storeName);", "protected function _getStore() {\r\n $storeId = (int) $this->getRequest()->getParam('store', 0);\r\n return Mage::app()->getStore($storeId);\r\n }", "public function setStoreId($storeId){\n return $this->setData(self::STORE_ID, $storeId);\n }", "public static function get_store($store_name = 'default')\n {\n }", "public function updateMasterProducts($store = null)\n {\n return boolval(Mage::getStoreConfig(self::XML_PATH_PRODUCT_UPDATE_MASTER, $store));\n }", "protected function _beforeSave()\n {\n $oldStores = $this->getOldStores();\n $newStores = $this->getNewStoreIds();\n if (is_array($newStores)) {\n $stores = array_merge($oldStores, $newStores);\n $this->setStoreIds(implode(',', array_unique($stores)));\n }\n return parent::_beforeSave();\n }", "protected function getDefaultStoreCode()\n {\n $store = $this->getVar('defaultStore', 'default');\n $stores = array_keys($this->getStores());\n if (in_array($store, $stores)) {\n return $store;\n } else {\n return array_shift($stores);\n }\n }", "public function getStore()\n {\n if (is_null($this->_store)) {\n $this->setStore(Mage::app()->getStore());\n }\n return $this->_store;\n }", "protected function getStore() {\n return Mage::app()->getStore();\n }", "public function setStoreId($id)\n {\n $this->store_id = $id;\n }", "public function catalogProductSaveBefore($productType,$product){\n /**\n * Check $productType has been set to 'property'\n */\n if ($productType == 'property') {\n /**\n * Getting Product's user Id\n */\n $customerId = $product->getUserid ();\n /**\n * Loading customer Details\n */\n $customer = Mage::getModel ( 'customer/customer' )->load ( $customerId );\n /**\n * checking empty or not\n */\n if ($customer->getId () == '') {\n $product->setCanSaveCustomOptions ( true );\n Mage::throwException ( Mage::helper ( 'adminhtml' )->__ ( 'User id was invalid' ) );\n }\n }\n }", "public function setStore($storeId) {\n\t\t$this->_store = Mage::app()->getStore($storeId);\n\t\treturn $this;\n\t}", "public function getStore()\n {\n if (is_null($this->_store)) {\n $this->_store = Mage::app()->getStore();\n }\n return $this->_store;\n }", "protected function configureStore()\n {\n /** @var $storeConfigurator Ess_M2ePro_Model_Magento_Quote_Store_Configurator */\n $storeConfigurator = Mage::getModel('M2ePro/Magento_Quote_Store_Configurator');\n $storeConfigurator->init($this->_quote, $this->_proxyOrder);\n\n $this->_originalStoreConfig = $storeConfigurator->getOriginalStoreConfig();\n\n $storeConfigurator->prepareStoreConfigForOrder();\n }", "public function getStore() { return $this->_store; }", "function save()\n {\n $GLOBALS['DB']->exec(\"INSERT INTO stores (store_name) VALUES (\n '{$this->getStoreName()}'\n );\");\n\n $this->id = $GLOBALS['DB']->lastInsertId();\n }", "public function getStore(): Store {\n return $this->store;\n }", "public function storeProduct();", "public function getStore(): Repository\n {\n return $this->store;\n }", "public function store(StoreProductRequest $request)\n {\n $product = new Product();\n $product->product_type_id = 0;\n $product->title = $request->input('title');\n $product->description = $request->input('description');\n $product->price = $request->input('price');\n $product->sku = $request->input('sku');\n $product->save();\n\n foreach ($request->input('options') as $option) {\n $product->options()->sync($option);\n }\n }", "function setProduct( $product )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n if ( get_class( $product ) == \"ezproduct\" )\n {\n $this->ProductID = $product->id();\n }\n }", "public function __construct() {\r\n\t\tif( Mage::app()->getStore()->isAdmin() ) {\r\n\t\t\t$this->_admin = true;\r\n\t\t}\r\n\t\t\r\n\t\tif( $this->_admin && Mage::registry('current_order') != false ) {\r\n\t\t\t$this->setStore( Mage::registry('current_order')->getStoreId() );\r\n\t\t}\r\n\t\telseif( $this->_admin && Mage::registry('current_invoice') != false ) {\r\n\t\t\t$this->setStore( Mage::registry('current_invoice')->getStoreId() );\r\n\t\t}\r\n\t\telseif( $this->_admin && Mage::registry('current_creditmemo') != false ) {\r\n\t\t\t$this->setStore( Mage::registry('current_creditmemo')->getStoreId() );\r\n\t\t}\r\n\t\telseif( $this->_admin && Mage::registry('current_customer') != false ) {\r\n\t\t\t$this->setStore( Mage::registry('current_customer')->getStoreId() );\r\n\t\t}\r\n\t\telseif( $this->_admin && Mage::getSingleton('adminhtml/session_quote')->getStoreId() > 0 ) {\r\n\t\t\t$this->setStore( Mage::getSingleton('adminhtml/session_quote')->getStoreId() );\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->setStore( Mage::app()->getStore()->getId() );\r\n\t\t}\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "public function store($productId)\n\t{\n\t\tProduct::findOrFail($productId)->suppliers()->sync(Input::all());\n\t}", "public function getStore()\n {\n return $this->store;\n }", "public function getStore()\n {\n return $this->store;\n }", "public function getStore()\n {\n return $this->store;\n }", "public function getStore()\n {\n return $this->store;\n }", "function add_store()\n {\n\tglobal $template;\n\tglobal $connect;\n\n\t$sys_connect = sys_db_connect();\n\t$product_id = $_REQUEST[product_id];\n\t$product_name = addslashes($_REQUEST[product_name]);\n\t$shop_price = $_REQUEST[shop_price];\n\t$options = $_REQUEST[options];\n\t$memo = addslashes($_REQUEST[memo]);\n\n\n\t$sql = \"select product_id from ez_store \n\t\t where domain = '\"._DOMAIN_.\"' \n\t\t and product_id = '$product_id'\";\n\t$list0 = mysql_fetch_array(mysql_query($sql, $sys_connect));\n\n\n\t$sql = \"select * from products where product_id = '$product_id'\";\n\t$list = mysql_fetch_array(mysql_query($sql, $connect));\n\t\n\t////////////////////////////////////////\n\t// make thumb image\n\tif ($list[img_500] && file_exists(_save_dir.$list[img_500]))\n\t{\n\t $img_150 = _save_dir . str_replace(\"_500\", \"_150\", $list[img_500]);\n\t if (!file_exists($img_150))\n\t {\n\t\t$cmd = \"/usr/local/bin/convert -resize 150x150 \"._save_dir.$list[img_500].\" \".$img_150;\n\t\texec($cmd);\n\t }\n\t $img_250 = _save_dir . str_replace(\"_500\", \"_250\", $list[img_500]);\n\t if (!file_exists($img_250))\n\t {\n\t\t$cmd = \"/usr/local/bin/convert -resize 250x250 \"._save_dir.$list[img_500].\" \".$img_250;\n\t\texec($cmd);\n\t }\n\t}\n\n\tif ($list0[product_id])\t\t// update\n\t{\n\t $upd_sql = \"update ez_store set\n\t\t\t\tname = '$product_name',\n\t\t\t\tshop_price = '$shop_price',\n\t\t\t\toptions = '$options',\n\t\t\t\tmemo = '$memo',\n\t\t\t\tis_sale = 1\n\t\t\t where domain = '\"._DOMAIN_.\"'\n\t\t\t and product_id = '$product_id'\";\n\t mysql_query($upd_sql, $sys_connect) or die(mysql_error());\n\t}\n\telse\t\t\t\t// insert\n\t{\n\t ////////////////////////////////////////\n\t $ins_sql = \"insert into ez_store set\n\t\t\tdomain \t\t= '\" . _DOMAIN_ . \"',\n\t\t\tproduct_id \t= '$list[product_id]',\n\t\t\tname\t\t= '$list[name]',\n\t\t\torigin\t\t= '$list[origin]',\n\t\t\tbrand\t\t= '$list[brand]',\n\t\t\toptions\t\t= '$list[options]',\n\t\t\tshop_price\t= '$list[shop_price]',\n\t\t\ttrans_fee\t= '$list[trans_fee]',\n\t\t\tproduct_desc\t= '$list[product_desc]',\n\t\t\timg_500\t\t= '$list[img_500]',\n\t\t\timg_desc1\t= '$list[img_desc1]',\n\t\t\timg_desc2\t= '$list[img_desc2]',\n\t\t\timg_desc3\t= '$list[img_desc3]',\n\t\t\timg_desc4\t= '$list[img_desc4]',\n\t\t\timg_desc5\t= '$list[img_desc5]',\n\t\t\timg_desc6\t= '$list[img_desc6]',\n\t\t\treg_date \t= now(),\n\t\t\treg_time \t= now(),\n\t\t\tis_sale \t= 1\n\t \";\n\t mysql_query($ins_sql, $sys_connect) or die(mysql_error());\n\t}\n\n\t// add by sy.hwang 2007.5.4\n\t$sql = \"select seq from ez_store \n\t\t where domain = '\"._DOMAIN_.\"'\n\t\t and product_id = '$product_id'\";\n\t$list = mysql_fetch_array(mysql_query($sql, $sys_connect));\n\n\t$store_id = sprintf(\"A%05d\", $list[seq]);\n\t$upd_sql = \"update ez_store set store_id = '$store_id' \n\t\t where domain = '\"._DOMAIN_.\"'\n\t\t and product_id = '$product_id'\";\n\tmysql_query($upd_sql, $sys_connect) or die(mysql_error());\n\n\t$upd_sql = \"update products set is_store = 1 where product_id = '$product_id'\";\n\tmysql_query($upd_sql, $connect) or die(mysql_error());\n\t\n $this->redirect(\"popup.htm?template=CK18&product_id=$product_id\");\n exit;\n }", "public function getStore()\n {\n return $this->store instanceof StoreResourceIdentifierBuilder ? $this->store->build() : $this->store;\n }", "protected function _getStore()\n {\n $system_configured_store_id = $this->_getSystemConfigurationStoreId();\n if ((!is_null($system_configured_store_id)) && ($system_configured_store_id !== false))\n {\n return $system_configured_store_id;\n }\n\n return false;\n \n }", "protected function updateProductIndex($product, $storeCode)\n {\n $helper = Mage::helper('doofinder_feed');\n\n // Set store code\n $this->_storeCode = $storeCode;\n\n // Get store config\n $this->_config = $helper->getStoreConfig($this->_storeCode);\n\n // Set options\n $options = array(\n 'close_empty' => true, // close xml even if there are no items\n 'products' => array($product->getId()), // list of products in feed\n 'store_code' => $this->_config['storeCode'],\n 'grouped' => $this->_getBoolean($this->_config['grouped']),\n 'display_price' => $this->_getBoolean($this->_config['display_price']),\n 'minimal_price' => $this->_getBoolean('minimal_price', false),\n 'image_size' => $this->_config['image_size'],\n 'customer_group_id' => 0,\n );\n\n $generator = Mage::getModel('doofinder_feed/generator', $options);\n\n $this->_log->debugEnabled && $this->_log->debug(\n sprintf('Starting atomic update for product %d in store %s', $product->getId(), $storeCode)\n );\n\n $xmlData = $generator->run();\n\n if ($xmlData) {\n $rss = simplexml_load_string($xmlData);\n\n $hashId = Mage::getStoreConfig('doofinder_search/internal_settings/hash_id', $this->_storeCode);\n if ($hashId === '') {\n $warning = sprintf(\n 'HashID is not set for the \\'%s\\' store view, ' .\n 'therefore, search indexes haven\\'t been updated for ' .\n 'this store view. To fix this problem set HashID for ' .\n 'a given stor view or disable Internal Search in ' .\n 'Doofinder Search Configuration.',\n $this->_storeCode\n );\n $this->_log->debug($warning);\n Mage::getSingleton('adminhtml/session')->addWarning($warning);\n return;\n }\n\n /** @var Doofinder_Feed_Model_Api_SearchEngines $searchEngines */\n $searchEngines = Mage::getSingleton('doofinder_feed/api_searchEngines');\n $searchEngine = $searchEngines->get($this->_storeCode);\n\n // Check if search engine exists and skip foreach iteration if not.\n if (!$searchEngine) {\n $warning = sprintf(\n 'Search engine with HashID %s doesn\\'t exists. ' .\n 'Please, check your configuration.',\n $hashId\n );\n $this->_log->debug($warning);\n Mage::getSingleton('adminhtml/session')->addWarning($warning);\n return;\n }\n\n // Declare array of products to update\n $products = array();\n foreach ($rss->channel->item as $item) {\n $_product = array();\n foreach ($item as $key => $value) {\n $_product[$key] = (string)$value;\n }\n\n $products[] = $_product;\n }\n\n if (!empty($products)) {\n /** @var Doofinder_Feed_Model_Api_Items $items */\n $items = Mage::getSingleton('doofinder_feed/api_items');\n $items->bulkUpdate($this->_storeCode, $products);\n\n $this->_log->debugEnabled && $this->_log->debug(\n sprintf(\n 'Atomic update for product %d in store %s done with: %s',\n $product->getId(),\n $storeCode,\n json_encode($products)\n )\n );\n return;\n }\n\n $this->_log->debugEnabled && $this->_log->debug(\n sprintf('Atomic update for product %d in store %s failed with no data', $product->getId(), $storeCode)\n );\n }\n }", "public function setStoreId($storeId = null)\n {\n if (is_numeric($storeId)) {\n $this->_storeId = (int) $storeId;\n } else {\n $this->_storeId = null;\n }\n return $this;\n }", "public function getStore()\n {\n $store = Mage::app()->getStore();\n if ($this->getCategory() && $this->getCategory()->getStoreId()) {\n $storeId = $this->getCategory()->getStoreId();\n $store = Mage::app()->getStore($storeId);\n }\n if ($this->getData('store')) {\n $store = $this->getData('store');\n }\n if ($this->getData('store_id')) {\n $storeId = $this->getData('store_id');\n $store = Mage::app()->getStore($storeId);\n }\n return $store;\n }", "private function setStore(Store $store) {\n $this->store = $store;\n }", "public function getStore()\n {\n if (is_null($this->store)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_STORE);\n if (is_null($data)) {\n return null;\n }\n\n $this->store = StoreResourceIdentifierModel::of($data);\n }\n\n return $this->store;\n }", "private function getStore()\n {\n return $this->storeManager->getStore($this->retrieveSharedCatalogStoreId());\n }", "public function saveStore($storeId, $storeListNodeId, array $productIds = array(), $applyImmediately, $oldStoreId)\r\n {\r\n $store = $this->em->getRepository('YilinkerCoreBundle:Store')->find($storeId);\r\n\r\n if (!$store instanceof Store) {\r\n return false;\r\n }\r\n\r\n $response = false;\r\n $homeWebXmlObject = $this->resourceService->fetchXML('home', 'v2', 'web');\r\n $storeDetailsNode = $homeWebXmlObject->mainList->xpath('storeList[@storeListNodeId=\"' . $storeListNodeId . '\"]');\r\n $storeDetailsNode = sizeof($storeDetailsNode) > 0 ? $storeDetailsNode[0] : null;\r\n $storeNode = !is_null($oldStoreId) ? $storeDetailsNode->xpath('store/storeId[.=\"' . $oldStoreId .'\"]/parent::*') : array();\r\n $productEntities = $this->em->getRepository('YilinkerCoreBundle:Product')->findByProductId($productIds);\r\n $slugs = array();\r\n\r\n if (count($productIds) > 0) {\r\n try {\r\n\r\n if ($applyImmediately) {\r\n\r\n if (count($storeNode) > 0) {\r\n $storeNode = $storeNode[0];\r\n $storeNode->storeId = $store->getStoreId();\r\n unset($storeNode->products);\r\n }\r\n else {\r\n $storeNode = $storeDetailsNode->addChild('store');\r\n $storeNode->addChild('storeId', $store->getStoreId());\r\n $storeNode->addChild('specialtyCategoryId', '0');\r\n }\r\n\r\n $products = $storeNode->addChild('products');\r\n\r\n foreach ($productEntities as $productEntity) {\r\n $products->addChild('slug', $productEntity->getSlug());\r\n }\r\n }\r\n else {\r\n foreach ($productEntities as $productEntity) {\r\n $slugs[] = $productEntity->getSlug();\r\n }\r\n }\r\n\r\n $response = true;\r\n }\r\n catch (\\Exception $e) {\r\n $response = $e->getMessage();\r\n }\r\n }\r\n\r\n if ($response && $applyImmediately) {\r\n $this->resourceService->saveXml($homeWebXmlObject, 'home', 'v2', 'web');\r\n $file = $this->getTempJsonFile(self::SELLER_JSON_FILE_NAME);\r\n $this->removeTempJsonFile(self::SELLER_JSON_FILE_NAME);\r\n $tempSellers = json_decode($file, true);\r\n unset($tempSellers[$storeListNodeId][$storeId]);\r\n if (count($tempSellers) == 0) {\r\n $this->removeTempJsonFile(self::SELLER_JSON_FILE_NAME);\r\n }\r\n else {\r\n $response = $this->createTempJsonFile($tempSellers, self::SELLER_JSON_FILE_NAME);\r\n }\r\n if ($this->redis) {\r\n $this->redis->del(RedisKeys::HOME_DATA);\r\n $this->redis->del(RedisKeys::HOME_PRODUCT_SECTION);\r\n }\r\n }\r\n else if ($response && $applyImmediately == false) {\r\n $file = $this->getTempJsonFile(self::SELLER_JSON_FILE_NAME);\r\n $tempSellers = json_decode($file, true);\r\n $data = array(\r\n 'storeId' => $oldStoreId,\r\n 'storeName' => $store->getStoreName(),\r\n 'productIds' => $productIds,\r\n 'storeListNodeId' => $storeListNodeId,\r\n 'isTemp' => true,\r\n 'isNew' => false,\r\n 'slugs' => $slugs,\r\n 'maxAllowableStoreProducts' => PagesService::MAX_ALLOWABLE_STORE_PRODUCTS\r\n );\r\n $tempSellers[$storeListNodeId][$storeId] = $data;\r\n $response = $this->createTempJsonFile($tempSellers, self::SELLER_JSON_FILE_NAME);\r\n }\r\n\r\n return $response;\r\n }", "public function store(ProductStoreRequest $request)\n {\n $this->productService->store($request);\n }", "function getStoreId($id = '')\n\t{\n\t\t$id\t.= ':'.$this->getState('filter.search');\n\n\t\treturn parent::getStoreId($id);\n\t}", "public function product()\n\t{\n\t\treturn $this->belongsTo(StoreProduct::class);\n\t}", "public function setStore(Repository $store): void\n {\n $this->store = $store;\n }", "public function setStore($storeId = null)\n {\n $this->_config->setStore($storeId);\n return $this;\n }", "public function _getProduct() {\n \n // get website id from request\n $websiteId = ( int ) $this->getRequest ()->getParam ( static::WEBSITE_ID );\n if ($websiteId <= 0) {\n $websiteId = Mage::app ()->getWebsite ( 'base' )->getId ();\n }\n \n // get store id from request\n $storeId = ( int ) $this->getRequest ()->getParam ( static::STORE_ID );\n if ($storeId <= 0) {\n $storeId = Mage::app ()->getWebsite ( $websiteId )->getDefaultGroup ()->getDefaultStoreId ();\n }\n if (is_null ( $this->_product )) {\n $productId = $this->getRequest ()->getParam ( 'id' );\n /**\n *\n * @var $productHelper Mage_Catalog_Helper_Product\n */\n $productHelper = Mage::helper ( 'catalog/product' );\n $product = $productHelper->getProduct ( $productId, $storeId );\n if (! ($product->getId ())) {\n $this->_critical ( static::RESOURCE_NOT_FOUND );\n }\n // check if product belongs to website current\n if ($this->_getStore ()->getId ()) {\n $isValidWebsite = in_array ( $websiteId, $product->getWebsiteIds () );\n if (! $isValidWebsite) {\n $this->_critical ( static::RESOURCE_NOT_FOUND );\n }\n }\n // Check display settings for customers & guests\n if ($this->getApiUser ()->getType () != Mage_Api2_Model_Auth_User_Admin::USER_TYPE) {\n // check if product assigned to any website and can be shown\n if ((! Mage::app ()->isSingleStoreMode () && ! count ( $product->getWebsiteIds () )) || ! $productHelper->canShow ( $product )) {\n $this->_critical ( static::RESOURCE_NOT_FOUND );\n }\n }\n $this->_product = $product;\n }\n return $this->_product;\n }", "public function add_store($store)\n {\n }", "public function getStore() {\n\t\treturn $this->_store;\n\t}", "public function setStoreId($id)\n\t{\n\t\t$this->_storeId = $id;\n\t\treturn $this;\n\t}", "protected function _initProduct()\n {\n $this->_title($this->__('Catalog'))\n ->_title($this->__('Manage Products'));\n\n $productId = (int) $this->getRequest()->getParam('id');\n $product = Mage::getModel('catalog/product')\n ->setStoreId($this->getRequest()->getParam('store', 0));\n\n // Hack\n\n $this->getRequest()->setParam('set',4);\n $this->getRequest()->setParam('type','simple');\n if (!$productId) {\n if ($setId = (int) $this->getRequest()->getParam('set')) {\n $product->setAttributeSetId($setId);\n }\n\n if ($typeId = $this->getRequest()->getParam('type')) {\n $product->setTypeId($typeId);\n }\n }\n\n $product->setData('_edit_mode', true);\n if ($productId) {\n try {\n $product->load($productId);\n\n } catch (Exception $e) {\n $product->setTypeId(Mage_Catalog_Model_Product_Type::DEFAULT_TYPE);\n Mage::logException($e);\n }\n }\n\n $attributes = $this->getRequest()->getParam('attributes');\n if ($attributes && $product->isConfigurable() &&\n (!$productId || !$product->getTypeInstance()->getUsedProductAttributeIds())) {\n $product->getTypeInstance()->setUsedProductAttributeIds(\n explode(\",\", base64_decode(urldecode($attributes)))\n );\n }\n\n // Required attributes of simple product for configurable creation\n if ($this->getRequest()->getParam('popup')\n && $requiredAttributes = $this->getRequest()->getParam('required')) {\n $requiredAttributes = explode(\",\", $requiredAttributes);\n foreach ($product->getAttributes() as $attribute) {\n if (in_array($attribute->getId(), $requiredAttributes)) {\n $attribute->setIsRequired(1);\n }\n }\n }\n\n if ($this->getRequest()->getParam('popup')\n && $this->getRequest()->getParam('product')\n && !is_array($this->getRequest()->getParam('product'))\n && $this->getRequest()->getParam('id', false) === false) {\n\n $configProduct = Mage::getModel('catalog/product')\n ->setStoreId(0)\n ->load($this->getRequest()->getParam('product'))\n ->setTypeId($this->getRequest()->getParam('type'));\n\n /* @var $configProduct Mage_Catalog_Model_Product */\n $data = array();\n foreach ($configProduct->getTypeInstance()->getEditableAttributes() as $attribute) {\n\n /* @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */\n if(!$attribute->getIsUnique()\n && $attribute->getFrontend()->getInputType()!='gallery'\n && $attribute->getAttributeCode() != 'required_options'\n && $attribute->getAttributeCode() != 'has_options'\n && $attribute->getAttributeCode() != $configProduct->getIdFieldName()) {\n $data[$attribute->getAttributeCode()] = $configProduct->getData($attribute->getAttributeCode());\n }\n }\n\n $product->addData($data)\n ->setWebsiteIds($configProduct->getWebsiteIds());\n }\n\n Mage::register('product', $product);\n Mage::register('current_product', $product);\n Mage::getSingleton('cms/wysiwyg_config')->setStoreId($this->getRequest()->getParam('store'));\n return $product;\n }", "public function edit(StoreProduct $storeProduct)\n {\n //\n }", "public function getStore () {\n\t\treturn $this->oStore;\n\t}", "function getStoreId($id = '')\n\t{\n\t\t$id\t.= ':'.$this->getState('category.id');\n\n\t\treturn parent::getStoreId($id);\n\t}", "public function getStore()\n\t{\n\t\t//\n\t}", "public function setStore( $id ) {\r\n\t\t$this->_storeId = $id;\r\n\t\t\r\n\t\t$this->initializeApi( true );\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "public function getProduct(){\r\n return Mage::registry('current_product');\r\n }", "public function getDefaultStore(): Store|null;", "public function createnewproduct()\n {\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\n $product = Mage::getModel('catalog/product');\n $websiteId = Mage::app()->getWebsite('base')->getId();\n $storeId = Mage::app()->getStore('default')->getId();\n\n //Set SKU dynamically over here\n $collection = Mage::getModel('catalog/product')\n ->getCollection()\n ->addAttributeToSort('created_at', 'desc');\n $collection->getSelect()->limit(1);\n $latestItemId = $collection->getLastItem()->getId();\n if($latestItemId) {\n $nextProid = $latestItemId + 1;\n } else {\n $nextProid = 1;\n }\n $SampleSKU = 'titechPro'.$nextProid;\n\n try {\n $product\n ->setStoreId($storeId) //you can set data in store scope\n ->setWebsiteIds(array($websiteId)) //website ID the product is assigned to, as an array\n ->setAttributeSetId(4) //ID of a attribute set named 'default'\n ->setTypeId('simple') //product type\n ->setCreatedAt(strtotime('now')) //product creation time\n ->setUpdatedAt(strtotime('now')) //product update time\n ->setSku($SampleSKU) //SKU\n ->setName('Titech sample product') //product name\n ->setWeight(4.0000)\n ->setStatus(1) //product status (1 - enabled, 2 - disabled)\n ->setTaxClassId(4) //tax class (0 - none, 1 - default, 2 - taxable, 4 - shipping)\n ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH) //catalog and search visibility\n //->setManufacturer(28) //manufacturer id\n //->setColor(24)\n //->setNewsFromDate('06/26/2014') //product set as new from\n //->setNewsToDate('06/30/2014') //product set as new to\n ->setCountryOfManufacture('IN') //country of manufacture (2-letter country code)\n ->setPrice(11.22) //price in form 11.22\n ->setCost(22.33) //price in form 11.22\n //->setSpecialPrice(00.44) //special price in form 11.22\n //->setSpecialFromDate('06/1/2014') //special price from (MM-DD-YYYY)\n //->setSpecialToDate('06/30/2014') //special price to (MM-DD-YYYY)\n ->setMsrpEnabled(1) //enable MAP\n ->setMsrpDisplayActualPriceType(1) //display actual price (1 - on gesture, 2 - in cart, 3 - before order confirmation, 4 - use config)\n ->setMsrp(99.99) //Manufacturer's Suggested Retail Price\n ->setMetaTitle('Sample meta title 2')\n ->setMetaKeyword('Sample meta keyword 2')\n ->setMetaDescription('Sample meta description 2')\n ->setDescription('This is a long description for sample product')\n ->setShortDescription('This is a short description for sample product')\n ->setMediaGallery (array('images'=>array (), 'values'=>array ())) //media gallery initialization\n ->addImageToMediaGallery('media/catalog/product/ti/ti_logo.png', array('image','thumbnail','small_image'), false, false) //assigning image, thumb and small image to media gallery\n ->setStockData(array(\n 'use_config_manage_stock' => 0, //'Use config settings' checkbox\n 'manage_stock'=>1, //manage stock\n 'min_sale_qty'=>1, //Minimum Qty Allowed in Shopping Cart\n 'max_sale_qty'=>2, //Maximum Qty Allowed in Shopping Cart\n 'is_in_stock' => 1, //Stock Availability\n 'qty' => 999 //qty\n )\n )\n ->setCategoryIds(array(2)); //assign product to categories - Set to Default\n\n $product->save();\n return $product->getIdBySku($SampleSKU);\n } catch(Exception $e) {\n Mage::log($e->getMessage());\n }\n }", "private function retrieveSharedCatalogStoreId()\n {\n $sharedCatalogStoreId = $this->getSharedCatalog()->getStoreId();\n if (!isset($sharedCatalogStoreId)) {\n $sharedCatalogStoreId = $this->request->getParam('store_id');\n }\n\n return (int)$sharedCatalogStoreId;\n }", "public function setStoreId($storeId)\n {\n return $this->setData('store_id', $storeId);\n }", "public function getStore(): Store|null;", "public function store(ProductStoreRequest $request, Product $product)\n {\n $product->name = $request->get('name');\n $product->sku = $request->get('sku');\n $product->price = $request->get('price');\n $product->created_at = Carbon::now();\n $product->save();\n \n $product->relateWithCategory($request->get('categories'));\n\n return new ProductStoreItemResource($product);\n }", "public function testCreateProductStore()\n {\n\n }", "public function getStore();", "public function getStore();", "public function save() {\n\t return isset($this->product_id) ? $this->update() : $this->create();\n\t}", "public function getStoreMode()\n {\n return $this->storeMode;\n }", "function getStoreId($id = '')\n\t{\n\t\t$id\t.= ':'.$this->getState('filter.extension');\n\t\t$id\t.= ':'.$this->getState('filter.published');\n\t\t$id\t.= ':'.$this->getState('filter.access');\n\t\t$id\t.= ':'.$this->getState('filter.parentId');\n\n\t\treturn parent::getStoreId($id);\n\t}", "function setBackStore() {\n $requestParam = explode('/', $this->params->url);\n $store_name = trim($requestParam[0]); // Name of the store which we will change later with Saas\n $StoreAdminid = $this->Session->read('Auth.Admin.id');\n if ($store_name && !$StoreAdminid) {\n $this->loadModel('Store');\n $store_result = $this->Store->store_info($store_name);\n if ($store_result) {\n $storeName = $store_result['Store']['store_name'];\n $this->Session->write('admin_domainname', $store_name);\n $this->Session->write('admin_storeName', $storeName);\n $this->Session->write('admin_store_id', $store_result['Store']['id']);\n $this->Session->write('admin_merchant_id', $store_result['Store']['merchant_id']);\n } else {\n $this->redirect(array('controller' => 'users', 'action' => 'selectStore'));\n }\n }\n }" ]
[ "0.7084521", "0.6922507", "0.69136125", "0.68153834", "0.67417574", "0.666534", "0.6663451", "0.66415256", "0.6581105", "0.6572421", "0.65311575", "0.65311575", "0.65311575", "0.65311575", "0.65243465", "0.6494825", "0.64702964", "0.6434718", "0.64294153", "0.64032143", "0.639225", "0.6391602", "0.63610876", "0.63610876", "0.63180965", "0.6312428", "0.6225791", "0.617553", "0.617553", "0.617553", "0.61015016", "0.6058971", "0.6031401", "0.60309464", "0.6029371", "0.5983313", "0.5945175", "0.5930579", "0.59149927", "0.59103847", "0.5905985", "0.590519", "0.58948994", "0.58943045", "0.5892317", "0.5889477", "0.58849096", "0.58753276", "0.58568907", "0.5856452", "0.58496356", "0.58309144", "0.58072376", "0.5796043", "0.5768585", "0.576578", "0.5765574", "0.576466", "0.5759793", "0.5759793", "0.5759793", "0.5759793", "0.5730603", "0.57299554", "0.57254004", "0.5725242", "0.57240134", "0.5722749", "0.5718475", "0.570621", "0.5704988", "0.5704228", "0.5698641", "0.56984806", "0.56939685", "0.5689107", "0.5681788", "0.5673064", "0.565298", "0.56529194", "0.56526446", "0.56401587", "0.56395763", "0.5637993", "0.563195", "0.5630319", "0.5630082", "0.5623239", "0.5602664", "0.5601869", "0.5599465", "0.55942243", "0.5590919", "0.5581549", "0.55812234", "0.55776876", "0.55776876", "0.55714935", "0.5566856", "0.55602556", "0.55540866" ]
0.0
-1
Function to add record in table
public function add($data){ $this->db->insert('awards', $data); if ($this->db->affected_rows() > 0) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dbase_add_record($dbase_identifier, $record)\n{\n}", "abstract public function insertRecord($tableName, $record);", "public function add(){\n $tab = DB::table('student');\n $res = $tab -> insert(['name' => '小黑', 'age' => '18']);\n }", "function add($record)\n\t{\n\t\t// convert object from associative array, if needed\n\t\t$record = (is_array($record)) ? (object) $record : $record;\n\n\t\t// update the DB table appropriately\n\t\t$key = $record->{$this->_keyfield};\n\t\t$this->_data[$key] = $record;\n\n\t\t$this->store();\n\t}", "function insert_record($data){\n\t$this->db->insert('tblname', $data);\n\t}", "function addNew($rec)\r\n\t\t{\r\n\t\t\t// Create associative array of key fields and data values\r\n\t\t\t$data = array(\"idMedicalRecord\"=>$rec[0],\"medicalRec_weight\"=>$rec[1],\"medicalRec_height\"=>$rec[2],\"medicalRec_bloodPressure\"=>$rec[3],\"medicalRec_temperature\"=>$rec[4],\"medicalRec_bloodIronLevel\"=>$rec[5],\"medicalRec_time\"=>$rec[6],\"medicalRec_date\"=>$rec[7],\"medicalRec_medicalHistory\"=>$rec[8],\"medicalRec_rejectionReason\"=>$rec[9]);\r\n\t\t\t// Bind values to object's attributes\r\n\t\t\t$this->bind($data);\r\n\t\t\t// Add new values to table in database\r\n\t\t\t$this->insert();\r\n\t\t}", "function add($table_name, $data_array)\n\t{\n\n\t}", "public function insertRow($row);", "public function add() {\n $fields_definition = '';\n $fields_values = '';\n foreach ($this->fields as $name => $value) {\n $fields_definition .= '`' . $name . '`, ';\n $fields_values .= '\\''. $value . '\\', ';\n }\n\n $fields_definition = chop($fields_definition, ', ');\n $fields_values = chop($fields_values, ', ');\n\n $query = 'INSERT INTO `' . $this->table . '`'\n . ' (' . $fields_definition\n . ' ) VALUES ( ' . $fields_values . ' )';\n\n return $this->connection->query($query);\n }", "public function addRow(TableRow $row);", "public function insertRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getAddRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// insert\n\t\t\t\t$this->getHandler()->create($record);\n\n\n\t\t\t\t$msg = new Message('You have successful create a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "public function recInsert($record) {\n $conn = Query::connect();\n $col = $conn->SelectLimit(\"select*from \".static::getTable(),1);\n $sql = $conn->GetInsertSQL($col,$record);\n $rs = $conn->Execute($sql);\n return $conn->ErrorNo();\n }", "function add($table, $data = array()) {\n $this->connect();\n $field_list = '';\n $value_list = '';\n foreach ($data as $key => $value) {\n $field_list .= $key . ',';\n $value_list .= \"'\" . $value . \"'\" . ',';\n }\n $sql = 'INSERT INTO ' . $table . ' (' . trim($field_list, ',') . ') VALUES (' . trim($value_list, ',') . ')';\n return mysqli_query($this->_conn, $sql);\n }", "public function createRecord();", "public function insert(Table $table, $row);", "function insert ($tablename, $newRow) \n\t{\n\t\t$lockfp = $this->getLock($tablename);\t\t\t\n\t\t$this->tables[$tablename][] = $newRow;\n\t\t$this->writeTable($tablename);\n\t\t$this->releaseLock($lockfp);\n\t}", "public function insert($tblUpdate);", "public function insert($tableName, $data);", "public function add (){\n // receives $_GET['id'] to redirect to page showing same page\n\n $columns = array('curriculum_id', 'timetable_period_id', 'start_time_id', 'end_time_id', 'weekday_id', 'classroom_id');\n $table = new simple_table_ops();\n $table->set_table_name('timetables');\n $table->set_table_column_names($columns);\n\n $table->add();\n header(\"Location: http://\".WEBSITE_URL.\"/index.php?controller=timetable&action=show&submit=yes&timetable_period_id={$_POST['timetable_period_id']}\");\n }", "function add($_data = null)\n\t{\n\t\tif (empty($_data['fields']) AND empty($_data['table'])){\n\t\t return FALSE;\n\t\t}\n\t\t\n\t\t$data = array();\n\t\tforeach($_data['fields'] as $k => $d)\n\t\t{\n\t\t\t$data[$k] = $d;\n\t\t}\n\t\t\n\t\t$ret =\t$this->db->insert($_data['table'], $data);\n\t\n\t\t\n\t\tlog_message('info','SQL Query: ' . $this->db->last_query());\n\t\n\t\t$this->__insert_id = $this->db->insert_id();\n\t\treturn $ret;\n\t}", "public abstract function insert();", "function Add() \n\t{\n\t\tglobal $dal_info;\n\t\t\n\t\t$insertFields = \"\";\n\t\t$insertValues = \"\";\n\t\t$tableinfo = &$dal_info[ $this->infoKey ];\n\t\t$blobs = array();\n\t\t//\tprepare parameters\t\t\n\t\tforeach($tableinfo as $fieldname => $fld)\n\t\t{\n\t\t\tif( isset($this->{$fld['varname']}) )\n\t\t\t{\n\t\t\t\t$this->Value[ $fieldname ] = $this->{$fld['varname']};\n\t\t\t}\n\t\t\t\n\t\t\tforeach($this->Value as $field => $value)\n\t\t\t{\n\t\t\t\tif( strtoupper($field) != strtoupper($fieldname) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t$insertFields.= $this->_connection->addFieldWrappers( $fieldname ).\",\";\n\t\t\t\t$insertValues.= $this->PrepareValue($value,$fld[\"type\"]) . \",\";\n\t\t\t\t\n\t\t\t\tif( $this->_connection->dbType == nDATABASE_Oracle || $this->_connection->dbType == nDATABASE_DB2 || $this->_connection->dbType == nDATABASE_Informix )\n\t\t\t\t{\n\t\t\t\t\tif( IsBinaryType( $fld[\"type\"] ) )\n\t\t\t\t\t\t$blobs[ $fieldname ] = $value;\n\t\t\t\t\t\t\n\t\t\t\t\tif( $this->_connection->dbType == nDATABASE_Informix && IsTextType( $fld[\"type\"] ) )\n\t\t\t\t\t\t$blobs[ $fieldname ] = $value;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//\tprepare and exec SQL\n\t\tif( $insertFields != \"\" && $insertValues != \"\" )\t\t\n\t\t{\n\t\t\t$insertFields = substr($insertFields, 0, -1);\n\t\t\t$insertValues = substr($insertValues, 0, -1);\n\t\t\t$dalSQL = \"insert into \".$this->_connection->addTableWrappers( $this->m_TableName ).\" (\".$insertFields.\") values (\".$insertValues.\")\";\n\t\t\t$this->Execute_Query($blobs, $dalSQL, $tableinfo);\n\t\t}\n\t\t//\tcleanup\t\t\n\t $this->Reset();\n\t}", "public function add(ClosureTableData $obj, $idEntry = 0);", "public function add($data){\n $this->db->insert('tbl_petugas', $data);\n\n }", "public function add() \n { // metodo add, complementar\n $str = \"insert into \".self::$tablename.\"(nitHotel, idCiudad, nomHotel, dirHotel, telHotel1, telHotel2, correoHotel, tipoHotel, Administrador, idRedes, aforo, tipoHabitaciones, status)\";\n $str.= \" values ('$this->nitHotel', $this->idCiudad, '$this->nomHotel', '$this->dirHotel', '$this->telHotel1', '$this->telHotel2', '$this->correoHotel', $this->tipoHotel, '$this->Administrador', $this->idRedes, $this->aforo, $this->tipoHabitaciones, $this->status);\";\n }", "public function addRow($tabela, $name, $type, $pkey, $notnull, $ai, $keys, $size, $default, $index, $unique);", "public function insert($data);", "public function Add(){\n $insert =[\n 'RankNo'=>32132,\n 'UserName'=>$UserName,\n 'NickName'=>123,\n 'MoneyNum'=>32131,\n 'Signature'=>32132131,\n 'WeChatID'=>3213123,\n 'Status'=>$Status,\n 'head_img'=>$head_img\n ];\n return $this->insert($insert);\n }", "function insertNewRecord($f){\n global $db;\n\n $sql= \"INSERT INTO products (partno,description) VALUES (\"\n .\"'\".$f['partno'].\"', \"\n .\"'\".$f['description'].\"')\";\n Basic::EventLog(\"Products->insertNewRecord: \".$sql);\n //Basic::EventLogDB(\"Product added - UID:\".$f['uid'].\", Modulo: \".$f['module'].\", Permiso: \".$f['perm']);\n $res =& $db->query($sql);\n return $res;\n }", "private function addRecord( $objTable ){\r\n\r\n\t\t\t$tableName = $objTable->table_name;\r\n\t\t\tunset( $objTable->table_name );\r\n\r\n\t\t\tforeach( $objTable as $key => $value ){\r\n\t\t\t\t$objTable->$key = addslashes(trim($value));\r\n\t\t\t}\r\n\t\t\t$this->post( $objTable, $tableName );\r\n\r\n\t\t}", "function addRow($tabName, $tabData) {\n\tglobal $mysqli;\n\t$keys = \"(\".implode(\", \",array_keys($tabData)).\")\";\n\t$values = \"'\".implode(\"','\",array_values($tabData)).\"'\";\n\t\n\t$sql = \"INSERT INTO $tabName $keys VALUES ($values)\";\n\tif (!$mysqli->query($sql)) {\n\t\tshowErrors();\n\t}\n return true;\n}", "public function insertRecord ($sqlString);", "public function insert($table);", "protected function createNew() {\n $this->db->insert($this->tableName, $this->mapToDatabase());\n $this->id = $this->db->insert_id();\n }", "public function save()\n {\n array_push($this->table, $this->value);\n }", "function add_row()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->rows[] = $this->_prep_args($args);\n\t}", "function Add($table,$values,$rediract){\n\t\t$insert = \"insert into $table values(Null,$values)\";\n\t\t$run = $this->connect->query($insert);\n\t\t\n\t\t\n\t\tif($run){\n\t\t\techo \"<script>location.href='$rediract=Added-Successfully';</script>\";\n\t\t}else {\n\t\t\techo \"<script>location.href='$rediract=Added-Error';</script>\";\n\t\t} // else close\n\t\t\n\t}", "public function add($data) {\r\n\t \tglobal $wpdb;\r\n\t \t\r\n\t \tif ($wpdb->insert( $this->table, (array) $data ))\r\n\t \t\t$return = $wpdb->insert_id;\r\n\t \telse\r\n\t \t\t$return = FALSE;\r\n\t \t\r\n\t \treturn $return;\r\n\t }", "public function add($data)\n {\n return $this->db->table($this->tableName)->insert($data)->execute();\n }", "abstract public function insert();", "public function add()\n\t{\n\t\t$fake_id = $this->_get_id_cur();\n\t\t$form = array();\n\t\t$form['view'] = 'form';\n\t\t$form['validation']['params'] = $this->_get_params();\n\t\t$form['submit'] = function()use ($fake_id)\n\t\t{\n\t\t\t$data = $this->_get_inputs();\n\t\t\t$data['sort_order'] = $this->_model()->get_total() + 1;\n\t\t\t$id = 0;\n\t\t\t$this->_model()->create($data,$id);\n\t\t\t// Cap nhat lai table_id table file\n\t\t\tmodel('file')->update_table_id_of_mod($this->_get_mod(), $fake_id, $id);\n\t\t\tfake_id_del($this->_get_mod());\n\n\t\t\tset_message(lang('notice_add_success'));\n\t\t\t\n\t\t\treturn admin_url($this->_get_mod());\n\t\t};\n\t\t$form['form'] = function() use ($fake_id)\n\t\t{\n\t\t\t$this->_create_view_data($fake_id);\n\n\t\t\t$this->_display('form');\n\t\t};\n\t\t$this->_form($form);\n\t}", "public function Do_insert_Example1(){\n\n\t}", "protected abstract function insertRow($tableName, $data);", "function add_tbl_profile($params)\n {\n $this->db->insert('tbl_profile',$params);\n return $this->db->insert_id();\n }", "public abstract function Insert();", "public function insert() {\n \n }", "public function insert()\n {\n # code...\n }", "public function add($tblname, $data) {\n\n \n\n \n $this->db->insert($tblname, $data);\n return $this->db->insert_id();\n }", "function cresponsable_add() {\n\t\tglobal $conn;\n\n\t\t// Initialize table object\n\t\t$GLOBALS[\"responsable\"] = new cresponsable();\n\n\t\t// Initialize other table object\n\t\t$GLOBALS['usuario'] = new cusuario();\n\n\t\t// Intialize page id (for backward compatibility)\n\t\tif (!defined(\"EW_PAGE_ID\"))\n\t\t\tdefine(\"EW_PAGE_ID\", 'add', TRUE);\n\n\t\t// Initialize table name (for backward compatibility)\n\t\tif (!defined(\"EW_TABLE_NAME\"))\n\t\t\tdefine(\"EW_TABLE_NAME\", 'responsable', TRUE);\n\n\t\t// Open connection to the database\n\t\t$conn = ew_Connect();\n\t}", "public function add()\r\n {\r\n $this->start();\r\n $this->write_to_db();\r\n }", "public function create() //添加\n {\n\t\t//\n }", "public function insert(){\n\n }", "public static function Insert(){\r\n }", "public function insert()\n {\n \n }", "function add_newuser($user) {\n global $DB;\n $DB->insert_record('report_user_statistics', $user, false);\n}", "public function insert(){\r\n\t\tif (!$this->new){\r\n\t\t\tMessages::msg(\"Cannot insert {$this->getFullTableName()} record: already exists.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$this->beforeCommit();\r\n\t\t\r\n\t\t$vals = array();\r\n\t\t$error = false;\r\n\t\tforeach ($this->values as $name=>$value){\r\n\t\t\tif ($value->isErroneous()){\r\n\t\t\t\tFramework::reportErrorField($name);\r\n\t\t\t\t$error = true;\r\n\t\t\t}\r\n\t\t\t$vals[\"`$name`\"] = $value->getSQLValue();\r\n\t\t}\r\n\t\tif ($error){\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$sql = 'INSERT INTO '.$this->getFullTableName().' ('.implode(', ',array_keys($vals)).') VALUES ('.implode(', ',$vals).')';\r\n\t\tif (!SQL::query($sql)->success()){\r\n\t\t\tMessages::msg('Failed to insert record into '.$this->getFullTableName().'.',Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t// Get this here, because getPrimaryKey can call other SQL queries and thus override this value\r\n\t\t$auto_id = SQL::getInsertId();\r\n\t\t\r\n\t\t$table = $this->getTable();\r\n\t\t// Load the AUTO_INCREMENT value, if any, before marking record as not new (at which point primary fields cannot be changed)\r\n\t\tforeach ($table->getPrimaryKey()->getColumns() as $name){\r\n\t\t\tif ($table->getColumn($name)->isAutoIncrement()){\r\n\t\t\t\t$this->$name = $auto_id;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->new = false;\r\n\t\t$this->hasChanged = false;\r\n\t\tforeach ($this->values as $value){\r\n\t\t\t$value->setHasChanged(false);\r\n\t\t}\r\n\t\t\r\n\t\t$this->afterCommit();\r\n\t\t\t\r\n\t\treturn self::RES_SUCCESS;\r\n\t}", "public function addRows()\n {\n }", "function insert_record()\n\t{\n\t $dbname=$this->dbname;\n\t $DB1=$this->__connect($dbname,$this->table_name);\n $fields_data=$this->__list_fields_data($dbname,$this->table_name);\n // echo_array($fields_data);\n $index=$this->_get_primary($fields_data);\n //echo $index;\n //echo_array($_POST);\n \n \n //since we are coming from a form there\n //are $_POST values\n foreach ($fields_data->name as $key=>$value)\n {\n $data[$value['name']]=$_POST[$value['name']];\n }\n\n //needs checking if a FOREIGN FIELD\n //insert into database \n $this->db->insert($this->table_name, $data);\n\n $keys=(array_keys($data));\n $values=(array_values($data));\n\n //prepare some data for the form controls\n //in this case the Tdataset control\n \n $i=0;\n $num_fields=count($keys);\n for ($i=0;$i<$num_fields;$i++){\n $this->table->add_row($keys[$i],$values[$i]);\n }\n $this->table->set_heading('field','Value');\n $this->table->set_caption('Insert');\n $this->table->set_template($this->tmpl);\n $s=$this->table->generate();\n $s.='<a href=\"http://localhost/CodeIgniter/admin/dbutil/browse/'.$dbname.'/'.$this->table_name.'\">Click to Edit More</a>';\n return $s;\n\t}", "public function createRecord()\n {\n $sql = sprintf(\n \"INSERT INTO %s (%s) values (%s)\", \"Cubans\",\n implode(\", \", array_keys($this->arrayKeysValues())),\n \":\" . implode(\", :\", array_keys($this->arrayKeysValues()))\n );\n $statement = $this->connect->prepare($sql);\n\t\t$statement->execute($this->arrayKeysValues());\n }", "function add($table,$values){\n $conn=connectDB();\n $query=\"INSERT INTO $table VALUES ($values)\";\n //print($query);\n $conn->query($query);\n }", "public function add_invoice_row() {\n\n $addFlag = false;\n\n // Set null values to check for and later insertion if required\n $data = array(\n 'category' => null,\n 'description' => null,\n 'amount' => null,\n 'mockInvoiceId' => $_POST[ 'mockInvoiceId' ]\n );\n\n // Check if there are any rows that have nothing in them\n $row = $this->mockinvoice_row_model->get_by( $data );\n\n // Add a new row if there are no blank ones already\n if ( empty( $row ) ) {\n // Add a new row with empty values\n $this->mockinvoice_row_model->save( $data );\n $addFlag = true;\n }\n\n\n // Send back if a new row was added\n $returnArray[] = array( 'rowAdded' => $addFlag );\n $this->json_library->print_array_json_unless_empty( $returnArray );\n }", "public function addRecord()\n {\n $rec = new Record($this, true);\n $rec->markForInsert();\n $this->records[] = $rec;\n return $rec;\n }", "public function insert()\n {\n }", "public function insert()\n {\n }", "public static function insert()\n {\n }", "function addRecord()\n {\n global $invenArray;\n // Add the new information into the array\n $invenArray[] = array($_POST[\"empID\"],$_POST[\"fName\"],$_POST[\"lName\"],$_POST[\"truckNum\"],$_POST[\"phoneNum\"],$_POST[\"yrsOfSen\"]);\n // The sort will be on the first column (part number) so use this to re-order the displays\n sort($invenArray);\n // Save the updated array in its session variable\n $_SESSION[\"serializedArray\"] = urlencode(serialize($invenArray));\n }", "function create($table, $data)\n {\n $current = get_instance();\n $current->db->insert($table, $data);\n return $current->db->insert_id();\n }", "public function add($data)\r\n {\r\n $data = $this->sanitize($data);\r\n\r\n return $this->db->table($this->table)->insertGetId($data);\r\n\r\n }", "function insert($conn,$table,$data)\n {\n }", "public function add($data)\n {\n // $this->db->insert($this->_table, $this);\n\t\t$this->db->insert('tb_event', $data);\n\t\t\treturn true;\n }", "public function add_record()\n {\n $data['main_content'] = $this->type.'/'.$this->viewname.'/add';\n\t $this->load->view($this->type.'/assets/template',$data);\n }", "function addRecord($con, $inpTeam, $inpEnv, $inpTech, $inpType, $inpInitial, $inpFinal, $totSavings, $inpCause, $inpSteps, $inpDate, $inpProj, $userID)\n\t{\n\t\t$stmt_insert = $con->prepare(\"INSERT INTO costsavings (csCause, csSteps, csDate, csSavings, csInitial, csFinal, teamID, techID, envID, typeID, projectID, userID) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\");\n\t\t$stmt_insert->bind_param(\"sssdddiiiiii\", $inpCause, $inpSteps, $inpDate, $totSavings, $inpInitial, $inpFinal, $inpTeam, $inpTech, $inpEnv, $inpType, $inpProj, $userID);\n\t\t$stmt_insert->execute() or die(mysqli_error($con));\n\n\t\t$msgDisplay = successAlert(\"Successfully inserted a new record.\");\n\n\t\treturn $msgDisplay;\n\t}", "public function inserir()\n {\n }", "private function crud_post($record = null) {\n $key = $record['id'];\n\n if (!isset($key)) {\n $this->response(array('error' => 'Create: No supply specified'), 406);\n return;\n }\n\n if ($this->supplies->exists($key)) {\n $this->response(array('error' => 'Create: Supply ' . $key . ' already exists'), 406);\n return;\n }\n\n $this->supplies->add($record);\n\n $oops = $this->db->error();\n if (empty($oops['code']))\n $this->response(array('ok'), 200);\n else\n $this->response($oops, 400);\n }", "protected function _insert()\n {\n \t$metadata = $this->_table->info(Zend_Db_Table_Abstract::METADATA);\n \t\n \tif(isset($metadata['created_at']))\n\t\t\t$this->_data['created_at'] = new Zend_Date ();\n \tif(isset($metadata['updated_at']))\n\t\t\t$this->_data['updated_at'] = new Zend_Date ();\n }", "protected function _create()\n {\n $entry = $this->_db->createRow();\n foreach ($this->getFields() as $key => $value) {\n $entry->{$key} = $value;\n }\n return $entry->save();\n }", "function add()\n\t{\n\t\t$this->_updatedata();\n\t}", "function action_add() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['add_id'];\n\t\t\t$table = $data['add_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\t$choosen[$table][$id] = $id;\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "function DoInsertRecordSQLOnAdd( &$pageObject )\n{\n\t$table = $pageObject->pSet->getOriginalTableName();\n\t$avalues = $pageObject->getNewRecordData();\n\t$blobfields = $pageObject->getBlobFields();\n\t\n\t//\tmake SQL string\n\t$strSQL = \"insert into \".$pageObject->connection->addTableWrappers($table).\" \";\n\t\n\t$strFields=\"(\";\n\t$strValues=\"(\";\n\t$blobs = PrepareBlobs( $avalues, $blobfields, $pageObject );\n\t\n\tforeach($avalues as $akey => $value)\n\t{\n\t\t$strFields.= $pageObject->getTableField($akey).\", \";\n\t\t\n\t\tif( in_array($akey, $blobfields) )\t\t\t\n\t\t\t$strValues.= $value.\", \";\n\t\telse\n\t\t{\n\t\t\tif( is_null( $pageObject->cipherer ) )\n\t\t\t\t$strValues.= add_db_quotes($akey, $value).\", \";\n\t\t\telse \n\t\t\t\t$strValues.= $pageObject->cipherer->AddDBQuotes($akey, $value).\", \";\n\t\t}\n\t}\n\t\n\tif( substr($strFields, -2) == \", \")\n\t\t$strFields = substr($strFields, 0, strlen($strFields) - 2);\n\t\t\n\tif( substr($strValues, -2) == \", \")\n\t\t$strValues = substr($strValues, 0, strlen($strValues) - 2);\n\t\n\t$strSQL.= $strFields.\") values \".$strValues.\")\";\n\t\n\tif( !ExecuteUpdate($pageObject, $strSQL, $blobs) )\n\t\treturn false;\n\n\treturn true;\n}", "public function add_payer_record($data){\n\t\t$this->db->insert('tat_finance_payers', $data);\n\t\tif ($this->db->affected_rows() > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function make_record($id, $patient, $doctor, $rad, $type, $p_date, $t_date, $diag, $desc){\n\t$conn = connect();\n\t$sql = \"insert into radiology_record values (\".(string)$id.\", \".(string)$patient.\", \".(string)$doctor.\", \".(string)$rad.\", '\".(string)$type.\"', TO_DATE('\".(string)$p_date.\"', 'YYYY-MM-DD'), TO_DATE('\".(string)$t_date.\"', 'YYYY-MM-DD'), '\".(string)$diag.\"', '\".(string)$desc.\"')\";\n\n\tif(($statement = oci_parse($conn, $sql)) == false){\n\t\t$err = oci_error($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\n\t$exec = oci_execute($statement);\n\n\tif(!$exec){\n\t\t$err = oci_error($statement);\n\t\toci_free_statement($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\toci_commit($conn);//_______________________________-----------------------------------------------------------------------------------------------\n\toci_free_statement($statement);\n\toci_close($conn);\n}", "public function add($data){\n \t\t\t$result = $this->db->insert(\"user\",$data);\n \t\t}", "function insert_transaction_record()\n\t{\n\t\t$invoice_id = strtotime('now');\n\t\t\n\t\t$data = array(\n\t\t 'user_id' => $this->user_id,\n\t\t 'invoice_id' => $invoice_id,\n\t\t 'product_id' => $this->auction_id,\t\t \t\t\n\t\t 'credit_debit' => 'DEBIT',\t\t \n\t\t 'transaction_name' =>'Bid Fee For auction ID: '.$this->auction_id,\n\t\t 'transaction_date' => $this->general->get_local_time('time'),\n\t\t 'transaction_type' => 'bid',\n\t\t 'transaction_status' => 'Completed',\t\t \n\t\t 'payment_method' => 'direct',\n\t\t 'amount'=>$this->user_bid_amt,\n\t\t 'pay_type' => $this->payment_type,\n\t \t);\n\t\t\n\t\t$this->db->insert('transaction', $data);\n\t\treturn $this->db->insert_id(); \t\n\t}", "public function insert($data)\r\n {\r\n \r\n }", "public function insert($table, array $data);", "public function add($data){\n\t\t\t// echo 'LINE 11:: model';\n\t\t\t// print_r($data);die;\n\n\t\t\tif($this->db->insert('tbl_books', $data)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function db_add($con,$table,$data){\n\t$fild_value = array();\n\tforeach ($data as $field => $value) {\n\t\t$fild_value[] = \"`\".$field.\"` = '\".$value.\"'\";\n\t}\n\t$data_string = implode(\",\", $fild_value);\n\n\t$sql = \"INSERT INTO `$table` SET \".$data_string;\n\t\n\t$query = mysqli_query($con,$sql);\n\tif($query){\n\t\treturn true;\n\t}else{\n\t\treturn mysqli_error($con);\n\t}\n}", "function simpandata($table,$data){\n\t\treturn $this->db->insert($table,$data);\n\t}", "function dbInsert($edit)\r\n\t{\r\n\r\n\t}", "function addGenericData($table=null,$data=null)\n {\n if($table!=null && $data!=null)\n {\n $this->db->insert($table, $data);\n return $this->db->insert_id();\n\n }\n }", "function add( $obj )\r\n\t{\r\n\t\tif ( $this->signUseID == true) {\r\n\t\t\t$pos = $obj->primary_key_value();\r\n\t\t\t$this->data[ $pos ] = $obj;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->data[] = $obj;\r\n\t\t}\r\n\t}", "public function add() {\n $mysqli = Database::getMYSQLI();\n \n $stmt = $mysqli->prepare(\"\n INSERT INTO lessons (title, subject, description, resources, persons_ID, \n date_created, search_field)\n VALUES (?,?,?,?,?,?,?)\");\n \n $stmt->bind_param('ssssiss', $this->title, $this->subject, $this->description, \n $this->resources, $this->personsID, $this->dateCreated, $this->searchField);\n \n $stmt->execute();\n $stmt->close();\n $insertID = $mysqli->insert_id;\n $mysqli->close();\n \n // Return ID of inserted record.\n return $insertID;\n }", "public function addChild(Doctrine_Record $record);", "function add_tarifa($params)\n {\n $this->db->insert('tarifa',$params);\n return $this->db->insert_id();\n }", "public function add($data = array())\n {\n return $this->db->insert($this->tableName, $data);\n }", "private function addDBRow(array $data = [])\n {\n $action = 'create';\n if ( $this->exists ) {\n return $this->addError( \"Can't \"\n . $this->getActionString( 'present', $action )\n . '. ' . ucfirst( $this->entityName )\n . ' ' . $this->getIDBadge( null, 'danger' ) . ' already exists.' );\n }\n if ( empty( $data ) ) {\n return $this->addError( \"Can't \" . $this->getActionString( 'present', $action ) . '. No data to put into database.' );\n }\n\n $result = $this->db->add( $this->tableName, $data );\n if ( phValidateID( $result ) ) {\n $this->id = phValidateID( $result );\n $this->messages->add(\n ucfirst( $this->getActionString( 'past', $action ) ) . $this->getIDBadge( null, 'primary' )\n , 'success'\n );\n $this->changed = [];\n $this->redirectAfterUpdate = true;\n return $this->id;\n }\n return $this->addError( 'Failed to ' . $this->getActionString( 'present', $action ) . '.' );\n }", "public function pushRecord()\r\n {\r\n\r\n }", "abstract public function insert(string $table, array $row, array $options = []);", "public static function add($data){\n DB::table('order_items')->insert($data);\n }", "public function insert()\n\t{\n\t\t$crud = $this->crud->data([\n\t\t\t'first_name' => $_POST['first_name'],\n\t\t\t'last_name' => $_POST['last_name'],\n\t\t]);\n\t\t$crud->insert();\n\t\t$this->redirect('crud');\n\t}" ]
[ "0.72459435", "0.71496356", "0.69956183", "0.69661665", "0.6891211", "0.6882587", "0.68729186", "0.6843317", "0.6827924", "0.6781718", "0.6763732", "0.67244714", "0.66673464", "0.6663619", "0.6633237", "0.66299826", "0.6629035", "0.66114223", "0.65507394", "0.6550169", "0.6531431", "0.6518043", "0.65098125", "0.64952034", "0.64770955", "0.64725375", "0.64694685", "0.6466576", "0.6463833", "0.64605415", "0.6454938", "0.64284587", "0.64181936", "0.6414796", "0.64109915", "0.64100343", "0.64078593", "0.637005", "0.635967", "0.63552225", "0.63294524", "0.63171506", "0.63164294", "0.63152164", "0.6314757", "0.6311504", "0.6308578", "0.63001776", "0.6275957", "0.62676007", "0.62655795", "0.6260375", "0.625674", "0.6255496", "0.6253363", "0.6250072", "0.6238384", "0.62367946", "0.6220995", "0.621787", "0.6215116", "0.62084544", "0.6205212", "0.6199896", "0.6199896", "0.61975145", "0.6190687", "0.6187003", "0.61847204", "0.6184165", "0.6181052", "0.6179006", "0.61768407", "0.61760384", "0.61743927", "0.61635333", "0.6159731", "0.61466587", "0.6139301", "0.61302435", "0.61256135", "0.6122162", "0.6121967", "0.611543", "0.6114696", "0.61082476", "0.6107583", "0.6097592", "0.6094993", "0.60940325", "0.6091436", "0.60786235", "0.607681", "0.607453", "0.6064929", "0.606089", "0.606016", "0.60530347", "0.6047355", "0.604542", "0.60441303" ]
0.0
-1
Function to Delete selected record from table
public function delete_record($id){ $this->db->where('award_id', $id); $this->db->delete('awards'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteRecord()\n { \n $sql = \"DELETE FROM Cubans WHERE Id = :Id\";\n $statement = $this->connect->prepare($sql);\n $statement->bindValue(':Id', $this->id);\n $statement->execute();\n }", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "function delete_record () { //deletes a record\n\t\t\n\t\t//deletes record\n\t\t$pdo = Database::connect();\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t$sql = \"DELETE FROM customers WHERE id = ?\";\n\t\t$q = $pdo->prepare($sql);\n\t\t$q->execute(array($_GET['id']));\n\t\tDatabase::disconnect();\n\t\theader(\"Location: customer.php\");\n\t\t\t\n\t}", "public function DeleteRecord()\n {\n // TODO: support delete multiple records\n // read the id array from the check box list _REQUEST['row_selections']\n global $g_BizSystem;\n $values = $g_BizSystem->GetClientProxy()->GetFormInputs('row_selections',false);\n if ($values)\n {\n foreach ($values as $id)\n {\n $recArray = $this->GetDataObj()->FetchById($id);\n $dataRec = new DataRecord($recArray, $this->GetDataObj());\n // take care of exception\n try {\n $dataRec->Delete();\n }\n catch (BDOException $e)\n {\n // call $this->ProcessBDOException($e);\n $this->ProcessBDOException($e);\n return;\n }\n }\n }\n else // delete current focused record\n {\n $rec = $this->GetActiveRecord();\n if (!$rec) return;\n global $g_BizSystem;\n //$recId = $this->m_ActiveRecord[\"Id\"];\n $ok = $this->GetDataObj()->DeleteRecord($rec);\n if (!$ok)\n return $this->ProcessDataObjError($ok);\n }\n $this->m_RecordId = null; // clean the current record id\n // TODO: adjust current page. if current page return no record, goto prev page\n \n return $this->ReRender();\n }", "public function delete() {\n global $db;\n $this->_predelete();\n $result = $db->query(\"DELETE FROM \".$this->table.\" WHERE \".$this->id_field.\"=?\", array($this->{$this->id_field}));\n $this->_postdelete($result);\n return $result;\n }", "public function delete()\n\t{\n\t\tif ($this->data['id'])\n\t\t{\n\t\t\treturn $this->db->delete($this->table_name, array('id' => $this->data['id']));\n\t\t}\n\t}", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "public function deleteRow($row);", "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }", "public function delete() {\n\t\ttry {\n\t\t\tif($this->_state == self::STATE_UNCHANGED) {\n\t\t\t\t$sql = 'DELETE FROM ' . self::sanitize($this->_table->getProperty('name')) . ' WHERE ' . self::sanitize($this->_key_primary->name) . ' = ' . self::sanitize($this->_data[$this->_key_primary->name]);\n\t\t\t\t\\Bedrock\\Common\\Logger::info('Deleting record with query: ' . $sql); echo $sql;\n\t\t\t\t$this->_connection->exec($sql);\n\t\t\t}\n\t\t\telseif($this->_state == self::STATE_CHANGED) {\n\t\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('Unsaved changes found, cannot delete record.');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('Record not found in database.');\n\t\t\t}\n\t\t}\n\t\tcatch(\\PDOException $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('A database error was encountered, the record could not be deleted.');\n\t\t}\n\t\tcatch(\\Exception $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('The record could not be deleted.');\n\t\t}\n\t}", "public function deleteSelected()\n {\n PatientRecord::whereIn('id', $this->selectedKeys())->delete();\n }", "function delete()\r\n\t{\r\n\t\t// Check for request forgeries\r\n\t\tJRequest::checkToken() or die( 'Invalid Token' );\r\n\t\tglobal $mainframe;\r\n\t\t$model\t= &$this->getModel( 'table' );\r\n\t\t$ids = JRequest::getVar('ids', array(), 'request', 'array');\r\n\t\t$model->deleteRows( $ids );\r\n\t\tif ( JRequest::getVar('format') == 'raw') {\r\n\t\t\tJRequest::setVar( 'view', 'table' );\r\n\t\t\t$this->display();\r\n\t\t} else {\r\n\t\t\t//@TODO: test this\r\n\t\t\t$ref = JRequest::getVar( 'fabrik_referrer', \"index.php\", 'post' );\r\n\t\t\t$mainframe->redirect( $ref, count($ids) . \" \" . JText::_( 'RECORDS DELETED' ) );\r\n\t\t}\r\n\t}", "function deleteRecord($table,$where) \t{\n\t\t$query = \"DELETE FROM \".$this->tablePrefix .$table.' WHERE '.$where ;\n $res = $this->execute($query);\n\n\t}", "function DeleteRecord($tabel_name='',$where='')\n {\n $param = ['is_delete'=>1];\n $this->db\n ->where($where)\n ->update($tabel_name,$param);\n }", "protected function delete() {\n $this->db->deleteRows($this->table_name, $this->filter);\n storeDbMsg($this->db);\n }", "function deleteRow($pairId)\r\n\r\n{\r\n global $dbh;\r\n\r\n $select = \"DELETE from flashcard WHERE pairId=:pairId\";\r\n\r\n // prepare statement\r\n $statement = $dbh->prepare($select);\r\n\r\n // bind parameters\r\n $statement->bindValue(':pairId', $pairId);\r\n\r\n // execute statement\r\n $success = $statement->execute();\r\n\r\n return $success;\r\n}", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n }", "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}", "function delete_record ($fieldName,$id,$tblName){\n\t\n\t\t$this->load->model('Common_function_model','common');\n\t\t\n\t\t$this->db->where($fieldName, $id);\n\n\t\tif($this->db->delete($tblName))\n\t\t\treturn true;\n\t\telse\n\t\t\t return false;\n\t\t\n }", "function Delete()\n\t{\n\t\tglobal $dal_info;\n\t\t\n\t\t$deleteFields = \"\";\n\t\t$tableinfo = &$dal_info[ $this->infoKey ];\n\t\t//\tprepare parameters\t\t\n\t\tforeach($tableinfo as $fieldname => $fld)\n\t\t{\n\t\t\tif( isset($this->{$fld['varname']}) )\n\t\t\t{\n\t\t\t\t$this->Param[ $fieldname ] = $this->{$fld['varname']};\n\t\t\t}\n\t\t\t\n\t\t\tforeach($this->Param as $field => $value)\n\t\t\t{\n\t\t\t\tif( strtoupper($field) != strtoupper($fieldname) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t$deleteFields.= $this->_connection->addFieldWrappers( $fieldname ).\"=\". $this->PrepareValue($value, $fld[\"type\"]) . \" and \";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//\tdo delete\n\t\tif ($deleteFields)\n\t\t{\n\t\t\t$deleteFields = substr($deleteFields, 0, -5);\n\t\t\t$dalSQL = \"delete from \".$this->_connection->addTableWrappers( $this->m_TableName ).\" where \".$deleteFields;\n\t\t\t$this->_connection->exec( $dalSQL );\n\t\t}\n\t\n\t\t//\tcleanup\n\t $this->Reset();\n\t}", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "function delete() {\n\t\t$sql = \"DELETE FROM cost_detail\n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq));\n\t}", "function delete()\n {\n if ($this->GET('sure')) {\n $function = basename($this->table->tablename()) . \"_onRowDelete\";\n if (function_exists($function)) {\n $function($this->table->data($this->GET('id')), &$this->table);\n }\n\n $this->table->delete($this->GET('id'));\n $this->table->write();\n $this->browse();\n return;\n }\n $this->displayHead();\n echo 'Do you really want to<br>delete row \\'' . $this->GET('id') . '\\'?<p>';\n echo '<a class=\"danger\" href=\"' . $this->SELF . '?method=delete&table=' . $this->table->tablename() . '&id=' . $this->GET('id') . '&sure=1\">Yes</a> | ';\n echo '<a href=\"' . $this->SELF . '?method=browse&table=' . $this->table->tablename() . '\">No</a>';\n }", "public function delete(){\n\t\t$parametro = func_get_args();\t\t\n\t\t$resultado=$this->execSql($this->DELETE,$parametro);\n\t\tif (!$resultado){\n\t\t\t$this->onError(\"COD_DELETE\",$this->DELETE);\n\t\t}\n\t\treturn $resultado;\n\t}", "public function do_delete_record()\n {\n $v_list_delete = get_post_var('hdn_item_id_list','');\n $this->model->do_delete_record($v_list_delete);\n }", "public function delete()\n{//delete\n $sql = \"DELETE FROM pefs_database.pef_assessor WHERE ase_id = ?\";\n $this->db->query($sql,array($this->ase_id)); \n}", "public function delete(){\r\n\t\t// goi den phuong thuc delete cua tableMask voi id cua man ghi hien hanh\r\n\t\t$mask = $this->mask();\r\n\t\treturn $mask->delete(array($mask->idField=>$this->id));\r\n\t\t// $query = \"DELETE FROM $this->tableName WHERE id='$this->id'\";\r\n\t\t// $conn = self::getConnect()->prepare($query);\r\n\t}", "public function deleteRecord($id){\n\t}", "public function actionRemove()\n {\n $delete_record = new DeleteRecord();\n $result = Yii::$app->request->post('selection');\n\n if (!$delete_record->isOkPermission(ACTION_DELETE)\n || !$delete_record->isOkSelection($result)\n ) {\n return $this->redirect([ACTION_INDEX]);\n }\n\n $nro_selections = sizeof($result);\n $status = [];\n for ($counter = 0; $counter < $nro_selections; $counter++) {\n try {\n $primary_key = $result[$counter];\n $model = Permission::findOne($primary_key);\n $item = $delete_record->remove($model, 0);\n $status[$item] .= $primary_key . ',';\n } catch (Exception $exception) {\n $bitacora = new Bitacora();\n $bitacora->registerAndFlash(\n $exception,\n 'actionRemove',\n MSG_ERROR\n );\n }\n }\n\n $delete_record->summaryDisplay($status);\n return $this->redirect([ACTION_INDEX]);\n }", "function del_by_id($table,$kode){\n\t\t$this->db->where('username',$kode);/*ative record*/\n\t\t$this->db->delete($table);\n\t}", "function delete_record($table, $arg, $column_id)\n{\n $ci = & get_instance();\n $db_debug = $ci->db->db_debug;\n $ci->db->db_debug = FALSE;\n $ci->db->where([$column_id => $arg]);\n $ci->db->delete($table);\n if ($ci->db->affected_rows() > 0) {\n return TRUE;\n } else {\n return FALSE;\n }\n $ci->db->db_debug = $db_debug;\n}", "public function delete() {\n\t\t$dbh = App::getDatabase()->connect();\n\n\t\t$query = \"DELETE FROM \".$this->getTableName();\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= \"\\n\".(($fl) ? \"WHERE\" : \"AND\").\" \".$column.\" = '\".$val.\"'\";\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$res = $dbh->exec($query);\n\t\t$dbh = null;\n\t\treturn $res;\n\t}", "public function deleteRecord ($id);", "final static public function SQLDelete($id){\n\t\t$record = new static::$modelNM();\t//instantiate new object\n\t\t$record->id = $id;\n\t\t$record->GoFunction(\"Delete\");\t//Run Delete() in modol class and echo success or not\n\t\t//return self::showData();\t//return display html table code from ShowData\n\t}", "public final function delete() {\n\t\t$sql = \"\n\tDELETE FROM\n\t\t\" . $this->table . \"\n\tWHERE\n\t\t\" . $this->primaryField . \" = ?\n\t;\";\n\n\t\t$db = new MySQL();\n\t\t$statement = $db->prepare($sql);\n\t\t$status = $statement->execute(array($this->{$this->primaryField}));\n\t\t$statement = NULL;\n\n\t\treturn $status;\n\t}", "function delete() {\n \tglobal $mysql;\n \tif(empty($this->id)) return;\n \t$tablename = $this->class_name();\n \t$id = $this->id;\n \t$query = \"DELETE FROM $tablename WHERE id=$id\";\n \t$mysql->update($query);\n }", "function delete($tabla,$campo,$criterio){\n\treturn $GLOBALS['cn']->query('DELETE FROM '.$tabla.' WHERE '.$campo.'=\"'.$criterio.'\"');\n}", "function delete($tabla,$campo,$criterio){\n\treturn $GLOBALS['cn']->query('DELETE FROM '.$tabla.' WHERE '.$campo.'=\"'.$criterio.'\"');\n}", "public function delete_form_db($conn,$table,$condition_column,$condition_data,$userid){\r\n $query=\"DELETE FROM \".$table.\" WHERE \".$condition_column.\"= :data AND user_id= \".$userid;\r\n $get=$conn->prepare($query);\r\n $get->bindValue(':data', $condition_data);\r\n if($get->execute()){return true;}\r\n\r\n\r\n}", "function del($fp_rowId)\n {\n foreach ((array)$fp_rowId as $k => $id) {\n $this->db->or_where('id', $id);\n }\n $this->db->from($this->table);\n $this->db->delete($this->table);\n //dump($this->db->last_query());\n return true;\n }", "public function delete( $value = NULL, $field = 'id' );", "function delete($table, $id){\n\nglobal $conn;\n$sql = \"DELETE FROM $table WHERE id=?\";\n\n$stmt = executeQuery($sql, ['id' => $id]);\nreturn $stmt->affected_rows;\n}", "function delete($id) {\n return $this->db->deleteParameters(self::TABLA, array('id' => $id));\n }", "function row_delete()\n\t{\n\t $this->db->where('id', $id);\n\t $this->db->delete('testimonials'); \n\t}", "function delete_($id){\r\nglobal $mod_id;\r\nglobal $db;\r\nglobal $_POST;\r\nglobal $tbl_name_main;\r\nglobal $tbl_name_detail;\r\n\r\n$sql =\"DELETE \";\r\n$sql .=\"FROM \".$tbl_name_main.\" \";\r\n$sql .=\"WHERE id_form_rfk_02_jp_main = '$id'\";\r\n\r\n$sqlresult = $db->Execute($sql);\r\n}", "function deleteRecord($table_name,$uid,$conn){\n\t\t$sql = \"DELETE FROM $table_name WHERE uid=$uid\";\n\n\t\tif ($conn->query($sql) === TRUE) {\n\t\t echo \"Record deleted successfully\";\n\t\t} else {\n\t\t echo \"Error deleting record: \" . $conn->error;\n\t\t}\n\t}", "public function deletePostSelection(){\n if(!empty($_POST['dg_item']))\n return $this->CI->db\n ->from($this->tbl_name)\n ->where_in($this->pk_col,$_POST['dg_item'])\n ->delete();\n }", "abstract public function deleteRecord($tableName, $where);", "public function delete($rowid)\n {\n $this->db->where('id',$rowid);\n $this->db->delete('goods');\n }", "public function deleteStudentInfoFromEventTable(){\n \n $deleteId = $_POST[\"edeleteId\"];\n \n if ($this->databaseConnection()){\n $queryDelete = $this->db_connection->prepare('DELETE FROM events WHERE eid = :deleteId');\n $queryDelete->bindValue(':deleteId', $deleteId ,PDO::PARAM_INT);\n $queryDelete->execute();\n // Return something to display the we have delete the entry \n }\n }", "public function deleteStudentFromBranchTable(){\n\n $deleteId = $_POST[\"bdeleteId\"];\n \n if ($this->databaseConnection()){\n $queryDelete = $this->db_connection->prepare('DELETE FROM branch WHERE bid = :deleteId');\n $queryDelete->bindValue(':deleteId', $deleteId ,PDO::PARAM_INT);\n $queryDelete->execute();\n // Return something to display the we have delete the entry \n }\n }", "public function delete()\n {\n $database = cbSQLConnect::adminConnect('object');\n if (isset($database))\n {\n return ($database->SQLDelete(self::$table_name, 'id', $this->id));\n }\n }", "public function deleteData()\n {\n DB::table($this->dbTable)\n ->where($this->where)\n ->delete();\n }", "function deleteRecord()\t{\n\t\tif ($this->conf['delete'])\t{\t// If deleting is enabled\n\t\n\t\t\t$origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $this->recUid);\n\t\t\tif (($GLOBALS['TSFE']->loginUser && $this->conf['requireLogin']) || ( $this->aCAuth($origArr)&& $this->conf['requireLogin'])||!$this->conf['requireLogin'])\t{\t// Must be logged in OR be authenticated by the aC code in order to delete\n\t\t\t\t\t// If the recUid selects a record.... (no check here)\n\t\t\t\tif (is_array($origArr))\t{\n\t\t\t\t\tif ($this->aCAuth($origArr) || $this->metafeeditlib->DBmayFEUserEdit($this->theTable,$origArr, $GLOBALS['TSFE']->fe_user->user,$this->conf['allowedGroups'],$this->conf['fe_userEditSelf'],$this->conf))\t{\t// Display the form, if access granted.\n\t\t\t\t\t\tif (!$GLOBALS['TCA'][$this->theTable]['ctrl']['delete'])\t{\t// If the record is fully deleted... then remove the image (or any file) attached.\n\t\t\t\t\t\t\t$this->deleteFilesFromRecord($this->recUid);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->cObj->DBgetDelete($this->theTable, $this->recUid, TRUE);\n\t\t\t\t\t\t$this->currentArr = $origArr;\n\t\t\t\t\t\t$this->saved = 1;\n\t\t\t\t\t\t$this->userProcess_alt($conf['edit.']['userFunc_afterDelete'],$conf['edit.']['userFunc_afterDelete.'],array('rec'=>$this->currentArr, 'origRec'=>$origArr));\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t }\n\t\t}\n\t}", "public function delete(){\n\t\tglobal $db;\n\t\t$response = array('success' => false);\n\t\t$response['success']=$db->delete($this->table, \"id = $this->id\");\n\t return $response;\n\t}", "function PersonalData_Deleted($row) {\n\n\t//echo \"PersonalData Deleted\";\n}", "function delete() {\n\t \t$sql = \"DELETE FROM evs_database.evs_identification\n\t \t\t\tWHERE idf_id=?\";\n\t \t$this->db->query($sql, array($this->idf_id));\n\t\t\n\t }", "function my_delete_record( $table_name , $field_key , $data_id){\r\n\tglobal $connection;\t\r\n\t\r\n\t$query = \"DELETE FROM `\".$table_name.\"` WHERE `\".$field_key .\"` = \". $data_id ;\r\n\t$result = my_query( $query );\r\n\t\r\n\treturn $connection->affected_rows ;\r\n}", "function PersonalData_Deleted($row) {\r\n\r\n\t//echo \"PersonalData Deleted\";\r\n}", "function delete()\n {\n $this->object->select();\n $this->object->_query_args['is_select'] = FALSE;\n $this->object->_query_args['is_delete'] = TRUE;\n return $this->object;\n }", "public function delete_record()\n {\n $id = $this->input->get('tpid');\n\n $result = $this->PumpModel->delete_data(array('tpid'=>$id));\n // print_r($result);die;\n redirect(base_url(). 'Pump');\n }", "function delete_data($table, $id){\n\n $query = $this->db->delete($table, array('id' => $id));\n\n }", "public function delete () {\n $this->db->delete('emprestimos', array('id_emprestimo' => $this->id_emprestimo));\n }", "public function delete()\n {\n $class = strtolower(get_called_class());\n $table = self::$_table_name != null ? self::$_table_name : $class . 's';\n\n $pdo = PDOS::getInstance();\n\n $whereClause = '';\n foreach (static::$_primary_keys as $pk)\n $whereClause .= $pk . ' = :' . $pk . ' AND ';\n $whereClause = substr($whereClause, 0, -4);\n $sql = 'DELETE FROM ' . $table . ' WHERE ' . $whereClause;\n $query = $pdo->prepare($sql);\n $attributes = $this->getAttributes(new \\ReflectionClass($this));\n foreach ($attributes as $k => $v)\n {\n if (in_array($k, static::$_primary_keys))\n $query->bindValue(':' . $k, $v);\n }\n $query->execute();\n }", "function Delete() {\n include('database_connection.php');\n \n if(isset($_POST[\"id\"]))\n {\n $query = \"\n DELETE FROM Task \n WHERE id = '\".$_POST[\"id\"].\"'\n \";\n $statement = $connect->prepare($query);\n $statement->execute();\n}\n\n }", "public function deleteRow($Cleaner_Name){\n\n $params = array(\n 'Supervisor_Name' => $this->Supervisor_ID,\n 'Cleaner_Name' => $this->Cleaner_Name,\n 'Cleaner_Email' => $this->Cleaner_Email,\n 'Cleaner_Phone' => $this->Cleaner_Phone,\n 'Cleaner_PPS' => $this->Cleaner_PPS,\n 'Cleaner_Rate' => $this->Cleaner_Rate,\n 'Cleaner_Type' => $this->Cleaner_Type,\n \n \n );\n\ntry{\n $pdo = new PDO(\"mysql:host=localhost;dbname=cleaning_db\", \"root\", \"\");\n // Set the PDO error mode to exception\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n} catch(PDOException $e){\n die(\"ERROR: Could not connect. \" . $e->getMessage());\n}\n\ntry{\n $sql = \"DELETE FROM cleaner_tbl WHERE Cleaner_Name= \" .$Cleaner_Name; \n $pdo->exec($sql);\n echo \"Records were deleted successfully.\";\n} catch(PDOException $e){\n die(\"ERROR: Could not execute $sql. \" . $e->getMessage());\n}\n\nunset($pdo);\n}", "public function delete(){\r\n $id=$_POST['del_row'];\r\n $id=implode(',',$id);\r\n $this->Events_Model->delete($this->table,$id);\r\n}", "function delete_one_record($id=\"\",$table,$column=\"id\") {\n global $lang,$db;\n\n if (empty($id)) return;\n\n $query=\"SELECT $column FROM $table WHERE id=?\";\n $prepared_query=$db->PrepareQuery($query);\n if ($prepared_query) {\n $db->QuerySetText($prepared_query,1,$id);\n $result=$db->ExecuteQuery($prepared_query);\n if ($result!=0) {\n $num_rows=$db->NumberOfRows($result);\n if ($num_rows>0) {\n $column=$db->FetchResult($result,0,\"$column\");\n\n // usun produkt\n $query=\"DELETE FROM $table WHERE id=?\";\n $prepared_query=$db->PrepareQuery($query);\n if ($prepared_query) {\n $db->QuerySetText($prepared_query,1,$id);\n $result=$db->ExecuteQuery($prepared_query);\n if ($result!=0) {\n print \"&nbsp; &nbsp; $column -\".$lang->deleted.\"<br>\";\n } else die ($db->Error());\n } else die ($db->Error());\n } else {\n print $lang->delete_not_found.\" id=$id<BR>\";\n }\n } else die ($db->Error());\n } else die ($db->Error());\n\n return;\n }", "public function deleteRecord($table ,$where = false){\n\t\tif($where){\n\t\t\t$where = $this->makeWhere($where);\n\t\t}\n\t\t$query = \"DELETE FROM $table \".$where;\n\t\t$this->query($query);\n\t}", "public function delete() {\n\t\tif (!empty($this->originalData)) {\n\t\t\t$query = $this->connection->query(\"DELETE FROM {$this->table} WHERE \".self::$primaryKey[$this->table].\"='{$this->originalData[self::$primaryKey[$this->table]]}'\");\n\t\t\t$query = $this->connection->query(\"ALTER TABLE $this->table AUTO_INCREMENT = 1\");\n\t\t\t$this->originalData = array();\n\t\t}\t\n\t\telse \n\t\t\tthrow new Exception('You are trying to delete an inexistent row');\n\t}", "function Delete ($table, $select)\r{\r\tif ($GLOBALS['feedback']) echo \"Delete($table,$select)\\n\";\r\r\tmysql_select_db ($GLOBALS['db']['db'], $GLOBALS['db']['link']);\r\t$query_delete = \"DELETE FROM `$table` WHERE $select\";\r\tmysql_query ($query_delete, $GLOBALS['db']['link']) or exit (mysql_error());\r}", "public function delete( $args ) {\n\t\t$db = new \\WordPress\\CMS\\DB\\Database( $this->wpdb );\n\t\t$table = $db->get_table( $args['table'] );\n\t\t$record_ident = isset( $args['ident'] ) ? $args['ident'] : false;\n\t\tif ( ! $record_ident ) {\n\t\t\twp_safe_redirect( $table->get_url() );\n\t\t\texit;\n\t\t}\n\n\t\t// Ask for confirmation.\n\t\tif ( ! isset( $_POST['confirm_deletion'] ) ) {\n\t\t\t$template = new \\WordPress\\CMS\\Template( 'record/delete.html' );\n\t\t\t$template->table = $table;\n\t\t\t$template->record = $table->get_record( $record_ident );\n\t\t\treturn $template->render();\n\t\t}\n\n\t\t// Delete the record.\n\t\tcheck_admin_referer( 'cms-record-delete-' . $record_ident );\n\t\ttry {\n\t\t\t$this->wpdb->query( 'BEGIN' );\n\t\t\t$table->delete_record( $record_ident );\n\t\t\t$this->wpdb->query( 'COMMIT' );\n\t\t} catch ( \\Exception $e ) {\n\t\t\t$template = $this->get_template( $table );\n\t\t\t$template->record = $table->get_record( $record_ident );\n\t\t\t$template->add_notice( 'error', $e->getMessage() );\n\t\t\treturn $template->render();\n\t\t}\n\n\t\twp_safe_redirect( $table->get_url() );\n\t\texit;\n\t}", "public function deleteRow($postArray,$editId,$tableName)\n{\n $retString='';\n \n $retString=$this->deletePreProcessing($postArray,$editId);\n \n $sql=\"delete from $tableName where id=$editId\";\n \n $ret=$this->updateTableData($sql,false);\n \n}", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "function del($param) {\n extract($param);\n $conexion->getPDO()->exec(\"DELETE FROM operario WHERE fk_usuario = '$id'; \n DELETE FROM usuario WHERE id_usuario='$id'\");\n echo $conexion->getEstado();\n }", "public function delete($entity){ \n //TODO: Implement remove record.\n }", "function deleteRecordByCondition($tablename, $condition) {\n $ci = & get_instance();\n $ci->load->database();\n $ci->db->delete($tablename, $condition);\n}", "public function delete_record($table,$id)\r\n {\r\n // echo $table.\",\".$id;\r\n\r\n $sql = \"DELETE FROM \".$table.\" WHERE id='\".$id.\"'\";\r\n $query = mysqli_query($this->con,$sql);\r\n if($query)\r\n {\r\n return true;\r\n }\r\n }", "public function delete() {\n $where = func_get_args();\n $this->_set_where($where);\n\n $this->_callbacks('before_delete', array($where));\n\n $result = $this->db->delete($this->_table());\n\n $this->_callbacks('after_delete', array($where, $result));\n\n return $this->db->affected_rows();\n }", "public function delete(){\r\n\t\tif(!$this->input->is_ajax_request()) show_404();\r\n\r\n\t\t//$this->auth->set_access('delete');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\tif($this->input->post('ang_id') === NULL) ajax_response();\r\n\r\n\t\t$all_deleted = array();\r\n\t\tforeach($this->input->post('ang_id') as $row){\r\n\t\t\t//$row = uintval($row);\r\n\t\t\t//permanent delete row, check MY_Model, you can set flag with ->update_single_column\r\n\t\t\t$this->m_anggota->permanent_delete($row);\r\n\r\n\t\t\t//this is sample code if you cannot delete, but you must update status\r\n\t\t\t//$this->m_anggota->update_single_column('ang_deleted', 1, $row);\r\n\t\t\t$all_deleted[] = $row;\r\n\t\t}\r\n\t\twrite_log('anggota', 'delete', 'PK = ' . implode(\",\", $all_deleted));\r\n\r\n\t\tajax_response();\r\n\t}", "public function delete()\n\t{\n\t\tDatabase::query(\"\n\t\t\tDELETE FROM\n\t\t\t\t\". $this->tableName .\"\n\t\t\tWHERE\n\t\t\t\tid = '\". $this->id .\"'\n\t\t\");\n\t}", "function deleteRecord($id)\n\t{\n\t\t$this->form->deleteRecord($this->tablename, $id);\n\t}", "public function delete($table);", "public function delete()\r\n {\r\n $recordId = $this->getRecId();\r\n $command = static::getDb()->newDeleteCommand(static::$defaultLayout, $recordId);\r\n try {\r\n $command->execute();\r\n return 1;\r\n } catch (FileMakerException $e) {\r\n $this->addError('delete', $e->getMessage());\r\n return 0;\r\n }\r\n }", "public function delete_extraproduct(){\n if($this->uri->segment(3) == \"temp\"){\n $id = $this->uri->segment(4);\n $result = MU_Model::deletedRecordById(\"temp_table\",array(\"ID\" => $id));\n }else{\n $id = $this->uri->segment(3);\n $result = MU_Model::deletedRecordById(\"extra_acti\",array(\"extraproduct_id\" => $id));\n }\n if($result) echo 't';\n }", "public function actionDelete()\n {\n //Yii::$app->controller->enableCsrfValidation = false;\n //print_r($_POST);\n if($_POST['selection_all']==1){\n DipaMaster::deleteAll();\n return $this->redirect(['index']);\n } else {\n foreach ($_POST['selection'] as $key => $value) {\n $this->findModel($value)->delete();\n }\n return $this->redirect(['index']);\n }\n // $this->findModel($id)->delete();\n\n // return $this->redirect(['index']);\n }", "public function delete(){\n \t\ttry{\n \t\t\t$db = DB::get();\n \t\t\t$sql = \"UPDATE t_\" . self::$Table . \" \n \t\t\t\t\tSET \" . self::$Table . \"_supprime='1' \n \t\t\t\t\tWHERE \" . self::$Table . \"_id = '\".$this->Id.\"' \";\n \t\t\n \t\t\t$result = $db->query($sql);\n \t\t}\n \t\tcatch(Exception $e){\n \t\t\tvar_dump($e->getMessage());\n \t\t}\n }", "public static function delete($id){\n $conexion = new Conexion();\n $sql = $conexion->prepare('DELETE FROM'. self::TABLA .' WHERE id = :id');\n $sql->bindValue(':id', $id);\n $sql->execute();\n return $sql; \n}", "function delete_data($where,$table){\n $this->db->where($where);\n $this->db->delete($table);\n }", "public function deleteRow()\n {\n $sql = 'DELETE FROM productos\n WHERE id_producto = ?';\n $params = array($this->id);\n return Database::executeRow($sql, $params);\n }", "public function deleteRow(Request $request)\n {\n $result=MyRow::where('id',$request->id)->delete();\n if ($result) echo 'Data Deleted';\n }", "function doRealDelete()\n {\n $this->assignSingle();\n /* Delete the record */\n DatabaseBean::dbDeleteById();\n }", "function delete_row($table_name, $redirect_filename, $id_column_name, $row_id)\n{\n ?>\n <td>\n <form class=\"form-horizontal\" action=\"<?= $_SERVER['SCRIPT_NAME'] ?>?p=delete\" method=\"post\">\n <input type=\"hidden\" name=\"table\" value=\"<?= $table_name ?>\">\n <input type=\"hidden\" name=\"return\" value=\"<?= $redirect_filename ?>\">\n <input type=\"hidden\" name=\"id_column\" value=\"<?= $id_column_name ?>\">\n <input type=\"hidden\" name=\"id\" value=\"<?= $row_id ?>\">\n <button type=\"submit\" class=\"btn btn-danger btn-xs\"><span class=\"glyphicon glyphicon-trash\"></span> Delete\n </button>\n </form>\n </td>\n <?php\n}", "function delete($id){\n $this->db->where('id', $id);\n $this->db->delete($this->$tbl_Employeeinfo);\n }", "function delete_emp($emp_id) {\n global $db;\n $query = 'DELETE FROM emps\n WHERE empID = :emp_id';\n $statement = $db->prepare($query);\n $statement->bindValue(':emp_id', $emp_id);\n $statement->execute();\n $statement->closeCursor();\n}", "function deleteRecord($id){\n global $db;\n\n $sql = \"DELETE FROM products WHERE id = $id\";\n Basic::EventLog(\"Products->deleteRecord: \".$sql);\n //Basic::EventLogDB(\"Usuario eliminado - UID:\".$f['uid'].\", Modulo: \".$f['module'].\", Permiso: \".$f['perm']);\n $res =& $db->query($sql);\n return $res;\n }", "function delete($table, $pk, $column = 'id')\n\t{\n\t\tif($statement = $this->query(\"DELETE FROM `$table` WHERE `$column` = ?\", $pk))\n\t\t{\n\t\t\treturn $statement->rowCount();\n\t\t}\n\t}", "public function deleteRecord(){\n\t\t/* Variable initialization */\n\t\t$intEmailCode \t= ($this->input->post('txtDeleteRecordCode') !='') ? getDecyptionValue($this->input->post('txtDeleteRecordCode')) : 0;\n\n\t\t/* if email code is not pass then do needful */\n\t\tif($intEmailCode == 0){\n\t\t\t/* Return error message */\n\t\t\tjsonReturn(array('status'=>0,'message'=>\"Invalid email template code requested.\"), true);\n\t\t}\n\t\t/* Setting the updated array */\n\t\t$strUpdatedArr\t= array(\n\t\t\t\t\t\t\t\t\t'table'=>$this->_strPrimaryTableName,\n\t\t\t\t\t\t\t\t\t'data'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t'deleted'=>1,\n\t\t\t\t\t\t\t\t\t\t\t\t'updated_by'=>$this->getUserCode(),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'where'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t'id'=>$intEmailCode\n\t\t\t\t\t\t\t\t\t\t\t)\n\n\t\t\t\t\t\t\t\t);\n\t\t/* Updating the requested record set */\n\t\t$intNunberOfRecordUpdated = $this->_objDataOperation->setUpdateData($strUpdatedArr);\n\n\t\tif($intNunberOfRecordUpdated > 0){\n\t\t\tjsonReturn(array('status'=>1,'message'=>'Requested email template deleted successfully.'), true);\n\t\t}else{\n\t\t\tjsonReturn(array('status'=>0,'message'=>DML_ERROR), true);\n\t\t}\n\n\t\t/* removed variables */\n\t\tunset($strUpdatedArr);\n\t}", "public function DELETE() {\n #\n }", "public function deleting()\n {\n # code...\n }" ]
[ "0.75734526", "0.7563883", "0.7478249", "0.74060357", "0.7400512", "0.73740226", "0.7373122", "0.7369009", "0.73394644", "0.7317224", "0.73083544", "0.7293077", "0.72828335", "0.7227615", "0.72137", "0.7179755", "0.7174981", "0.7168064", "0.7163909", "0.7138189", "0.711748", "0.71020514", "0.7076628", "0.7070557", "0.70613873", "0.70602936", "0.7026185", "0.7025747", "0.7022592", "0.702156", "0.7007657", "0.7000414", "0.699152", "0.6990984", "0.6985528", "0.6984465", "0.6976078", "0.69697154", "0.69697154", "0.69609773", "0.6943636", "0.6942607", "0.69402814", "0.6935434", "0.69334227", "0.69281644", "0.6927564", "0.6924789", "0.69222605", "0.6915721", "0.6915188", "0.69111586", "0.69101477", "0.691003", "0.6908599", "0.6902075", "0.69004536", "0.6895189", "0.68909746", "0.6870413", "0.6864506", "0.68630755", "0.686161", "0.6858794", "0.68531793", "0.6850742", "0.68479", "0.6844594", "0.6844141", "0.68434435", "0.68430364", "0.68419695", "0.6841537", "0.6839964", "0.68382233", "0.6830361", "0.68254256", "0.68230003", "0.6821805", "0.682083", "0.6820462", "0.6812635", "0.68025374", "0.68023974", "0.679794", "0.67916656", "0.6788871", "0.67848724", "0.6781212", "0.6774429", "0.67723197", "0.67708784", "0.6768541", "0.67645687", "0.67641723", "0.6757866", "0.6756474", "0.6754489", "0.6751308", "0.6746608", "0.6746164" ]
0.0
-1
Function to update record in table
public function update_record($data, $id){ $this->db->where('award_id', $id); if( $this->db->update('awards',$data)) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($record);", "public function updateRow($row);", "public function updateRecord() \n {\n $str = \"Id = :Id\";\n array_walk($this->arrayKeysValues(), function ($value, $key) use (&$str) {\n $str .= \", $key = :$key\";\n });\n $sql = sprintf(\"UPDATE Cubans SET %s WHERE Id = :Id\", $str);\n $statement = $this->connect->prepare($sql);\n $statement->execute(array_merge([\":Id\" => $this->id], $this->arrayKeysValues()));\n }", "abstract public function updateRecord($tableName, $record, $where = '');", "public function update($tblUpdate);", "function adv_update($table, array $data, array $where);", "public function updateRecord(){\n\t\tglobal $db;\n $data = array('email'=>$this->email);\n\t\t\t\t$response = $db->update($this->table,$data,\"id = $this->id\");\n\t\treturn $response;\n\t}", "function updateRecord($table_name,$uid,$update_field,$update_value,$conn){\n\t\t$update_echo = '';\n\n\t\tfor($i=0;$i<count($update_field);$i++){\n\n\t\t\tif ($i==(count($update_field)-1)) {\n\t\t\t\t$update_echo = $update_echo.$update_field[$i].\"='\".$update_value[$i].\"'\";\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$update_echo = $update_echo.$update_field[$i].\"='\".$update_value[$i].\"', \";\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t$sql = \"UPDATE $table_name SET $update_echo WHERE uid=$uid\";\n\n\t\techo $sql;\n\t\t\n\t\tif ($conn->query($sql) === TRUE) {\n\t\t echo \"Record updated successfully\";\n\t\t} else {\n\t\t echo \"Error updating record: \" . $conn->error;\n\t\t}\n\t}", "function my_update_record( $table_name , $primary_key , $data_id , $datas ){\r\n\r\n\tglobal $connection;\r\n\r\n\t$build_query = \" UPDATE `\".$table_name .\"` SET \" ;\r\n\tforeach( $datas as $field => $value ){\r\n\t\r\n\t\t$build_query .= \"`\".$field .\"` = \". $value . \", \";\r\n\t\r\n\t}\r\n\t\r\n\t$query = rtrim( trim($build_query) , \",\" );\r\n\t\r\n\t$update_query = $query .\" WHERE `\".$primary_key.\"` = \". $data_id ; \r\n \r\n\t$result = my_query( $update_query );\r\n\t \r\n\treturn $connection->affected_rows ; \r\n\r\n}", "function updateField() {\n DATABASE::INIT_TABLE($this->database, $this->table);\n $fname = $this->urlParam('fname');\n $fvalue = $this->urlParam('fvalue');\n $id = $this->urlParam('id');\n DATABASE::UPDATE($this->table, [$fname], [$fvalue], $id);\n }", "public function updateRecord ($sqlString);", "public function update(){\r\n\t\tif (!$this->hasChanged) return self::RES_UNCHANGED;\r\n\t\t$table = $this->getTable();\r\n\t\tif ($this->new){\r\n\t\t\tMessages::msg(\"Cannot update record in {$this->getFullTableName()}, because the record doesn't exist.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\tif (!$table->hasPrimaryKey()){\r\n\t\t\tMessages::msg(\"Cannot update record in {$this->getFullTableName()}, because the table does not have a primary key.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$this->beforeCommit();\r\n\t\t\r\n\t\t$vals = array();\r\n\t\t$where = array();\r\n\t\t$changeCount = 0;\r\n\t\t$error = false;\r\n\t\tforeach ($this->values as $name=>$value){\r\n\t\t\tif ($value->isErroneous()){\r\n\t\t\t\tFramework::reportErrorField($name);\r\n\t\t\t\t$error = true;\r\n\t\t\t}\r\n\t\t\tif ($value->hasChanged()){\r\n\t\t\t\t$vals[] = \"`$name` = \".$value->getSQLValue();\r\n\t\t\t\t$changeCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($error){\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($table->getPrimaryKey()->getColumns() as $name){\r\n\t\t\t$where[] = \"`$name` = \".$this->values[$name]->getSQLValue();\r\n\t\t}\r\n\t\t$sql = 'UPDATE '.$this->getFullTableName().' SET '.implode(', ',$vals).' WHERE '.implode(' AND ',$where).' LIMIT 1';\r\n\t\tif (!SQL::query($sql)->success()){\r\n\t\t\tMessages::msg('Failed to update record in '.$this->getFullTableName().'.',Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t$this->hasChanged = false;\r\n\t\tforeach ($this->values as $value){\r\n\t\t\t$value->setHasChanged(false);\r\n\t\t}\r\n\t\t\r\n\t\t$this->afterCommit();\r\n\t\t\r\n\t\treturn self::RES_SUCCESS;\r\n\t}", "function updateOneFieldFromTable($table, $field, $value, $id)\n{\n $result = DatabaseHandler::Execute(\"UPDATE `$table` SET `$field` = '\" . $value . \"' WHERE `id` = $id ;\");\n if($result)\n {\n return true;\n }\n else\n {\n return false;\n }\n \n}", "protected function _update() {\n $this->_getDef();\n \n //prepare\n foreach ($this->_tableData as $field) {\n if($field['primary']) {\n $primaryKey = $field['field_name'];\n $primaryValue = $this->$primaryKey;\n continue;\n }\n \n $sql_fields[] = '`' . $field['field_name'] . '` =?';\n \n $field_name = $field['field_name'];\n \n if(false !== ($overrideKey = $this->_getOverrideKey($field_name))){\n $field_name = $overrideKey;\n }\n \n if($this->$field_name instanceof \\DateTime){\n $$field_name = $this->$field_name->format('Y-m-d H:i:s');\n } elseif(is_array($$field_name)){\n $$field_name = json_encode($$field_name);\n } else {\n $$field_name = $this->$field_name;\n }\n \n $values[] = $$field_name;\n }\n \n $values[] = $primaryValue;\n \n $sql = \"UPDATE `{$this->_table}` SET \" . implode(',', $sql_fields) . \" WHERE `{$primaryKey}` =?\";\n $stmt = Database::connection($this->_connection)->prepare($sql, $values);\n $stmt->execute();\n $this->setLastError(NULL);\n if($stmt->error !== ''){\n $this->setLastError($stmt->error);\n }\n \n $stmt->close();\n \n return $this->getLastError() === NULL ? true : false;\n }", "public function db_update() {}", "public function update($entity){ \n //TODO: Implement update record.\n }", "private function update()\n {\n $queryString = 'UPDATE ' . $this->table . ' SET ';\n foreach ($this->data as $column => $value) {\n if ($column != self::ID) {\n $queryString .= $column . ' =:' . $column . ',';\n }\n }\n $queryString .= ' updated_at = sysdate() WHERE 1 = 1 AND ' . self::ID . ' =:' . self::ID;\n $this->query = $this->pdo->prepare($queryString);\n }", "function update($idMedicalRecord) // Implementation \r\n\t\t{\r\n\t\t\t$this->idMedicalRecord = $idMedicalRecord;\r\n\t\t\t$dbo = database::getInstance(); // pass back that database object already created perhaps\r\n\t\t\t$sql = $this->buildQuery('update'); // what we want to do (update records)\r\n\r\n\t\t\t$dbo->doQuery($sql); // execute query statement\r\n\t\t}", "public function update(Tinebase_Record_Interface $_record) {\n }", "public function SQL_UPDATE() {\r\n\t}", "function updateData($table,$data,$id){\n\t\treturn $this->db->update($table,$data,$id);\n\t}", "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}", "public function update($table);", "public function update($table);", "function UpdateRecord($tabel_name='',$where='', $param)\n {\n $this->db\n ->where($where)\n ->update($tabel_name, $param);\n }", "public function update(){\n\t\t$this->beforeSave();\n\t\t$tableName = $this->tableName();\n\t\t$fields = $this->fields();\n\t\t// Remove fields set as ignored by rules validation.\n\t\t$fields = $this->removeIgnored($fields);\n\t\t// Create PDO placeholders.\n\t\t$params = implode(', ', array_map(fn($name) => $name . ' = :' . $name, $fields));\n\t\t$primaryKey = $this->getPrimaryKey();\n\t\t$where = $primaryKey . ' = :' . $primaryKey;\n\t\t$statement = $this->db->prepare('UPDATE ' . $tableName . ' SET ' . $params . ' WHERE ' . $where);\n\t\t// Bind values to placeholders.\n\t\tforeach($fields as $field){\n\t\t\t$this->binder($statement, ':' . $field, $this->{$field});\n\t\t}\n\t\t$statement->bindValue(':' . $primaryKey, $this->{$primaryKey});\n\t\tif($statement->execute()){\n\t\t\t$this->afterSave();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function update_record () {\n\t\t\n\t\t// validate input\n $valid = true;\n if (empty($this->name)) {\n $this->nameError = 'Please enter Name';\n $valid = false;\n }\n\n if (empty($this->email)) {\n $this->emailError = 'Please enter Email Address';\n $valid = false;\n } \n\n\n if (empty($this->mobile)) {\n $this->mobileError = 'Please enter Mobile Number';\n $valid = false;\n }\n\n // update data\n if ($valid) {\n $pdo = Database::connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql = \"UPDATE customers SET name = ?, email = ?, mobile = ? WHERE id=\".$_GET['id'];\n $q = $pdo->prepare($sql);\n $q->execute(array($this->name,$this->email,$this->mobile));\n Database::disconnect();\n header(\"Location: customer.php\");\n }\n else {\n $this->update();\n }\n\t\n\t}", "public function DoUpdate()\n\t{\n\n\t\treturn db_update_records($this->fields, $this->tables, $this->values, $this->filters);\n\t}", "function update() {\n\t\t\t$updateQuery = \"UPDATE \".$this->table.\" SET \";\n\n\t\t\t$keysAR = array_keys($this->activeRecord);\n\n\t\t\tfor ($loopUp = 0; $loopUp < count($this->activeRecord); $loopUp++) {\n\n $updateQuery .= $keysAR[$loopUp] . \" = ?, \";\n $paramArray[] = $this->activeRecord[$keysAR[$loopUp]];\n\n\t\t\t}\n\n\t\t\t$updateQuery = substr($updateQuery, 0, -2); // Haal de laatste komma weg.\n\n\t\t\t$updateQuery .= \" WHERE \";\n\n\t\t\t// Fetch de primary key van de tabel.\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n $updateQuery .= $kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\n\t\t\t$this->lastQuery = $updateQuery;\n\n $updateTable = $this->mysqlConnection->prepare($this->lastQuery);\n $updateTable->execute($paramArray);\n\n\t\t}", "protected function update() {\n $this->db->updateRows($this->table_name, $this->update, $this->filter);\n storeDbMsg($this->db,ucwords($this->form_ID) . \" successfully updated!\");\n }", "public function update($table, array $data, array $identifier);", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",lastname=\\\"$this->lastname\\\",username=\\\"$this->username\\\",email=\\\"$this->email\\\",kind=\\\"$this->kind\\\",status=\\\"$this->status\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "function update_data($where,$data,$table){\n $this->db->where($where);\n $this->db->update($table,$data);\n }", "function update($table, $id, $data){\n global $conn;\n$sql = \"UPDATE $table SET \";\n\n$i = 0;\n foreach ($data as $key => $value){\n if($i === 0){\n $sql = $sql . \" $key=?\"; \n } else{\n $sql = $sql . \", $key=?\";\n }\n$i++;\n}\n\n$sql = $sql . \" WHERE id=?\";\n$data['id'] = $id;\n$stmt = executeQuery($sql, $data);\nreturn $stmt->affected_rows;\n}", "function UpdateRecord($id,$param) {\n $this->db->where('id_form_bd',$id);\n $this->db->update('form_bd',$param);\n }", "function update($user, $id)\n{\n # update the record\n echo $id;\n $cmd = 'UPDATE ' . TABLE .\n ' SET name = :name, price = :price ' .\n 'WHERE ID = :id';\n $sql = $GLOBALS['db']->prepare($cmd);\n $sql->bindValue(':name', $user['name']);\n $sql->bindValue(':price', $user['price']);\n $sql->bindValue(':id', $id);\n # execute returns true if the update worked, so we don't actually have to test\n # to see if the record exists before attempting an update.\n return $sql->execute();\n}", "function EditRow() {\r\n\t\tglobal $Security, $Language;\r\n\t\t$sFilter = $this->KeyFilter();\r\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\r\n\t\t$conn = &$this->Connection();\r\n\t\t$this->CurrentFilter = $sFilter;\r\n\t\t$sSql = $this->SQL();\r\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\r\n\t\t$rs = $conn->Execute($sSql);\r\n\t\t$conn->raiseErrorFn = '';\r\n\t\tif ($rs === FALSE)\r\n\t\t\treturn FALSE;\r\n\t\tif ($rs->EOF) {\r\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // Set no record message\r\n\t\t\t$EditRow = FALSE; // Update Failed\r\n\t\t} else {\r\n\r\n\t\t\t// Save old values\r\n\t\t\t$rsold = &$rs->fields;\r\n\t\t\t$this->LoadDbValues($rsold);\r\n\t\t\t$rsnew = array();\r\n\r\n\t\t\t// Nro_Serie\r\n\t\t\t$this->Nro_Serie->SetDbValueDef($rsnew, $this->Nro_Serie->CurrentValue, \"\", $this->Nro_Serie->ReadOnly || $this->Nro_Serie->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// SN\r\n\t\t\t$this->SN->SetDbValueDef($rsnew, $this->SN->CurrentValue, NULL, $this->SN->ReadOnly || $this->SN->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Cant_Net_Asoc\r\n\t\t\t$this->Cant_Net_Asoc->SetDbValueDef($rsnew, $this->Cant_Net_Asoc->CurrentValue, NULL, $this->Cant_Net_Asoc->ReadOnly || $this->Cant_Net_Asoc->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Id_Marca\r\n\t\t\t$this->Id_Marca->SetDbValueDef($rsnew, $this->Id_Marca->CurrentValue, 0, $this->Id_Marca->ReadOnly || $this->Id_Marca->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Id_Modelo\r\n\t\t\t$this->Id_Modelo->SetDbValueDef($rsnew, $this->Id_Modelo->CurrentValue, 0, $this->Id_Modelo->ReadOnly || $this->Id_Modelo->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Id_SO\r\n\t\t\t$this->Id_SO->SetDbValueDef($rsnew, $this->Id_SO->CurrentValue, 0, $this->Id_SO->ReadOnly || $this->Id_SO->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Id_Estado\r\n\t\t\t$this->Id_Estado->SetDbValueDef($rsnew, $this->Id_Estado->CurrentValue, 0, $this->Id_Estado->ReadOnly || $this->Id_Estado->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// User_Server\r\n\t\t\t$this->User_Server->SetDbValueDef($rsnew, $this->User_Server->CurrentValue, NULL, $this->User_Server->ReadOnly || $this->User_Server->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Pass_Server\r\n\t\t\t$this->Pass_Server->SetDbValueDef($rsnew, $this->Pass_Server->CurrentValue, NULL, $this->Pass_Server->ReadOnly || $this->Pass_Server->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// User_TdServer\r\n\t\t\t$this->User_TdServer->SetDbValueDef($rsnew, $this->User_TdServer->CurrentValue, NULL, $this->User_TdServer->ReadOnly || $this->User_TdServer->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Pass_TdServer\r\n\t\t\t$this->Pass_TdServer->SetDbValueDef($rsnew, $this->Pass_TdServer->CurrentValue, NULL, $this->Pass_TdServer->ReadOnly || $this->Pass_TdServer->MultiUpdate <> \"1\");\r\n\r\n\t\t\t// Cue\r\n\t\t\t// Fecha_Actualizacion\r\n\r\n\t\t\t$this->Fecha_Actualizacion->SetDbValueDef($rsnew, ew_CurrentDate(), NULL);\r\n\t\t\t$rsnew['Fecha_Actualizacion'] = &$this->Fecha_Actualizacion->DbValue;\r\n\r\n\t\t\t// Usuario\r\n\t\t\t$this->Usuario->SetDbValueDef($rsnew, CurrentUserName(), NULL);\r\n\t\t\t$rsnew['Usuario'] = &$this->Usuario->DbValue;\r\n\r\n\t\t\t// Call Row Updating event\r\n\t\t\t$bUpdateRow = $this->Row_Updating($rsold, $rsnew);\r\n\t\t\tif ($bUpdateRow) {\r\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\r\n\t\t\t\tif (count($rsnew) > 0)\r\n\t\t\t\t\t$EditRow = $this->Update($rsnew, \"\", $rsold);\r\n\t\t\t\telse\r\n\t\t\t\t\t$EditRow = TRUE; // No field to update\r\n\t\t\t\t$conn->raiseErrorFn = '';\r\n\t\t\t\tif ($EditRow) {\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\r\n\r\n\t\t\t\t\t// Use the message, do nothing\r\n\t\t\t\t} elseif ($this->CancelMessage <> \"\") {\r\n\t\t\t\t\t$this->setFailureMessage($this->CancelMessage);\r\n\t\t\t\t\t$this->CancelMessage = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UpdateCancelled\"));\r\n\t\t\t\t}\r\n\t\t\t\t$EditRow = FALSE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Call Row_Updated event\r\n\t\tif ($EditRow)\r\n\t\t\t$this->Row_Updated($rsold, $rsnew);\r\n\t\tif ($EditRow) {\r\n\t\t\t$this->WriteAuditTrailOnEdit($rsold, $rsnew);\r\n\t\t}\r\n\t\t$rs->Close();\r\n\t\treturn $EditRow;\r\n\t}", "private function update_record($table, Array $columns, Array $records, Array $where_columns, Array $where_records, $printSQL = false) {\n\t\treturn $this->get_database_utils ()->update_record ( $table, $columns, $records, $where_columns, $where_records, $printSQL );\n\t}", "private function update_record($table, Array $columns, Array $records, Array $where_columns, Array $where_records, $printSQL = false) {\n\t\treturn $this->get_database_utils ()->update_record ( $table, $columns, $records, $where_columns, $where_records, $printSQL );\n\t}", "private function update_record($table, Array $columns, Array $records, Array $where_columns, Array $where_records, $printSQL = false) {\n\t\treturn $this->get_database_utils ()->update_record ( $table, $columns, $records, $where_columns, $where_records, $printSQL );\n\t}", "public function update(){\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $fieldsList = \" SET \";\n foreach ($this->attributes as $column => $value) {\n $fieldsList.=$column.\"=\".'\\''.$value.'\\''.\", \";\n }\n $fieldsList = str_last_replace(\", \", \"\", $fieldsList);\n $sqlQuery = \"UPDATE \".$this->table.$fieldsList.\" WHERE \".$this->idName.\"=\".$this->attributes[$this->idName];\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n }\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function updateRecord($table = NULL , $columns = NULL, $where = NULL)\n\t{\n\t//echo $table;die;\n\t\t\tif($table == NULL || $columns == NULL)\n\t\t\t{\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\t\n\t\t if($where){\n\t\t\t $this->db->where($where);\n\t\t }\n\t\t \n\t\t //print_r($this->db->last_query()). '<hr>';\n\t\t $result = $this->db->update($table, $columns);\n\t\t return $result;\n\t\t$this->db->close();\t\t\n\t}", "function updateRowById ($tablename, $idField, $updatedRow)\n\t{\n\t\t$this->updateSetWhere($tablename, $updatedRow, \n\t\t\tnew SimpleWhereClause($idField, '=', $updatedRow[$idField]));\n\t}", "function updateRecord($f){\n global $db;\n\n $sql= \"UPDATE products SET \"\n .\"description='\".$f['description'].\"' \"\n .\"WHERE id='\".$f['id'].\"'\";\n Basic::EventLog(\"Product->updateRecord: \".$sql);\n //Basic::EventLogDB(\"Usuario modificado - UID:\".$f['uid'].\", Modulo: \".$f['module'].\", Permiso: \".$f['perm']);\n $res =& $db->query($sql);\n return $res;\n }", "public function update() {\n\t\tif (isset($this->params['updated'])) {\n\t\t\t$this->params['updated'] = null;\n\t\t} // 'updated' is an auto timestamp\n\n\t\t$columns = array();\n\t\tforeach (array_keys($this->params) as $key) {\n\t\t\tarray_push($columns, $key . ' = ?');\n\t\t}\n\t\t$bindings = implode(', ', $columns);\n\t\t$sql = 'UPDATE ' . static::$table . ' SET ' . $bindings . ' WHERE id = ' . $this->get('id') . ' ;';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array_values($this->params));\n\t}", "function dbRowUpdate($table_name, $form_data, $where_clause='')\n{\n // check for optional where clause\n $whereSQL = '';\n if(!empty($where_clause))\n {\n // check to see if the 'where' keyword exists\n if(substr(strtoupper(trim($where_clause)), 0, 5) != 'WHERE')\n {\n // not found, add key word\n $whereSQL = \" WHERE \".$where_clause;\n } else\n {\n $whereSQL = \" \".trim($where_clause);\n }\n }\n // start the actual SQL statement\n $sql = \"UPDATE \".$table_name.\" SET \";\n\n // loop and build the column /\n $sets = array();\n foreach($form_data as $column => $value)\n {\n $sets[] = \"`\".$column.\"` = '\".$value.\"'\";\n }\n $sql .= implode(', ', $sets);\n\n // append the where statement\n $sql .= $whereSQL;\n\n // run and return the query result\n $q = $this->conn->prepare($sql);\n \n return $q->execute() or die(print_r($q->errorInfo()));\n}", "public function update() {\n $Sql = \"UPDATE \" . $this->tableName[0] . \" SET \";\n foreach ($this->fieldListArray as $Key_ => $Value_) {\n $Sql = $Sql . \"$Key_='$Value_', \";\n }\n $Sql = substr($Sql, 0, strlen($Sql) - 2);\n $Sql = $Sql . \" WHERE \";\n foreach ($this->conditionArray as $Key_ => $Value_) {\n $Sql = $Sql . \"$Key_='$Value_' AND \";\n }\n $Sql = substr($Sql, 0, strlen($Sql) - 4);\n //echo $Sql;\n return mysqli_query($this->dataBaseConnect->getConnection(), $Sql);\n }", "public function Do_update_Example1(){\n\n\t}", "final static public function SQLUpdate_11(){\n\t\t$record = new static::$modelNM();\t//instantiate new object\n\t\t$record->id = 11;\n\t\t$record->email = 'kzzz@njit.edu';\n\t\t$record->fname = \"Kan\";\n\t\t$record->lname = \"Zhang\";\n\t\t$record->phone = \"44144414\";\n\t\t$record->birthday = \"1800-01-01\";\n\t\t$record->gender = \"male\";\n\t\t$record->password = \"31s\";\n\t\t$record->GoFunction(\"Update\");\t//Run Update() in modol class and echo success or not\n\t\treturn self::showData();\t//return display html table code from ShowData\t\n\t}", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",comments=\\\"$this->comments\\\",price=\\\"$this->price\\\",brand=\\\"$this->brand\\\",model=\\\"$this->model\\\",y=\\\"$this->y\\\",link=\\\"$this->link\\\",in_existence=\\\"$this->in_existence\\\",is_public=\\\"$this->is_public\\\",is_featured=\\\"$this->is_featured\\\",category_id=\\\"$this->category_id\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function update() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t\r\n\t\t\tif (! isset ( $this->id )) { \r\n\t\t\t\techo \"Fatal Error: Id is not set for the object! Please do \\$objA->setId(\\$id); in: \" . __METHOD__;\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t//check if record exists\r\n\t\t\tif(! $this->exists ()) {\r\n\t\t\t\techo \"Fatal Error: No record found with id of ($this->id)\";\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t$sql = \"UPDATE $this->sqlTable SET \";\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$sql .= \"lp_userid = ?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$sql .= \"lp_random = ?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$sql .= \"lp_deadline = ?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\r\n\t\t\t$sql = preg_replace ( '/, $/', '', $sql);\r\n\t\t\t$sql .= \" WHERE lp_id = ?\";\r\n\t\t\t$arrBindings[] = $this->id;\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "function update_record($dbc, $id, $item_name, $description, $location_id, $owner, $finder, $status) {\n\t$query = 'UPDATE stuff set id = '.$id.', set item_name = '.$item_name.', set description = '.$description.', set location_id = '.$location_id.', set create_date= '.$create_date.' , set owner= '.$owner.', set finder = '.$finder.', set status = '.$status.')' ;\n show_query($query);\n\n $results = mysqli_query($dbc,$query) ;\n check_results($results) ;\n\n return $results ;\n}", "function update_data($where,$data,$table){\n\t\t$this->db->where($where);\n\t\t$this->db->update($table,$data);\n\t}", "abstract function update (\\Database\\Query\\Query $query);", "function updateRecord()\n\t{\n\t\t$data['roleName'] = $this->roleName;\n\t\t$data['roleDesc'] = $this->roleDesc;\n\t\t\n\t $this->db->where('roleID', $this->roleID);\n\t\t$this->db->update('roles', $data); \n\t\t\n\t\tif ($this->db->_error_message())\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "abstract protected function updateModel();", "public function updateRow(Request $request)\n {\n $result=MyRow::where('id',$request->id)->update([$request->column_name=>$request->value]);\n if ($result) echo 'Data Updated';\n }", "function update_data($where,$data,$table){\n $this->db->where($where);\n $this->db->update($table,$data);\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",short_name=\\\"$this->short_name\\\",is_active=\\\"$this->is_active\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function update( $sql, $params=array());", "function fn_update($table, $param, $condition) {\r\n foreach ($param as $key => $value) {\r\n $this->query(\"update $table set $key = $value where $condition\");\r\n }\r\n }", "protected function updateRow()\n { \n $tableName = $this->getTableName($this->className);\n $assignedValues = $this->getAssignedValues();\n $updateDetails = [];\n\n for ($i = 0; $i < count($assignedValues['columns']); $i++) { \n array_push($updateDetails, $assignedValues['columns'][$i] .' =\\''. $assignedValues['values'][$i].'\\'');\n }\n\n $connection = Connection::connect();\n\n $allUpdates = implode(', ' , $updateDetails);\n $update = $connection->prepare('update '.$tableName.' set '. $allUpdates.' where id='.$this->resultRows[0]['id']);\n \n if ($update->execute()) { \n return 'Row updated';\n } else { \n throw new Exception(\"Unable to update row\"); \n }\n }", "function _update($entity)\n {\n $key = $this->object->get_primary_key_column();\n return $this->object->_wpdb()->update($this->object->get_table_name(), $this->object->_convert_to_table_data($entity), array($key => $entity->{$key}));\n }", "public function updateRecord($table_name, $table_field_name, $table_field_data) {\n return $this->db->where($table_field_name)->update($table_name, $table_field_data);\n }", "public function update_record($data, $id){\n\t\t$this->db->where('training_id', $id);\n\t\tif( $this->db->update('training',$data)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "function updateRow($pairId, $question, $answer)\r\n{\r\n global $dbh;\r\n\r\n $select = \"UPDATE flashcard SET question = :question, answer = :answer WHERE pairId=:pairId\";\r\n\r\n // prepare statement\r\n $statement = $dbh->prepare($select);\r\n\r\n // bind parameters\r\n $statement->bindValue(':pairId', $pairId);\r\n $statement->bindValue(':answer', $answer);\r\n $statement->bindValue(':question', $question);\r\n\r\n // execute statement\r\n $success = $statement->execute();\r\n\r\n return $success;\r\n}", "public function queryUpdate($table, $data, $where) : int;", "function update( \\gb\\domain\\DomainObject $object ) {\n //$this->updateStmt->execute( $values );\n }", "function editRecord($rec)\r\n\t\t{\r\n\t\t\t// Create associative array of key fields and data values\r\n\t\t\t$data = array(\"idMedicalRecord\"=>$rec[0],\"medicalRec_weight\"=>$rec[1],\"medicalRec_height\"=>$rec[2],\"medicalRec_bloodPressure\"=>$rec[3],\"medicalRec_temperature\"=>$rec[4],\"medicalRec_bloodIronLevel\"=>$rec[5],\"medicalRec_time\"=>$rec[6],\"medicalRec_date\"=>$rec[7],\"medicalRec_medicalHistory\"=>$rec[8],\"medicalRec_rejectionReason\"=>$rec[9]);\r\n\t\t\t// Bind values to object's attributes\r\n\t\t\t$this->bind($data);\r\n\t\t\t// Add new updated values to table in database to location of given Primary key\r\n\t\t\t$this->update($rec[0]);\r\n\t\t}", "function insert_slash_update($tbl, $data, $field, $id,$where){\n $this->db->where($where);\n $q = $this->db->get($tbl);\n if ( $q->num_rows() > 0 )\n {\n $this->db->where($field,$id);\n $this->db->update($tbl,$data);\n $affectedRows = $this->db->affected_rows();\n if($affectedRows){\n return TRUE;\n }else{\n return FALSE;\n }\n } else {\n $this->db->set($field, $id);\n $this->db->insert($tbl,$data);\n $insertedID = $this->db->insert_id();\n if($insertedID > 0){\n return TRUE;\n }else{\n return FALSE;\n }\n }\n }", "public function update($table, array $fields_arr, $where) {\n }", "public function update_record($table, $dataobject, $bulk=false) {\n\nerror('todo');\n\n global $db, $CFG;\n\n if (! isset($dataobject->id) ) {\n return false;\n }\n\n /// Check we are handling a proper $dataobject\n if (is_array($dataobject)) {\n debugging('Warning. Wrong call to update_record(). $dataobject must be an object. array found instead', DEBUG_DEVELOPER);\n $dataobject = (object)$dataobject;\n }\n\n /// Temporary hack as part of phasing out all access to obsolete user tables XXX\n if (!empty($CFG->rolesactive)) {\n if (in_array($table, array('user_students', 'user_teachers', 'user_coursecreators', 'user_admins'))) {\n if (debugging()) { var_dump(debug_backtrace()); }\n print_error('This SQL relies on obsolete tables ('.$table.')! Your code must be fixed by a developer.');\n }\n }\n\n /// Begin DIRTY HACK\n if ($CFG->dbfamily == 'oracle') {\n oracle_dirty_hack($table, $dataobject); // Convert object to the correct \"empty\" values for Oracle DB\n }\n /// End DIRTY HACK\n\n /// Under Oracle, MSSQL and PostgreSQL we have our own update record process\n /// detect all the clob/blob fields and delete them from the record being updated\n /// saving them into $foundclobs and $foundblobs [$fieldname]->contents\n /// They will be updated later\n if (($CFG->dbfamily == 'oracle' || $CFG->dbfamily == 'mssql' || $CFG->dbfamily == 'postgres')\n && !empty($dataobject->id)) {\n /// Detect lobs\n $foundclobs = array();\n $foundblobs = array();\n db_detect_lobs($table, $dataobject, $foundclobs, $foundblobs, true);\n }\n\n // Determine all the fields in the table\n if (!$columns = $db->MetaColumns($CFG->prefix . $table)) {\n return false;\n }\n $data = (array)$dataobject;\n\n if (defined('MDL_PERFDB')) { global $PERF ; $PERF->dbqueries++; };\n\n // Pull out data matching these fields\n $update = array();\n foreach ($columns as $column) {\n if ($column->name == 'id') {\n continue;\n }\n if (array_key_exists($column->name, $data)) {\n $key = $column->name;\n $value = $data[$key];\n if (is_null($value)) {\n $update[] = \"$key = NULL\"; // previously NULLs were not updated\n } else if (is_bool($value)) {\n $value = (int)$value;\n $update[] = \"$key = $value\"; // lets keep pg happy, '' is not correct smallint MDL-13038\n } else {\n $update[] = \"$key = '$value'\"; // All incoming data is already quoted\n }\n }\n }\n\n /// Only if we have fields to be updated (this will prevent both wrong updates +\n /// updates of only LOBs in Oracle\n if ($update) {\n $query = \"UPDATE {$CFG->prefix}{$table} SET \".implode(',', $update).\" WHERE id = {$dataobject->id}\";\n if (!$rs = $db->Execute($query)) {\n debugging($db->ErrorMsg() .'<br /><br />'.s($query));\n if (!empty($CFG->dblogerror)) {\n $debug=array_shift(debug_backtrace());\n error_log(\"SQL \".$db->ErrorMsg().\" in {$debug['file']} on line {$debug['line']}. STATEMENT: $query\");\n }\n return false;\n }\n }\n\n /// Under Oracle, MSSQL and PostgreSQL, finally, update all the Clobs and Blobs present in the record\n /// if we know we have some of them in the query\n if (($CFG->dbfamily == 'oracle' || $CFG->dbfamily == 'mssql' || $CFG->dbfamily == 'postgres') &&\n !empty($dataobject->id) &&\n (!empty($foundclobs) || !empty($foundblobs))) {\n if (!db_update_lobs($table, $dataobject->id, $foundclobs, $foundblobs)) {\n return false; //Some error happened while updating LOBs\n }\n }\n\n return true;\n }", "public function modifyRecords(){\n \n // Get the sql statement\n $sql = $this->updateSql();\n // Prepare the query\n $stmt = $this->db->prepare($sql);\n\n foreach ($this->requestUpdateValues as $key => $value) {\n $stmt->bindParam($this->params['columnName_Pdo'][$key], $this->requestUpdateValues[$key]);\n }\n \n $stmt->execute();\n \n return true;\n \n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "function update($where) {\n}", "static function update( $table_name, $record, $values, $id_field = 'id', $formats = array() ) {\n global $wpdb;\n \n \n\n if ( is_numeric( $record ) ) {\n $id_record = $record;\n } elseif ( is_object( $record ) ) {\n $id_record = $record->$id_field;\n } elseif ( is_array( $record ) ) {\n $id_record = $record[$id_field];\n }\n\n $where = array(\n $id_field => $id_record\n );\n\n if ( empty( $formats ) ) {\n $result = $wpdb->update( $table_name, $values, $where );\n } else {\n $where_formats = array( '%d' );\n $result = $wpdb->update( $table_name, $values, $where, $formats, $where_formats );\n }\n return $result;\n }", "function update($table,$update,$condition){\n\t$conn=$this->connect();\n $query=\"Update \". $table .\" set \". $update .\" where \". $condition;\n\t//echo $query;\n $res=mysql_query($query); \n \n if(!$res){\n echo \"<br><font color=red>Problem during Record updation.</font>\";\n } else {\n return true;\n }\n\t\n }", "function update($id, $data)\n {\n $this->db->where($this->id,$id);\n $this->db->update($this->table, $data);\n }", "function updateField($table,$field,$value,$id){\n\n global $db;\n\n $sql = \"UPDATE $table SET $field='$value' WHERE id='$id'\";\n //Basic::EventLog(\"Product->updateField: \".$sql);\n $res =& $db->query($sql);\n return $res;\n\n }", "function updateRecord($strTable,$strCommand,$strCondition){\n\t\t$strSQL = \"UPDATE $strTable SET $strCommand WHERE $strCondition \";\n\t\t//print $strSQL;\n\t\treturn @mysql_query($strSQL);\n\t}", "public function update() {\n\t\t$dbh = App::getDatabase()->connect();\n\n\t\t$query = \"UPDATE \".$this->getTableName().\"\n\t\t\t\t SET \";\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(!in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= (($fl) ? \"\" : \", \").$column.\" = \".((is_bool($val)) ? (($val) ? \"TRUE\" : \"FALSE\") : ((is_null($val)||($val === \"\")) ? \"null\" : \"'\".$val.\"'\"));\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= \"\\n\".(($fl) ? \"WHERE\" : \"AND\").\" \".$column.\" = '\".$val.\"'\";\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$res = $dbh->exec($query);\n\t\t$dbh = null;\n\t\treturn $res;\n\t}", "function update($unique_id, $model)\n {\n }", "function update($tbl, $where, $data)\n {\n $this->db->where($where);\n $this->db->update($tbl, $data);\n $affectedRows = $this->db->affected_rows();\n if ($affectedRows) {\n return true;\n } else {\n return $this->db->error();\n }\n }", "function update($table,$modify,$condition){\n $conn=connectDB();\n $query=\"UPDATE $table SET $modify WHERE $condition\"; //$table=table to modify, $modify=column to modify in database with the value, $condition=contition for modifying the database\n $conn->query($query);\n }", "function update_data($table,$col,$id,$data,$cn){\n $str=\"update `$table` set \";\n $cnt=1;\n foreach($data as $key=>$value){\n $str.=\"`$key`='\".addslashes($value).\"'\";\n if($cnt++<count($data))\n $str.=\",\";\n }\n $str.=\" where {$col}=$id\";\n $cn->query($str);\n\n }", "public function update($table, array $fields);", "function UpdateRecord($values)\n {\n $databasename = $this->databasename;\n $tablename = $this->tablename;\n $path = $this->path;\n //dprint_r($_FILES);\n if ( !isset($values[$this->primarykey]) )\n return false;\n $unirecid = $values[$this->primarykey];\n return $this->UpdateRecordBypk($values,$this->primarykey,$values[$this->primarykey]);\n }", "public function update($data) {}", "public function update($data) {}", "function update($table, $data, $idField, $idValue) {\n $this->connect();\n $sql = '';\n foreach ($data as $key => $value) {\n $sql .= \"$key = '\" . $value . \"',\";\n }\n $sql = 'UPDATE ' . $table . ' SET ' . trim($sql, ',') . ' WHERE ' . $idField . ' = ' . $idValue . ';';\n return mysqli_query($this->_conn, $sql);\n }", "function updateThisRecord($fname, $lname, $city, $zip, $dob, $email, $userid)\n{\n global $mysqli, $db_table_prefix;\n $stmt = $mysqli->prepare(\n \"UPDATE \" . $db_table_prefix . \"user\n\t\tSET\n\t\tFirstName = ?,\n\t\tLastName = ?,\n\t\tCity = ?,\n\t\tZip = ?,\n\t\tDateOfBirth = ?,\n\t\tEmailAddress = ?\n\t\tWHERE\n\t\tuserid = ?\n\t\tLIMIT 1\"\n );\n $stmt->bind_param(\"sssssss\", $fname, $lname, $city, $zip, $dob, $email, $userid);\n $result = $stmt->execute();\n $stmt->close();\n\n return $result;\n}", "private function update(){\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (empty ( $id )) return;\n\t\t// Check permission to update.\n\t\t$result = $this->clsAccessPermission->toUpdate();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to update!\");\n\t\t\treturn;\n\t\t}\n\t\t// Execute Update.\n\t\tif (! $this->objAccessCrud->update ()) {\n\t\t\t$this->msg->setError (\"There were issues on update the record!\");\n\t\t\treturn;\n\t\t}\n\t\t$this->msg->setSuccess (\"Updated the record with success!\");\n\t\treturn;\n\t}", "function update($record)\n\t{\n\t\t// convert object from associative array, if needed\n\t\t$record = (is_array($record)) ? (object) $record : $record;\n\t\t// update the collection appropriately\n\t\t$key = $record->{$this->_keyfield};\n\t\tif (isset($this->_data[$key]))\n\t\t{\n\t\t\t$this->_data[$key] = $record;\n\t\t\t$this->store();\n\t\t}\n\t}", "function updateRecord()\n{\n\n // Connect to DB\n require('connect.php');\n\n //User inputs for id, idiom, occurence and translation \n // in the record they'd like to edit \n\n $id = $_POST['update-id'];\n $idiom = $_POST['update-idiom'];\n $occurence = $_POST['update-occurence'];\n $translation = $_POST['update-translation'];\n\n // Update query\n $sql = \"UPDATE `meno` \n SET\n `idiom` = '$idiom',\n `occurence` = '$occurence',\n `translation` = '$translation',\n `commentary` = '$commentary'\n WHERE `id` = '$id' \";\n\n $update_query = mysqli_query($connection, $sql);\n\n if (!$update_query) {\n echo \"Error: \" . $sql . mysqli_error($connection);\n }\n\n mysqli_close($connection);\n\n header('Location: index.php');\n\n // check if save button has been clicked \n}", "static function update($connection, $id, $data, $new_value)\n {\n }", "public function update(){\n $sql = \"update \".self::$tablename.\" set correlativo=\\\"$this->correlativo\\\",nombre_instalador=\\\"$this->nombre_instalador\\\",nombre_proyecto=\\\"$this->nombre_proyecto\\\",localizacion=\\\"$this->localizacion\\\",contrato_orden_trabajo=\\\"$this->contrato_orden_trabajo\\\",sector_trabajo=\\\"$this->sector_trabajo\\\",area_aceptada=\\\"$this->area_aceptada\\\",fecha_proyecto=\\\"$this->fecha_proyecto\\\" where id_usuario=$this->id_usuario\";\n Executor::doit($sql);\n }", "public function updateRow($table, $col, $colVal, $data) {\n \t\t$this->db->where($col,$colVal);\n\t\t$this->db->update($table,$data);\n\t\treturn true;\n \t}", "public function update($row)\n\t{\n\t\t$this->db->where('tournamentId', $row['tournamentId']);\n\t\treturn $this->db->update('tournaments', $row);\n\t}" ]
[ "0.8025563", "0.7645333", "0.7508828", "0.7463139", "0.7371479", "0.7362578", "0.73619044", "0.719311", "0.71700305", "0.7140587", "0.7123179", "0.70799226", "0.70616263", "0.704788", "0.7037321", "0.7020862", "0.7012545", "0.70097744", "0.7005162", "0.70013535", "0.69944245", "0.698358", "0.6964365", "0.6964365", "0.6961038", "0.6898228", "0.6854663", "0.6854145", "0.68462074", "0.6839558", "0.68365395", "0.68346196", "0.6732163", "0.6716672", "0.6715011", "0.6700029", "0.6687881", "0.6683073", "0.6683073", "0.6683073", "0.66790384", "0.6665894", "0.66656697", "0.6662653", "0.6662626", "0.66438204", "0.6641935", "0.66398644", "0.66285074", "0.6627953", "0.6625805", "0.66216296", "0.6621368", "0.6618387", "0.6613195", "0.66084915", "0.6607735", "0.6607455", "0.65917695", "0.65835893", "0.6571614", "0.65670204", "0.6559019", "0.65531427", "0.6552985", "0.65518665", "0.6537992", "0.6527603", "0.6526324", "0.6522434", "0.65189517", "0.65187025", "0.6516137", "0.65156007", "0.6513567", "0.6513567", "0.6513567", "0.65115404", "0.65108794", "0.6509815", "0.65091467", "0.6504767", "0.64984864", "0.6495843", "0.64921844", "0.6484189", "0.6472264", "0.64705366", "0.64612806", "0.6455082", "0.6453761", "0.6453761", "0.64521694", "0.6449914", "0.6438378", "0.64348644", "0.6429188", "0.6428327", "0.64241403", "0.64209604", "0.6420914" ]
0.0
-1
Display a listing of the resource.
public function index() { // $pre=Preguntas::all(); $arr=[]; $i=0; foreach ($pre as $key => $value) { $arr[$i]=$value; $arr[$i]["respuestas"]=Respuestas::where("fk_id_pregunta","=",$value->id)->get(); $i++; } //var_dump($arr); if(count($arr)>0){ return response()->json(["mensaje"=>"Preguntas encontradas ","respuesta"=>true,"datos"=>$arr]); }else{ return response()->json(["mensaje"=>"Preguntas NO encontradas ","respuesta"=>false]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // $datos=Util::decodificar_json($request->get("datos")); $p=Preguntas::firstOrCreate([ "argumento_pregunta"=>$datos["datos"]->argumento_pregunta, "tipo_pregunta"=>$datos["datos"]->tipo_pregunta, "estado_pregunta"=>"1", ]); if($p->id > 0){ if(count($datos["datos"]->respuestas)==0){ Respuestas::firstOrCreate([ "argumento_respuesta"=>"Respuesta:", "es_correcta"=>true, "fk_id_pregunta"=>$p->id, ]); } foreach ($datos["datos"]->respuestas as $key => $value) { Respuestas::firstOrCreate([ "argumento_respuesta"=>$value->respuesta, "es_correcta"=>$value->es_correcta, "fk_id_pregunta"=>$p->id, ]); } } return response()->json(["mensaje"=>"Pregunta creada","id"=>$p->id]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // $pre=Preguntas::where("id","=",$id)->get(); $arr=[]; $i=0; foreach ($pre as $key => $value) { $arr[$i]=$value; $arr[$i]["respuestas"]=Respuestas::where("fk_id_pregunta","=",$value->id)->get(); $i++; } //var_dump($arr); if(count($arr)>0){ return response()->json(["mensaje"=>"Preguntas encontradas ","respuesta"=>true,"datos"=>$arr]); }else{ return response()->json(["mensaje"=>"Preguntas NO encontradas ","respuesta"=>false]); } return response()->json(["datos"=>$e,"mensaje"=>"Detalle preguntas encontrado"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // $datos=Util::decodificar_json($request->get("datos")); Preguntas::where("id",$id) ->update([ "argumento_pregunta"=>$datos["datos"]->argumento_pregunta, "tipo_pregunta"=>$datos["datos"]->tipo_pregunta, ]); return response()->json(["mensaje"=>"Recurso actualizado"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // $datos=Util::decodificar_json($request->get("datos")); $e=Preguntas::where("id",$id); if($e->estado_pregunta==1){ Preguntas::where("id",$id) ->where("estado_pregunta","=",1) ->update(["estado_pregunta"=>0]); return response()->json(["mensaje"=>"Recurso eliminado"]); }else{ Preguntas::where("id",$id) ->where("estado_pregunta","=",0) ->update(["estado_pregunta"=>1]); return response()->json(["mensaje"=>"Recurso habilitado"]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Display a listing of the resource.
public function index() { return Inventory::all(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create(Request $request) { $inventory = new Inventory; $inventory-> ref_book_id = request('ref_book_id'); $inventory-> checked_out = request('checked_out')->default(false); $inventory-> check_out_date = request('checkout_date')->nullable(); $inventory-> due_date = request('due_date')->nullable(); $inventory-> notes = request('notes')->nullable(); $inventory-> ref_user_id = request('ref_user_id')->nullable(); $inventory->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Display the specified resource.
public function show($id) { return Inventory::find($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Inventory $inventory) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.6834566", "0.68116575", "0.68075293", "0.6805924", "0.6801357", "0.6796291", "0.67915684", "0.67915684", "0.67874014", "0.678544", "0.67787844", "0.6777662", "0.67675763", "0.676299", "0.6746726", "0.6745706", "0.67450166", "0.67450166", "0.6739429", "0.6734577", "0.6725992", "0.67127997", "0.6694406", "0.6692487", "0.6689421", "0.66884303", "0.6687299", "0.6685663", "0.6682167", "0.66701853", "0.66697115", "0.6666091", "0.6666091", "0.66627705", "0.6661716", "0.6661522", "0.6657919", "0.6656454", "0.6653187", "0.6642113", "0.66332614", "0.66324973", "0.66275465", "0.66275465", "0.6619777", "0.6619387", "0.6617973", "0.66154003", "0.66110945", "0.6607966", "0.66065043", "0.6596376", "0.65953517", "0.65941286", "0.6591486", "0.6590759", "0.6588404", "0.658161", "0.6580548", "0.6579757", "0.6577171", "0.65761065", "0.657386", "0.65686774", "0.6567784", "0.65672046", "0.6566417", "0.65615803", "0.65615714", "0.65615714", "0.65592474", "0.65586483", "0.65568006", "0.6556628", "0.65564895", "0.6555322", "0.65551996", "0.6555016", "0.654888", "0.65477645", "0.65451735" ]
0.0
-1
Update the specified resource in storage.
public function update(Inventory $id) { $inventory = Inventory::find($id); $inventory-> ref_book_id = request('ref_book_id'); $inventory-> checked_out = request('checked_out')->default(false); $inventory-> check_out_date = request('checkout_date')->nullable(); $inventory-> due_date = request('due_date')->nullable(); $inventory-> notes = request('notes')->nullable(); $inventory-> ref_user_id = request('ref_user_id')->nullable(); $inventory->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Inventory $inventory) { Inventory::find($inventory->id)->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. To override this in a child theme, remove the filter and optionally add your own function tied to the wp_page_menu_args filter hook.
function rw_page_menu_args( $args ) { $args['show_home'] = true; return $args; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function theme_main_nav_fallback() {\n wp_page_menu(array(\n 'show_home' => true,\n 'menu_class' => 'nav footer-nav clearfix', // adding custom nav class\n 'include' => '',\n 'exclude' => '',\n 'echo' => true,\n 'link_before' => '', // before each link\n 'link_after' => '', // after each link\n ));\n}", "function bones_main_nav_fallback() {\n\twp_page_menu( 'show_home=Home&menu_class=menu' );\n}", "function default_menu(){\n\twp_nav_menu(array('menu' => 'Main Menu', 'fallback_cb' => 'default_page_menu', 'container' => 'nav', 'container_class' => 'mainmenu', 'menu_class' => 'menu clear'));\n}", "function ts_theme_page_menu_args( $args ) {\r\n $args['show_home'] = true;\r\n return $args;\r\n}", "function lkdkamp_page_menu_args( $args ) {\n\t$args['show_home'] = false;\n\treturn $args;\n}", "function rusticmodern_page_menu_args( $args ) {\n\tif ( ! isset( $args['show_home'] ) )\n\t\t$args['show_home'] = true;\n\treturn $args;\n}", "function filter_menu_items( $args ) {\r\n $args['show_home'] = false;\r\n return $args;\r\n}", "function twentytwelve_page_menu_args($args) {\n if (!isset($args['show_home']))\n $args['show_home'] = true;\n return $args;\n}", "function twentyten_page_menu_args( $args ) {\n\tif ( ! isset( $args['show_home'] ) ) {\n\t\t$args['show_home'] = true;\n\t}\n\treturn $args;\n}", "function adelle_theme_home_page_menu( $args ) {\r\n $args['show_home'] = true;\r\n return $args;\r\n }", "function twentyten_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}", "function oylg2013_page_menu_args( $args ) {\n\t$args['show_home'] = false;\n\treturn $args;\n}", "function home_page_menu_args( $args ) {\n\n$args['show_home'] = true;\n\nreturn $args;\n\n}", "function labs_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}", "function home_page_menu_args( $args ) {\r\n$args['show_home'] = true;\r\nreturn $args;\r\n}", "function material_press_page_menu_args($args)\n {\n $args['show_home'] = true;\n return $args;\n }", "function wpak_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}", "function twentytwelve_page_menu_args( $args ) {\n\tif ( ! isset( $args['show_home'] ) ) {\n\t\t$args['show_home'] = true;\n\t}\n\treturn $args;\n}", "function twentytwelve_page_menu_args( $args ) {\n\tif ( ! isset( $args['show_home'] ) )\n\t\t$args['show_home'] = true;\n\treturn $args;\n}", "function twentytwelve_page_menu_args( $args ) {\n\tif ( ! isset( $args['show_home'] ) )\n\t\t$args['show_home'] = true;\n\treturn $args;\n}", "function twentytwelve_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}", "function emc_page_menu_args( $args ) {\r\n\t$args['show_home'] = true;\r\n\treturn $args;\r\n}", "function home_page_menu_args( $args ) {\n $args['show_home'] = true;\n return $args;\n }", "function kstWpNavMenuFallbackCb(){\n $list_args['echo'] = false;\n $list_args['title_li'] = '';\n $list_args['depth'] = 1;\n $menu = str_replace( array( \"\\r\", \"\\n\", \"\\t\" ), '', wp_list_pages($list_args) );\n $menu = str_replace(\"page_item\", \"menu-item\", $menu ); // to match the wp_nav_menu for styling\n $menu = '<ul class=\"menu\">' . $menu . '</ul>';\n echo $menu;\n }", "function minicard_page_menu() {\n\tglobal $wp_query;\n\techo '<ul>';\n\t$exclude = str_replace(' ', '', trim(get_option('exclude_ids')));\n\tif ($exclude) $exclude = '&exclude='.$exclude.'';\n\t\n\t/* Show home unless un-needed */\n\t\t$show_home = true;\n\t\t$post_obj = $wp_query->get_queried_object();\n\t\t$post_ID = $post_obj->ID;\n\n\t\t$show_on_front = get_option( 'show_on_front'); // does the front page display the latest posts or a static page\n\t\t$page_on_front = get_option( 'page_on_front' ); // if it shows a page, what page\n\t\t$page_for_posts = get_option( 'page_for_posts' );\n\t\t\n\t\tif ($show_on_front == 'page' && $page_on_front > 0) $show_home = false;\n\t\t\n\t\tif ($show_home) {\n\t\t\n\t\t\techo '<li class=\"page_item ';\n\t\t\t\n\t\t\tif (is_home() && $post_ID!=$page_for_posts) echo 'current_page_item';\n\t\t\t\n\t\t\techo '\"><a href=\"'.get_bloginfo('url').'\" title=\"'.__('Home','minicard').'\">'.__('Home','minicard').'</a></li>';\n\t\t\t\n\t\t\tif ( ( is_home() || is_search() ) && $post_ID!=$page_for_posts) {\n\t\t\t\techo str_replace('current_page_parent','', wp_list_pages('sort_column=menu_order&title_li=&echo=0&link_before=&link_after=&depth=1'.$exclude));\n\t\t\t} else {\n\t\t\t\techo wp_list_pages('sort_column=menu_order&title_li=&echo=0&link_before=&link_after=&depth=1'.$exclude);\n\t\t\t}\n\t\t\n\t\t} else {\t\t\t\t\n\t\t\techo wp_list_pages('sort_column=menu_order&title_li=&echo=0&link_before=&link_after=&depth=1'.$exclude);\t\t\t\t\t\n\t\t}\n\t/* end */\n\techo minicard_menu_search_box();\n\techo '</ul>';\n}", "function darksnow_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}", "function cera_grimlock_navbar_nav_menu( $args ) {\n\t\tif ( has_nav_menu( 'primary' ) ) :\n\t\t\twp_nav_menu( wp_parse_args( $args, array(\n\t\t\t\t'theme_location' => 'primary',\n\t\t\t) ) );\n\t\tendif;\n\t}", "function simpleton_navmenu() {\n\nif ( function_exists( 'wp_nav_menu' ) )\n\twp_nav_menu( 'menu_class=toppagenavi&fallback_cb=simpleton_navmenu_fallback&theme_location=mainmenu' );\nelse\n\tsimpleton_navmenu_fallback();\n}", "function cmsmasters_page_menu_args($args) {\n $args['show_home'] = true;\n \n return $args;\n}", "function emc_nav_menu_args( $args ) {\r\n\r\n\t$args[ 'theme_location' ] = 'primary';\r\n\t$args[ 'container_class' ] = 'container';\r\n\t/**\r\n\t * Set our new walker only if a menu is assigned,\r\n\t * and a child theme hasn't modified it to one level\r\n\t * (naughty child theme...)\r\n\t */\r\n\tif ( 1 !== $args[ 'depth' ] && has_nav_menu( 'primary' ) ) {\r\n\t\t$args[ 'walker' ] = new EMC_Page_Navigation_Walker;\r\n\t}\r\n\treturn $args;\r\n}", "function wp_get_nav_menus($args = array())\n {\n }", "function thememove_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\n\treturn $args;\n}", "function block_core_navigation_get_classic_menu_fallback()\n {\n }", "function custom_nav_menu_args( $args ) {\n\tif ( $args['walker'] == '' ) {\n\t\t$args['walker'] = new Custom_Walker_Nav_Menu;\n\t}\n\n\treturn $args;\n}", "public function filter_wp_nav_menu_args($args)\n {\n }", "function main_menu_fallback() {\n\t\t\t?>\n\t\t\t<div id=\"navigation\">\n\t\t\t\t<ul id=\"nav\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\twp_list_pages( 'title_li=&number=9' );\n\t\t\t\t\t?>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\t}", "function uwmadison_page_menu_args( $args ) {\n\t\t$args['show_home'] = true;\n\t\t$args['menu_class'] = $args['container_class'];\n\t\treturn $args;\n\t}", "function html5blank_nav() {\n wp_nav_menu(\n array(\n 'theme_location' => 'header-menu',\n 'menu' => '',\n 'container' => 'div',\n 'container_class' => 'menu-{menu slug}-container',\n 'container_id' => '',\n 'menu_class' => 'menu',\n 'menu_id' => '',\n 'echo' => true,\n 'fallback_cb' => 'wp_page_menu',\n 'before' => '',\n 'after' => '',\n 'link_before' => '',\n 'link_after' => '',\n 'items_wrap' => '<ul>%3$s</ul>',\n 'depth' => 0,\n 'walker' => '',\n )\n );\n}", "function sp_main_navigation() {\n\t\tif ( function_exists ( 'wp_nav_menu' ) )\n\t\t\twp_nav_menu( array(\n\t\t\t\t'container' => false,\n\t\t\t\t'menu_class'\t => 'menu-nav',\n\t\t\t\t'theme_location' => 'primary_nav',\n\t\t\t\t'fallback_cb' => 'sp_main_nav_fallback'\n\t\t\t\t) );\n\t\telse\n\t\t\tsp_main_nav_fallback();\t\n\t}", "function courage_default_menu() {\n echo '<ul id=\"mainnav-menu\" class=\"menu\">'. wp_list_pages('title_li=&echo=0') .'</ul>';\n}", "function sp_main_navigation() {\n\t\tif ( function_exists ( 'wp_nav_menu' ) )\n\t\t\twp_nav_menu( array(\n\t\t\t\t'container' => false,\n\t\t\t\t'menu_class'\t => 'main-menu',\n\t\t\t\t'theme_location' => 'primary_nav',\n\t\t\t\t'fallback_cb' => 'sp_main_nav_fallback'\n\t\t\t\t) );\n\t\telse\n\t\t\tsp_main_nav_fallback();\t\n\t}", "function erp_menu() {\n $menu = [];\n return apply_filters( 'erp_menu', $menu );\n}", "function my_wp_nav_menu_args( $args = '' ) {\n\t$args['container'] = false;\n\treturn $args;\n}", "function elijah_wp_nav_menu_args( $args = '' ) {\n\n\tif ($args['theme_location'] == 'topbar_navigation') {\n\t\tif( is_user_logged_in()) {\n\t\t\t$args['menu'] = 'topbar';\n\t\t}else{\n\t\t\t$args['menu'] = 'topbar-topbar-navigation-logged-out';\n\t\t}\n\t}\n\treturn $args;\n}", "function ntp_use_nav_menu() {\n return 'wp_nav_menu';\n}", "function my_wp_nav_menu_args($args = '')\n{\n $args['container'] = false;\n return $args;\n}", "function my_wp_nav_menu_args($args = '')\n{\n $args['container'] = false;\n return $args;\n}", "function my_wp_nav_menu_args($args = '')\n{\n $args['container'] = false;\n return $args;\n}", "function my_wp_nav_menu_args($args = '')\n{\n $args['container'] = false;\n return $args;\n}", "function block_core_navigation_maybe_use_classic_menu_fallback()\n {\n }", "function wp_nav_menu_setup()\n {\n }", "function my_wp_nav_menu_args($args = '')\n{\n $args['container'] = false;\n $args['menu_class'] = 'nav-list';\n return $args;\n}", "function my_wp_nav_menu_args($args = '')\n{\n $args['container'] = false;\n return $args;\n}", "function my_wp_nav_menu_args( $args = '' ) {\n $args['container'] = false;\n return $args;\n}", "function header_large_menu() {\n\n wp_nav_menu(array(\n 'container' => false, // remove nav container\n 'menu_class' => 'header-large-menu', // adding custom nav class\n 'theme_location' => 'header-large', // where it's located in the theme\n 'depth' => 0, // limit the depth of the nav\n ));\n\n}", "function mdx_tertiary_menu($args) {\n\tinclude_once 'functions/class-walker-tertiary-menu.php';\n\t$uri_parts = explode('/', $_SERVER['REQUEST_URI']);\n\t$args['ancestor'] = get_page_by_path($uri_parts[1]);\n\t$args['echo'] = false;\n\t$args['walker'] = new Walker_Tertiary_Menu();\n\treturn wp_nav_menu($args);\n}", "function hook_top_menu() {\n\t\treturn null;\n\t}", "function hook_top_menu() {\n\t\treturn null;\n\t}", "function jet_menu_oceanwp_fix_menu_args( $args ) {\n\n\tif ( ! isset( $args['menu_class'] ) || 'jet-menu' !== $args['menu_class'] ) {\n\t\treturn $args;\n\t}\n\n\t$args['link_before'] = '';\n\t$args['link_after'] = '';\n\n\treturn $args;\n}", "function get_registered_nav_menus()\n {\n }", "function hook_menu() {\n\t\treturn null;\n\t}", "function ks_wp_nav_menu_args( $args = '' ) {\n\t$args['container'] = false;\n\n\treturn $args;\n}", "function getMainMenu() {\r\n $links = array();\r\n\r\n //Get nav menu id by name\r\n $menu_name = 'primary';\r\n $locations = get_nav_menu_locations();\r\n $menu_id = (isset($locations[$menu_name])) ? $locations[$menu_name] : 0;\r\n\r\n //Get nav menu items\r\n $items = wp_get_nav_menu_items( $menu_id, array(\r\n 'order' => 'ASC',\r\n 'orderby' => 'menu_order',\r\n 'post_type' => 'nav_menu_item',\r\n 'post_status' => 'publish',\r\n 'output' => ARRAY_A,\r\n 'output_key' => 'menu_order',\r\n 'nopaging' => true,\r\n 'update_post_term_cache' => false )\r\n );\r\n\r\n if(!empty($items)) {\r\n foreach($items as $item) {\r\n //active class for pages, categories\r\n $active = false;\r\n\r\n if( ($item->object == 'page') && (is_page($item->object_id)) ) {\r\n $active = 'active';\r\n } \r\n \r\n $links[$item->ID] = array(\r\n 'title' => $item->title,\r\n 'href' => $item->url,\r\n 'class' => $active\r\n );\r\n }\r\n }\r\n\r\n return $links;\r\n}", "function menu_fallback(){ ?>\n\t\t\t<div id=\"menu\">\n\t\t\t\t<ul>\n\t\t\t\t\t<li> <?php _e( 'Go to Admin > Appearance > Menus, to create your menu.', 'basetheme_td' ); ?></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t<?php\n\t\t}", "function social_media_menu() {\r\n // display the WordPress Custom Menu if available\r\n wp_nav_menu(array(\r\n 'menu' => 'social-media',\r\n 'theme_location' => 'social',\r\n 'depth' => 2,\r\n 'container' => 'div',\r\n 'container_class' => 'collapse navbar-collapse navbar-ex1-collapse',\r\n 'menu_class' => 'nav navbar-nav soc-med',\r\n 'fallback_cb' => 'wp_bootstrap_navwalker::fallback',\r\n 'walker' => new wp_bootstrap_navwalker()\r\n ));\r\n}", "function get_primary_menu($the_menu) {\n if ($the_menu == 'secondary') {\n $menu_name = $the_menu;\n\n if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) {\n $menu = wp_get_nav_menu_object( $locations[ $menu_name ] );\n\n $menu_items = wp_get_nav_menu_items($menu->term_id);\n $menu_list = '<ul id=\"one-page-nav\" class=\"nav\" >';\n\n foreach ( (array) $menu_items as $key => $menu_item ) {\n $title = $menu_item->title;\n $id = $menu_item->object_id;\n $url = $menu_item->url;\n $slug = strtolower($title);\n $slug = str_replace(' ', '-', $slug);\n $slug = str_replace('å', 'a', $slug);\n $slug = str_replace('ä', 'a', $slug);\n $slug = str_replace('ö', 'o', $slug);\n $menu_list .= '<li><a href=\"'. $url . '\" class=\"page-scroll\">' . $title . '</a></li>';\n }\n $menu_list .= '</ul>';\n } \n else {\n $menu_list = '<ul><li>Menu \"' . $menu_name . '\" not defined.</li></ul>';\n }\n return $menu_list;\n }\n else {\n $menu_name = $the_menu;\n\n if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) {\n $menu = wp_get_nav_menu_object( $locations[ $menu_name ] );\n\n $menu_items = wp_get_nav_menu_items($menu->term_id);\n\n $menu_list = '<ul id=\"one-page-nav\" class=\"nav navbar-nav\" >';\n\n foreach ( (array) $menu_items as $key => $menu_item ) {\n if ($menu_item->title ==\"Om\") {\n $title = $menu_item->title;\n $id = $menu_item->object_id;\n $url = $menu_item->url;\n $slug = get_the_slug( $menu_item->object_id );\n $menu_list .= '<li><a href=\"#' . $slug . '\" class=\"page-scroll\">' . $title . ' <span class=\"notranslate\">Hamnfestivalen</span></a></li>';\n\n }\n else {\n $title = $menu_item->title;\n $id = $menu_item->object_id;\n $url = $menu_item->url;\n $slug = get_the_slug( $menu_item->object_id );\n $menu_list .= '<li><a href=\"#' . $slug . '\" class=\"page-scroll\">' . $title . '</a></li>';\n }\n }\n $menu_list .= '</ul>';\n } \n else {\n $menu_list = '<ul><li>Menu \"' . $menu_name . '\" not defined.</li></ul>';\n }\n return $menu_list;\n }\n}", "function woo_menu( $exclude=\"\" ) {\n // Split the featured pages from the options, and put in an array\n if ( get_option('woo_ex_feat_pages') == \"true\" ) {\n $menupages = get_option('woo_feat_pages');\n $exclude = $menupages . ',' . $exclude;\n }\n // Split the main content pages from the options, and put in an array\n if ( get_option('woo_ex_main_pages') == \"true\" ) {\n $menupages = get_option('woo_main_pages');\n $exclude = $menupages . ',' . $exclude;\n }\n \n $pages = wp_list_pages('title_li=&echo=0&depth=3&exclude='.$exclude);\n $pages = preg_replace('%<a ([^>]+)>%U','<a $1><span>', $pages);\n $pages = str_replace('</a>','</span></a>', $pages);\n echo $pages;\n}", "function html5blank_nav()\n{\n\twp_nav_menu(\n\tarray(\n\t\t'theme_location' => 'header-menu',\n\t\t'menu' => '',\n\t\t'container' => 'div',\n\t\t'container_class' => 'menu-{menu slug}-container',\n\t\t'container_id' => '',\n\t\t'menu_class' => 'menu',\n\t\t'menu_id' => '',\n\t\t'echo' => true,\n\t\t'fallback_cb' => 'wp_page_menu',\n\t\t'before' => '',\n\t\t'after' => '',\n\t\t'link_before' => '',\n\t\t'link_after' => '',\n\t\t'items_wrap' => '<ul>%3$s</ul>',\n\t\t'depth' => 0,\n\t\t'walker' => ''\n\t\t)\n\t);\n}", "function ieatwp_default_menu(){ ?>\n\t\t<ul class=\"navbar navbar-right\">\n <li><a href=\"#section_intro\" class=\"easing\">Home</a></li>\n <li><a href=\"#section_about\" class=\"easing\">About</a></li>\n <li><a href=\"#section_work\" class=\"easing\">Strategy</a></li>\n <li><a href=\"#section_resume\" class=\"easing\">Resume</a></li>\n <li><a href=\"#section_portfolio\" class=\"easing\">Portfolio</a></li>\n <li><a href=\"#section_services\" class=\"easing\">Services</a></li>\n <li><a href=\"#section_contact\" class=\"easing\">Contact</a></li>\n </ul>\n<?php }", "function createDefaultMenu(){\n\t// Check if the menu exists\n\t$menu_name = 'Default Menu';\n\t$menu_exists = wp_get_nav_menu_object( $menu_name );\n\n\t// If it doesn't exist, let's create it.\n\tif( !$menu_exists){\n\t $menu_id = wp_create_nav_menu($menu_name);\n\n\t\t// Set up default menu items\n\t wp_update_nav_menu_item($menu_id, 0, array(\n\t 'menu-item-title' => ( 'Home' ),\n\t 'menu-item-classes' => 'home',\n\t 'menu-item-url' => home_url( '/' ),\n\t 'menu-item-status' => 'publish'));\n\n\t wp_update_nav_menu_item($menu_id, 0, array(\n\t 'menu-item-title' => ( 'Custom Page' ),\n\t 'menu-item-url' => home_url( '/custom-page/' ),\n\t 'menu-item-status' => 'publish'));\n\t}\n}", "function rp_wpdentist_menu_base() {\n\treturn apply_filters( 'rp_wpdentist_menu_base', 'menu' );\n}", "function cera_grimlock_vertical_navbar_nav_menu( $args ) {\n\t\tif ( has_nav_menu( 'primary' ) ) :\n\t\t\twp_nav_menu( wp_parse_args( $args, array(\n\t\t\t\t'theme_location' => 'primary',\n\t\t\t) ) );\n\t\tendif;\n\t}", "function custom_nav_item( $menu, stdClass $args ){\n if ( 'primary' != $args->theme_location )\n\n return $menu; \n\t\t// $menu .= '</ul><ul class=\"search-form-container\"><div class=\"search-toggle\"><i class=\"dashicons dashicons-search\"></i>\n\t\t$menu .= '</ul><ul class=\"search-form-container\"><div class=\"search-toggle\"><i class=\"fa fa-search\"></i>\n\t\t\t\t<a href=\"#search-container\" class=\"screen-reader-text\"></a>\n\t\t\t\t</div>'; \n return $menu; \n}", "function revo_nav_menu_args($args = '') {\n\t$revo_nav_menu_args['container'] = false;\n\t$revo_theme_locates = array();\n\t$revo_menu = sw_options( 'menu_location' );\n\tif( !is_array( $revo_menu ) ){\n\t\t$revo_theme_locates[] = $revo_menu;\n\t}else{\n\t\t$revo_theme_locates = $revo_menu;\n\t}\n\tif (!$args['items_wrap']) {\n\t\t$revo_nav_menu_args['items_wrap'] = '<ul class=\"%2$s\">%3$s</ul>';\n\t}\n\tif (!$args['walker']) {\n\t\tif ( 'mega' == sw_options( 'menu_type' ) && $revo_theme_locates[0] != NULL && in_array( $args['theme_location'], $revo_theme_locates ) ){\n\t\t\t$args['menu_class'] .= ' revo-mega';\n\t\t\t$revo_nav_menu_args['walker'] = new Revo_Mega_Menu_Walker();\n\t\t\t\n\t\t\tif( !revo_mobile_check() ) :\n\t\t\t\twp_enqueue_script('revo_megamenu', get_template_directory_uri() . '/js/megamenu.js', array(), null, true);\n\t\t\tendif;\n\t\t\t\n\t\t} else {\n\t\t\t$revo_nav_menu_args['walker'] = new Revo_Menu_Walker();\n\t\t}\n\t}\n\n\treturn array_merge($args, $revo_nav_menu_args);\n}", "function wp_nav_menu_no_ul()\n{\n $options = array(\n 'echo' => false,\n 'container' => false,\n 'theme_location' => 'primary',\n 'fallback_cb'=> 'default_page_menu'\n );\n\n $menu = wp_nav_menu($options);\n echo preg_replace(array(\n '#^<ul[^>]*>#',\n '#</ul>$#'\n ), '', $menu);\n\n}", "function get_menu() {\n return wp_get_nav_menu_items(9);\n }", "function ks_nav() {\n\twp_nav_menu(\n\t\tarray(\n\t\t\t'theme_location' => 'header-menu',\n\t\t\t'menu' => '',\n\t\t\t'container' => 'div',\n\t\t\t'container_class' => 'menu-{menu slug}-container',\n\t\t\t'container_id' => '',\n\t\t\t'menu_class' => 'menu',\n\t\t\t'menu_id' => '',\n\t\t\t'echo' => true,\n\t\t\t'fallback_cb' => 'wp_page_menu',\n\t\t\t'before' => '',\n\t\t\t'after' => '',\n\t\t\t'link_before' => '',\n\t\t\t'link_after' => '',\n\t\t\t'items_wrap' => '<ul>%3$s</ul>',\n\t\t\t'depth' => 0,\n\t\t\t'walker' => ''\n\t\t)\n\t);\n}", "function wpc_client_custom_menu( $args ) {\r\n $wpc_settings = get_option( 'wpc_settings' );\r\n\r\n if ( isset( $wpc_settings['show_custom_menu'] ) && 'yes' == $wpc_settings['show_custom_menu'] ) {\r\n if ( is_user_logged_in() && ( current_user_can( 'wpc_client' ) || current_user_can( 'wpc_client_staff' ) ) ) {\r\n //only for clients and staff\r\n if ( '' != $args['theme_location'] && isset( $wpc_settings['custom_menu_logged_in'][$args['theme_location']] ) && '' != $wpc_settings['custom_menu_logged_in'][$args['theme_location']] ) {\r\n $menu = get_term( $wpc_settings['custom_menu_logged_in'][$args['theme_location']], 'nav_menu' );\r\n $args['menu'] = $menu->name;\r\n }\r\n }\r\n elseif ( '' != $args['theme_location'] && isset( $wpc_settings['custom_menu_logged_out'][$args['theme_location']] ) && '' != $wpc_settings['custom_menu_logged_out'][$args['theme_location']] ) {\r\n $menu = get_term( $wpc_settings['custom_menu_logged_out'][$args['theme_location']], 'nav_menu' );\r\n $args['menu'] = $menu->name;\r\n }\r\n }\r\n\r\n return $args;\r\n\r\n }", "function greenfields_display_main_menu()\n{\n wp_nav_menu(\n array(\n 'theme_location' => 'main_nav', /* where in the theme it's assigned */\n 'menu' => 'main_nav', /* menu name */\n 'menu_class' => 'nav navbar-nav',\n 'container' => false, /* container class */\n 'depth' => 2,\n 'walker' => new greenfields_Bootstrap_walker(),\n )\n );\n}", "function change_default_menu_walker( $args ) {\n\t\t$args = (object) $args;\n\t\t$args->walker = new WFIM_Walker_Nav_Menu_With_Icon();\n\t\treturn $args;\n\t}", "function oh_nav()\n{\n\twp_nav_menu(\n\tarray(\n\t\t'theme_location' => 'header-menu',\n\t\t'menu' => '',\n\t\t'container' => 'div',\n\t\t'container_class' => 'menu-{menu slug}-container',\n\t\t'container_id' => '',\n\t\t'menu_class' => 'menu',\n\t\t'menu_id' => '',\n\t\t'echo' => true,\n\t\t'fallback_cb' => 'wp_page_menu',\n\t\t'before' => '',\n\t\t'after' => '',\n\t\t'link_before' => '',\n\t\t'link_after' => '',\n\t\t'items_wrap' => '<ul class=\"nav navbar-nav navbar-right no-margin alt-font text-normal\" data-in=\"fadeIn\" data-out=\"fadeOut\">%3$s</ul>',\n\t\t'depth' => 0,\n\t\t'walker' => ''\n\t\t)\n\t);\n}", "function hybrid_get_primary_menu() {\n\tget_template_part( 'menu', 'primary' );\n}", "function wpstartup_menu_html( $menu ){\n if( $menu != '' || is_array( $menu ) ){\n if( is_array( $menu ) ){\n // multi menu\n foreach( $menu as $nm ){\n\n if( has_nav_menu( $nm ) ){\n echo '<div id=\"'.$nm.'menubox\"><div id=\"'.$nm.'menu\" class=\"\"><nav><div class=\"innerpadding\">';\n //if( $nm == 'top' ){\n echo '<div class=\"menutoggle\"><span>menu</span></div>';\n //}\n wp_nav_menu( array( 'theme_location' => $nm ) );\n echo '<div class=\"clr\"></div></div></nav></div></div>';\n }\n }\n }else if( has_nav_menu( $menu ) ){\n // single menu\n echo '<div id=\"'.$menu.'menubox\"><div id=\"'.$menu.'menu\" class=\"\"><nav><div class=\"innerpadding\">';\n //if( $menu == 'top' ){\n echo '<div class=\"menutoggle\"><span>menu</span></div>';\n //}\n wp_nav_menu( array( 'theme_location' => $menu , 'menu_class' => 'nav-menu' ) );\n echo '<div class=\"clr\"></div></div></nav></div></div>';\n }\n }\n}", "function display_multisite_global_menu() {\n\t//that caching plugin really was ridiculous, wasn't it?\n\tif (is_multisite() && !is_main_site()) {\n\t\tswitch_to_blog(1); //should send us to the main site temporarily\n\t}\n\twp_nav_menu( array (\n\t\t\"theme_location\" => \"global_menu\"\n\t\t//these werent used, divs were created in the header and footer\n\t\t//\"container\" => \"nav\",\n\t\t//\"container_class\" => \"\",\n\t\t//\"container_id\" => \"global_menu\"\n\t) );\n\t//get the nav menu from the main site context\n\tif (is_multisite() && ms_is_switched()) {\n\t\trestore_current_blog(); //revert to the network site if we switched it above\n\t}\n}", "public function filter_wp_nav_menu($nav_menu_content, $args)\n {\n }", "function menu_Individuals()\n{\n\treturn wp_nav_menu(array(\n\n\t\t'echo' => false,\n\n\t\t'menu' => 'Individuals',\n\n\t\t'theme_location' => 'primary',\n\n\t\t'container' => true,\n\n\t\t'menu_class' => 'menu',\n\n\t));\n\n}", "function wpmu_menu()\n {\n }", "public function get_menu( $atts = array() ) {\n\t\tif( empty( $atts['theme_location'] ) && empty( $atts['menu'] ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t// Merge passed in atts with defaults\n\t\t$atts = shortcode_atts( array(\n\t\t\t'theme_location' => '',\n\t\t\t'menu' => '',\n\t\t\t'container' => 'div',\n\t\t\t'container_class' => '',\n\t\t\t'container_id' => '',\n\t\t\t'menu_class' => 'menu',\n\t\t\t'menu_id' => '',\n\t\t\t'echo' => false,\n\t\t\t'fallback_cb' => 'wp_page_menu',\n\t\t\t'before' => '',\n\t\t\t'after' => '',\n\t\t\t'link_before' => '',\n\t\t\t'link_after' => '',\n\t\t\t'items_wrap' => '<ul id=\"%1$s\" class=\"%2$s\">%3$s</ul>',\n\t\t\t'depth' => 0,\n\t\t\t'walker' => ''\n\t\t\t), $atts, 'mpress_embed_menu' );\n\t\t\t// !important Force echo to false\n\t\t\t$atts['echo'] = false;\n\t\treturn wp_nav_menu( $atts );\n\t}", "function charity_page_menu_args() {\n\t$args = array (\n\t\t'sort_column' => 'menu_order',\n\t\t'menu_class' => 'menu',\n\t\t'include' => '',\n\t\t'exclude' => '',\n\t\t'echo' => FALSE,\n\t\t'show_home' => FALSE,\n\t\t'link_before' => '',\n\t\t'link_after' => ''\n\t);\n\treturn $args;\n}", "function fix_no_menu_warning( $args ) {\n\t\tif ( get_class( $args['walker'] ) == 'WFIM_Walker_Nav_Menu_With_Icon' )\n\t\t\t$args['walker'] = null;\n\n\t\treturn $args;\n\t}", "function register_my_menus() {\n register_nav_menus(\n array( \n 'primary' => __( 'Main one page navigation' ),\n 'secondary' => __( 'Post and Page navigation' ),\n )\n );\n}", "function cera_grimlock_navbar_secondary_nav_menu( $args ) {\n\t\tif ( has_nav_menu( 'secondary' ) ) :\n\t\t\twp_nav_menu( wp_parse_args( $args, array(\n\t\t\t\t'theme_location' => 'secondary',\n\t\t\t) ) );\n\t\tendif;\n\t}", "function new_spa_menu_items($items, $args) {\n\n if( get_option('is_single_page') && $args->theme_location == 'header-menu' ){\n\n $myItems = wp_get_nav_menu_items($args->menu);\n foreach ($myItems as $item) {\n if ($item->post_parent){\n $auxUrl = str_replace(get_site_url().'/','#post-', $item->url);\n $auxUrl = str_replace('#post-home/','#post-', $auxUrl);\n $auxUrl = str_replace('#post-inicio/','#post-', $auxUrl);\n $auxUrl = str_replace('/','', $auxUrl);\n $auxUrl = str_replace('#post-',get_site_url().'#post-', $auxUrl);\n\n $items = str_replace($item->url, $auxUrl, $items);\n }\n }\n\n return $items;\n }\n else{\n return $items;\n }\n}", "function simple_bootstrap_display_main_menu() {\n wp_nav_menu(\n array( \n 'theme_location' => 'main_nav', /* where in the theme it's assigned */\n 'menu_class' => 'navbar-nav mr-auto',\n 'container' => false, /* container class */\n 'depth' => 2,\n 'walker' => new simple_bootstrap_Bootstrap_walker(),\n )\n );\n}", "function wp_nav_menu_no_ul()\n{\n $options = array(\n 'echo' => false,\n 'container' => false,\n 'menu' => 'Mobile Menu',\n 'fallback_cb'=> 'fall_back_menu'\n );\n\n $menu = wp_nav_menu($options);\n echo preg_replace(array(\n '#^<ul[^>]*>#',\n '#</ul>$#'\n ), '', $menu);\n\n}", "function tierone_delta_menu(){\n\twp_nav_menu(\n\t\tarray(\n\t\t\t'theme_location' => 'primary-menu', /* where in the theme it's assigned */\n\t\t\t'menu'\t\t\t => 'main_nav', /* menu name */\n\t\t\t'menu_class'\t => 'nav navbar-nav',\n\t\t\t'container'\t\t => false, /* container class */\n\t\t\t'items_wrap'\t => '<ul id=\"%1$s\" class=\"%2$s\">%3$s</ul>',\n\t\t\t'depth' => 2,\n\t\t\t'walker' => new tierone_walker_menu() /* custom walker */\n\t\t)\n\t);\n}", "function register_my_menu() {\n register_nav_menu( 'primary', __( 'Primary Menu' ) );\n}", "public function filter_wp_get_nav_menus($menus, $args)\n {\n }", "function rt_custom_menu() {\n register_nav_menus(\n array(\n 'top-nav' => __ ('Top menu'),\n 'bottom-nav' => __ ('Bottom menu'),\n )\n );\n}", "function thoughts_register_theme_menu() {\n register_nav_menu( 'primary', 'Main Navigation Menu' );\n}" ]
[ "0.8151469", "0.7999775", "0.75212353", "0.73407674", "0.7339197", "0.73226285", "0.7317129", "0.7302537", "0.72921693", "0.72666216", "0.7234366", "0.71972007", "0.7195003", "0.7161684", "0.7141193", "0.7127636", "0.71269363", "0.7117605", "0.7104582", "0.7104582", "0.70851576", "0.707887", "0.7075649", "0.70674425", "0.7051556", "0.70251167", "0.6978106", "0.69688", "0.6967263", "0.6953226", "0.68948907", "0.6868808", "0.6774846", "0.6761723", "0.6739081", "0.673584", "0.6728717", "0.6707191", "0.66993177", "0.6657861", "0.6653389", "0.6615166", "0.6598087", "0.6591635", "0.658072", "0.6558387", "0.6558387", "0.6558387", "0.6558387", "0.6543186", "0.6537112", "0.6530739", "0.6528745", "0.65233034", "0.65194786", "0.64871687", "0.64797765", "0.64797765", "0.6468137", "0.64505786", "0.6430278", "0.64182645", "0.6412046", "0.64061403", "0.6402747", "0.63879997", "0.6370084", "0.6359474", "0.63495284", "0.6341733", "0.6319747", "0.631133", "0.6301629", "0.6299719", "0.62914985", "0.62620944", "0.6257816", "0.6252385", "0.6217714", "0.6208965", "0.61936647", "0.6191773", "0.61891985", "0.617814", "0.61733925", "0.61663467", "0.61609095", "0.6159784", "0.61587125", "0.61555684", "0.61548644", "0.6152615", "0.6139554", "0.6137286", "0.6136206", "0.6116966", "0.6095469", "0.6084185", "0.6083456", "0.6081815" ]
0.7399093
3
Allows for excerpt formatting outside the loop For whatever reason, the WP core doesn't allow trimming of content outside the loop. Also, allowing get_the_excerpt() outside of the loop has been deprecated. What this means to me is that I can either add this filter with duplicate code or create an unecessary loop for pulling a oneoff excerpt. Way to go, WP. You ruined Christmas.
function rw_trim_excerpt( $text='' ) { $text = strip_shortcodes( $text ); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]&gt;', $text); $excerpt_length = apply_filters('excerpt_length', 55); $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); return wp_trim_words( $text, $excerpt_length, $excerpt_more ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function custom_trim_excerpt($text) { // Fakes an excerpt if needed\rglobal $post;\rif ( '' == $text ) {\r$text = get_the_content('');\r$text = apply_filters('the_content', $text);\r$text = str_replace(']]>', ']]>', $text);\r$text = strip_tags($text);\r$excerpt_length = 90;\r$words = explode(' ', $text, $excerpt_length + 1);\rif (count($words) > $excerpt_length) {\rarray_pop($words);\rarray_push($words, '...');\r$text = implode(' ', $words);\r}\r}\rreturn $text;\r}", "function improved_trim_excerpt($text) { // Fakes an excerpt if needed\n global $post;\n if ( '' == $text ) {\n $text = get_the_content('');\n $text = apply_filters('the_content', $text);\n \n\t$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);\n\t$text = preg_replace('@<style[^>]*?>.*?</style>@si', '', $text);\n\t$text = preg_replace('@<p class=\"wp-caption-text\"[^>]*?>.*?</p>@si', '', $text);\t\n $text = str_replace('\\]\\]\\>', ']]&gt;', $text);\n $text = strip_tags($text, '<p><i><em><b><a><strong>');\n $excerpt_length = 140;\n $words = explode(' ', $text, $excerpt_length + 1);\n if (count($words)> $excerpt_length) {\n array_pop($words);\n array_push($words, '... <a href=\"'.get_permalink($post->ID).'\">'.'Read More &raquo;'.'</a>');\n $text = implode(' ', $words);\n }\n }\nreturn $text;\n}", "function mobject_excerpt_filter( $excerpt_text, $post ) {\n\tif ( $excerpt_text ) {\n\t\treturn $excerpt_text;\n\t}\n\treturn wp_trim_excerpt( '', $post );\n}", "function get_my_excerpt(){\n\t$text = get_the_content();\n\t$text = strip_shortcodes($text);\n\t$text = apply_filters('the_content', $text);\n\t$text = strip_tags($text);\n\t$excerpt_length = 30; // set the number of words here\n\t$excerpt_more = '...';\n\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\treturn $text;\n}", "function custom_excerpt($text = '') {\r\n\t$raw_excerpt = $text;\r\n\tif ( '' == $text ) {\r\n\t\t$text = get_the_content('');\r\n // $text = strip_shortcodes( $text );\r\n\t\t$text = do_shortcode( $text );\r\n\t\t$text = apply_filters('the_content', $text);\r\n\t\t$text = str_replace(']]>', ']]>', $text);\r\n\t\t$excerpt_length = apply_filters('excerpt_length', 55);\r\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\r\n\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\r\n\t}\r\n\treturn apply_filters('wp_trim_excerpt', $text, $raw_excerpt);\r\n}", "function TS_VCSC_Custom_Excerpt_Routines() {\r\n\t\t\t// Setze Auszugslänge Global auf 100 Wörter\r\n\t\t\tfunction TS_VCSC_Custom_Excerpt_Length($length) {\r\n\t\t\t\treturn 100;\r\n\t\t\t}\r\n\t\t\tadd_filter('excerpt_length', 'TS_VCSC_Custom_Excerpt_Length', \t888);\r\n\t\t\t\r\n\t\t\t// Entferne Standard WP Routine für den Beitragsauszug\r\n\t\t\tremove_filter('get_the_excerpt', 'wp_trim_excerpt');\r\n\t\t\t\r\n\t\t\t// Erstellt Auszugsinhalt unter Berücksichtigung von WBP Textblock Inhalten\r\n\t\t\tfunction TS_VCSC_Custom_Excerpt_Content($text) {\r\n\t\t\t\tglobal $post;\r\n\t\t\t\t// Speichere RAW Auszugs Text\r\n\t\t\t\t$excerpt_rawcode\t= $text;\r\n\t\t\t\t// Setze Auszugslänge auf 100 Wörter\r\n\t\t\t\t$excerpt_length \t= apply_filters('excerpt_length', \t\t100);\r\n\t\t\t\t// Definiere den Indikator für mehr Inhalt\r\n\t\t\t\t$excerpt_more \t\t= apply_filters('excerpt_more', ' ' . '[...]');\r\n\t\t\t\t// Entferne WBP Textblock Shortcodes vom Filter\r\n\t\t\t\t$excerpt_composer \t= array('vc_column_text', 'TS_VCSC_Advanced_Textblock');\r\n\t\t\t\t$excerpt_values\t\t= array_values($excerpt_composer);\r\n\t\t\t\t$excerpt_exclude \t= implode('|', $excerpt_values);\r\n\t\t\t\t// Nutze Beitragsinhalt wenn kein Auszug vorhanden\t\r\n\t\t\t\tif ('' == $text) {\r\n\t\t\t\t\t$text \t\t\t= get_the_content('');\r\n\t\t\t\t\t$text\t\t\t= preg_replace(\"~(?:\\[/?)(?!(?:$excerpt_exclude))[^/\\]]+/?\\]~s\", '', $text);\r\n\t\t\t\t\t$text \t\t\t= apply_filters('the_content', $text);\r\n\t\t\t\t\t$text \t\t\t= str_replace(']]>', ']]&gt;', $text);\r\n\t\t\t\t}\r\n\t\t\t\t// Entferne jedweden HTML oder PHP Code\r\n\t\t\t\t$text \t\t\t\t= strip_tags($text);\r\n\t\t\t\t// Kürze Ausug auf die Anzahl von vorgegebenen Wörtern\r\n\t\t\t\t$text \t\t\t\t= wp_trim_words($text, $excerpt_length, $excerpt_more);\r\n\t\t\t\treturn apply_filters('wp_trim_excerpt', $text, $excerpt_rawcode);\r\n\t\t\t}\r\n\t\t\tadd_filter('get_the_excerpt', 'TS_VCSC_Custom_Excerpt_Content', 999);\r\n\t\t}", "function custom_field_excerpt() {\n\tglobal $post;\n\t$text = get_template_part( 'partials/search' , 'flexible' ); \n\tif ( '' != $text ) {\n\t\t$text = strip_shortcodes( $text );\n $text = preg_replace( '@<(script|style)[^>]*?>.*?</\\\\1>@si', '', $text );\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]&gt;', ']]&gt;', $text);\n\t\t$excerpt_length = 20; // 20 words\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n \n\t}\n\treturn apply_filters($text);\n}", "function custom_field_excerpt2() {\n\tglobal $post;\n\t$text = get_field('article_main');\n\tif ( '' != $text ) {\n\t\t$text = strip_shortcodes( $text );\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]>', $text);\n\t\t$excerpt_length = 20; // 20 words\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\t}\n\treturn apply_filters('the_excerpt', $text);\n}", "function cc_post_excerpt() {\n\tglobal $post;\n\n\t$excerpt = htmlentities(strip_tags($post->post_content));\n\t$excerpt_a = array_slice (explode(\" \", $excerpt), 0, 55);\n\techo implode(\" \", $excerpt_a) . \"...\";\n}", "public static function remove_vc_the_excerpt_filter() {\n\t\t\tremove_filter( 'the_excerpt', array( vc_manager()->vc(), 'excerptFilter' ) );\n\t\t}", "function ridizain_recentpost_excerpt () {\r\n\t$theContent = trim(strip_tags(get_the_content()));\r\n\t\t$output = str_replace( '\"', '', $theContent);\r\n\t\t$output = str_replace( '\\r\\n', ' ', $output);\r\n\t\t$output = str_replace( '\\n', ' ', $output);\r\n\t\t\tif (get_theme_mod( 'ridizain_recentpost_excerpt_length' )) :\r\n\t\t\t$limit = get_theme_mod( 'ridizain_recentpost_excerpt_length' );\r\n\t\t\telse : \r\n\t\t\t$limit = '15';\r\n\t\t\tendif;\r\n\t\t\t$content = explode(' ', $output, $limit);\r\n\t\t\tarray_pop($content);\r\n\t\t$content = implode(\" \",$content).\" \";\r\n\treturn strip_tags($content, ' ');\r\n}", "function octavo_trim_excerpt($return = '') {\n\t\n\t# Use `1` to finish sentence, otherwise use `0`.\n\t$finish_sentence = 1;\n\t# Tags to allow in the excerpt:\n\t$allowed_tags = '<a><strong><b><em><i>';\n\t\n\tif ($return == '') {\n\t\t\n\t\t# Setup text:\n\t\t$text = $return;\n\t\t# Get the full content:\n\t\t$text = get_the_content('');\n\t\t# Delete all shortcode tags from the content:\n\t\t$text = strip_shortcodes($text);\n\t\t# Filter it:\n\t\t$text = apply_filters('the_content', $text);\n\t\t# From the default wp_trim_excerpt():\n\t\t$text = str_replace(']]>', ']]&gt;', $text); // Some kind of precaution against malformed CDATA in RSS feeds I suppose.\n\t\t# Remove script tags:\n\t\t$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);\n\t\t# Allowed tags?\n\t\t$text = strip_tags($text, $allowed_tags);\n\t\t\n\t\t# Word length (depends on setting above).\n\t\t$excerpt_length = apply_filters('excerpt_length', 55); // Defaults to `55` words.\n\t\t\n\t\t# Divide the string into tokens; HTML tags, or words, followed by any whitespace:\n\t\t$tokens = array();\n\t\tpreg_match_all('/(<[^>]+>|[^<>\\s]+)\\s*/u', $text, $tokens);\n\t\t\n\t\t# Itterate over word tokens:\n\t\t$word = 0;\n\t\tforeach ($tokens[0] as $token) {\n\t\t\t\n\t\t\t# Parse each token:\n\t\t\tif (($word >= $excerpt_length) && ( ! $finish_sentence)) {\n\t\t\t\t\n\t\t\t\t# Limit reached:\n\t\t\t\tbreak; // Quit the loop.\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t# Is token a tag?\n\t\t\tif ($token[0] != '<') {\n\t\t\t\t\n\t\t\t\t# Check for the end of the sentence: '.', '?' or '!':\n\t\t\t\tif (($word >= $excerpt_length) && $finish_sentence && (preg_match('/[\\?\\.\\!]\\s*$/uS', $token) == 1)) {\n\t\t\t\t\t\n\t\t\t\t\t# Limit reached!\n\t\t\t\t\t$return .= trim($token); // Continue until '?' '.' or '!' occur to reach the end of the sentence.\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t# Add `1` to $word:\n\t\t\t\t$word++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t# Append what's left of the token:\n\t\t\t$return .= $token;\n\t\t\t\n\t\t}\n\t\t\n\t\t# Add the excerpt suffix:\n\t\t$return .= apply_filters('excerpt_more', ' &hellip;');\n\t\t\n\t\t# Balances tags:\n\t\t$return = force_balance_tags($return);\n\t\t\n\t\t# Trim:\n\t\t$return = trim($return);\n\t\t\n\t}\n\t\n\t# Return the excerpt:\n\treturn $return;\n\t\n}", "function ridizain_featured_excerpt () {\r\n\t$theContent = trim(strip_tags(get_the_content()));\r\n\t\t$output = str_replace( '\"', '', $theContent);\r\n\t\t$output = str_replace( '\\r\\n', ' ', $output);\r\n\t\t$output = str_replace( '\\n', ' ', $output);\r\n\t\t\t$limit = '15';\r\n\t\t\t$content = explode(' ', $output, $limit);\r\n\t\t\tarray_pop($content);\r\n\t\t$content = implode(\" \",$content).\" \";\r\n\treturn strip_tags($content, ' ');\r\n}", "function maranatha_entry_widget_excerpt() {\n\n\tglobal $post;\n\n\t$excerpt = get_the_excerpt();\n\n\t$excerpt = strip_tags( $excerpt );\n\t$excerpt = ctfw_shorten( $excerpt, 180 );\n\t$excerpt = str_replace( ' [&hellip;]', '&hellip;', $excerpt );\n\t$excerpt = wptexturize( $excerpt );\n\n\techo apply_filters( 'maranatha_entry_widget_excerpt', $excerpt );\n\n}", "function ridizain_ephemera_excerpt () {\r\n\t$theContent = trim(strip_tags(get_the_content()));\r\n\t\t$output = str_replace( '\"', '', $theContent);\r\n\t\t$output = str_replace( '\\r\\n', ' ', $output);\r\n\t\t$output = str_replace( '\\n', ' ', $output);\r\n\t\t\t$limit = '15';\r\n\t\t\t$content = explode(' ', $output, $limit);\r\n\t\t\tarray_pop($content);\r\n\t\t$content = implode(\" \",$content).\" \";\r\n\treturn strip_tags($content, ' ');\r\n}", "function the_excerpt()\n {\n }", "function accouk_post_excerpt() {\n if(has_excerpt()) {\n the_excerpt();\n }\n}", "function the_excerpt_limit($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'...';\n } else {\n $excerpt = implode(\" \",$excerpt);\n }\n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n echo $excerpt;\n}", "function sfc_publish_make_excerpt($text) {\r\n\t$text = strip_shortcodes( $text );\r\n\tremove_filter( 'the_content', 'wptexturize' );\r\n\t$text = apply_filters('the_content', $text);\r\n\tadd_filter( 'the_content', 'wptexturize' );\r\n\t$text = str_replace(']]>', ']]&gt;', $text);\r\n\t$text = strip_tags($text);\r\n\t$text = str_replace(array(\"\\r\\n\",\"\\r\",\"\\n\"),' ',$text);\r\n\t$excerpt_length = apply_filters('excerpt_length', 55);\r\n\t$excerpt_more = apply_filters('excerpt_more', '[...]');\r\n\t$words = explode(' ', $text, $excerpt_length + 1);\r\n\tif (count($words) > $excerpt_length) {\r\n\t\tarray_pop($words);\r\n\t\tarray_push($words, $excerpt_more);\r\n\t\t$text = implode(' ', $words);\r\n\t}\r\n\t$text = html_entity_decode($text); // added to try to fix annoying &entity; stuff\r\n\treturn $text;\r\n}", "function voyage_mikado_excerpt($excerpt_length = '') {\n global $post;\n\n if(post_password_required()) {\n echo get_the_password_form();\n } //does current post has read more tag set?\n elseif(voyage_mikado_post_has_read_more()) {\n global $more;\n\n //override global $more variable so this can be used in blog templates\n $more = 0;\n the_content(true);\n } //is word count set to something different that 0?\n elseif($excerpt_length != '0') {\n //if word count is set and different than empty take that value, else that general option from theme options\n $word_count = '45';\n if(isset($excerpt_length) && $excerpt_length != \"\") {\n $word_count = $excerpt_length;\n\n } elseif(voyage_mikado_options()->getOptionValue('number_of_chars') != '') {\n $word_count = esc_attr(voyage_mikado_options()->getOptionValue('number_of_chars'));\n }\n //if post excerpt field is filled take that as post excerpt, else that content of the post\n $post_excerpt = $post->post_excerpt != \"\" ? $post->post_excerpt : strip_tags($post->post_content);\n\n //remove leading dots if those exists\n $clean_excerpt = strlen($post_excerpt) && strpos($post_excerpt, '...') ? strstr($post_excerpt, '...', true) : $post_excerpt;\n\n //if clean excerpt has text left\n if($clean_excerpt !== '') {\n //explode current excerpt to words\n $excerpt_word_array = explode(' ', $clean_excerpt);\n\n //cut down that array based on the number of the words option\n $excerpt_word_array = array_slice($excerpt_word_array, 0, $word_count);\n\n //add exerpt postfix\n $excert_postfix = apply_filters('voyage_mikado_excerpt_postfix', '...');\n\n //and finally implode words together\n $excerpt = implode(' ', $excerpt_word_array).$excert_postfix;\n\n //is excerpt different than empty string?\n if($excerpt !== '') {\n echo '<p class=\"mkdf-post-excerpt\">'.wp_kses_post($excerpt).'</p>';\n }\n }\n }\n }", "function html5wp_excerpt($length_callback = '', $more_callback = '')\n{\n global $post;\n if (function_exists($length_callback)) {\n add_filter('excerpt_length', $length_callback);\n }\n if (function_exists($more_callback)) {\n add_filter('excerpt_more', $more_callback);\n }\n $output = get_the_excerpt();\n $output = apply_filters('wptexturize', $output);\n $output = apply_filters('convert_chars', $output);\n $output = '<p>' . $output . '</p>';\n echo $output;\n}", "function html5wp_excerpt($length_callback = '', $more_callback = '')\n{\n global $post;\n if (function_exists($length_callback)) {\n add_filter('excerpt_length', $length_callback);\n }\n if (function_exists($more_callback)) {\n add_filter('excerpt_more', $more_callback);\n }\n $output = get_the_excerpt();\n $output = apply_filters('wptexturize', $output);\n $output = apply_filters('convert_chars', $output);\n $output = '<p>' . $output . '</p>';\n echo $output;\n}", "function trim_excerpt( $text, $excerpt_length = null ) {\n\t\t$text = strip_shortcodes( $text );\n\t\t/** This filter is documented in wp-includes/post-template.php */\n\t\t$text = apply_filters( 'the_content', $text );\n\t\t$text = str_replace( ']]>', ']]&gt;', $text );\n\n\t\tif ( ! $excerpt_length ) {\n\t\t\t/**\n\t\t\t * Filters the number of words in an excerpt.\n\t\t\t *\n\t\t\t * @since 2.7.0\n\t\t\t *\n\t\t\t * @param int $number The number of words. Default 55.\n\t\t\t */\n\t\t\t$excerpt_length = apply_filters( 'excerpt_length', 55 );\n\t\t}\n\t\t$more_text = ' &hellip;';\n\t\t$excerpt_more = apply_filters( 'excerpt_more', $more_text );\n\n\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\n\t\treturn $text;\n\t}", "function get_character_limited_excerpt(){\n$permalink = get_permalink($post->ID);\n$excerpt = get_the_content();\n$excerpt = preg_replace(\" (\\[.*?\\])\",'',$excerpt);\n$excerpt = strip_shortcodes($excerpt);\n$excerpt = strip_tags($excerpt);\n$excerpt = substr($excerpt, 0, 150);\n$excerpt = substr($excerpt, 0, strripos($excerpt, \" \"));\n$excerpt = trim(preg_replace( '/\\s+/', ' ', $excerpt));\n$excerpt = $excerpt.'... <a href=\"'.$permalink.'\">Read More</a>';\nreturn $excerpt;\n}", "function my_excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n\tarray_pop($excerpt);\n\t$excerpt = implode(\" \",$excerpt).'...';\n } else {\n\t$excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function get_classes_excerpt(){\n$excerpt = get_the_excerpt();\n$excerpt = preg_replace(\" (\\[.*?\\])\",'',$excerpt);\n$excerpt = strip_shortcodes($excerpt);\n$excerpt = strip_tags($excerpt);\n$excerpt = substr($excerpt, 0, 225);\n$excerpt = substr($excerpt, 0, strripos($excerpt, \" \"));\n$excerpt = trim(preg_replace( '/\\s+/', ' ', $excerpt));\nreturn $excerpt;\n}", "function rf_excerpt($content, $length)\n{\n $text = strip_shortcodes( $content );\n\n /** This filter is documented in wp-includes/post-template.php */\n $text = apply_filters( 'the_content', $text );\n $text = str_replace(']]>', ']]&gt;', $text);\n\n return wp_trim_words( $text, $length );\n}", "function custom_field_excerpt() {\n\tglobal $post;\n\t$text = get_field('workshop_intro');\n\tif ( '' != $text ) {\n\t\t$text = strip_shortcodes( $text );\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]>', $text);\n\t\t$excerpt_length = 20; // 20 words\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\t}\n\treturn apply_filters('the_excerpt', $text);\n}", "function dustrial_excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'';\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`[[^]]*]`','',$excerpt);\n return $excerpt;\n}", "function cah_news_excerpt($text) {\r\n return wp_trim_words($text, 50, '...');\r\n}", "function postExcerpt($content) {\n\t\t$clean = strip_tags($content);\n\t\tif (strlen($clean) > 120){\n\t\t\t$excerpt = substr($clean, 0, strpos($clean, ' ', 120));\n\t\t\tprint $excerpt . ' ...';\n\t\t}\n\t}", "function the_excerpt_limit($limit, $max = '') {\r\n $excerpt = get_the_excerpt_limit( $limit, $max );\r\n $excerpt = sprintf('<p>%s</p>', strip_tags($excerpt));\r\n\r\n echo $excerpt;\r\n\r\n}", "function custom_field_excerpt4() {\n\tglobal $post;\n\t$text = get_field('idiom_intro');\n\tif ( '' != $text ) {\n\t\t$text = strip_shortcodes( $text );\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]>', $text);\n\t\t$excerpt_length = 20; // 20 words\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\t}\n\treturn apply_filters('the_excerpt', $text);\n}", "function trim_excerpt($text) { return rtrim($text,'[...]'); }", "function medigroup_mikado_excerpt($excerpt_length = '') {\n global $post;\n\n if(post_password_required()) {\n echo get_the_password_form();\n } //does current post has read more tag set?\n elseif(medigroup_mikado_post_has_read_more()) {\n global $more;\n\n //override global $more variable so this can be used in blog templates\n $more = 0;\n the_content(true);\n } //is word count set to something different that 0?\n elseif($excerpt_length != '0') {\n //if word count is set and different than empty take that value, else that general option from theme options\n $word_count = '45';\n if(isset($excerpt_length) && $excerpt_length != \"\") {\n $word_count = $excerpt_length;\n\n } elseif(medigroup_mikado_options()->getOptionValue('number_of_chars') != '') {\n $word_count = esc_attr(medigroup_mikado_options()->getOptionValue('number_of_chars'));\n }\n //if post excerpt field is filled take that as post excerpt, else that content of the post\n $post_excerpt = $post->post_excerpt != \"\" ? $post->post_excerpt : strip_tags($post->post_content);\n\n //remove leading dots if those exists\n $clean_excerpt = strlen($post_excerpt) && strpos($post_excerpt, '...') ? strstr($post_excerpt, '...', true) : $post_excerpt;\n\n //if clean excerpt has text left\n if($clean_excerpt !== '') {\n //explode current excerpt to words\n $excerpt_word_array = explode(' ', $clean_excerpt);\n\n //cut down that array based on the number of the words option\n $excerpt_word_array = array_slice($excerpt_word_array, 0, $word_count);\n\n //add exerpt postfix\n $excert_postfix = apply_filters('medigroup_mikado_excerpt_postfix', '...');\n\n //and finally implode words together\n $excerpt = implode(' ', $excerpt_word_array).$excert_postfix;\n\n //is excerpt different than empty string?\n if($excerpt !== '') {\n echo '<p class=\"mkd-post-excerpt\">'.wp_kses_post($excerpt).'</p>';\n }\n }\n }\n }", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt);\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function themify_custom_excerpt_more($more) {\n global $post;\n return '';\n}", "function hwp_get_excerpt( $excerpt_length = 55, $id = false, $echo = true ) {\n $text = '';\n\n if ( $id ) {\n $the_post = & get_post( $id );\n $text = ( $the_post->post_excerpt ) ? $the_post->post_excerpt : $the_post->post_content;\n } else {\n global $post;\n $text = ( $post->post_excerpt ) ? $post->post_excerpt : get_the_content( '' );\n }\n\n $text = strip_shortcodes( $text );\n $text = apply_filters( 'the_content', $text );\n $text = str_replace( ']]>', ']]&gt;', $text );\n $text = strip_tags( $text );\n\n $excerpt_more = ' ' . '...';\n $words = preg_split( \"/[\\n\\r\\t ]+/\", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY );\n\n if ( count( $words ) > $excerpt_length ) {\n array_pop( $words );\n $text = implode( ' ', $words );\n $text = $text . $excerpt_more;\n } else {\n $text = implode( ' ', $words );\n }\n\n if ( $echo ) {\n echo apply_filters( 'the_content', $text );\n } else {\n return $text;\n }\n}", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'....';\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'....';\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function charity_use_excerpt() {\n $display = TRUE;\n $display = apply_filters('charity_use_excerpt', $display);\n return $display;\n}", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'...';\n } else {\n $excerpt = implode(\" \",$excerpt);\n }\n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'...';\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n }", "function excerpt($limit) {\n\t$excerpt = explode(' ', get_the_excerpt(), $limit);\n\tif (count($excerpt)>=$limit) {\n\t\tarray_pop($excerpt);\n\t\t$excerpt = implode(\" \",$excerpt).'...';\n\t} else {\n\t\t$excerpt = implode(\" \",$excerpt);\n\t} \n\t$excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\treturn $excerpt;\n}", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'...';\n } else {\n $excerpt = implode(\" \",$excerpt);\n }\t\n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function custom_field_excerpt3() {\n\tglobal $post;\n\t$text = get_field('quick_facts');\n\tif ( '' != $text ) {\n\t\t$text = strip_shortcodes( $text );\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]>', $text);\n\t\t$excerpt_length = 20; // 20 words\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\t}\n\treturn apply_filters('the_excerpt', $text);\n}", "function excerpt($limit) {\n\t$excerpt = explode(' ', get_the_excerpt(), $limit);\n\tif (count($excerpt)>=$limit) {\n\t\tarray_pop($excerpt);\n\t\t$excerpt = implode(\" \",$excerpt).'...';\n\t} else {\n\t\t$excerpt = implode(\" \",$excerpt);\n\t}\n\t$excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\treturn $excerpt;\n}", "function dynamic_excerpt($length) { // Variable excerpt length. Length is set in characters\n\t global $post;\n\t $text = $post->post_excerpt;\n\t if ( '' == $text ) {\n\t $text = get_the_content('');\n\t $text = apply_filters('the_content', $text);\n\t $text = str_replace(']]>', ']]>', $text);\n\t }\n\t $text = strip_shortcodes($text); // optional, recommended\n\t $text = strip_tags($text); // use ' $text = strip_tags($text,'<p><a>'); ' if you want to keep some tags\n\t $text = mb_substr($text,0,$length).'';\n\t echo $text;\n\t}", "function magillDev_excerpt($length_callback = '', $more_callback = '')\n{\n\tglobal $post;\n\tif (function_exists($length_callback)) {\n\t\tadd_filter('excerpt_length', $length_callback);\n\t}\n\tif (function_exists($more_callback)) {\n\t\tadd_filter('excerpt_more', $more_callback);\n\t}\n\t$output = get_the_excerpt();\n\t$output = apply_filters('wptexturize', $output);\n\t$output = apply_filters('convert_chars', $output);\n\t$output = '<p>' . $output . '</p>';\n\techo $output;\n}", "private function retrieve_excerpt_only() {\n\t\t$replacement = null;\n\n\t\t// The check `post_password_required` is because excerpt must be hidden for a post with a password.\n\t\tif ( ! empty( $this->args->ID ) && $this->args->post_excerpt !== '' && ! post_password_required( $this->args->ID ) ) {\n\t\t\t$replacement = wp_strip_all_tags( $this->args->post_excerpt );\n\t\t}\n\n\t\treturn $replacement;\n\t}", "public function get_excerpt();", "public function excerpt()\n\t{\n\t\treturn ( ! empty($this->excerpt))? $this->excerpt : truncate_word($this->content, 200);\n\t}", "function the_excerpt_dynamic($length) { // Outputs an excerpt of variable length (in characters)\n\tglobal $post;\n\t$text = $post->post_exerpt;\n\tif ( '' == $text ) {\n\t\t$text = get_the_content('');\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]>', $text);\n\t}\n\t\t$text = strip_shortcodes( $text ); // optional, recommended\n\t\t$text = strip_tags($text); // use ' $text = strip_tags($text,'<p><a>'); ' to keep some formats; optional\n\n\t\t$output = strlen($text);\n\t\tif($output <= $length ) {\n\t\t\t$text = substr($text,0,$length).'';\n\t\t}else {\n\t\t\t$text = substr($text,0,$length).'...';\n\t\t}\n\n\techo apply_filters('the_excerpt',$text);\n}", "function wp_new_excerpt($text)\n{\n\tif ($text == '')\n\t{\n\t\t$text = get_the_content('');\n\t\t$text = strip_shortcodes( $text );\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]>', $text);\n\t\t$text = strip_tags($text);\n\t\t$text = nl2br($text);\n\t\t$excerpt_length = apply_filters('excerpt_length', 100);\n\t\t$words = explode(' ', $text, $excerpt_length + 1);\n\t\tif (count($words) > $excerpt_length) {\n\t\t\tarray_pop($words);\n\t\t\tarray_push($words, '<div class=\"more-stuff\"><a class=\"more-link\" href=\"'. get_permalink() .'\">Read More</a></div>');\n\t\t\t$text = implode(' ', $words);\n\t\t}\n\t}\n\treturn $text;\n}", "function ks_excerpt( $length_callback = '', $more_callback = '' ) {\n\tglobal $post;\n\tif ( function_exists( $length_callback ) ) {\n\t\tadd_filter( 'excerpt_length', $length_callback );\n\t}\n\tif ( function_exists( $more_callback ) ) {\n\t\tadd_filter( 'excerpt_more', $more_callback );\n\t}\n\t$output = get_the_excerpt();\n\t$output = apply_filters( 'wptexturize', $output );\n\t$output = apply_filters( 'convert_chars', $output );\n\t$output = '<p>' . $output . '</p>';\n\techo $output;\n}", "function jetpack_the_excerpt_customizer( $excerpt ) {\n\tif ( ( is_home() || is_archive() ) && ! is_post_type_archive( array( 'jetpack-testimonial', 'jetpack-portfolio', 'product' ) ) ) {\n\t\tob_start();\n\t\tthe_content(\n\t\t\tsprintf(\n\t\t\t\twp_kses(\n\t\t\t\t\t/* translators: %s: Name of current post. Only visible to screen readers */\n\t\t\t\t\t__( 'Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>', 'jetpack' ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'span' => array(\n\t\t\t\t\t\t\t'class' => array(),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tget_the_title()\n\t\t\t)\n\t\t);\n\t\t$content = ob_get_clean();\n\t}\n\tif ( empty( $content ) ) {\n\t\treturn $excerpt;\n\t} else {\n\t\treturn sprintf( '<div class=\"jetpack-blog-display jetpack-the-content\">%s</div><div class=\"jetpack-blog-display jetpack-the-excerpt\">%s</div>', $content, $excerpt );\n\t}\n}", "function excerpt($limit) {\n\t $excerpt = explode(' ', get_the_excerpt(), $limit);\n\t if (count($excerpt)>=$limit) {\n\t array_pop($excerpt);\n\t $excerpt = implode(\" \",$excerpt).'...';\n\t } else {\n\t $excerpt = implode(\" \",$excerpt);\n\t } \n\t $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\t return $excerpt;\n\t}", "function excerpt($limit)\n{\n\t$excerpt = explode(' ', do_shortcode(get_the_content()), $limit);\n\n\tif (count($excerpt)>=$limit)\n\t{\n\t\tarray_pop($excerpt);\n\t\t$excerpt = implode(\" \",$excerpt).'...';\n\t}\n\telse\n\t{\n\t\t$excerpt = implode(\" \",$excerpt);\n\t}\n\t\t$excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\t\treturn $excerpt;\n}", "function arlo_fn_excerpt($limit,$postID = '') {\n\t$limit++;\n\n\t$excerpt = explode(' ', wp_trim_excerpt('', $postID), $limit);\n\t\n\tif (count($excerpt)>=$limit) {\n\t\tarray_pop($excerpt);\n\t\t$excerpt = implode(\" \",$excerpt);\n\t} \n\telse{\n\t\t$excerpt = implode(\" \",$excerpt);\n\t} \n\t$excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\t\n\treturn esc_html($excerpt);\n}", "function get_post_excerpt($entity)\n {\n return '';\n }", "function neu_excerpt($num) {\n\t$limit = $num+1;\n\tif( get_the_excerpt() ){\n\t\t$excerpt = get_the_excerpt();\n\t}else{\n\t\t//no hay extracto es un postevento\n\t\t$excerpt = get_field('descripcion_postevento');\n\t}\n\t$excerpt = explode(' ', $excerpt, $limit);\n\tarray_pop($excerpt);\n\t$excerpt = implode(\" \",$excerpt).\" [...]\"; \n\techo $excerpt;\n}", "function the_excerpt_rss()\n {\n }", "function rw_custom_excerpt_more( $output )\n{\n if( has_excerpt() && !is_attachment() )\n {\n $output .= rw_continue_reading_link();\n }\n return $output;\n}", "function trim_excerpt_length ($length) {\n return 20;\n}", "function register_block_core_post_excerpt()\n {\n }", "function lucasato_get_the_excerpt($post_id)\n{\n $output = get_the_excerpt($post_id);\n return $output;\n}", "function devlyTruncateExcerpt($limit) {\n\n\tglobal $post;\n\n\t$excerpt\t \t= strip_tags(get_the_excerpt($post->ID));\n\n\t$devlyExcerpt \t= substr($excerpt, 0, $limit);\n\t$truncExcerpt \t= substr($excerpt, 0, $limit) . '...';\n\n\tif($excerpt > $devlyExcerpt) {\n\n\t\techo $truncExcerpt;\n\n\t} else {\n\n\t\techo $devlyExcerpt;\n\n\t}\n\n\n}", "function excerpt($num) {\n$limit = $num+1;\n$excerpt = explode(' ', get_the_excerpt(), $limit);\narray_pop($excerpt);\n$excerpt = implode(\" \",$excerpt).\" <a href='\" .get_permalink($post->ID) .\" ' class='\".readmore.\"'>READ THIS</a>\";\necho $excerpt;\n}", "function excerpt($limit) {\n\t\t$excerpt = explode(' ', get_the_excerpt(), $limit);\n\t\tif (count($excerpt)>=$limit) {\n\t\t\tarray_pop($excerpt);\n\t\t\t$excerpt = implode(\" \",$excerpt).'...';\n\t\t}\n\t\telse {\n\t\t\t$excerpt = implode(\" \",$excerpt);\n\t\t}\n\t\t$excerpt = preg_replace('`[[^]]*]`','',$excerpt);\n\t\treturn $excerpt;\n\t}", "function excerpt($num) {\n$limit = $num+1;\n$excerpt = explode(' ', get_the_excerpt(), $limit);\narray_pop($excerpt);\n$excerpt = implode(\" \",$excerpt).\" <a href='\" .get_permalink($post->ID) .\" ' class='\".readmore.\"'>Read More</a>\";\necho $excerpt;\n}", "public function filter_post_content_excerpt($text)\n\t{\n\t\tif(strlen($text) > 280) {\n\t\t\t// cut off everything after the word at position 280. Don't use \\W so we don't cut HTML tags\n\t\t\t$rest = preg_replace('/[ .\\-]+.*/', '', substr($text, 280));\n\t\t\treturn substr($text, 0, 280) . $rest;\n\t\t}\n\t\treturn $text;\n\t\t\n\t\t// Alternative method: Return match[0] from /(\\w+\\W+){50}/ for the first 50 words\n\t}", "private function retrieve_excerpt() {\n\t\t$replacement = null;\n\n\t\t// The check `post_password_required` is because excerpt must be hidden for a post with a password.\n\t\tif ( ! empty( $this->args->ID ) && ! post_password_required( $this->args->ID ) ) {\n\t\t\tif ( $this->args->post_excerpt !== '' ) {\n\t\t\t\t$replacement = wp_strip_all_tags( $this->args->post_excerpt );\n\t\t\t}\n\t\t\telseif ( $this->args->post_content !== '' ) {\n\t\t\t\t$replacement = wp_html_excerpt( strip_shortcodes( $this->args->post_content ), 156 );\n\t\t\t\t// Trim the auto-generated string to a word boundary.\n\t\t\t\t$replacement = substr( $replacement, 0, strrpos( $replacement, ' ' ) );\n\t\t\t}\n\t\t}\n\n\t\treturn $replacement;\n\t}", "function the_excerpt_embed()\n {\n }", "function custom_excerpt_more( $more ) {\r\n\t return '...';\r\n}", "function custom_field_excerpt($title,$tax) {\r\n\t\t\tglobal $post;\r\n\t\t\tif ( $tax ) {\r\n\t\t\t\t$text = get_field($title,$tax);\r\n\t\t\t} else {\r\n\t\t\t\t$text = get_field($title);\r\n\t\t\t}\r\n\t\t\tif ( '' != $text ) {\r\n\t\t\t\t$text = strip_shortcodes( $text );\r\n\t\t\t\t$text = apply_filters('the_content', $text);\r\n\t\t\t\t$text = str_replace(']]>', ']]>', $text);\r\n\t\t\t\t$excerpt_length = 20; // 20 words\r\n\t\t\t\t$excerpt_length_char = 160; // 160 characters\r\n//\t\t\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\r\n\t\t\t\t$excerpt_more = apply_filters('excerpt_more', __('...','indagare'));\r\n\t\t\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\r\n//\t\t\t\t$text = wp_html_excerpt( $text, $excerpt_length_char );\r\n\t\t\t}\r\n//\t\t\treturn apply_filters('the_excerpt', $text);\r\n\t\t\treturn $text;\r\n}", "function jwp_post_excerpt() {\n return JWP_Post_Excerpt::get_instance();\n}", "function staff_bio_excerpt($text, $excerpt_length) {\n\t\t\tglobal $post;\n\t\t\tif (!$excerpt_length || !is_int($excerpt_length))$excerpt_length = 20;\n\t\t\tif ( '' != $text ) {\n\t\t\t\t$text = strip_shortcodes( $text );\n\t\t\t\t$text = apply_filters('the_content', $text);\n\t\t\t\t$text = str_replace(']]>', ']]>', $text);\n\t\t\t\t$excerpt_more = \" ...\";\n\t\t\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\t\t\t}\n\t\t\treturn apply_filters('the_excerpt', $text);\n\t\t}", "function madang_short_excerpt( $limit ) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'...';\n } else {\n $excerpt = implode(\" \",$excerpt);\n }\n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function new_excerpt_more( $more ) {\n return '';\n}", "public function excerpt()\n {\n if (!$this->desc()->empty()) {\n $excerpt = $this->desc();\n } else {\n $excerpt = excerpt($this->text(), $length = 40, $mode = 'words');\n };\n\n return $excerpt;\n }", "function molla_excerpt( $length = 0, $unit = 0 ) {\n\n\t\tglobal $post;\n\n\t\tif ( ! $length ) {\n\t\t\t$length = (int) molla_option( 'blog_excerpt_length' );\n\t\t}\n\n\t\tif ( ! $unit ) {\n\t\t\t$unit = molla_option( 'blog_excerpt_unit' );\n\t\t}\n\n\t\t// Check if has excerpt\n\t\tif ( has_excerpt( $post ) ) {\n\t\t\t$output = get_the_excerpt( $post );\n\t\t}\n\n\t\t// Has no custom excerpt\n\t\telse {\n\t\t\t// Check if has more tag\n\t\t\tif ( strpos( $post->post_content, '<!--more-->' ) ) {\n\t\t\t\t$output = apply_filters( 'the_content', molla_strip_script_tags( get_the_content() ) );\n\t\t\t}\n\t\t\t// Has not more tag\n\t\t\telse {\n\t\t\t\t// Check if the unit is character\n\t\t\t\tif ( 'character' == $unit ) {\n\t\t\t\t\t$output = molla_strip_script_tags( get_the_content() );\n\t\t\t\t\tif ( mb_strlen( $output ) > $length ) {\n\t\t\t\t\t\t$output = mb_substr( $output, 1, $length ) . '...';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Check if the unit is word\n\t\t\t\telse {\n\t\t\t\t\t$output = wp_trim_words( molla_strip_script_tags( get_the_content() ), $length );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "function wp_strip_header_tags( $excerpt='' ) {\n\t$raw_excerpt = $excerpt;\n\tif ( '' == $excerpt ) {\n\t\t$excerpt = get_the_content('');\n\t\t$excerpt = strip_shortcodes( $excerpt );\n\t\t$excerpt = apply_filters('the_content', $excerpt);\n\t\t$excerpt = str_replace(']]>', ']]&gt;', $excerpt);\n\t}\n\t$regex = '#(<h([1-6])[^>]*>)\\s?(.*)?\\s?(<\\/h\\2>)#';\n\t$excerpt = preg_replace($regex,'', $excerpt);\n\t$excerpt_length = apply_filters('excerpt_length', 55);\n\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\t$excerpt = wp_trim_words( $excerpt, $excerpt_length, $excerpt_more );\n\treturn apply_filters('wp_trim_excerpt', preg_replace($regex,'', $excerpt), $raw_excerpt);\n}", "function always_the_excerpt() {\n\tglobal $more;\n\t$old_more = isset($more) ? $more : null;\n\t$more = 0;\n\tthe_excerpt();\n\t$more = $old_more;\n}", "public function excerpt() { return $this->post->post_excerpt; }", "function woo_excerpt($text, $chars = 120) {\n\t$text = $text.\" \";\n\t$text = substr($text,0,$chars);\n\t$text = substr($text,0,strrpos($text,' '));\n\t$text = $text.\"...\";\n\treturn $text;\n}", "function custom_excerpt($content, $limit) {\n\n\t$excerpt = explode(' ', $content, $limit);\t\n\n\tif (count($excerpt)>=$limit) {\n\n\t\tarray_pop($excerpt);\n\t\t$excerpt = implode(\" \",$excerpt).'...';\n\n\t} else {\n\n\t\t$excerpt = implode(\" \",$excerpt);\n\t\t\n\t} \n\n\t$excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\treturn $excerpt;\n}", "private function getPostExcerpt()\n {\n global $post;\n\n // If this is not a page or a single post, it cannot have an excerpt and\n // so the method should return an empty string.\n if (!is_page() && !is_singular()) {\n return '';\n }\n\n // Attempt to get a manaul excerpt\n $excerpt = apply_filters('the_excerpt', $post->post_excerpt);\n\n // If there is no manual excerpt, use the main content instead\n if (!$excerpt) {\n $excerpt = apply_filters('the_content', $post->post_content);\n }\n\n // Return the excerpt, stripped of any HTML code\n return strip_tags($excerpt);\n }", "function civicrm_wp_content_test_basepage_handler($wp) {\n\n add_filter('the_content', 'civicrm_wp_content_test_basepage_render');\n\n // error_log(' TEST ');\n $excerpt = wp_trim_excerpt();\n // error_log(' XC '.substr($excerpt,0,15).' ');\n\n}", "public static function before_get_the_excerpt( $excerpt ) {\n\t\tself::$force_disable = true;\n\n\t\tif ( TpsOptions::get( 'add_header_to_excerpt' ) && $excerpt == '' ) {\n\t\t\t$text = get_the_content( '' );\n\t\t\t$text = str_replace( array( '[tps_header]', '[/tps_header]', '[tps_footer]', '[/tps_footer]' ), '', $text );\n\n\t\t\t$text = strip_shortcodes( $text );\n\n\t\t\t/** This filter is documented in wp-includes/post-template.php */\n\t\t\t$text = apply_filters( 'the_content', $text );\n\t\t\t$text = str_replace( ']]>', ']]&gt;', $text );\n\n\t\t\t/**\n\t\t\t * Filter the number of words in an excerpt.\n\t\t\t *\n\t\t\t * @since 2.7.0\n\t\t\t *\n\t\t\t * @param int $number The number of words. Default 55.\n\t\t\t */\n\t\t\t$excerpt_length = apply_filters( 'excerpt_length', 55 );\n\t\t\t/**\n\t\t\t * Filter the string in the \"more\" link displayed after a trimmed excerpt.\n\t\t\t *\n\t\t\t * @since 2.9.0\n\t\t\t *\n\t\t\t * @param string $more_string The string shown within the more link.\n\t\t\t */\n\t\t\t$excerpt_more = apply_filters( 'excerpt_more', ' ' . '[&hellip;]' );\n\t\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\n\t\t\treturn apply_filters( 'wp_trim_excerpt', $text, $excerpt );\n\t\t}\n\n\t\treturn $excerpt;\n\t}", "function custom_excerpt_length() {\n\treturn 100;\n}", "function custom_excerpt_length() {\n return 50;\n}", "function flatsome_excerpt_suffix() {\n\treturn get_theme_mod( 'blog_excerpt_suffix', ' [...]' );\n}", "function get_the_excerpt($post = \\null)\n {\n }", "function lalita_sanitize_blog_excerpt( $input ) {\n\t $valid = array(\n\t 'full',\n\t\t\t'excerpt'\n\t );\n\n\t if ( in_array( $input, $valid ) ) {\n\t return $input;\n\t } else {\n\t return 'full';\n\t }\n\t}", "function create_excerpt($post_content, $excerpt_length, $post_permalink, $excerpt_words = NULL)\n{\n\n $keep_excerpt_tags = get_option('rps_keep_excerpt_tags');\n\n\n if (!$keep_excerpt_tags) {\n\n $post_excerpt = strip_shortcodes($post_content);\n\n $post_excerpt = str_replace(']]>', ']]&gt;', $post_excerpt);\n\n $post_excerpt = strip_tags($post_excerpt);\n\n } else {\n\n $post_excerpt = $post_content;\n\n }\n\n\n $link_text = get_option('rps_link_text');\n\n if (!empty($link_text)) {\n\n $more_link = \"\";\n\n } else {\n\n $more_link = \"\";\n\n }\n\n if (!empty($excerpt_words)) {\n\n if (!empty($post_excerpt)) {\n\n $words = explode(' ', $post_excerpt, $excerpt_words + 1);\n\n array_pop($words);\n\n array_push($words, ' <a href=\"' . $post_permalink . '\">' . $more_link . '</a>');\n\n $post_excerpt_rps = implode(' ', $words);\n\n return $post_excerpt_rps;\n\n } else {\n\n return;\n\n }\n\n } else {\n\n $post_excerpt_rps = substr($post_excerpt, 0, $excerpt_length);\n\n if (!empty($post_excerpt_rps)) {\n\n if (strlen($post_excerpt) > strlen($post_excerpt_rps)) {\n\n $post_excerpt_rps = substr($post_excerpt_rps, 0, strrpos($post_excerpt_rps, ' '));\n\n }\n\n $post_excerpt_rps .= ' <a href=\"' . $post_permalink . '\">' . $more_link . '</a>';\n\n return $post_excerpt_rps;\n\n } else {\n\n return;\n\n }\n\n }\n\n}", "function charity_use_autoexcerpt() {\n $display = FALSE;\n $display = apply_filters('charity_use_autoexcerpt', $display);\n return $display;\n}", "function custom_excerpt_length(){\n return 25;\n}", "function custom_excerpt_length(){\n return 25;\n}", "function custom_excerpt_length( $length ) {\r\n return 50;\r\n}", "function barjeel_excerpt($more) {\n global $post;\n return '&nbsp; &nbsp;<a href=\"'. get_permalink($post->ID) . '\">...Continue Reading</a>';\n}" ]
[ "0.8127001", "0.81208426", "0.793198", "0.7922301", "0.7850822", "0.77194446", "0.76226646", "0.7551151", "0.7449537", "0.7442827", "0.7441337", "0.7430813", "0.73806745", "0.73121494", "0.729196", "0.7291283", "0.729039", "0.72826934", "0.72425836", "0.72245836", "0.7216837", "0.7216837", "0.72079575", "0.7206342", "0.7170564", "0.7169336", "0.7167796", "0.7158211", "0.714028", "0.71001613", "0.7096073", "0.7095744", "0.7093595", "0.70853615", "0.7062032", "0.7028176", "0.7025942", "0.7013999", "0.7002119", "0.7002119", "0.6988809", "0.69448566", "0.6941485", "0.693576", "0.6934818", "0.69320756", "0.6927783", "0.6927416", "0.6920221", "0.69144875", "0.6880612", "0.68805856", "0.68794525", "0.6873741", "0.6867553", "0.68648535", "0.6857862", "0.68527466", "0.6846914", "0.68394583", "0.6837867", "0.683529", "0.68237054", "0.67855", "0.67763084", "0.6772038", "0.6770158", "0.67698663", "0.6763716", "0.67605", "0.6757877", "0.67437005", "0.6742701", "0.67283905", "0.67192", "0.6716609", "0.67116493", "0.67075133", "0.6698278", "0.6695384", "0.66926163", "0.66908777", "0.66843235", "0.66792256", "0.6660352", "0.6643128", "0.66413105", "0.6638959", "0.6625758", "0.6612579", "0.66116583", "0.6610096", "0.65956044", "0.65888953", "0.657507", "0.65672237", "0.65588605", "0.65588605", "0.6546815", "0.6542797" ]
0.7963036
2
Sets the default post excerpt length to 100 characters. To override this length in a child theme, remove the filter and add your own function tied to the excerpt_length filter hook.
function rw_excerpt_length( $length=100 ) { return $length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function custom_excerpt_length() {\n\treturn 100;\n}", "function custom_excerpt_length() {\n return 50;\n}", "function custom_excerpt_length(){\n\t\treturn 25;\n\t}", "function custom_excerpt_length() {\n\treturn 120;\n}", "function custom_excerpt_length(){\n return 25;\n}", "function custom_excerpt_length(){\n return 25;\n}", "function custom_excerpt_length() {\n\treturn 40;\n}", "function t_excerpt_length(){\n\t// sets the amount of characters an excerpt contains\n\treturn 50;\n}", "function cheffism_custom_excerpt_length( $length ) {\n return 50;\n}", "function wprm_custom_excerpt_length( $length ) {\n return 200;\n}", "function custom_excerpt_length( $length ) {\r\n return 50;\r\n}", "function custom_excerpt_length( $length ) {\n\treturn 25;\n}", "function custom_excerpt_length($length) {\n return 25;\n}", "function thoughts_custom_excerpt_length( $length ) {\n\treturn 100;\n}", "function d4tw_custom_excerpt_length( $length ) {\r\nreturn 35;\r\n}", "function classiera_blog_excerpt_length($length) {\r\n\tglobal $post;\r\n\tif ($post->post_type == 'blog_posts'){\r\n\t\treturn 150;\r\n\t}\r\n\telse {\r\n\t\treturn $length;\r\n\t}\r\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 25;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 25;\n}", "function custom_excerpt_length( $length ) {\n return 30;\n}", "function custom_excerpt_length( $length ) {\n return 30;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 1000;\n}", "function custom_excerpt_length( $length ) {\nreturn 20;\n}", "public static function excerpt_length() {\n\t\t\t$cpt = self::get_post_type();\n\n\t\t\tif ( $cpt && $cpt !== 'post' ) {\n\t\t\t\treturn self::option( 'post_excerpt_' . $cpt, 20 );\n\t\t\t}\n\n\t\t\treturn self::option( 'post_excerpt', 20 );\n\t\t}", "function wow_theme_excerpt_length( $length ) {\n return 100;\n}", "function theme_excerpt_length($length){\r\n return 35; //el número aquí es nueva cantidad de palabras en el excerpt\r\n}", "function wfs_custom_excerpt_length( $length ) {\n return 20;\n}", "function custom_excerpt_length( $length ) {\n\treturn 90;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 150;\n}", "function sm_modern_post_excerpt_length () {\n\treturn 20;\n}", "function custom_excerpt_length($length) {\n return 20;\n}", "function custom_excerpt_length( $length ) {\n\treturn 20;\n}", "function custom_excerpt_length( $length ) {\n\treturn 30;\n}", "function custom_excerpt_length( $length ) {\n\treturn 30;\n}", "function tn_custom_excerpt_length( $length ) {\r\n return 15;\r\n}", "function leafbase_custom_excerpt_length( $length ) {\n\n return 40;\n\n}", "function custom_excerpt_length($length) {\n return 15;\n}", "function mt_filter_excerpt_length($length) {\n\treturn 20;\n }", "function wpdocs_custom_excerpt_length( $length ) {\n return 20;\n }", "function wpdocs_custom_excerpt_length( $length ) {\n return 40;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 30;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 30;\n}", "function custom_excerpt_length( $length ) {\n return 16;\n }", "function block_core_latest_posts_get_excerpt_length()\n {\n }", "function excerpt_size($legth = 150) {\r\n global $post;\r\n return substr(strip_tags($post->post_content), 0, $legth).'...';\r\n}", "function wpdocs_custom_excerpt_length( $length ) {\r\n return 20;\r\n}", "function recent_posts_excerpt_length( $length ) {\r\n\treturn 20;\r\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 15;\n}", "function wpdocs_custom_excerpt_length($length) {\n return 12;\n }", "function wpdocs_custom_excerpt_length( $length ) {\r\n return 45;\r\n}", "function studiare_custom_excerpt_length( $length ) {\n\treturn 30;\n}", "function custom_excerpt_length( $length ) {\r\n if (is_search()) {\r\n return 10;\r\n }\r\n else return 35;\r\n}", "function wpdocs_custom_excerpt_length( $length ) {\n return 8;\n}", "function new_excerpt_length($length) {\nreturn 50;\n}", "function new_excerpt_length($length) {\nreturn 50;\n}", "function wpdocs_custom_excerpt_length( $length ) {\n\treturn 18;\n}", "function new_excerpt_length($length) { \n return 75;\n}", "function tn_custom_excerpt_length( $length ) {\r\n\t\treturn 15;\r\n\t\t}", "function wpdocs_custom_excerpt_length( $length ) {\n return 26;\n\t\t}", "function twentyten_excerpt_length( $length ) {\n\treturn 40;\n}", "function twentyten_excerpt_length( $length ) {\n\treturn 40;\n}", "function new_excerpt_length($length) {\n\treturn 100;\n}", "function new_excerpt_length($length) {\n\treturn 100;\n}", "function mobject_excerpt_length( $length ) {\n\tif ( is_admin() ) {\n\t\treturn $length;\n\t}\n\t$display_options = get_customizer_settings()[ WPM_PREFIX . 'collection_style' ];\n\tif ( $display_options['excerpt_max_length'] ) {\n\t\treturn $display_options['excerpt_max_length'];\n\t}\n\treturn $length;\n}", "function my_excerpt_length($length) {\nreturn 20; // Or whatever we want the length to be.\n}", "function new_excerpt_length($length) {\r\nreturn 30;\r\n}", "function new_excerpt_length($length) {\r\n return 40;\r\n}", "function d4tw_excerpt_length( $length ) {\n return 20;\n}", "function sp_excerpt_length( $length ) {\n\treturn 50;\n}", "function isacustom_excerpt_length($length) {\n global $post;\n if ($post->post_type == 'post')\n return 48;\n else if ($post->post_type == 'clases_yoga')\n return 24;\n else\n return 48;\n\t}", "function wpex_new_excerpt_length($length) {\n\n\treturn 50;\n\n}", "function new_excerpt_length($length) {\n return 30;\n}", "function wpt_excerpt_length( $length ) {\n\treturn 40;\n}", "public function excerpt($length = 300);", "public function excerpt_length($length) {\n\t\tglobal $wpv_loop_vars;\n\n\t\tif(isset($wpv_loop_vars) && $wpv_loop_vars['news'])\n\t\t\treturn 15;\n\n\t\treturn $length;\n\t}", "function <%= functionPrefix %>_custom_excerpt_length($length) {\n\treturn 55;\n}", "function xo_excerpt_length( $length ) {\n return 12;\n}", "function rocked_excerpt_length( $length ) {\n\t$excerpt = get_theme_mod('exc_lenght', '55');\n\treturn $excerpt;\n}", "function new_excerpt_length($length) {\n\treturn 15;\n}", "function tz_excerpt_length($length) {\nreturn 55; }", "function darksnow_excerpt_length( $length ) {\n\treturn 40;\n}", "function be_excerpt_length( $length ) { \n\t\n\t$length = '40'; \n\t\n\treturn $length;\n\t \n\t}", "function uwmadison_excerpt_length( $length ) {\n\t\treturn 40;\n\t}", "static public function change_excerpt_length($length)\n\t{\n\t\treturn 12;\n\t}", "function medigroup_mikado_excerpt_length($length) {\n\n if(medigroup_mikado_options()->getOptionValue('number_of_chars') !== '') {\n return esc_attr(medigroup_mikado_options()->getOptionValue('number_of_chars'));\n } else {\n return 45;\n }\n }", "function voyage_mikado_excerpt_length($length) {\n\n if(voyage_mikado_options()->getOptionValue('number_of_chars') !== '') {\n return esc_attr(voyage_mikado_options()->getOptionValue('number_of_chars'));\n } else {\n return 45;\n }\n }", "function rls_text_excerpt($length) {\n return 25;\n}", "function voyage_mikado_excerpt($excerpt_length = '') {\n global $post;\n\n if(post_password_required()) {\n echo get_the_password_form();\n } //does current post has read more tag set?\n elseif(voyage_mikado_post_has_read_more()) {\n global $more;\n\n //override global $more variable so this can be used in blog templates\n $more = 0;\n the_content(true);\n } //is word count set to something different that 0?\n elseif($excerpt_length != '0') {\n //if word count is set and different than empty take that value, else that general option from theme options\n $word_count = '45';\n if(isset($excerpt_length) && $excerpt_length != \"\") {\n $word_count = $excerpt_length;\n\n } elseif(voyage_mikado_options()->getOptionValue('number_of_chars') != '') {\n $word_count = esc_attr(voyage_mikado_options()->getOptionValue('number_of_chars'));\n }\n //if post excerpt field is filled take that as post excerpt, else that content of the post\n $post_excerpt = $post->post_excerpt != \"\" ? $post->post_excerpt : strip_tags($post->post_content);\n\n //remove leading dots if those exists\n $clean_excerpt = strlen($post_excerpt) && strpos($post_excerpt, '...') ? strstr($post_excerpt, '...', true) : $post_excerpt;\n\n //if clean excerpt has text left\n if($clean_excerpt !== '') {\n //explode current excerpt to words\n $excerpt_word_array = explode(' ', $clean_excerpt);\n\n //cut down that array based on the number of the words option\n $excerpt_word_array = array_slice($excerpt_word_array, 0, $word_count);\n\n //add exerpt postfix\n $excert_postfix = apply_filters('voyage_mikado_excerpt_postfix', '...');\n\n //and finally implode words together\n $excerpt = implode(' ', $excerpt_word_array).$excert_postfix;\n\n //is excerpt different than empty string?\n if($excerpt !== '') {\n echo '<p class=\"mkdf-post-excerpt\">'.wp_kses_post($excerpt).'</p>';\n }\n }\n }\n }", "function ti_excerpt_length( $length ) {\n\treturn 24;\n}", "function rls_media_excerpt($length) {\n return 25;\n}", "function gallo_excerpt( $length ) {\n\treturn 30;\n}", "function init() {\r\n $options = get_option('e_tools');\r\n if ($options['enforce_length']) {\r\n add_filter('wp_trim_excerpt', __NAMESPACE__.'\\filter_trim_excerpt', 11, 2);\r\n add_filter('option_relevanssi_excerpt_length', __NAMESPACE__.'\\option_relevanssi_excerpt_length', 99);\r\n }\r\n}", "function excerpt_length($length) {\n global $data;\n return $data['blog_excerptlength'];\n}", "function the_excerpt_max_charlength($charlength) {\n $excerpt = get_the_excerpt();\n $charlength++;\n if(strlen($excerpt)>$charlength) {\n $subex = substr($excerpt,0,$charlength-5);\n $exwords = explode(\" \",$subex);\n $excut = -(strlen($exwords[count($exwords)-1]));\n if($excut<0) {\n echo substr($subex,0,$excut);\n } else {\n \t echo $subex;\n }\n echo ' <a href=\"'.get_permalink().'\"> Read more ...</a>';\n } else {\n\t echo $excerpt;\n }\n}", "function the_excerpt_dynamic($length) { // Outputs an excerpt of variable length (in characters)\n\tglobal $post;\n\t$text = $post->post_exerpt;\n\tif ( '' == $text ) {\n\t\t$text = get_the_content('');\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]>', $text);\n\t}\n\t\t$text = strip_shortcodes( $text ); // optional, recommended\n\t\t$text = strip_tags($text); // use ' $text = strip_tags($text,'<p><a>'); ' to keep some formats; optional\n\n\t\t$output = strlen($text);\n\t\tif($output <= $length ) {\n\t\t\t$text = substr($text,0,$length).'';\n\t\t}else {\n\t\t\t$text = substr($text,0,$length).'...';\n\t\t}\n\n\techo apply_filters('the_excerpt',$text);\n}", "function postExcerpt($content) {\n\t\t$clean = strip_tags($content);\n\t\tif (strlen($clean) > 120){\n\t\t\t$excerpt = substr($clean, 0, strpos($clean, ' ', 120));\n\t\t\tprint $excerpt . ' ...';\n\t\t}\n\t}", "function devlyTruncateExcerpt($limit) {\n\n\tglobal $post;\n\n\t$excerpt\t \t= strip_tags(get_the_excerpt($post->ID));\n\n\t$devlyExcerpt \t= substr($excerpt, 0, $limit);\n\t$truncExcerpt \t= substr($excerpt, 0, $limit) . '...';\n\n\tif($excerpt > $devlyExcerpt) {\n\n\t\techo $truncExcerpt;\n\n\t} else {\n\n\t\techo $devlyExcerpt;\n\n\t}\n\n\n}", "function medigroup_mikado_excerpt($excerpt_length = '') {\n global $post;\n\n if(post_password_required()) {\n echo get_the_password_form();\n } //does current post has read more tag set?\n elseif(medigroup_mikado_post_has_read_more()) {\n global $more;\n\n //override global $more variable so this can be used in blog templates\n $more = 0;\n the_content(true);\n } //is word count set to something different that 0?\n elseif($excerpt_length != '0') {\n //if word count is set and different than empty take that value, else that general option from theme options\n $word_count = '45';\n if(isset($excerpt_length) && $excerpt_length != \"\") {\n $word_count = $excerpt_length;\n\n } elseif(medigroup_mikado_options()->getOptionValue('number_of_chars') != '') {\n $word_count = esc_attr(medigroup_mikado_options()->getOptionValue('number_of_chars'));\n }\n //if post excerpt field is filled take that as post excerpt, else that content of the post\n $post_excerpt = $post->post_excerpt != \"\" ? $post->post_excerpt : strip_tags($post->post_content);\n\n //remove leading dots if those exists\n $clean_excerpt = strlen($post_excerpt) && strpos($post_excerpt, '...') ? strstr($post_excerpt, '...', true) : $post_excerpt;\n\n //if clean excerpt has text left\n if($clean_excerpt !== '') {\n //explode current excerpt to words\n $excerpt_word_array = explode(' ', $clean_excerpt);\n\n //cut down that array based on the number of the words option\n $excerpt_word_array = array_slice($excerpt_word_array, 0, $word_count);\n\n //add exerpt postfix\n $excert_postfix = apply_filters('medigroup_mikado_excerpt_postfix', '...');\n\n //and finally implode words together\n $excerpt = implode(' ', $excerpt_word_array).$excert_postfix;\n\n //is excerpt different than empty string?\n if($excerpt !== '') {\n echo '<p class=\"mkd-post-excerpt\">'.wp_kses_post($excerpt).'</p>';\n }\n }\n }\n }", "function ks_excerpt( $length_callback = '', $more_callback = '' ) {\n\tglobal $post;\n\tif ( function_exists( $length_callback ) ) {\n\t\tadd_filter( 'excerpt_length', $length_callback );\n\t}\n\tif ( function_exists( $more_callback ) ) {\n\t\tadd_filter( 'excerpt_more', $more_callback );\n\t}\n\t$output = get_the_excerpt();\n\t$output = apply_filters( 'wptexturize', $output );\n\t$output = apply_filters( 'convert_chars', $output );\n\t$output = '<p>' . $output . '</p>';\n\techo $output;\n}", "function the_excerpt_limit($limit, $max = '') {\r\n $excerpt = get_the_excerpt_limit( $limit, $max );\r\n $excerpt = sprintf('<p>%s</p>', strip_tags($excerpt));\r\n\r\n echo $excerpt;\r\n\r\n}", "function trim_excerpt_length ($length) {\n return 20;\n}" ]
[ "0.7965883", "0.79035646", "0.7719666", "0.7708998", "0.77060646", "0.77060646", "0.7684543", "0.76506025", "0.7573192", "0.7563099", "0.75590986", "0.7554856", "0.75225717", "0.7504926", "0.7466565", "0.74515474", "0.74426746", "0.74426746", "0.7435189", "0.7435189", "0.7432988", "0.7422878", "0.7393086", "0.73869866", "0.7376263", "0.73758715", "0.7359974", "0.7356752", "0.7356579", "0.73500854", "0.7343962", "0.7341458", "0.7341458", "0.73172367", "0.729952", "0.72927994", "0.7287781", "0.7273555", "0.722878", "0.7213767", "0.7213767", "0.72136676", "0.7212124", "0.7194379", "0.71832144", "0.7181261", "0.71754825", "0.7174783", "0.717156", "0.7155797", "0.71413946", "0.71263665", "0.71124375", "0.71124375", "0.7096447", "0.70304257", "0.7026326", "0.7004423", "0.6995233", "0.6995233", "0.69873255", "0.69873255", "0.69587326", "0.69532245", "0.6951573", "0.6942197", "0.6939245", "0.69314843", "0.68769264", "0.68707997", "0.6834397", "0.6799768", "0.67452496", "0.67360485", "0.67253804", "0.6724247", "0.6693307", "0.6673034", "0.6665637", "0.66380703", "0.6628551", "0.6627884", "0.6620268", "0.6611599", "0.66102964", "0.6588418", "0.65809625", "0.6547162", "0.6514964", "0.64785314", "0.64628184", "0.6438963", "0.6416402", "0.6394586", "0.6367945", "0.6366882", "0.63632035", "0.6359109", "0.63366526", "0.6334373" ]
0.679601
72
Returns a "Continue Reading" link for excerpts
function rw_continue_reading_link( ) { return ' <a href="'. get_permalink() . '" class="more-link">' . __( 'More', 'rotorwash' ) . '</a>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twentyten_continue_reading_link() {\n\t\treturn ' <a href=\"' . get_permalink() . '\">' . __( 'Continue reading <span class=\"meta-nav\">&rarr;</span>', 'twentyten' ) . '</a>';\n\t}", "function echotheme_continue_reading_link() {\n\treturn ' <a href=\"'. esc_url(get_permalink()) . '\">' . __('Continue reading <span class=\"meta-nav\">&rarr;</span>', 'echotheme') . '</a>';\n}", "function mithpress_continue_reading_link() {\n\treturn ' <a href=\"'. get_permalink() . '\">' . __( 'Continue reading <span class=\"meta-nav\">&rarr;</span>', 'twentyten' ) . '</a>';\n}", "function darksnow_continue_reading_link() {\n\treturn ' <a href=\"'. esc_url( get_permalink() ) . '\">' . __( 'Continue reading <span class=\"meta-nav\">&rarr;</span>', 'darksnow' ) . '</a>';\n}", "function rw_custom_excerpt_more( $output )\n{\n if( has_excerpt() && !is_attachment() )\n {\n $output .= rw_continue_reading_link();\n }\n return $output;\n}", "function labs_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . labs_continue_reading_link();\n}", "function show_excerpts() {\n\treturn 'excerpts';\n}", "function mithpress_auto_excerpt_more( $more ) {\n\treturn ' . . . ' . mithpress_continue_reading_link();\n}", "function showIntro() {\n if (! $_SESSION[\"eligible\"]) {\n return $this->showStart();\n }\n $nexturl = $this->action . '?mode=details';\n $safety = $this->action . '?mode=safety';\n $extra = array('next' => $nexturl, 'safetyurl' => $safety);\n $output = $this->outputBoilerplate('introduction.html', $extra);\n return $output;\n }", "function understrap_all_excerpts_get_more_link( $post_excerpt ) {\n\t\treturn $post_excerpt . ' [...]<p><a class = \"read-more-link\" href=\"' . esc_url( get_permalink( get_the_ID() )) . '\">Read Full Post</a></p>';\n\t}", "function uwmadison_auto_excerpt_more( $more ) {\n\t\treturn ' &hellip;' . uwmadison_continue_reading_link();\n\t}", "function new_excerpt_more( $more ) {\n\tglobal $post;\n\treturn '... <div class=\"button small text-center\"><a href=\"'. get_permalink($post->ID) . '\">Continue Reading</a></div>';\n}", "function darksnow_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . darksnow_continue_reading_link();\n}", "function rw_auto_excerpt_more( )\n{\n return in_the_loop() ? '&hellip;' . rw_continue_reading_link() : '&hellip;';\n}", "function twentyten_auto_excerpt_more( $more ) {\n\tif ( ! is_admin() ) {\n\t\treturn ' &hellip;' . twentyten_continue_reading_link();\n\t}\n\treturn $more;\n}", "function understrap_all_excerpts_get_more_link( $post_excerpt ) {\n\n\t\treturn $post_excerpt . '<br><a class=\"badge badge-primary\" href=\"' . esc_url( get_permalink( get_the_ID() )) . '\">' . __( 'Read More',\n\t\t'understrap' ) . ' <i class=\"fas fa-angle-double-right\"></i></a>';\n\t}", "public function introductionAction()\n {\n if (! isset($this->dictionary['introduction'])) {\n $this->homeAction();\n\n } else if (strpos($this->dictionary['introduction'], 'http') !== false) {\n $this->view->externalDict = $this->dictionary['introduction'];\n\n } else {\n $this->view->introduction = 'introduction/' . $this->dictionary['introduction'];\n }\n }", "function new_excerpt_more($more) {\n global $post;\n return ' [...] <a href=\"' . get_permalink($post->ID) . '\">' . __('Continue reading <span class=\"meta-nav\">&rarr;</span>', 'twentytwelve') . '</a>';\n }", "function echotheme_custom_excerpt_more($output) {\n\tif (has_excerpt() && ! is_attachment()) {\n\t\t$output .= echotheme_continue_reading_link();\n\t}\n\treturn $output;\n}", "public static function include_introduction_paragraph() {\n global $edd_options;\n\n if ( isset( $edd_options['taxedd_introduction_text'] ) && !empty( $edd_options['taxedd_introduction_text'] ) && \"\" !== $edd_options['taxedd_introduction_text'] ) {\n $intro_text = $edd_options['taxedd_introduction_text'];\n echo '<p>' . $intro_text . '</p>';\n }\n\n }", "function new_excerpt_more($more) {\n global $post;\n\treturn ' <a href=\"'. get_permalink($post->ID) . '\"><em>(Continue Reading...)</em></a>';\n}", "function echotheme_auto_excerpt_more($more) {\n\treturn '&hellip; <br />' . echotheme_continue_reading_link();\n}", "function twentyten_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() && ! is_admin() ) {\n\t\t$output .= twentyten_continue_reading_link();\n\t}\n\treturn $output;\n}", "function mithpress_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t$output .= mithpress_continue_reading_link();\n\t}\n\treturn $output;\n}", "function langdoc_preview_url($currentfile) {\n if (substr($currentfile, 0, 5) == 'help/') {\n $currentfile = substr($currentfile, 5);\n $currentpathexp = explode('/', $currentfile);\n if (count($currentpathexp) > 1) {\n $url = '/help.php?module='.$currentpathexp[0].'&amp;file='.$currentpathexp[1];\n } else {\n $url = '/help.php?module=moodle&amp;file='.$currentfile;\n }\n } else {\n $url = '';\n }\n return $url;\n}", "function darksnow_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t$output .= darksnow_continue_reading_link();\n\t}\n\treturn $output;\n}", "function new_excerpt_more( $more ) {\n\treturn '... <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">Continue Reading...</a>';\n}", "function barjeel_excerpt($more) {\n global $post;\n return '&nbsp; &nbsp;<a href=\"'. get_permalink($post->ID) . '\">...Continue Reading</a>';\n}", "function voyage_mikado_modify_read_more_link() {\n $link = '<div class=\"mkdf-more-link-container\">';\n $link .= voyage_mikado_get_button_html(array(\n 'link' => get_permalink().'#more-'.get_the_ID(),\n 'text' => esc_html__('Continue reading', 'voyage'),\n 'size' => 'small'\n ));\n\n $link .= '</div>';\n\n return $link;\n }", "function lightseek_read_more_link() {\n\treturn '<p><a class=\"btn btn-primary\" href=\"' . get_permalink() . '\">Read More</a></p>';\n}", "function echotheme_auto_content_more($more) {\n\treturn echotheme_continue_reading_link();\n}", "function excerpt_read_more_link($output) {\r\n global $post;\r\n return $output . '<a class=\"more-link\" href=\"'. get_permalink($post->ID) . '\">'.__(\"Keep Reading\",TEXTDOMAIN ).'<span class=\"icon-arrow-right5\"></span></a>';\r\n}", "private static function intro()\n {\n $files = ['Intro'];\n $folder = static::$root.'Access'.'/';\n\n self::call($files, $folder);\n }", "function uwmadison_custom_excerpt_more( $output ) {\n\t\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t\t$output .= uwmadison_continue_reading_link();\n\t\t}\n\t\treturn $output;\n\t}", "function quasar_read_more($target='_self'){\n\tglobal $post;\n\n\tif(!$post || (!$post->ID)) return;\n\t\n\t$return = ' <a href=\"'.get_permalink().'\" target=\"'.$target.'\">'.__('read more','quasar').' <i class=\"fa-angle-double-right\"></i></a>';\n\t\n\treturn $return;\n}", "function no_more_jumping($post) {\n\t\treturn '&nbsp;<a href=\"'.get_permalink($post->ID).'\" class=\"read-more\">'.'Continue Reading'.'</a>';\n\t}", "function new_excerpt_more( $more ) {\r\n\treturn ' <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">Continue Reading &#8594;</a>';\r\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( '...', 'textdomain' )\n );\n}", "function medigroup_mikado_modify_read_more_link() {\n $link = '<div class=\"mkd-more-link-container\">';\n $link .= medigroup_mikado_get_button_html(array(\n 'link' => get_permalink().'#more-'.get_the_ID(),\n 'text' => esc_html__('Continue reading', 'medigroup'),\n 'size' => 'small'\n ));\n\n $link .= '</div>';\n\n return $link;\n }", "function wpdocs_excerpt_more( $more ) {\n return ' <a href=\"' . get_the_permalink() . '\" rel=\"nofollow\">[Read More...]</a>';\n}", "public function getIntro();", "function new_excerpt_more( $more ) {\n return '&hellip; <span class=\"read-more\"><a href=\"'.get_permalink().'\" rel=\"bookmark\">continue reading</a></span>';\n}", "function wpdocs_excerpt_more( $more ) {\n return '<a href=\"'.get_the_permalink().'\" rel=\"nofollow\">...</a>';\n}", "function dh_modify_read_more_link() {\r\n return '<a class=\"more-link\" href=\"' . get_permalink() . '\">Click to Read!</a>';\r\n}", "public function skip_link() {\n\t\techo '<a class=\"skip-link screen-reader-text\" href=\"#site-content\">' . __( 'Skip to the content', 'wilbur' ) . '</a>';\n\t}", "function nightsky_excerpt_more( $more ) {\n global $post;\n return ' <p class=\"readmore\"><a href=\"' . get_permalink( $post->ID ) . '\">Continue reading ' . $post->post_title . '</a></p>';\n}", "function theme_pi_authoring_inquiry_activities($new_activity_link)\n{\n\t$output='';\n\t$link = l('here', $new_activity_link); \t\n\t// Display some boilerplate text about defining activities...\n\t$output .=\"<div class='help'>\\n\";\n\t$output .= \"<p>\";\n\t$output .= t(\"Each activity in an inquiry is allocated to a phase. A phase is a conceptual part of the inquiry model, for example, \" .\n\t \" <em>Find My Topic</em>, <em>Data Collection</em> and <em>Reflect</em> can all be phases in an inquiry. Click !link to add a new activity.</p>\", \n\t array('!link' => $link));\n\t$output .= \"</div>\\n\";\n\treturn $output;\n}", "public function linkAction() : object\n {\n $title = \"Markdown\";\n $text = file_get_contents(__DIR__ . \"/textfiles/clickable.txt\");\n // $filter = new MyTextFilter();\n\n // Deal with the action and return a response.\n $this->app->page->add(\"textfilter/clickable\", [\n \"text\" => $text,\n \"html\" => $this->filter->parse($text, [\"link\"])\n ], \"main\");\n return $this->app->page->render([ \"title\" => $title ]);\n }", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a><br/>',\n get_permalink( get_the_ID() ),\n __( '<i class=\"fa fa-book\"></i> Read More...', 'textdomain' )\n );\n}", "function my_excerpt_more( $more ) {\n\treturn ' &hellip; <a href=\"'. get_permalink() .'\">Continue reading &ldquo;'. get_the_title() .'&rdquo; &rarr;</a>';\n}", "function pastIntro() {\n // move progress forward and redirect to the runSurvey action\n $this->autoRender = false; // turn off autoRender\n $this->Session->write('Survey.progress', RIGHTS);\n $this->redirect(array('action' => 'runSurvey'));\n\n }", "function section_text_nr_ad() {\n\t\t_e('<p>Become a part of the nrelate advertising network and earn some extra money on your blog. Click on the ADVERTISING tab of a participating nRelate product settings page.</p>','nrelate');\n}", "function helpLink() {\n\t\t// By default it's an (external) URL, hence not a valid Title.\n\t\t// But because MediaWiki is by nature very customizable, someone\n\t\t// might've changed it to point to a local page. Tricky!\n\t\t// @see https://phabricator.wikimedia.org/T155319\n\t\t$helpPage = $this->msg( 'helppage' )->inContentLanguage()->plain();\n\t\tif ( preg_match( '/^(?:' . wfUrlProtocols() . ')/', $helpPage ) ) {\n\t\t\t$helpLink = Linker::makeExternalLink(\n\t\t\t\t$helpPage,\n\t\t\t\t$this->msg( 'help' )->plain()\n\t\t\t);\n\t\t} else {\n\t\t\t$helpLink = MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(\n\t\t\t\tTitle::newFromText( $helpPage ),\n\t\t\t\t$this->msg( 'help' )->text()\n\t\t\t);\n\t\t}\n\t\treturn $helpLink;\n\t\t// This doesn't work with the default value of 'helppage' which points to an external URL\n\t\t// return $this->footerLink( 'help', 'helppage' );\n\t}", "public function readme()\n {\n return 'Generate a link to an external page or an internal page. \nIn order to call an internal URL use the `//` prefix like `link[//contact](Go to contact)`, now the `//` are replace by the url of the webserver. \nIf a single `/` is used its a relative url and therfore won\\'t be changed.\nIn order to generate an external url use `link[luya.io](Go to Luya.io)`.';\n }", "public function get_link()\r\n\t{\r\n\t\t$url = api_get_path(WEB_PATH)\r\n\t\t\t.'main/gradebook/exercise_jump.php?cid='.$this->get_course_code();\r\n\t\tif (!api_is_allowed_to_create_course()\r\n\t\t\t&& $this->calc_score(api_get_user_id()) == null)\r\n\t\t$url .= '&amp;doexercise='.$this->get_ref_id();\r\n\t\t\r\n\t\treturn $url;\r\n\t}", "public function getIntroInFeed()\n {\n return $this->getData('introInFeed') ?? '';\n }", "function generate_do_skip_to_content_link() {\n\tprintf( '<a class=\"screen-reader-text skip-link\" href=\"#content\" title=\"%1$s\">%2$s</a>',\n\t\tesc_attr__( 'Skip to content', 'generatepress' ),\n\t\tesc_html__( 'Skip to content', 'generatepress' )\n\t);\n}", "function new_excerpt_more($more) {\n global $post, $wpak_options;\n\n\treturn '<p class=\"readmore\"><a title=\"' . $wpak_options['linkto'] . $post->post_title.'\" href=\"'. get_permalink($post->ID) . '\">' . $wpak_options['readmore'] . '</a></p>';\n}", "function writeHelpLink($indent, $helptext)\n{\n echo($indent.'<a class=\"help\" onmouseover=\"nhpup.popup(\\''.$helptext.'\\')\" title=\"\">&nbsp;&nbsp;&nbsp;&nbsp;</a>'.\"\\n\");\n}", "function wprt_remove_read_more_link() {\n return '';\n}", "function emc_learn_more_link() {\r\n\r\n\t$more = sprintf( '<a href=\"%1$s\" title=\"%2$s\">%3$s</a>',\r\n\t\tget_permalink(),\r\n\t\tesc_attr__( 'View full post', 'emc' ),\r\n\t\tesc_html__( '&nbsp;&nbsp;More&nbsp;&rarr;', 'emc' )\r\n\t);\r\n\treturn $more;\r\n\r\n}", "public function getIntro()\n {\n return $this->getData('intro') ?? '';\n }", "public function a11yExcerpt($more)\n {\n return sprintf(\n '&hellip; <a class=\"text-nowrap\" href=\"%s\">Continue reading<span class=\"sr-only\"> %s</span></a>',\n get_permalink(get_the_ID()),\n get_the_title()\n );\n }", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"understrap-read-more-link goodswave-read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( 'Read More', 'textdomain' )\n );\n}", "public function getContinueUrl()\n {\n return $this->getUrl(\n 'adminhtml/*/*',\n ['_current' => true, 'code' => '<%- data.code %>', 'theme_id' => '<%- data.theme_id %>']\n );\n }", "function linolakestheme_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( ' Read more', 'textdomain' )\n );\n}", "function aside(){\n\tglobal $info;\n\t$pd = new ParsedownExtra();\n\t$page_id = \"./application/aside.md\";\n\techo \"<aside><br />\";\n\techo $pd->text(file_get_contents($page_id));\n\techo \"</aside>\";\n}", "function custom_excerpt_more($more) {\n\t\treturn 'Read More &raquo;';\n\t}", "function new_excerpt_more( $more ) {\n\treturn '... <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">' . __('Read More', 'your-text-domain') . '</a>';\n}", "public function showExitLink()\n\t{\n\t\treturn true;\n\t}", "public static function excerpt_read_more( $more ) {\n global $post;\n // Defining the $output (read more link)\n $output = '...<br><p><a class=\"read-more more-link\" href=\"'. get_permalink( $post->ID ) . '\"> Read More</a></p>';\n // Returning the $output\n return $output;\n }", "function DF_read_more($matches) {\r\n\treturn '<p>'.$matches[1].'</p><p><a '.$matches[3].' class=\"more-link\"><i class=\"icon-double-angle-right\"></i>'.$matches[4].'</a></p> ';\r\n}", "function wpdocs_excerpt_more( $more ) {\n return ' ...';\n}", "public function isAccepted_as_tutorial() {\n\t\t$this->getAccepted_as_tutorial();\n\t}", "function tac_new_excerpt_more( $more ) {\n\treturn '...';\n}", "function new_excerpt_more($more) {\n global $post;\n return '<a class=\"post-link\" href=\"'. get_permalink($post->ID) . '\"> ...Read the full article</a>';\n}", "function modify_read_more_link() {\n return '<a class=\"more-link\" href=\"' . get_permalink() . '\">View list..</a>';\n}", "function exampleJavadoc($link)\n{\n\techo \"<p class=\\\"example_javadoc\\\">\";\n\tBlank(\"doc_full/$link\", 'Javadoc for this example.');\n\techo \"</p>\\n\\n\";\n}", "function mintshow_excerpt_more( $more ) {\n return sprintf( '<a class=\"ms-read-more\" href=\"%1$s\">%2$s <i class=\"fa fa-long-arrow-right\"></i></a>',\n get_permalink( get_the_ID() ),\n __( 'Read More', 'textdomain' )\n );\n}", "public function reviewAndContinue()\n {\n $this->waitForElementVisible($this->continue);\n $this->_rootElement->find($this->continue)->click();\n }", "function wfs_excerpt_more( $more ) {\n return '...';\n}", "function more_link( $link, $text ) {\n\treturn ( __( '(more&hellip;)' ) !== $text ) ? $link : str_replace( $text, __( 'Continue Reading', 'wpdh' ), $link );\n}", "function new_excerpt_more($more) {\n\n\tglobal $post;\n\n\treturn '...&nbsp; <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"><br/>read&nbsp;more</a>';\n\n}", "public function links()\n\t{\n\t\techo view('sketchpad::help/output/links');\n\t}", "function new_excerpt_more($more) {\n global $post;\n // return '<a class=\"read_more\" href=\"'. get_permalink($post->ID) . '\">'.__('Read More','textdomain').'</a>';\n return '';\n}", "function new_excerpt_more($more) {\n global $post;\n return ' <a class=\"read_more\" href=\"' . get_permalink($post->ID) . '\">[...]</a>';\n}", "function new_excerpt_more($more)\r\n{\r\n\tglobal $post;\r\n\treturn '<a class=\"moretag\" href=\"' . get_permalink($post->ID) . '\"> Read the full article...</a>';\r\n}", "function wpfme_replace_excerpt($content) {\n return str_replace('[...]',\n '<a class=\"readmore\" href=\"'. get_permalink() .'\">Continue Reading</a>',\n $content\n );\n}", "function the_excerpt_embed()\n {\n }", "function new_excerpt_more( $more ) {\n\treturn '...<br/>'.'<a href=\"'. get_permalink( get_the_ID() ) . '\" class=\"more\">Read More</a>';\n}", "function quasar_get_read_more_text(){\n\t\n\t$return = '';\n\t\n\t$return .= __('Read More <i class=\"fa-angle-double-right\"></i>','quasar');\n\t\n\treturn $return;\t\n}", "function echoDocumentLink ($row)\r{\r\t// name and the event ids that need to be highlighted.\r\r\t$file = $row[3];\r\t$id1 = $row[6];\r\t$id2 = $row[7];\r\t$file = $row['tmlfile'];\r\t$id1 = $row['eid1'];\r\t$id2 = $row['eid2'];\r\techo \"<a href=displayArticle.php?file=$file&highlight=$id1,$id2 target=_NEW>\";\r\techo \"<img src=inline004.gif border=0></a>\\n\";\r}", "public function showing_excerpts() {\n\n\t\tif ( null === $this->showing_excerpts ) {\n\n\t\t\t$this->showing_excerpts = 'yes' === get_option( $this->show_excerpts_option );\n\t\t}\n\n\t\treturn $this->showing_excerpts;\n\t}", "public static function start_help()\n\t{\n\t\treturn <<<HTML\n<a accesskey=\"0\" class=\"btn btn-link btn-sm\" data-toggle=\"collapse\" href=\"#ajuda-pagina\" aria-expanded=\"false\" aria-controls=\"ajuda-pagina\">\n\t<i class=\"glyphicon glyphicon-info-sign\"></i> <span class=\"sr-only\">Ajuda desta página</span>\n</a>\n<div class=\"collapse\" id=\"ajuda-pagina\">\n\t<div class=\"alert alert-info\" role=\"alert\">\nHTML;\n\t}", "function mt_filter_excerpt_more_link($excerpt) {\n\t$post = get_post();\n\t$excerpt .= '<a href=\"'. get_permalink($post->ID) .'\" class=\"btn btn-primary float-right\"> Läs mer &raquo; </a>';\n\t\n\treturn $excerpt;\n }", "function getHelpUrl()\n{\n global $_CONF;\n\n $retval = '';\n\n $doclang = COM_getLanguageName();\n $docs = 'docs/' . $doclang . '/trackback.html';\n if (file_exists($_CONF['path_html'] . $docs)) {\n $retval = $_CONF['site_url'] . '/' . $docs;\n } else {\n $retval = $_CONF['site_url'] . '/docs/english/trackback.html';\n }\n\n return $retval;\n}", "function wp_embed_excerpt_more($more_string)\n {\n }", "function faculty_get_resume( $metaArray ) {\n if ( $metaArray['resume'][0] ) {\n $attachment = get_post( $metaArray['resume'][0] );\n return '<a href=\"'.$attachment->guid.'\">Download CV</a>';\n }\n\n return 'N/A';\n}", "function rls_read_more_button($more) {\n global $post;\n return '<div class=\"center-align read-more\"><a class=\" gray view-article button\" href=\"'.get_permalink($post->ID).'\">'\n .__('Read More', 'rls')\n .'</a></div>';\n}", "public function lectureNavigation() {\n return \"Lecture navigation\";\n }" ]
[ "0.7099974", "0.6987083", "0.6863726", "0.66312873", "0.6251551", "0.6249267", "0.6242988", "0.62425447", "0.6179895", "0.61149544", "0.61037755", "0.5949004", "0.5916799", "0.5866989", "0.58608365", "0.57746345", "0.5774568", "0.5757173", "0.57347953", "0.57289803", "0.57286114", "0.5725207", "0.5723321", "0.56580883", "0.56353086", "0.5616368", "0.5606076", "0.5585258", "0.55782735", "0.5576165", "0.5572116", "0.5569917", "0.5520695", "0.55201733", "0.55111057", "0.5470322", "0.5466013", "0.5463243", "0.5437903", "0.5432053", "0.5426093", "0.54187334", "0.54153234", "0.5397775", "0.5394796", "0.53716284", "0.5368279", "0.53534245", "0.5345041", "0.5337893", "0.5332274", "0.53235036", "0.5318773", "0.531854", "0.5294401", "0.5280167", "0.5279009", "0.52358186", "0.5231808", "0.5205724", "0.5205605", "0.52027017", "0.5181738", "0.51811713", "0.5154094", "0.51474243", "0.51473755", "0.51364446", "0.5129773", "0.5129492", "0.5127959", "0.5125402", "0.51174897", "0.5114538", "0.51058406", "0.5104299", "0.509145", "0.5085884", "0.5084258", "0.5080952", "0.5076618", "0.50759625", "0.50758225", "0.5072273", "0.50669914", "0.50603586", "0.5060268", "0.50546795", "0.50523174", "0.50499713", "0.50427127", "0.5040425", "0.50297403", "0.5023212", "0.5023148", "0.5020151", "0.5016671", "0.5013854", "0.5013539", "0.5000873" ]
0.58980155
13
Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and rw_continue_reading_link(). Additionally, this will remove the "read more" link from any excerpts generated outside the loop. To override this in a child theme, remove the filter and add your own function tied to the excerpt_more filter hook.
function rw_auto_excerpt_more( ) { return in_the_loop() ? '&hellip;' . rw_continue_reading_link() : '&hellip;'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rw_custom_excerpt_more( $output )\n{\n if( has_excerpt() && !is_attachment() )\n {\n $output .= rw_continue_reading_link();\n }\n return $output;\n}", "function echotheme_custom_excerpt_more($output) {\n\tif (has_excerpt() && ! is_attachment()) {\n\t\t$output .= echotheme_continue_reading_link();\n\t}\n\treturn $output;\n}", "function new_excerpt_more( $more ) {\n return '';\n}", "function mithpress_auto_excerpt_more( $more ) {\n\treturn ' . . . ' . mithpress_continue_reading_link();\n}", "function custom_excerpt_more( $more ) {\r\n\t return '...';\r\n}", "function themify_custom_excerpt_more($more) {\n global $post;\n return '';\n}", "function new_excerpt_more($more) {\n global $post, $wpak_options;\n\n\treturn '<p class=\"readmore\"><a title=\"' . $wpak_options['linkto'] . $post->post_title.'\" href=\"'. get_permalink($post->ID) . '\">' . $wpak_options['readmore'] . '</a></p>';\n}", "function new_excerpt_more( $more ) {\n return '&hellip; <span class=\"read-more\"><a href=\"'.get_permalink().'\" rel=\"bookmark\">continue reading</a></span>';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn ' <a href=\"'. get_permalink($post->ID) . '\"><em>(Continue Reading...)</em></a>';\n}", "function twentyten_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() && ! is_admin() ) {\n\t\t$output .= twentyten_continue_reading_link();\n\t}\n\treturn $output;\n}", "function wpfme_replace_excerpt($content) {\n return str_replace('[...]',\n '<a class=\"readmore\" href=\"'. get_permalink() .'\">Continue Reading</a>',\n $content\n );\n}", "function custom_excerpt_more($more) {\n\t\treturn 'Read More &raquo;';\n\t}", "function new_excerpt_more($more) {\n global $post;\n return ' <a class=\"read_more\" href=\"' . get_permalink($post->ID) . '\">[...]</a>';\n}", "function labs_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . labs_continue_reading_link();\n}", "function new_excerpt_more($more) {\n\n\tglobal $post;\n\n\treturn '...&nbsp; <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"><br/>read&nbsp;more</a>';\n\n}", "function new_excerpt_more($more) {\n global $post;\n return ' [...] <a href=\"' . get_permalink($post->ID) . '\">' . __('Continue reading <span class=\"meta-nav\">&rarr;</span>', 'twentytwelve') . '</a>';\n }", "function clrfl_excerpt_more($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a>';\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( '...', 'textdomain' )\n );\n}", "function new_excerpt_more( $more ) {\n\tglobal $post;\n\treturn '... <div class=\"button small text-center\"><a href=\"'. get_permalink($post->ID) . '\">Continue Reading</a></div>';\n}", "function twentyten_auto_excerpt_more( $more ) {\n\tif ( ! is_admin() ) {\n\t\treturn ' &hellip;' . twentyten_continue_reading_link();\n\t}\n\treturn $more;\n}", "function excerpt($num) {\n$limit = $num+1;\n$excerpt = explode(' ', get_the_excerpt(), $limit);\narray_pop($excerpt);\n$excerpt = implode(\" \",$excerpt).\" <a href='\" .get_permalink($post->ID) .\" ' class='\".readmore.\"'>READ THIS</a>\";\necho $excerpt;\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<div class=\"readmore\"><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More <i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"></i></a></div>';\n}", "function new_excerpt_more( $more ) {\n\treturn '... <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">Continue Reading...</a>';\n}", "function mithpress_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t$output .= mithpress_continue_reading_link();\n\t}\n\treturn $output;\n}", "function wpdocs_excerpt_more( $more ) {\n return ' ...';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '... (<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">Read more</a>)';\n}", "function excerpt($num) {\n$limit = $num+1;\n$excerpt = explode(' ', get_the_excerpt(), $limit);\narray_pop($excerpt);\n$excerpt = implode(\" \",$excerpt).\" <a href='\" .get_permalink($post->ID) .\" ' class='\".readmore.\"'>Read More</a>\";\necho $excerpt;\n}", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '&hellip; </br> <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">Read more</a>';\n}", "function darksnow_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t$output .= darksnow_continue_reading_link();\n\t}\n\treturn $output;\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a><br/>',\n get_permalink( get_the_ID() ),\n __( '<i class=\"fa fa-book\"></i> Read More...', 'textdomain' )\n );\n}", "function nightsky_excerpt_more( $more ) {\n global $post;\n return ' <p class=\"readmore\"><a href=\"' . get_permalink( $post->ID ) . '\">Continue reading ' . $post->post_title . '</a></p>';\n}", "function wfs_excerpt_more( $more ) {\n return '...';\n}", "function new_excerpt_more($more) {\n global $post;\n // return '<a class=\"read_more\" href=\"'. get_permalink($post->ID) . '\">'.__('Read More','textdomain').'</a>';\n return '';\n}", "function new_excerpt_more( $more ) {\n\treturn '[...]<div class=\"read-more\"><a href=\"'. get_permalink( get_the_ID() ) . '\">Lire la suite</a></div>';\n}", "function echotheme_auto_excerpt_more($more) {\n\treturn '&hellip; <br />' . echotheme_continue_reading_link();\n}", "function new_excerpt_more($more)\r\n{\r\n\tglobal $post;\r\n\treturn '<a class=\"moretag\" href=\"' . get_permalink($post->ID) . '\"> Read the full article...</a>';\r\n}", "function wpdocs_excerpt_more( $more ) {\n return ' <a href=\"' . get_the_permalink() . '\" rel=\"nofollow\">[Read More...]</a>';\n}", "function new_excerpt_more( $more ) {\n\treturn '...';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<p><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More</a></p>';\n}", "function new_excerpt_more( $more ) {\n\treturn '... <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">' . __('Read More', 'your-text-domain') . '</a>';\n}", "function custom_desktop_excerpt_more($more) {\n}", "function understrap_all_excerpts_get_more_link( $post_excerpt ) {\n\t\treturn $post_excerpt . ' [...]<p><a class = \"read-more-link\" href=\"' . esc_url( get_permalink( get_the_ID() )) . '\">Read Full Post</a></p>';\n\t}", "function new_excerpt_more( $more ) {\r\n\treturn ' <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">Continue Reading &#8594;</a>';\r\n}", "function kstHelpWordpressBlogPosts_excerptsAndMoreTeasers() {\n ?>\n <p>\n Your theme uses the excerpt field as well as the &lt;--more--&gt; tag giving\n you many options for formatting your blog index. Many themes use either the\n excerpt or the &lt;--more--&gt; tag to control what content appears on your\n blog index.\n </p>\n <p>\n Posts are displayed on the index in one of these formats (and order shown):\n </p>\n <ol>\n <li>Title and excerpt (if you type anything in the excerpt field)</li>\n <li>Title and the post up to the &lt;--more--&gt; (if you insert &lt;--more--&gt; in the post)</li>\n <li>Title and the entire post (if you do not enter an excerpt or the &lt;--more--&gt; tag)</li>\n </ol>\n <p><em>i.e. If you enter an excerpt and include a &lt;--more--&gt; tag only the excerpt will display</em></p>\n <p>\n <strong>How to use the \"more\" tag:</strong>\n </p>\n <p>\n In \"Visual\" mode:<br />\n Place the cursor <em>after</em> the content you would like to appear on the blog index for that post.\n Click the button above the post editor that looks like\n a rectangle cut in two pieces (a small rectangle on top and a longer rectangle on the button).\n A line that says \"more\" will appear.\n </p>\n <p>\n In \"html\" mode:<br />\n Place the cursor <em>after</em> the content you would like to appear on the blog index for that post.\n Type &lt;--more--&gt; on it's own line.\n </p>\n <p>\n Note: You may also customize the \"more\" link text that is shown per post (only possible using \"html\" mode).<br />\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Simply type the text to use after \"more\" e.g. &lt;--more But wait, there's more! --&gt;\n </p>\n <?php\n}", "function the_excerpt_limit($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'...';\n } else {\n $excerpt = implode(\" \",$excerpt);\n }\n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n echo $excerpt;\n}", "function linolakestheme_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( ' Read more', 'textdomain' )\n );\n}", "function swbtheme_excerpt_more($more) {\n global $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a>';\n}", "function new_excerpt_more( $more ) {\n return ' <a class=\"read-more\" href=\"' . get_permalink( get_the_ID() ) . '\">' . __( 'Read More...', 'your-text-domain' ) . '</a>';\n}", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Leia o artigo completo...</a>';\n}", "function generate_excerpt_more($more)\n {\n return apply_filters('generate_excerpt_more_output', sprintf(' ... <a title=\"%1$s\" class=\"read-more text-primary\" href=\"%2$s\">%3$s %4$s</a>',\n the_title_attribute('echo=0'),\n esc_url(get_permalink(get_the_ID())),\n __('Read more', 'generatepress'),\n '<span class=\"screen-reader-text\">' . get_the_title() . '</span>'\n ));\n }", "function wp_embed_excerpt_more($more_string)\n {\n }", "function new_excerpt_more($more) {\n global $post;\n\treturn ' <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">[ more ]</a>';\n}", "function my_excerpt_more( $more ) {\n\treturn ' &hellip; <a href=\"'. get_permalink() .'\">Continue reading &ldquo;'. get_the_title() .'&rdquo; &rarr;</a>';\n}", "function new_excerpt_more($more) {\n\treturn '...';\n}", "function new_excerpt_more( $more ) {\n\treturn '...<br/>'.'<a href=\"'. get_permalink( get_the_ID() ) . '\" class=\"more\">Read More</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> read more...</a>';\n}", "function new_excerpt_more( $more ) {\n return ' ...';\n}", "function new_excerpt_more($more) {\n global $post;\n return '<a class=\"post-link\" href=\"'. get_permalink($post->ID) . '\"> ...Read the full article</a>';\n}", "function understrap_custom_excerpt_more( $more ) {\n\t\treturn '';\n\t}", "function voyage_mikado_excerpt_more($more) {\n return '...';\n }", "function mintshow_excerpt_more( $more ) {\n return sprintf( '<a class=\"ms-read-more\" href=\"%1$s\">%2$s <i class=\"fa fa-long-arrow-right\"></i></a>',\n get_permalink( get_the_ID() ),\n __( 'Read More', 'textdomain' )\n );\n}", "function tac_new_excerpt_more( $more ) {\n\treturn '...';\n}", "function et_excerpt_more($more) {\n global $post;\n return '<div><a href=\"'. get_permalink($post->ID) . '\" > ... Click to View Full Post</a></div>;';\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"understrap-read-more-link goodswave-read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( 'Read More', 'textdomain' )\n );\n}", "function codium_extend_excerpt_more($more) {\n global $post;\n $readmore = __('Czytaj wiecej', 'codium_extend' );\n return '';\n}", "function codium_extend_excerpt_more($more) {\n global $post;\n $readmore = __('Czytaj wiecej', 'codium_extend' );\n return '';\n}", "function darksnow_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . darksnow_continue_reading_link();\n}", "function barjeel_excerpt($more) {\n global $post;\n return '&nbsp; &nbsp;<a href=\"'. get_permalink($post->ID) . '\">...Continue Reading</a>';\n}", "function gigx_excerpt_more($more) {\n\treturn '';\n}", "function uwmadison_custom_excerpt_more( $output ) {\n\t\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t\t$output .= uwmadison_continue_reading_link();\n\t\t}\n\t\treturn $output;\n\t}", "function mt_filter_excerpt_more_link($excerpt) {\n\t$post = get_post();\n\t$excerpt .= '<a href=\"'. get_permalink($post->ID) .'\" class=\"btn btn-primary float-right\"> Läs mer &raquo; </a>';\n\t\n\treturn $excerpt;\n }", "function medigroup_mikado_excerpt_more($more) {\n return '...';\n }", "function start_replace_excerpt_more( $more ) {\n\tglobal $post;\n\t// edit here if you like\n\treturn null;\n}", "function understrap_all_excerpts_get_more_link( $post_excerpt ) {\n\n\t\treturn $post_excerpt . '<br><a class=\"badge badge-primary\" href=\"' . esc_url( get_permalink( get_the_ID() )) . '\">' . __( 'Read More',\n\t\t'understrap' ) . ' <i class=\"fas fa-angle-double-right\"></i></a>';\n\t}", "function excerpt_ellipse($text) {\nreturn str_replace(' [...]', ' &nbsp;<a href=\"'.get_permalink().'\">Read more</a>', $text);\n}", "function improved_trim_excerpt($text) { // Fakes an excerpt if needed\n global $post;\n if ( '' == $text ) {\n $text = get_the_content('');\n $text = apply_filters('the_content', $text);\n \n\t$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);\n\t$text = preg_replace('@<style[^>]*?>.*?</style>@si', '', $text);\n\t$text = preg_replace('@<p class=\"wp-caption-text\"[^>]*?>.*?</p>@si', '', $text);\t\n $text = str_replace('\\]\\]\\>', ']]&gt;', $text);\n $text = strip_tags($text, '<p><i><em><b><a><strong>');\n $excerpt_length = 140;\n $words = explode(' ', $text, $excerpt_length + 1);\n if (count($words)> $excerpt_length) {\n array_pop($words);\n array_push($words, '... <a href=\"'.get_permalink($post->ID).'\">'.'Read More &raquo;'.'</a>');\n $text = implode(' ', $words);\n }\n }\nreturn $text;\n}", "function tz_excerpt_more($excerpt) {\nreturn str_replace('[...]', '...', $excerpt); }", "function uwmadison_auto_excerpt_more( $more ) {\n\t\treturn ' &hellip;' . uwmadison_continue_reading_link();\n\t}", "function wprt_remove_read_more_link() {\n return '';\n}", "function new_excerpt_more($more) {\n global $post;\n return '...';\n}", "function mila_custom_excerpt_more($more) {\n global $post;\n return '&nbsp;<div class=\"more-link\"><a href=\"'. get_permalink($post->ID) . '\">'. __('<i title=\"Läs mer\" class=\"fa fa-arrow-circle-right\"></i>', 'mila') .'</a></div>';\n }", "function et_excerpt_more($more) {\n global $post;\n return '<div class=\"view-full-post\"><a href=\"'. get_permalink($post->ID) . '\" class=\"view-full-post-btn\">Skaityti</a></div>';\n}", "function wprt_excerpt_more( $more ) {\n\treturn '&hellip;';\n}", "function twentyseventeen_excerpt_more( $link ) {\n\tif ( is_admin() ) {\n\t\treturn $link;\n\t}\n\n\t$link = sprintf( '<p class=\"link-more\"><a href=\"%1$s\" class=\"more-link\">%2$s</a></p>',\n\t\tesc_url( get_permalink( get_the_ID() ) ),\n\t\t/* translators: %s: Name of current post */\n\t\tsprintf( __( 'Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>', 'twentyseventeen' ), get_the_title( get_the_ID() ) )\n\t);\n\treturn ' &hellip; ' . $link;\n}", "function wpdocs_excerpt_more( $more ) {\n return '<a href=\"'.get_the_permalink().'\" rel=\"nofollow\">...</a>';\n}", "function my_excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n\tarray_pop($excerpt);\n\t$excerpt = implode(\" \",$excerpt).'...';\n } else {\n\t$excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "public function a11yExcerpt($more)\n {\n return sprintf(\n '&hellip; <a class=\"text-nowrap\" href=\"%s\">Continue reading<span class=\"sr-only\"> %s</span></a>',\n get_permalink(get_the_ID()),\n get_the_title()\n );\n }", "function thefirst_new_excerpt_more($more) {\n global $post;\n\treturn '...';\n}", "public static function excerpt_read_more( $more ) {\n global $post;\n // Defining the $output (read more link)\n $output = '...<br><p><a class=\"read-more more-link\" href=\"'. get_permalink( $post->ID ) . '\"> Read More</a></p>';\n // Returning the $output\n return $output;\n }", "function new_excerpt_more( $more ) {\n\treturn '&hellip;';\n/*\n\tif(is_front_page()){\n\treturn '&nbsp;<span class=\"genericon genericon-next\"></span>';\t\t\n\t} else {\n\treturn '&hellip;';\n\t}\n*/\n}", "function ppo_excerpt_more($more) {\n $link = sprintf('<a href=\"%1$s\" class=\"more-link\">%2$s</a>', esc_url(get_permalink(get_the_ID())),\n /* translators: %s: Name of current post */ \n sprintf(__('Xem thêm <span class=\"meta-nav\">&rarr;</span>', SHORT_NAME))\n );\n return ' &hellip; ' . $link;\n}", "function get_character_limited_excerpt(){\n$permalink = get_permalink($post->ID);\n$excerpt = get_the_content();\n$excerpt = preg_replace(\" (\\[.*?\\])\",'',$excerpt);\n$excerpt = strip_shortcodes($excerpt);\n$excerpt = strip_tags($excerpt);\n$excerpt = substr($excerpt, 0, 150);\n$excerpt = substr($excerpt, 0, strripos($excerpt, \" \"));\n$excerpt = trim(preg_replace( '/\\s+/', ' ', $excerpt));\n$excerpt = $excerpt.'... <a href=\"'.$permalink.'\">Read More</a>';\nreturn $excerpt;\n}", "function excerpt_read_more_link($output) {\r\n global $post;\r\n return $output . '<a class=\"more-link\" href=\"'. get_permalink($post->ID) . '\">'.__(\"Keep Reading\",TEXTDOMAIN ).'<span class=\"icon-arrow-right5\"></span></a>';\r\n}", "function wp_new_excerpt($text)\n{\n\tif ($text == '')\n\t{\n\t\t$text = get_the_content('');\n\t\t$text = strip_shortcodes( $text );\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]>', $text);\n\t\t$text = strip_tags($text);\n\t\t$text = nl2br($text);\n\t\t$excerpt_length = apply_filters('excerpt_length', 100);\n\t\t$words = explode(' ', $text, $excerpt_length + 1);\n\t\tif (count($words) > $excerpt_length) {\n\t\t\tarray_pop($words);\n\t\t\tarray_push($words, '<div class=\"more-stuff\"><a class=\"more-link\" href=\"'. get_permalink() .'\">Read More</a></div>');\n\t\t\t$text = implode(' ', $words);\n\t\t}\n\t}\n\treturn $text;\n}", "function cheffism_new_excerpt_more( $more ) {\n return '&hellip;';\n}", "public function excerpt_more($more) {\n\t\treturn '...';\n\t}", "function voyage_mikado_excerpt($excerpt_length = '') {\n global $post;\n\n if(post_password_required()) {\n echo get_the_password_form();\n } //does current post has read more tag set?\n elseif(voyage_mikado_post_has_read_more()) {\n global $more;\n\n //override global $more variable so this can be used in blog templates\n $more = 0;\n the_content(true);\n } //is word count set to something different that 0?\n elseif($excerpt_length != '0') {\n //if word count is set and different than empty take that value, else that general option from theme options\n $word_count = '45';\n if(isset($excerpt_length) && $excerpt_length != \"\") {\n $word_count = $excerpt_length;\n\n } elseif(voyage_mikado_options()->getOptionValue('number_of_chars') != '') {\n $word_count = esc_attr(voyage_mikado_options()->getOptionValue('number_of_chars'));\n }\n //if post excerpt field is filled take that as post excerpt, else that content of the post\n $post_excerpt = $post->post_excerpt != \"\" ? $post->post_excerpt : strip_tags($post->post_content);\n\n //remove leading dots if those exists\n $clean_excerpt = strlen($post_excerpt) && strpos($post_excerpt, '...') ? strstr($post_excerpt, '...', true) : $post_excerpt;\n\n //if clean excerpt has text left\n if($clean_excerpt !== '') {\n //explode current excerpt to words\n $excerpt_word_array = explode(' ', $clean_excerpt);\n\n //cut down that array based on the number of the words option\n $excerpt_word_array = array_slice($excerpt_word_array, 0, $word_count);\n\n //add exerpt postfix\n $excert_postfix = apply_filters('voyage_mikado_excerpt_postfix', '...');\n\n //and finally implode words together\n $excerpt = implode(' ', $excerpt_word_array).$excert_postfix;\n\n //is excerpt different than empty string?\n if($excerpt !== '') {\n echo '<p class=\"mkdf-post-excerpt\">'.wp_kses_post($excerpt).'</p>';\n }\n }\n }\n }", "function wp_html_excerpt($str, $count, $more = \\null)\n {\n }", "function modify_read_more_link() {\n return '<a class=\"more-link\" href=\"' . get_permalink() . '\">View list..</a>';\n}", "function pulcherrimum_excerpt_more($link)\n {\n if (is_admin()) {\n return $link;\n }\n\n $link = sprintf(\n '<p class=\"link-more\"><a href=\"%1$s\" class=\"more-link\">%2$s</a></p>',\n esc_url(get_permalink(get_the_ID())),\n /* translators: %s: Post title. */\n sprintf(__('Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>', 'pulcherrimum'), get_the_title(get_the_ID()))\n );\n return ' &hellip; ' . $link;\n }" ]
[ "0.75341016", "0.72422767", "0.7210304", "0.7170559", "0.7161548", "0.7161211", "0.7148592", "0.7139816", "0.7125492", "0.7123181", "0.7111185", "0.70961785", "0.7093685", "0.70893836", "0.7078723", "0.707271", "0.70585024", "0.7046129", "0.7042821", "0.703532", "0.7030595", "0.70223725", "0.7017182", "0.70043683", "0.69991106", "0.6998652", "0.6989496", "0.69880116", "0.6980851", "0.6975924", "0.69613105", "0.6959913", "0.69574195", "0.6956075", "0.69552267", "0.69532174", "0.69490147", "0.6937904", "0.6934195", "0.69326717", "0.69246864", "0.6918646", "0.69119316", "0.69112957", "0.68791324", "0.68765324", "0.6875888", "0.6871853", "0.6869977", "0.68591064", "0.68577975", "0.6851372", "0.6849385", "0.6842944", "0.6841647", "0.68392175", "0.68372536", "0.68299484", "0.6829818", "0.68115616", "0.68055886", "0.68023753", "0.6798404", "0.6786635", "0.6780062", "0.6780062", "0.677453", "0.67695755", "0.6759514", "0.67543936", "0.67427135", "0.6737422", "0.6733461", "0.6723599", "0.6714404", "0.67100704", "0.67027", "0.66756743", "0.6650503", "0.6647105", "0.66377294", "0.66352504", "0.6620763", "0.66157883", "0.66106915", "0.6606374", "0.6603332", "0.65946305", "0.65921515", "0.6590548", "0.6578501", "0.65468633", "0.65438426", "0.6533366", "0.6520776", "0.65138364", "0.64934766", "0.6491522", "0.6483505", "0.6481548" ]
0.7463437
1
Adds a pretty "Continue Reading" link to custom post excerpts. To override this link in a child theme, remove the filter and add your own function tied to the get_the_excerpt filter hook.
function rw_custom_excerpt_more( $output ) { if( has_excerpt() && !is_attachment() ) { $output .= rw_continue_reading_link(); } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function echotheme_continue_reading_link() {\n\treturn ' <a href=\"'. esc_url(get_permalink()) . '\">' . __('Continue reading <span class=\"meta-nav\">&rarr;</span>', 'echotheme') . '</a>';\n}", "function mithpress_continue_reading_link() {\n\treturn ' <a href=\"'. get_permalink() . '\">' . __( 'Continue reading <span class=\"meta-nav\">&rarr;</span>', 'twentyten' ) . '</a>';\n}", "function barjeel_excerpt($more) {\n global $post;\n return '&nbsp; &nbsp;<a href=\"'. get_permalink($post->ID) . '\">...Continue Reading</a>';\n}", "function twentyten_continue_reading_link() {\n\t\treturn ' <a href=\"' . get_permalink() . '\">' . __( 'Continue reading <span class=\"meta-nav\">&rarr;</span>', 'twentyten' ) . '</a>';\n\t}", "function new_excerpt_more($more) {\n global $post;\n\treturn ' <a href=\"'. get_permalink($post->ID) . '\"><em>(Continue Reading...)</em></a>';\n}", "function darksnow_continue_reading_link() {\n\treturn ' <a href=\"'. esc_url( get_permalink() ) . '\">' . __( 'Continue reading <span class=\"meta-nav\">&rarr;</span>', 'darksnow' ) . '</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n return '<a class=\"post-link\" href=\"'. get_permalink($post->ID) . '\"> ...Read the full article</a>';\n}", "function rw_auto_excerpt_more( )\n{\n return in_the_loop() ? '&hellip;' . rw_continue_reading_link() : '&hellip;';\n}", "function new_excerpt_more( $more ) {\n\tglobal $post;\n\treturn '... <div class=\"button small text-center\"><a href=\"'. get_permalink($post->ID) . '\">Continue Reading</a></div>';\n}", "function rw_continue_reading_link( )\n{\n return ' <a href=\"'. get_permalink() . '\" class=\"more-link\">' . __( 'More', 'rotorwash' ) . '</a>';\n}", "function understrap_all_excerpts_get_more_link( $post_excerpt ) {\n\t\treturn $post_excerpt . ' [...]<p><a class = \"read-more-link\" href=\"' . esc_url( get_permalink( get_the_ID() )) . '\">Read Full Post</a></p>';\n\t}", "function new_excerpt_more($more) {\n global $post;\n return ' <a class=\"read_more\" href=\"' . get_permalink($post->ID) . '\">[...]</a>';\n}", "function new_excerpt_more( $more ) {\r\n\treturn ' <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">Continue Reading &#8594;</a>';\r\n}", "function echotheme_custom_excerpt_more($output) {\n\tif (has_excerpt() && ! is_attachment()) {\n\t\t$output .= echotheme_continue_reading_link();\n\t}\n\treturn $output;\n}", "function new_excerpt_more( $more ) {\n\treturn '... <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">Continue Reading...</a>';\n}", "function accouk_post_excerpt() {\n if(has_excerpt()) {\n the_excerpt();\n }\n}", "function twentyten_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() && ! is_admin() ) {\n\t\t$output .= twentyten_continue_reading_link();\n\t}\n\treturn $output;\n}", "function mithpress_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t$output .= mithpress_continue_reading_link();\n\t}\n\treturn $output;\n}", "function new_excerpt_more($more) {\n global $post;\n // return '<a class=\"read_more\" href=\"'. get_permalink($post->ID) . '\">'.__('Read More','textdomain').'</a>';\n return '';\n}", "function emc_the_link_excerpt() {\r\n\r\n\t$title = ( get_field( 'link_title' ) ) ? get_field( 'link_title' ) : get_the_title();\r\n\t$url = ( is_single() ) ? get_field( 'link_url' ) : get_permalink();\r\n\t$source = get_field( 'source' );\r\n\t$excerpt = get_field( 'excerpt' );\r\n\r\n\tif ( ! $url ) return false; ?>\r\n\r\n\t<div class=\"emc-link\">\r\n\t\t<a href=\"<?php echo esc_url( $url ); ?>\">\r\n\t\t\t<!--<?php echo get_the_post_thumbnail( get_the_ID(), 'thumbnail' ); ?>-->\r\n\t\t\t<div class=\"emc-link-content\">\r\n\t\t\t\t<h2 class=\"emc-link-title\"><?php echo esc_html( $title ); ?></h2>\r\n\t\t\t\t<?php if(is_single()) {\r\n\t\t \techo '<div class=\"link-post-icon\"><img src=\"http://earlymath.erikson.edu/wp-content/themes/emc/img/icon-link.png\"></div>';\r\n\t\t \t}?>\r\n\t\t\t\t<div class=\"emc-link-source\"><?php echo esc_html( $source ); ?></div>\r\n\t\t\t\t<?php echo esc_html( $excerpt ); ?>\r\n\t\t\t</div>\r\n\t\t</a>\r\n\t</div><!-- .emc-link -->\r\n\r\n<?php }", "function the_excerpt_embed()\n {\n }", "function new_excerpt_more($more) {\n global $post;\n return ' [...] <a href=\"' . get_permalink($post->ID) . '\">' . __('Continue reading <span class=\"meta-nav\">&rarr;</span>', 'twentytwelve') . '</a>';\n }", "function wpdocs_excerpt_more( $more ) {\n return ' <a href=\"' . get_the_permalink() . '\" rel=\"nofollow\">[Read More...]</a>';\n}", "function new_excerpt_more($more)\r\n{\r\n\tglobal $post;\r\n\treturn '<a class=\"moretag\" href=\"' . get_permalink($post->ID) . '\"> Read the full article...</a>';\r\n}", "function mt_filter_excerpt_more_link($excerpt) {\n\t$post = get_post();\n\t$excerpt .= '<a href=\"'. get_permalink($post->ID) .'\" class=\"btn btn-primary float-right\"> Läs mer &raquo; </a>';\n\t\n\treturn $excerpt;\n }", "function mithpress_auto_excerpt_more( $more ) {\n\treturn ' . . . ' . mithpress_continue_reading_link();\n}", "function et_excerpt_more($more) {\n global $post;\n return '<div><a href=\"'. get_permalink($post->ID) . '\" > ... Click to View Full Post</a></div>;';\n}", "function my_add_excerpts_to_pages()\n{\n add_post_type_support('page', 'excerpt');\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<p><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More</a></p>';\n}", "function the_excerpt()\n {\n }", "function wpdocs_excerpt_more( $more ) {\n return '<a href=\"'.get_the_permalink().'\" rel=\"nofollow\">...</a>';\n}", "function darksnow_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t$output .= darksnow_continue_reading_link();\n\t}\n\treturn $output;\n}", "function nightsky_excerpt_more( $more ) {\n global $post;\n return ' <p class=\"readmore\"><a href=\"' . get_permalink( $post->ID ) . '\">Continue reading ' . $post->post_title . '</a></p>';\n}", "function new_excerpt_more( $more ) {\n return ' <a class=\"read-more\" href=\"' . get_permalink( get_the_ID() ) . '\">' . __( 'Read More...', 'your-text-domain' ) . '</a>';\n}", "function my_excerpt_more( $more ) {\n\treturn ' &hellip; <a href=\"'. get_permalink() .'\">Continue reading &ldquo;'. get_the_title() .'&rdquo; &rarr;</a>';\n}", "function wpfme_replace_excerpt($content) {\n return str_replace('[...]',\n '<a class=\"readmore\" href=\"'. get_permalink() .'\">Continue Reading</a>',\n $content\n );\n}", "function excerpt_read_more_link($output) {\r\n global $post;\r\n return $output . '<a class=\"more-link\" href=\"'. get_permalink($post->ID) . '\">'.__(\"Keep Reading\",TEXTDOMAIN ).'<span class=\"icon-arrow-right5\"></span></a>';\r\n}", "function dh_modify_read_more_link() {\r\n return '<a class=\"more-link\" href=\"' . get_permalink() . '\">Click to Read!</a>';\r\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '... (<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">Read more</a>)';\n}", "function understrap_all_excerpts_get_more_link( $post_excerpt ) {\n\n\t\treturn $post_excerpt . '<br><a class=\"badge badge-primary\" href=\"' . esc_url( get_permalink( get_the_ID() )) . '\">' . __( 'Read More',\n\t\t'understrap' ) . ' <i class=\"fas fa-angle-double-right\"></i></a>';\n\t}", "function new_excerpt_more($more) {\n\n\tglobal $post;\n\n\treturn '...&nbsp; <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"><br/>read&nbsp;more</a>';\n\n}", "function user_add_excerpts_to_pages() {\n add_post_type_support( 'page', 'excerpt' );\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> read more...</a>';\n}", "function new_excerpt_more( $more ) {\n return '&hellip; <span class=\"read-more\"><a href=\"'.get_permalink().'\" rel=\"bookmark\">continue reading</a></span>';\n}", "function modify_read_more_link() {\n $post_slug = get_post_field( 'post_name', get_post() );\n return '<a href=\"/'. $post_slug .'\" class=\"btn btn-info btn-sm mb-3\">Detail</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<div class=\"readmore\"><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More <i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"></i></a></div>';\n}", "function dg_excerpt() {\n global $post;\n $excerpt = '<p>' . get_the_excerpt() . ' <a class=\"more\" href=\"'. get_permalink($post->ID) . '\" title=\"'. get_the_title($post->ID) .'\">Read&nbsp;more&nbsp;»</a></p>';\n echo $excerpt;\n}", "function charity_use_excerpt() {\n $display = TRUE;\n $display = apply_filters('charity_use_excerpt', $display);\n return $display;\n}", "function custom_excerpt_more( $more ) {\r\n\t return '...';\r\n}", "function modify_read_more_link() {\n return '<a class=\"more-link\" href=\"' . get_permalink() . '\">View list..</a>';\n}", "function et_excerpt_more($more) {\n global $post;\n return '<div class=\"view-full-post\"><a href=\"'. get_permalink($post->ID) . '\" class=\"view-full-post-btn\">Skaityti</a></div>';\n}", "function labs_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . labs_continue_reading_link();\n}", "function total_add_excerpts_to_pages() {\n add_post_type_support('page', 'excerpt');\n}", "function twentyten_auto_excerpt_more( $more ) {\n\tif ( ! is_admin() ) {\n\t\treturn ' &hellip;' . twentyten_continue_reading_link();\n\t}\n\treturn $more;\n}", "function new_excerpt_more($more) {\n global $post, $wpak_options;\n\n\treturn '<p class=\"readmore\"><a title=\"' . $wpak_options['linkto'] . $post->post_title.'\" href=\"'. get_permalink($post->ID) . '\">' . $wpak_options['readmore'] . '</a></p>';\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( '...', 'textdomain' )\n );\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn ' <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">[ more ]</a>';\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a><br/>',\n get_permalink( get_the_ID() ),\n __( '<i class=\"fa fa-book\"></i> Read More...', 'textdomain' )\n );\n}", "function tbx_add_excerpts_to_pages() {\n\tadd_post_type_support( 'page', 'excerpt' );\n}", "function uwmadison_custom_excerpt_more( $output ) {\n\t\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t\t$output .= uwmadison_continue_reading_link();\n\t\t}\n\t\treturn $output;\n\t}", "function clrfl_excerpt_more($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a>';\n}", "function new_excerpt_more( $more ) {\n\treturn '... <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">' . __('Read More', 'your-text-domain') . '</a>';\n}", "function new_excerpt_more($more) {\r\n global $post;\r\n return '<button class=\"btn btn-primary hvr-grow clearfix\"><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a></button>';\r\n}", "function jetpack_the_excerpt_customizer( $excerpt ) {\n\tif ( ( is_home() || is_archive() ) && ! is_post_type_archive( array( 'jetpack-testimonial', 'jetpack-portfolio', 'product' ) ) ) {\n\t\tob_start();\n\t\tthe_content(\n\t\t\tsprintf(\n\t\t\t\twp_kses(\n\t\t\t\t\t/* translators: %s: Name of current post. Only visible to screen readers */\n\t\t\t\t\t__( 'Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>', 'jetpack' ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'span' => array(\n\t\t\t\t\t\t\t'class' => array(),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tget_the_title()\n\t\t\t)\n\t\t);\n\t\t$content = ob_get_clean();\n\t}\n\tif ( empty( $content ) ) {\n\t\treturn $excerpt;\n\t} else {\n\t\treturn sprintf( '<div class=\"jetpack-blog-display jetpack-the-content\">%s</div><div class=\"jetpack-blog-display jetpack-the-excerpt\">%s</div>', $content, $excerpt );\n\t}\n}", "function swbtheme_excerpt_more($more) {\n global $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a>';\n}", "function add_excerpts_to_pages() {\n\t\tadd_post_type_support('page', 'excerpt');\n\t}", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '&hellip; </br> <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">Read more</a>';\n}", "function themify_custom_excerpt_more($more) {\n global $post;\n return '';\n}", "function custom_excerpt_more($more) {\n\t\treturn 'Read More &raquo;';\n\t}", "function new_excerpt_more( $more ) {\n\treturn '...<br/>'.'<a href=\"'. get_permalink( get_the_ID() ) . '\" class=\"more\">Read More</a>';\n}", "public function add_page_excerpts() {\n add_post_type_support( 'page', 'excerpt' );\n }", "function tsk_add_excerpts_to_pages() {\n\t\tadd_post_type_support( 'page', 'excerpt' );\n\t}", "function kstHelpWordpressBlogPosts_excerptsAndMoreTeasers() {\n ?>\n <p>\n Your theme uses the excerpt field as well as the &lt;--more--&gt; tag giving\n you many options for formatting your blog index. Many themes use either the\n excerpt or the &lt;--more--&gt; tag to control what content appears on your\n blog index.\n </p>\n <p>\n Posts are displayed on the index in one of these formats (and order shown):\n </p>\n <ol>\n <li>Title and excerpt (if you type anything in the excerpt field)</li>\n <li>Title and the post up to the &lt;--more--&gt; (if you insert &lt;--more--&gt; in the post)</li>\n <li>Title and the entire post (if you do not enter an excerpt or the &lt;--more--&gt; tag)</li>\n </ol>\n <p><em>i.e. If you enter an excerpt and include a &lt;--more--&gt; tag only the excerpt will display</em></p>\n <p>\n <strong>How to use the \"more\" tag:</strong>\n </p>\n <p>\n In \"Visual\" mode:<br />\n Place the cursor <em>after</em> the content you would like to appear on the blog index for that post.\n Click the button above the post editor that looks like\n a rectangle cut in two pieces (a small rectangle on top and a longer rectangle on the button).\n A line that says \"more\" will appear.\n </p>\n <p>\n In \"html\" mode:<br />\n Place the cursor <em>after</em> the content you would like to appear on the blog index for that post.\n Type &lt;--more--&gt; on it's own line.\n </p>\n <p>\n Note: You may also customize the \"more\" link text that is shown per post (only possible using \"html\" mode).<br />\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Simply type the text to use after \"more\" e.g. &lt;--more But wait, there's more! --&gt;\n </p>\n <?php\n}", "function add_excerpt_support_for_pages() {\n\tadd_post_type_support( 'page', 'excerpt' );\n}", "function add_excerpt_support_for_pages() {\n\tadd_post_type_support( 'page', 'excerpt' );\n}", "function monaco_child_get_the_excerpt($content) {\n global $post;\n $link = '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> ' . __('[Read the full article...]', 'patrick') . '</a>';\n return preg_replace('/\\[.*\\]$/', '', $content) . $link;\n}", "function get_the_excerpt($post = \\null)\n {\n }", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Leia o artigo completo...</a>';\n}", "function lightseek_read_more_link() {\n\treturn '<p><a class=\"btn btn-primary\" href=\"' . get_permalink() . '\">Read More</a></p>';\n}", "function wpdocs_excerpt_more( $more ) {\n return ' ...';\n}", "function charity_use_autoexcerpt() {\n $display = FALSE;\n $display = apply_filters('charity_use_autoexcerpt', $display);\n return $display;\n}", "function darksnow_auto_excerpt_more( $more ) {\n\treturn ' &hellip;' . darksnow_continue_reading_link();\n}", "function cera_grimlock_the_excerpt( $more_link ) {\n\t\t$allowed_html = array(\n\t\t\t'a' => array(\n\t\t\t\t'href' => array(),\n\t\t\t\t'title' => array(),\n\t\t\t\t'class' => array(),\n\t\t\t),\n\t\t\t'span' => array(\n\t\t\t\t'class' => array(),\n\t\t\t),\n\t\t);\n\n\t\tif ( has_post_format( array( 'link', 'quote' ) ) ) : ?>\n\t\t\t<div class=\"entry-content clearfix\">\n\t\t\t\t<?php\n\t\t\t\tthe_content();\n\t\t\t\techo wp_kses( $more_link, $allowed_html ); ?>\n\t\t\t</div><!-- .entry-content -->\n\t\t\t<?php\n\t\telse : ?>\n\t\t\t<div class=\"entry-summary clearfix\">\n\t\t\t\t<?php\n\t\t\t\tthe_excerpt();\n\t\t\t\techo wp_kses( $more_link, $allowed_html ); ?>\n\t\t\t</div><!-- .entry-summary -->\n\t\t\t<?php\n\t\tendif;\n\t}", "function register_block_core_post_excerpt()\n {\n }", "function wpcodex_add_excerpt_support_for_pages() {\n\tadd_post_type_support( 'page', 'excerpt' );\n}", "function excerpt($num) {\n$limit = $num+1;\n$excerpt = explode(' ', get_the_excerpt(), $limit);\narray_pop($excerpt);\n$excerpt = implode(\" \",$excerpt).\" <a href='\" .get_permalink($post->ID) .\" ' class='\".readmore.\"'>READ THIS</a>\";\necho $excerpt;\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"understrap-read-more-link goodswave-read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( 'Read More', 'textdomain' )\n );\n}", "function no_more_jumping($post) {\n\t\treturn '&nbsp;<a href=\"'.get_permalink($post->ID).'\" class=\"read-more\">'.'Continue Reading'.'</a>';\n\t}", "function linolakestheme_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( ' Read more', 'textdomain' )\n );\n}", "function twentyseventeen_excerpt_more( $link ) {\n\tif ( is_admin() ) {\n\t\treturn $link;\n\t}\n\n\t$link = sprintf( '<p class=\"link-more\"><a href=\"%1$s\" class=\"more-link\">%2$s</a></p>',\n\t\tesc_url( get_permalink( get_the_ID() ) ),\n\t\t/* translators: %s: Name of current post */\n\t\tsprintf( __( 'Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>', 'twentyseventeen' ), get_the_title( get_the_ID() ) )\n\t);\n\treturn ' &hellip; ' . $link;\n}", "function uwmadison_auto_excerpt_more( $more ) {\n\t\treturn ' &hellip;' . uwmadison_continue_reading_link();\n\t}", "function thefirst_new_excerpt_more($more) {\n global $post;\n\treturn '...';\n}", "function new_excerpt_more($more) {\n global $post;\n return '...';\n}", "function echotheme_auto_excerpt_more($more) {\n\treturn '&hellip; <br />' . echotheme_continue_reading_link();\n}", "function ppo_excerpt_more($more) {\n $link = sprintf('<a href=\"%1$s\" class=\"more-link\">%2$s</a>', esc_url(get_permalink(get_the_ID())),\n /* translators: %s: Name of current post */ \n sprintf(__('Xem thêm <span class=\"meta-nav\">&rarr;</span>', SHORT_NAME))\n );\n return ' &hellip; ' . $link;\n}", "function print_excerpt($length) {\r\n\t\tglobal $post;\r\n $length = ($length =='')? '50' : $length;\r\n\t\t/*condition for supreme related theme*/\r\n\t\tif(function_exists('supreme_prefix')){\r\n\t\t\t$pref = supreme_prefix();\r\n\t\t}else{\r\n\t\t\t$pref = sanitize_key( apply_filters( 'hybrid_prefix', get_template() ) );\r\n\t\t}\r\n\t\t$tmpdata = get_option($pref.'_theme_settings');\t\r\n\t\t$morelink = @$tmpdata['templatic_excerpt_link'];\r\n\t\t\r\n\t\tif(!empty($morelink))\r\n\t\t\t$morelink =sprintf(__('<a href=\"%s\" class=\"more moretag\">%s</a>','templatic'),get_permalink(),$morelink);\r\n\t\telse\r\n\t\t\t$morelink ='<a class=\"moretag\" href=\"'.get_permalink().'\" class=\"more\">'.__('Read more').'...</a>';\r\n\t\t\r\n\t\t$text = $post->post_excerpt;\r\n\t\tif ($text =='') {\r\n\t\t\t$text = $post->post_content;\r\n\t\t\t$text = apply_filters('the_excerpt', $text);\r\n\t\t\t$text = str_replace(']]>', ']]>', $text);\r\n\t\t}\r\n\t\t$text = strip_shortcodes($text); // optional, recommended\r\n\t\t$text = strip_tags($text); // use ' $text = strip_tags($text,'<p><a>'); ' if you want to keep some tags\r\n\r\n\t\t$text = wp_trim_words($text,$length); /* shows perticular words */\r\n\t\tif(reverse_strrchr($text, '.', 1)){\r\n\t\t\t$excerpt = reverse_strrchr($text, '.', 1).\" \".sprintf(__('%s','templatic'),$morelink);\r\n\t\t}else{\r\n\t\t\t$excerpt = $text.\" \".sprintf(__('%s','templatic'),$morelink);\r\n\t\t}\r\n\t\t\r\n\t\tif( $excerpt ) {\r\n\t\t\techo apply_filters('the_excerpt',$excerpt);\r\n\t\t} else {\r\n\t\t\techo apply_filters('the_excerpt',$text);\r\n\t\t}\r\n\t}", "function html5wp_excerpt($length_callback = '', $more_callback = '')\n{\n global $post;\n if (function_exists($length_callback)) {\n add_filter('excerpt_length', $length_callback);\n }\n if (function_exists($more_callback)) {\n add_filter('excerpt_more', $more_callback);\n }\n $output = get_the_excerpt();\n $output = apply_filters('wptexturize', $output);\n $output = apply_filters('convert_chars', $output);\n $output = '<p>' . $output . '</p>';\n echo $output;\n}", "function html5wp_excerpt($length_callback = '', $more_callback = '')\n{\n global $post;\n if (function_exists($length_callback)) {\n add_filter('excerpt_length', $length_callback);\n }\n if (function_exists($more_callback)) {\n add_filter('excerpt_more', $more_callback);\n }\n $output = get_the_excerpt();\n $output = apply_filters('wptexturize', $output);\n $output = apply_filters('convert_chars', $output);\n $output = '<p>' . $output . '</p>';\n echo $output;\n}", "function mintshow_excerpt_more( $more ) {\n return sprintf( '<a class=\"ms-read-more\" href=\"%1$s\">%2$s <i class=\"fa fa-long-arrow-right\"></i></a>',\n get_permalink( get_the_ID() ),\n __( 'Read More', 'textdomain' )\n );\n}", "function start_replace_excerpt_more( $more ) {\n\tglobal $post;\n\t// edit here if you like\n\treturn null;\n}" ]
[ "0.7045646", "0.70330435", "0.6981231", "0.69776946", "0.691947", "0.6803941", "0.67263323", "0.66948456", "0.6679784", "0.6657154", "0.6646176", "0.6579395", "0.65316045", "0.6525813", "0.6507832", "0.6491643", "0.6487802", "0.646562", "0.64560455", "0.64254105", "0.6415044", "0.6411163", "0.64020336", "0.63944435", "0.6382673", "0.63801557", "0.63686216", "0.63612294", "0.6359254", "0.63510525", "0.6326736", "0.6326422", "0.6324932", "0.63120127", "0.62940156", "0.62835604", "0.62749165", "0.6263584", "0.62594044", "0.6255921", "0.62434083", "0.6240841", "0.62362784", "0.623123", "0.6226494", "0.6216484", "0.6205848", "0.61946714", "0.61764973", "0.6176153", "0.6175895", "0.61737543", "0.61718565", "0.61523443", "0.6151784", "0.61365724", "0.6132704", "0.6128623", "0.61200297", "0.6115149", "0.6100426", "0.60841864", "0.60745543", "0.60543114", "0.6046636", "0.60451263", "0.6044729", "0.6033508", "0.60331196", "0.6016939", "0.60135305", "0.6007297", "0.6001881", "0.5993713", "0.5993713", "0.5984421", "0.59839004", "0.5966717", "0.5959475", "0.5932508", "0.59091336", "0.5908561", "0.5895331", "0.58831716", "0.5875116", "0.5870813", "0.58670634", "0.5866422", "0.5861494", "0.5857936", "0.58446085", "0.58439434", "0.5831192", "0.58296555", "0.58098215", "0.57921964", "0.5788002", "0.5788002", "0.5779981", "0.57782996" ]
0.7291859
0
Adds "active" class to menu items with "current_page_item" for bootstrap
function rwbs_add_active_class_to_nav_menu($classes) { if (in_array('current-menu-item', $classes, true) || in_array('current_page_item', $classes, true)) { $classes = array_diff($classes, array('current-menu-item', 'current_page_item', 'active')); $classes[] = 'active'; } return $classes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function simple_bootstrap_add_active_class($classes, $item) {\n if( in_array('current-menu-item', $classes) ) {\n $classes[] = \"active\";\n }\n \n return $classes;\n}", "function uk_active_nav_class( $class, $item ) {\n if (in_array( 'current-menu-item', $class )) {\n $class[] = 'uk-active';\n }\n return $class;\n}", "function active_nav_class($classes, $item){\n\tif (in_array('current-menu-item', $classes)) {\n\t\t$classes[] = 'active';\n\t}\n\treturn $classes;\n}", "function set_active_nav_class ($classes, $item) {\n if (in_array('current-menu-item', $classes) ){\n $classes[] = 'activemenu ';\n }\n return $classes;\n}", "function foundation_active_class($classes, $item){\n if( in_array('current-menu-item', $classes) ){\n $classes[] = 'active ';\n }\n return $classes;\n}", "function special_nav_class($classes, $item){\n if( in_array('current-menu-item', $classes) ){\n $classes[] = 'active ';\n }\n return $classes;\n}", "function greenfields_add_active_class($classes, $item)\n{\n if (in_array('current-menu-item', $classes)) {\n $classes[] = \"active\";\n }\n\n return $classes;\n}", "function add_current_nav_class($classes, $item) {\n\tglobal $post;\n\t// Getting the post type of the current post\n\t$current_post_type = get_post_type_object(get_post_type($post->ID));\n\t$current_post_type_slug = $current_post_type->rewrite['slug'];\n\t// Getting the URL of the menu item\n\t$menu_slug = strtolower(trim($item->url));\n\t// If the menu item URL contains the current post types slug add the current-menu-item class\n\tif (strpos($menu_slug,$current_post_type_slug) !== false) {\n\t\t$classes[] = 'current-menu-item';\n\t}\n\t// Return the corrected set of classes to be added to the menu item\n\treturn $classes;\n}", "function add_current_nav_class($classes, $item) {\n\t\tglobal $post;\n\t\t\n\t\t// Getting the post type of the current post\n\t\t$current_post_type = get_post_type_object(get_post_type($post->ID));\n\t\t$current_post_type_slug = $current_post_type->rewrite['slug'];\n\t\t\t\n\t\t// Getting the URL of the menu item\n\t\t$menu_slug = strtolower(trim($item->url));\n\t\t\n\t\t// If the menu item URL contains the current post types slug add the current-menu-item class\n\t\tif (strpos($menu_slug,$current_post_type_slug) !== false) {\n\t\t\n\t\t $classes[] = 'current-menu-item';\n\t\t\n\t\t}\n\t\t\n\t\t// Return the corrected set of classes to be added to the menu item\n\t\treturn $classes;\n\t\n\t}", "function add_current_nav_class($classes, $item) {\n\t\tglobal $post;\n\t\t\n\t\t// Getting the post type of the current post\n\t\t$current_post_type = get_post_type_object(get_post_type($post->ID));\n\t\t$current_post_type_slug = $current_post_type->rewrite[slug];\n\t\t\t\n\t\t// Getting the URL of the menu item\n\t\t$menu_slug = strtolower(trim($item->url));\n\t\t\n\t\t// If the menu item URL contains the current post types slug add the current-menu-item class\n\t\tif (strpos($menu_slug,$current_post_type_slug) !== false) {\n\t\t\n\t\t $classes[] = 'current-menu-item';\n\t\t\n\t\t}\n\t\t\n\t\t// Return the corrected set of classes to be added to the menu item\n\t\treturn $classes;\n\t\n\t}", "function trucking_filter_active_class_menu( $classes){\n if(in_array('current-menu-item', $classes)) {\n $classes[] = 'active';\n }\n return $classes;\n}", "function get_active_menu (string $page, string $page_active, string $class_active = \"active\") {\n return $page == $page_active ? $class_active : \"\";\n }", "function get_active_menu (string $page, string $page_active, string $class_active = \"active\") {\n return $page == $page_active ? $class_active : \"\";\n }", "function current_to_active($text)\n{\n $replace = array(\n //List of menu item classes that should be changed to \"active\"\n 'current-menu-item' => 'active',\n 'current_page_parent' => 'active',\n 'current_page_ancestor' => 'active',\n 'current_page_item' => 'active',\n );\n $text = str_replace(array_keys($replace), $replace, $text);\n return $text;\n}", "function active_menu()\n{\n $CI =& get_instance();\n\n $class = '';\n if($CI->router->fetch_class() == 'blog') {\n $class = 'class=\"navbar-item-active\"';\n }\n return $class;\n}", "function add_nav_class( $classes, $item ) {\n if ( is_page('past-events') AND $item->post_title === 'Events') {\n // Notice you can change the conditional from is_single() and $item->title\n $classes[] = \"current-menu-item\";\n }\n return $classes;\n}", "function add_nav_menu_classes($classes, $item){\n if( is_post_type_archive('program') && ($item->title == \"Programs\") ){\n $classes[] = 'current-menu-item';\n }\n\n return $classes;\n }", "function nav_accordion_item_class( $classes, $item, $args ) {\n\tif ( 'nav-primary' === $args->theme_location ) {\n\t\t$classes[] = 'NavAccordion_Item';\n\t\tif ( array_intersect( $classes, [ 'current-menu-item' ] ) ) {\n\t\t\t$classes[] = 'NavAccordion_Item-Active';\n\t\t}\n\t}\n\treturn $classes;\n}", "public static function menu_current_class( $classes, $item ) {\n\n\t\t\t$url = trailingslashit( $item->url );\n\t\t\t$base = basename( $url );\n\n\t\t\t// Default.\n\t\t\t$classes[] = 'cz';\n\n\t\t\t// Fix anchor links\n\t\t\tif ( self::contains( $url, '/#' ) ) {\n\t\t\t\treturn $classes;\n\t\t\t}\n\n\t\t\t// Find parent menu\n\t\t\t$in_array = in_array( 'current_page_parent', $classes );\n\n\t\t\t// Current menu\n\t\t\tif ( in_array( 'current-menu-ancestor', $classes ) || in_array( 'current-menu-item', $classes ) || ( $in_array && get_post_type() === 'post' ) ) {\n\t\t\t\t$classes[] = 'current_menu';\n\t\t\t}\n\n\t\t\t// Current menu parent.\n\t\t\tif ( have_posts() ) { \n\n\t\t\t\t$c = get_post_type_object( get_post_type( self::$post->ID ) );\n\n\t\t\t\tif ( ! empty( $c ) ) {\n\n\t\t\t\t\t// Check custom link of post or page in menu.\n\t\t\t\t\t$con1 = ( is_singular() && $url === trailingslashit( get_the_permalink( self::$post->ID ) ) );\n\n\t\t\t\t\t// Check post type slug changes.\n\t\t\t\t\t$con2 = ( isset( $c->rewrite['slug'] ) && self::contains( $base, $c->rewrite['slug'] ) && $in_array );\n\n\t\t\t\t\t// Check with post type name.\n\t\t\t\t\t$con3 = ( $base === strtolower( urlencode( html_entity_decode( $c->name ) ) ) );\n\n\t\t\t\t\t// Fix multisite same name as post type name conflict.\n\t\t\t\t\tif ( $con3 && trailingslashit( get_site_url() ) === $url ) {\n\t\t\t\t\t\t$con3 = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check with post type label.\n\t\t\t\t\t$con4 = ( $base === strtolower( urlencode( html_entity_decode( $c->label ) ) ) );\n\t\t\t\t\t\n\t\t\t\t\t// Check if CPT name is different in menu URL and fix also for non-english lang.\n\t\t\t\t\t$con5 = ( $base === strtolower( urlencode( html_entity_decode( $c->has_archive ) ) ) );\n\n\t\t\t\t\tif ( $con1 || $con2 || $con3 || $con4 || $con5 ) {\n\t\t\t\t\t\t$classes[] = 'current_menu';\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Fix: single post with category in menu.\n\t\t\tif ( in_array( 'menu-item-object-category', $classes ) && is_single() ) {\n\n\t\t\t\t$key = array_search( 'current-menu-parent', $classes );\n\n\t\t\t\tif ( isset( $classes[ $key ] ) ) {\n\t\t\t\t\tunset( $classes[ $key ] );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t/*\n\t\t\t// Fix: Non-english languages.\n\t\t\tif ( is_post_type_archive( 'product' ) || is_singular( 'product' ) ) {\n\n\t\t\t\t$classes_json = json_encode( $classes );\n\n\t\t\t\tif ( ! self::contains( $classes_json, 'current-' ) && ! self::contains( $classes_json, 'current_menu_' ) ) {\n\n\t\t\t\t\t$key = array_search( 'current_menu', $classes );\n\n\t\t\t\t\tif ( isset( $classes[ $key ] ) ) {\n\t\t\t\t\t\tunset( $classes[ $key ] );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t*/\n\n\t\t\treturn $classes;\n\t\t}", "function be_menu_item_classes( $classes, $item, $args ) {\n global $post;\nif( in_array('photo-item',$classes) && is_page() && $post->post_parent ) {\n $classes[] = 'current-menu-item';\n }\n\n return $classes;\n\n}", "function cmdeals_nav_menu_item_classes( $menu_items, $args ) {\n\t\n\tif (!is_cmdeals()) return $menu_items;\n\t\n\t$store_page \t\t= (int) get_option('cmdeals_store_page_id');\n\t$page_for_posts = (int) get_option( 'page_for_posts' );\n\n\tforeach ( (array) $menu_items as $key => $menu_item ) :\n\n\t\t$classes = (array) $menu_item->classes;\n\n\t\t// Unset active class for blog page\n\t\tif ( $page_for_posts == $menu_item->object_id ) :\n\t\t\t$menu_items[$key]->current = false;\n\t\t\tunset( $classes[ array_search('current_page_parent', $classes) ] );\n\t\t\tunset( $classes[ array_search('current-menu-item', $classes) ] );\n\n\t\t// Set active state if this is the store page link\n\t\telseif ( is_store() && $store_page == $menu_item->object_id ) :\n\t\t\t$menu_items[$key]->current = true;\n\t\t\t$classes[] = 'current-menu-item';\n\t\t\t$classes[] = 'current_page_item';\n\t\t\n\t\tendif;\n\n\t\t$menu_items[$key]->classes = array_unique( $classes );\n\t\n\tendforeach;\n\n\treturn $menu_items;\n}", "public function custom_wp_nav_menu( $css_class, $item ) {\n\n\t\t//Init vars\n\t\tglobal $post;\n\n\t\t//Remove 'current_page_parent' from blog menu item when not a blog page\n\t\tif( get_post_type() !== 'post' ) {\n\n\t\t\tif( $item->object_id == get_option('page_for_posts') ) {\n\t\t\t\tforeach ($css_class as $k=>$v) {\n\t\t\t\t\tif ($v=='current_page_parent') unset($css_class[$k]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t//Add custom post type slug as css class to all menu items for custom posts\n\t\tif( (get_post_type($item->object_id) !== 'post') && (get_post_type($item->object_id) !== 'page') ) {\n\n\t\t\t$css_class[] = str_replace('_', '-', get_post_type($item->object_id));\n\n\t\t}\n\n\t\t//Add object id class\n\t\t$css_class[] = 'active-for-post-' . $item->object_id;\n\n\t\t//Is active page?\n\t\tif( isset($post->ID, $item->object_id) && ($post->ID == $item->object_id) ) {\n\t\t\t$css_class[] = 'active';\n\t\t}\n\n\t\treturn $css_class;\n\t}", "function mro_menu_top_item_classes( $classes, $item, $args ) {\n\n\tif( 'primary' !== $args->theme_location )\n\t\treturn $classes;\n\n\tif( is_front_page() && ( 'Clases de Yoga' == $item->title || 'Clases de yoga' == $item->title || 'Clases' == $item->title ) )\n\t\t$classes[] = 'active';\n\n\tif( is_singular( 'mro-team' ) && ( 'Clases de Yoga' == $item->title || 'Clases de yoga' == $item->title || 'Clases' == $item->title ) )\n\t\t$classes[] = 'current-menu-item active';\n\n\tif( is_singular( 'mro-event' ) && 'Actividades' == $item->title )\n\t\t$classes[] = 'current-menu-item active';\n\n\tif( is_page_template( 'page-templates/template-thai.php' ) && 'Masaje tai' == $item->title )\n\t\t$classes[] = 'current-menu-item active';\n\n\t// if( ( is_singular( 'code' ) || is_tax( 'code-tag' ) ) && 'Talleres' == $item->title )\n\t\t// $classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Entrenamiento' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Masaje Tai' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Yoga' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Nosotros' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\tif( mandir_is_tree(18) && 'Tienda' == $item->title )\n\t\t$classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Contáctenos' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\treturn array_unique( $classes );\n}", "public static function nav_menu_css_class( $classes, $item, $args = array() ) {\n\t\tif(strpos($item->url, '#') !== false && ($key = array_search('current-menu-item', $classes)) !== false) {\n\t\t\tunset($classes[$key]);\n\t\t\t$classes[] = 'maybe-current-menu-item';\n\t\t}\n\n\t\treturn $classes;\n\t}", "function ntp_blogpost_nav_class($classes, $item) {\n if ( is_single() && get_post_type() !== 'ntp_project' && $item->title == \"Blog\" ) {\n $classes[] = 'current_page_item';\n }\n return $classes;\n}", "function launchpad_modify_nav_class($classes, $item) {\n\t$slug = sanitize_title($item->title);\n\t$classes = preg_replace('/^((menu|page)[-_\\w+]+)+/', '', $classes);\n\t\n\t$classes[] = 'menu-' . $slug;\n\t\n\t$link_url = preg_replace('|^https?://' . $_SERVER['HTTP_HOST'] . '/|', '/', $item->url);\n\t$current_url = $_SERVER['REQUEST_URI'];\n\t\n\tif($link_url != '/' && $current_url !== $link_url && stristr($current_url, $link_url) !== false) {\n\t\t$classes[] = 'current-hierarchy-ancestor';\n\t} else if($current_url === $link_url) {\n\t\t$classes[] = 'current-hierarchy-page';\t\t\n\t}\n\t\n\t$classes = array_unique($classes);\n\t\n\t// Apply filters to allow the developer to change it.\n\t$classes = apply_filters('launchpad_nav_class', $classes);\n\t\n\treturn array_filter(\n\t\t$classes, \n\t\tfunction($el) {\n\t\t\t$el = trim($el);\n\t\t\treturn empty($el) ? false : true;\n\t\t}\n\t);\n}", "public function current_to_active( $nav_menu, $args ){\n\t\t$replace = array(\n\t\t\t//List of menu item classes that should be changed to \"active\"\n\t\t\t'current_page_item' \t=> 'active',\n\t\t\t'current_page_parent' \t=> 'active',\n\t\t\t'current_page_ancestor' => 'active',\n\t\t\t'current-menu-item' \t=> 'active',\n\t\t\t'current-menu-parent' \t=> 'active',\n\t\t\t'current-menu-ancestor' => 'active',\n\t\t);\n\t\t$nav_menu = str_replace(array_keys($replace), $replace, $nav_menu);\n\n\t\treturn $nav_menu;\n\t}", "function set_current_menu_class($classes) {\n\tglobal $post;\n\t\n\t/*\n\tif( _s_is_page_template_name( 'find-an-agent' ) || is_post_type_archive( 'agent' ) || is_singular( 'agent' ) ) {\n\t\t\n\t\t$classes = array_filter($classes, \"remove_parent_classes\");\n\t\t\n\t\tif ( in_array('menu-item-206', $classes ) )\n\t\t\t$classes[] = 'current-menu-item';\n\t}\n\t*/\n\t\t\t\n\treturn $classes;\n}", "function BootstrapBlocks_preprocess_menu_link(&$vars) {\n if ($vars['element']['#href'] == $_GET['q'] || (drupal_is_front_page() && $vars['element']['#href'] === '<front>')) {\n $vars['element']['#attributes']['class'][] = 'active';\n }\n}", "function is_sidebar_menu_active($current)\n{\n $CI =& get_instance();\n if ($CI->uri->segment(1) == $current) {\n return 'active';\n }\n return '';\n}", "function nav_menu_css_class($classes, $item) {\n\t$slug = sanitize_title($item->title);\n\t$post_type = get_query_var('post_type');\n\t$blog_id = get_option('page_for_posts');\n\t$is_404 = is_404();\n\n\t$classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'is-active', $classes);\n\t$classes = preg_replace('/^((menu|page)[-_\\w+]+)+/', '', $classes);\n\t$classes[] = 'nav__item';\n\t$classes[] = 'nav__item--' . $slug;\n\t$classes = array_unique($classes);\n\n\t// Add active class if item has \"cases-cpt\" class\n\tif ( $post_type === 'cases') {\n\t\tif ( in_array('cases-cpt', $classes) ) {\n\t\t\t$classes[] = 'is-active';\n\t\t}\n\t}\n\n\t// Add active class if item has \"job-cpt\" class\n\tif ( $post_type === 'job') {\n\t\tif ( in_array('job-cpt', $classes) ) {\n\t\t\t$classes[] = 'is-active';\n\t\t}\n\t}\n\n\t// If \"blog\" has active class, and current page is either tax or cpt, remove active class\n\tif ( $item->object_id === $blog_id && in_array('is-active', $classes)) {\n\t\tif ( $post_type === 'cases' || $post_type === 'job' || $is_404 ) {\n\t\t\t$key = array_search('is-active', $classes); \n\t\t\tif ($key !== false) unset($classes[$key]);\n\t\t}\n\t}\n\n\treturn array_filter($classes, 'is_element_empty');\n}", "function makeLinks($nav)\r\n{\r\n$myReturn='';\r\n foreach($nav as $key => $value){\r\n if(THIS_PAGE == $key){//current page add active class\r\n \r\n $myReturn .='\r\n <li class=\"nav-item \">\r\n <a class=\"nav-link active\" href=\"' . $key . ' \">' . $value . ' </a>\r\n </li>'; \r\n \r\n \r\n }else{//add no formatting\r\n \r\n\r\n \r\n $myReturn .='\r\n <li class=\"nav-item\">\r\n <a class=\"nav-link\" href=\"' . $key . ' \">' . $value . ' </a>\r\n </li>'; }\r\n \r\n \r\n \r\n }\r\n \r\n \r\n return $myReturn;\r\n\r\n\r\n\r\n}", "protected function getActive($item)\n {\n $url = trim($item['url'], '/');\n\n if ($this->current === $url)\n {\n return 'active current';\n }\n\n if(strpos($this->currentKey, $item['key']) === 0) {\n return 'active';\n }\n }", "function makeLinks($nav){\n \n $myReturn = '';\n foreach($nav as $key => $value){\n \n if(THIS_PAGE == $key)\n {//current page add active class \n $myReturn .= '\n <li class=\"nav-item\">\n <a class=\"nav-link active\" href=\"' . $key . '\">' . $value . '</a>\n </li>';\n \n \n }else{//add formatting\n $myReturn .= '\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"' . $key . '\">' . $value . '</a>\n </li>';\n \n }\n \n }\n \n return $myReturn;\n \n}", "function revo_nav_menu_css_class( $classes, $item ) {\n\t$slug = sanitize_title($item->title);\n\t$classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes);\n\t$classes = preg_replace('/^((menu|page)[-_\\w+]+)+/', '', $classes);\n\n\t$classes[] = 'menu-' . $slug;\n\n\t$classes = array_unique($classes);\n\n\treturn array_filter($classes, 'revo_element_empty');\n}", "function printItemNavbar( $text, $link, $actual, $index ) {\n\n // seta a classe\n $cl = $index == $actual ? 'active' : '';\n\n // imprime o item\n echo \"<a href='\".site_url( $link ).\"' class='nav-link $cl'>$text</a>\"; \n}", "function add_parent_url_menu_class( $classes = array(), $item = false ) {\n // Get current URL\n $current_url = current_url();\n\n // Get homepage URL\n $homepage_url = trailingslashit( get_bloginfo( 'url' ) );\n\n // Exclude 404 and homepage\n if( is_404() or $item->url == $homepage_url )\n return $classes;\n\n if ( get_post_type() == \"projets\" )\n {\n unset($classes[array_search('current_page_parent',$classes)]);\n if ( isset($item->url) )\n if ( strstr( $current_url, $item->url) )\n $classes[] = 'current-menu-item';\n }\n\n return $classes;\n}", "private function print_active($i, $page) {\n\t\tif ($i == $page) {\n\t\t\techo \"<li class=\\\"active\\\"><a href=\\\"index.php?page=$i\\\">$i</a>\";\n\t\t} else {\n\t\t\techo \"<li><a href=\\\"index.php?page=$i\\\">$i</a>\";\n\t\t}\n\t}", "public function setLiActiveClass(string $liActiveClass);", "function activate_menu($controller) {\n $CI = get_instance();\n // Getting router class to active.\n $class = $CI->router->fetch_class();\n return ($class == $controller) ? 'active' : '';\n }", "function add_minutes_current_menu_item_class( $classes = array(), $menu_item = false ) {\n if ( 'board_minutes' == Extras\\get_post_type_outside_loop() && 'Meeting Minutes' == $menu_item->title && ! in_array( 'current-menu-item', $classes ) )\n $classes[] = 'current-menu-item';\n\n return $classes;\n}", "function audiotheme_nav_menu_classes( $items, $args ) {\n\tglobal $wp;\n\n\t$classes = array();\n\t$first_top = -1;\n\n\t$current_url = trailingslashit( home_url( add_query_arg( array(), $wp->request ) ) );\n\t$blog_page_id = get_option( 'page_for_posts' );\n\t$is_blog_post = is_singular( 'post' );\n\n\t$is_audiotheme_post_type = is_singular( array( 'audiotheme_gig', 'audiotheme_record', 'audiotheme_track', 'audiotheme_video' ) );\n\t$post_type_archive_id = get_audiotheme_post_type_archive( get_post_type() );\n\t$post_type_archive_link = get_post_type_archive_link( get_post_type() );\n\n\tforeach ( $items as $key => $item ) {\n\t\tif ( 0 == $item->menu_item_parent ) {\n\t\t\t$first_top = ( -1 == $first_top ) ? $key : $first_top;\n\t\t\t$last_top = $key;\n\t\t} else {\n\t\t\tif ( ! isset( $classes['first-child-items'][ $item->menu_item_parent ] ) ) {\n\t\t\t\t$classes['first-child-items'][ $item->menu_item_parent ] = $key;\n\t\t\t\t$items[ $key ]->classes[] = 'first-child-item';\n\t\t\t}\n\t\t\t$classes['last-child-items'][ $item->menu_item_parent ] = $key;\n\t\t}\n\n\t\tif ( ! is_404() && ! is_search() ) {\n\t\t\tif (\n\t\t\t\t'audiotheme_archive' == $item->object &&\n\t\t\t\t$post_type_archive_id == $item->object_id &&\n\t\t\t\ttrailingslashit( $item->url ) == $current_url\n\t\t\t) {\n\t\t\t\t$items[ $key ]->classes[] = 'current-menu-item';\n\t\t\t}\n\n\t\t\tif ( $is_blog_post && $blog_page_id == $item->object_id ) {\n\t\t\t\t$items[ $key ]->classes[] = 'current-menu-parent';\n\t\t\t}\n\n\t\t\t// Add 'current-menu-parent' class to CPT archive links when viewing a singular template.\n\t\t\tif ( $is_audiotheme_post_type && $post_type_archive_link == $item->url ) {\n\t\t\t\t$items[ $key ]->classes[] = 'current-menu-parent';\n\t\t\t}\n\t\t}\n\t}\n\n\t$items[ $first_top ]->classes[] = 'first-item';\n\t$items[ $last_top ]->classes[] = 'last-item';\n\n\tif ( isset( $classes['last-child-items'] ) ) {\n\t\tforeach ( $classes['last-child-items'] as $item_id ) {\n\t\t\t$items[ $item_id ]->classes[] = 'last-child-item';\n\t\t}\n\t}\n\n\treturn $items;\n}", "function menu_item_classes( $classes, $item, $args, $depth ) {\n $classes[] = 'nav-item';\n return $classes;\n}", "function nav_menu_css_class( $classes, $item ) {\n\n\t$_classes = [ 'menu__item' ];\n\n\tforeach ( [ 'item', 'parent', 'ancestor' ] as $type ) {\n\n\t\tif ( in_array( \"current-menu-{$type}\", $classes ) || in_array( \"current_page_{$type}\", $classes ) ) {\n\n\t\t\t$_classes[] = 'item' === $type ? 'menu__item--current' : \"menu__item--{$type}\";\n\t\t}\n\t}\n\n\t// If the menu item is a post type archive and we're viewing a single\n\t// post of that post type, the menu item should be an ancestor.\n\tif ( 'post_type_archive' === $item->type && is_singular( $item->object ) && ! in_array( 'menu__item--ancestor', $_classes ) ) {\n\t\t$_classes[] = 'menu__item--ancestor';\n\t}\n\n\t// Add a class if the menu item has children.\n\tif ( in_array( 'menu-item-has-children', $classes ) ) {\n\t\t$_classes[] = 'has-children';\n\t}\n\n\t// Add custom user-added classes if we have any.\n\t$custom = get_post_meta( $item->ID, '_menu_item_classes', true );\n\n\tif ( $custom ) {\n\t\t$_classes = array_merge( $_classes, (array) $custom );\n\t}\n\n\treturn $_classes;\n}", "function nav_menu_add_classes($items, $args) {\n //Add first item class\n $items[1]->classes[] = 'first';\n\n //Add last item class\n $i = count($items);\n while($items[$i]->menu_item_parent != 0 && $i > 0) {\n $i--;\n }\n $items[$i]->classes[] = 'last';\n\n return $items;\n}", "function ActiveMenu($requestUri)\n{\n $current_file_name = basename($_SERVER['REQUEST_URI'], \".php\");\n\n if ($current_file_name == $requestUri)\n echo 'class=\"active\"';\n}", "function add_classes_on_li($classes, $item, $args) {\n $classes[] = 'nav-item';\n return $classes;\n}", "public function navbarNav(array $items, $currentPath = null, array $option = [])\n {\n $option = array_replace_recursive([\n // ul class\n 'class' => 'nav navbar-nav',\n // append ul class\n 'appendClass' => '',\n // ul > li attr\n 'parentAttr' => [\n 'class' => 'dropdown',\n ],\n // ul > li > a attr\n 'parentItemAttr' => [\n 'class' => 'dropdown-toggle',\n 'data-toggle' => 'dropdown',\n 'role' => 'button',\n 'aria-haspopup' => 'true',\n 'aria-expanded' => 'false',\n ],\n // ul > li > ul attr\n 'childGroupAttr' => [\n 'class' => 'dropdown-menu',\n ],\n // ul > li > ul > li\n 'childAttr' => [\n ],\n // ul > li > ul > li > a\n 'childItemAttr' => [\n ],\n 'useCaret'=>true,\n ], $option);\n\n $app = App::instance();\n $role = $app->service(User::class)->get('role');\n $str = '';\n foreach ($items as $item) {\n $item += [\n 'path' => null,\n 'label' => null,\n 'items' => [],\n 'roles' => [],\n ];\n if ($item['roles'] && !in_array($role, $item['roles'])) {\n continue;\n }\n $list = '';\n $strChild = '';\n $active = $currentPath === $item['path'];\n $parentAttr = [];\n $parentItemAttr = [];\n $childGroupAttr = $option['childGroupAttr'];\n $childAttr = $option['childAttr'];\n $childItemAttr = $option['childItemAttr'];\n $childCounter = 0;\n\n if (count($item['items'])) {\n $activeFromChild = false;\n foreach ($item['items'] as $child) {\n $child += [\n 'path' => null,\n 'label' => null,\n 'roles' => [],\n ];\n\n if ($child['roles'] && !in_array($role, $child['roles'])) {\n continue;\n }\n\n $childCounter++;\n $childActive = $currentPath === $child['path'];\n if (!$activeFromChild) {\n $activeFromChild = $childActive;\n $active = $activeFromChild;\n }\n $url = '#'===$child['path']?'#':$app->url($child['path']);\n $strChild .= '<li'\n . $this->renderAttributes($childAttr, ['class'=>$childActive?'active':''])\n . '>'\n . '<a'\n . $this->renderAttributes(['href'=>$url]+$childItemAttr)\n . '>'\n . $child['label']\n . '</a>'\n . '</li>';\n }\n if ($childCounter) {\n $parentAttr += $option['parentAttr'];\n $parentItemAttr += $option['parentItemAttr'];\n $strChild = '<ul'\n . $this->renderAttributes($childGroupAttr)\n . '>'\n . $strChild\n . '</ul>';\n if ($option['useCaret']) {\n $item['label'] .= ' <span class=\"caret\"></span>';\n }\n } else {\n $strChild = '';\n }\n }\n\n if (count($item['items']) && 0 === $childCounter) {\n continue;\n }\n $url = '#'===$item['path']?'#':$app->url($item['path']);\n $str .= '<li'\n . $this->renderAttributes($parentAttr, ['class'=>$active?'active':''])\n . '>'\n . '<a'\n . $this->renderAttributes(['href'=>$url]+$parentItemAttr)\n . '>'\n . $item['label']\n . '</a>'\n . $strChild\n . '</li>';\n }\n $str = '<ul'\n . $this->renderAttributes(['class'=>$option['class']], ['class'=>$option['appendClass']])\n . '>'\n . $str\n . '</ul>';\n\n return $str;\n }", "protected function _markActive($menu){\n $controllerName = Zend_Registry::get('controllerName');\n $actionName = Zend_Registry::get('actionName');\n\n foreach($menu as $tabKey => $tab){\n if ($controllerName === $tab['main']['controller'] && $actionName === $tab['main']['action']){\n $menu[$tabKey]['main']['active'] = TRUE;\n }\n\n if(isset($tab['pages'])){\n foreach($tab['pages'] as $pagekey => $page) {\n if($controllerName === $page['controller'] && ($actionName === $page['action'] || (array_key_exists('scope', $page) && $page['scope'] == '*'))){\n $menu[$tabKey]['pages'][$pagekey]['active'] = TRUE;\n $menu[$tabKey]['main']['active'] = TRUE;\n break;\n }\n }\n }\n }\n\n return $menu;\n }", "public function getLiActiveClass(): string;", "function sc_mailbox_boxlink_active($parm = '')\n {\n if(!$parm) { $parm = 'inbox'; }\n\n // Check if current page is the active page\n if(e107::getParser()->filter($_GET['page']) == $parm)\n {\n return 'class=\"active\"';\n }\n\n return;\n }", "function class_active($url) {\r\n $page = strrchr($_SERVER['PHP_SELF'], '/');\r\n if($page == $url) {\r\n return ' active ';\r\n }\r\n}", "function gymfitness_li_class($classes,$item,$args) {\n \n $classes[] = 'nav-item';\n \n return $classes;\n\n}", "function custom_nav_class($classes, $item)\n{\n if(array_search(\"menu-item-has-children\", $classes) && !$item->menu_item_parent)\n {\n $classes[] = \"dropdown\";\n }\n\n return $classes;\n}", "function atg_menu_classes($classes, $item, $args) {\n if($args->theme_location == 'header') {\n $classes[] = 'nav-item';\n }\n return $classes;\n}", "public function menu_set_active_item($path)\n {\n return menu_set_active_item($path);\n }", "function c12_page_nav( $active ) {\n\t\t\n\t\t$c12_page_nav = '';\n\t\t\n\t\t$items = array(\n\t\t\t'about' => 'à propos',\n\t\t\t'about2' => 'about',\n\t\t\t'credits' => 'crédits',\n\t\t\t'bio' => 'bio',\n\t\t\t'order' => 'commander'\n\t\t);\n\t\t\n\t\t$c12_page_nav = c12_page_nav_global( $items, $active );\n\t\t\n\t\treturn $c12_page_nav;\n\t\t\n\t}", "function activation($in) {\n $directoryURI = $_SERVER['PHP_SELF'];\n $path = parse_url($directoryURI, PHP_URL_PATH);\n $components = explode('/', $path);\n $first_part = $components[1];\n\n if($first_part == $in) {\n echo 'class=\"active\"';\n }\n}", "function c12_page_nav( $active ) {\n\t\t\n\t\t$c12_page_nav = '';\n\t\t\n\t\t$items = array(\n\t\t\t'about' => 'à propos',\n\t\t\t'audio' => 'audio',\n\t\t\t'bio' => 'bio',\n\t\t\t'credits' => 'crédits',\n\t\t\t// 'presse' => 'presse',\n\t\t\t'order' => 'commander'\n\t\t);\n\t\t\n\t\t$c12_page_nav = c12_page_nav_global( $items, $active );\n\t\t\n\t\treturn $c12_page_nav;\n\t\t\n\t}", "function ppNavbar ($menuitems, $selected='', $parms='') {\n global $_CONF;\n\n $navbar = new Template($_CONF['path_layout'] . 'navbar');\n $navbar->set_file (array (\n 'navbar' => 'navbar.thtml',\n 'menuitem' => 'menuitem.thtml',\n ));\n $navbar->set_var ('xhtml', XHTML);\n for ($i=1; $i <= count($menuitems); $i++) {\n $parms = explode( \"=\",current($menuitems) );\n $navbar->set_var( 'link', current($menuitems));\n if (key($menuitems) == $selected) {\n $navbar->set_var( 'cssactive', 'id=\"active\"');\n $navbar->set_var( 'csscurrent','id=\"current\"');\n } else {\n $navbar->set_var( 'cssactive', '');\n $navbar->set_var( 'csscurrent','');\n }\n $navbar->set_var( 'label', key($menuitems));\n $navbar->parse( 'menuitems', 'menuitem', true );\n next($menuitems);\n }\n $navbar->parse ('output', 'navbar');\n $retval = $navbar->finish($navbar->get_var('output'));\n return $retval;\n}", "function my_wp_nav_menu_items( $items, $args, $ajax = false ) {\n\tif ( ( isset( $ajax ) && $ajax ) || ( property_exists( $args, 'theme_location' ) && $args->theme_location === 'top_nav' ) ) {\n\t\t// WooCommerce\n\t\tif ( class_exists( 'woocommerce' ) ) {\n\t\t\t$css_class = 'menu-item menu-item-type-cart menu-item-type-woocommerce-cart';\n\t\t\t// Is this the cart page?\n\t\t\tif ( is_cart() )\n\t\t\t\t$css_class .= ' current-menu-item';\n\t\t\t$items .= '<li class=\"' . esc_attr( $css_class ) . '\">';\n\t\t\t\t$items .= '<a class=\"cart-contents\" href=\"' . esc_url( WC()->cart->get_cart_url() ) . '\">';\n\t\t\t\t\t$items .= wp_kses_data( WC()->cart->get_cart_total() ) . ' - <span class=\"count\">' . wp_kses_data( sprintf( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'simple-shop' ), WC()->cart->get_cart_contents_count() ) ) . '</span>';\n\t\t\t\t$items .= '</a>';\n\t\t\t$items .= '</li>';\n\t\t}\n\t\t// Easy Digital Downloads\n\t\telse if ( class_exists( 'Easy_Digital_Downloads' ) ) {\n\t\t\t$css_class = 'menu-item menu-item-type-cart menu-item-type-edd-cart';\n\t\t\t// Is this the cart page?\n\t\t\tif ( edd_is_checkout() )\n\t\t\t\t$css_class .= ' current-menu-item';\n\t\t\t$items .= '<li class=\"' . esc_attr( $css_class ) . '\">';\n\t\t\t\t$items .= '<a class=\"cart-contents\" href=\"' . esc_url( edd_get_checkout_uri() ) . '\">';\n\t\t\t\t\t$items .= wp_kses_data( edd_cart_subtotal() ) . ' - <span class=\"count\">' . wp_kses_data( sprintf( _n( '%d item', '%d items', edd_get_cart_quantity(), 'simple-shop' ), edd_get_cart_quantity() ) ) . '</span>';\n\t\t\t\t$items .= '</a>';\n\t\t\t$items .= '</li>';\n\t\t}\n\t}\n\treturn $items;\n}", "function je_portfolio_menu_item_classes( $classes, $item )\n{\n switch ( get_query_var('post_type') ) {\n // Only run on portfolio post type\n case 'portfolio_item':\n // Remove current_page_parent from Blog menu item\n if( $item->title == 'Blog' ) {\n $classes = array_diff( $classes, array( 'current_page_parent' ) );\n }\n // Add current_page_parent class to the portfolio menu item\n if ( $item->title == 'Books' ) {\n $classes[] = 'current_page_parent';\n }\n break;\n }\n \n return $classes;\n}", "function internal_navigation_item($title, $href) {\n \n // Strip first forward slash (start of string)\n $script = substr($_SERVER['SCRIPT_NAME'], 1);\n \n if ($script === $href) {\n return \"<li><a class='active' href='$href'>$title</a></li>\";\n } else {\n return \"<li><a href='$href'>$title</a></li>\";\n }\n}", "function activatePage($activePage, $currentPage){\n\techo (strcmp($currentPage, $activePage) === 0)? 'active' : '';\n}", "function render_nav_item( \\WP_Post $page ) {\n\n\t$classes = ['NavAccordion_Item'];\n\n\tif ( 'private' === get_post_status( $page->ID ) ) {\n\t\t$classes[] = 'Nav_Item-Private';\n\t}\n\n\tif ( is_nav_item_current( $page ) ) {\n\t\t$classes[] = 'NavAccordion_Item-Active';\n\t}\n\n\tprintf(\n\t\t'<li class=\"%s\"><a href=\"%s\" class=\"NavAccordion_Anchor\">%s</a>',\n\t\tesc_attr( implode( ' ', array_map( 'sanitize_html_class', $classes ) ) ),\n\t\tesc_url( get_permalink( $page->ID ) ),\n\t\tesc_html( $page->post_title )\n\t);\n\n\trender_nav_list( $page->ID );\n\n\techo '</li>';\n}", "function get_navbar($menu) \n{\n\t$html = \"<nav class='navbar'>\\n\";\n\tforeach($menu['items'] as $item) \n\t{\n\t\tif(basename($_SERVER['SCRIPT_FILENAME']) == $item['url'])\n\t\t{\n\t\t\t$item['class'] .= ' selected'; \n\t\t}\n\t\t$html .= \"<p><a href='{$item['url']}' class='{$item['class']}'>{$item['text']}</a>\\n</p>\";\n\t}\n\t$html .= \"</nav>\";\n\treturn $html;\n}", "function my_walker_nav_menu_start_el($item_output, $item, $depth, $args) {\n $classes = implode(' ', $item->classes);\n $item_output = preg_replace('/<a /', '<a class=\"'.$classes.'\"', $item_output, 1);\n return $item_output;\n }", "function isActive($path, $active = 'active nav-active nav-expanded'){\n return call_user_func_array('Request::is', (array)$path) ? $active : '';\n}", "function bimber_bp_followers_nav_current( $nav_menu, $args ) {\n\t$nav_menu = explode( '<li', $nav_menu );\n\tforeach ( $nav_menu as $index => $item ) {\n\t\tif ( 'following' === bp_current_component() && strpos( $item, 'following-personal-li' ) > -1 ) {\n\t\t\t$nav_menu[ $index ] = str_replace( 'g1-tab-item', 'g1-tab-item g1-tab-item-current ', $item );\n\t\t}\n\t\tif ( 'followers' === bp_current_component() && strpos( $item, 'followers-personal-li' ) > -1 ) {\n\t\t\t$nav_menu[ $index ] = str_replace( 'g1-tab-item', 'g1-tab-item g1-tab-item-current', $item );\n\t\t}\n\t}\n\t$nav_menu = implode( '<li', $nav_menu );\n\treturn $nav_menu;\n}", "private function bootstrapNav(?string $item): string {\n return static::coreHtmlElement(\"li\", $item, [\"role\" => \"presentation\"]);\n }", "public static function isActive ( $link )\n {\n echo $_SERVER[ \"REQUEST_URI\" ] == $link ? \"active\" : \"\";\n }", "public function render_navbar($items, $active = NULL) {\n $this->config['type_class'] = 'navbar-nav';\n return $this->render($items, $active); \n }", "function active_link($active)\n {\n return $active ? 'active' : '';\n }", "function updateMenu($navLink)\n{\n // checking if the URI matches the passed in navigation link and if so, \n\t// return class = active which highlights the tab on the navigation bar. \n if (URI == $navLink)\n \t\treturn 'class=\"active\"';\n\n // checking if the navigation link is a substring of the URI and if so, return class = active which highlights \n\t// the tab on the navigation bar. \n // an example of this is index.php?category=none\n\n if (strpos(URI, $navLink) !== false)\n {\n return \"class='active'\";\n }\n}", "function isCurrent($pageName){\n\tglobal $NAV_PAGE;\n\t//If the global matches the argument set as current\n\tif ($NAV_PAGE == $pageName){\n\t\techo \"currentNavItem\";\n\t}\n}", "function setActiveNavTab($path)\n{\n return Request::is($path) ? 'nav-link active' : 'nav-link';\n}", "function activeLink($page){\n\n\t\t/* Compare $page to $_GET */\n\t\tswitch($page){\n\t\tcase 'home':\n\t\t\tif(empty($_GET) || isset($_GET['home'])){\n\t\t\t\techo ' active';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'about';\n\t\t\tif(isset($_GET['about'])){\n\t\t\t\techo ' active';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'recent';\n\t\t\tif(isset($_GET['recent'])){\n\t\t\t\techo ' active';\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "public static function topMenu($current_page, $refer_to = 0){\n\t\t$result = '';\n\t\t$menu = AdminMenu::select('id','title','slug','img','enabled')\n\t\t\t->where('refer_to','=',$refer_to)\n\t\t\t->orderBy('position','asc')\n\t\t\t->get();\n\t\tif(!empty($menu->all())){\n\t\t\t$result .= '<ul class=\"cfix\">';\n\n\t\t\tforeach($menu as $item){\n\t\t\t\t//if current page is equal to menu link -> add class 'active'\n\t\t\t\t$link_active = ($current_page == $item->slug)? 'class=\"active\"': '';\n\n\t\t\t\t$result .= '<li>';\n\t\t\t\tif($item->enabled == 1){\n\t\t\t\t\t$result .= '<a '.$link_active.' href=\"'.asset($item->slug).'\">';\n\t\t\t\t}else{\n\t\t\t\t\t$result .= '<a '.$link_active.' href=\"#\">';\n\t\t\t\t}\n\n\t\t\t\t//if menu item has image\n\t\t\t\t$result .= (!empty($item->img))\n\t\t\t\t\t? '<span class=\"menu-img fa '.$item->img.'\"><strong>'.$item->title.'</strong></span>'\n\t\t\t\t\t: $item->title;\n\t\t\t\t$result .= '</a>';\n\t\t\t\t//check for inner menu elements\n\t\t\t\t$inner_count = AdminMenu::select('id')->where('refer_to','=',$item->id)->count();\n\t\t\t\tif($inner_count > 0){\n\t\t\t\t\t$result .= self::topMenu($current_page, $item->id);\n\t\t\t\t}\n\t\t\t\t$result .= '</li>';\n\t\t\t}\n\n\t\t\t$result .= '</ul>';\n\t\t}\n\t\treturn $result;\n\t}", "function get_primary_nav($active) {\r\n\t\trequire_once('theme_parts/primary_nav.php');\r\n\t}", "public function activate_menu_item($name)\n\t{\n\t\t$this->_active_item = $name;\n\t}", "function custom_nav_menu_css_class( $classes, $item, $args ) {\n\tif ( $args->theme_location == 'main_menu' ) {\n\n//add common class to main menu item\n\t\tif ( $item->menu_item_parent == 0 ) {\n\t\t\tarray_push( $classes, 'header__item' );\n\t\t} else {\n\n//add common class to sub menu item\n\t\t\tarray_push( $classes,'header__submenu-item' );\n\t\t}\n\n\n//add class to item if has sub menu\n\t\tif (in_array('menu-item-has-children', $classes)){\n\t\t\tarray_push( $classes, 'header__submenu-list' );\n\t\t} \n\t}\n\treturn $classes;\n}", "function checkForCurrentPage($pageTitle, $currentLink) {\n if ($pageTitle == $currentLink) {\n echo 'class=\"current\"';\n }\n}", "public function fixMenuClasses($classes, $item)\n {\n if ($item->current_item_ancestor && !in_array('current-menu-ancestor', $classes)) {\n $classes[] = 'current-menu-ancestor';\n }\n if ($item->current_item_parent && !in_array('current-menu-parent', $classes)) {\n $classes[] = 'current-menu-parent';\n }\n return $classes;\n }", "function isActive($route, $className = 'active') {\n if (is_array($route)) {\n return in_array(Route::currentRouteName(), $route) ? $className : '';\n }\n if (Route::currentRouteName() == $route) {\n return $className;\n }\n if (strpos(URL::current(), $route)) {\n return $className;\n }\n }", "public function setMenuActiveItem(MenuItem $item)\n {\n $this->activeItem = $item;\n }", "protected function getTopmenuActiveItem() {\n return 0;\n }", "function start_el(&$output, $page, $depth = 0, $args = array(), $current_page = 0) {\n\n // get currently pretended ID\n global $pretend_id;\n\n // item css classes\n $css_class = array();\n\n if (isset($args['pages_with_children'][$page->ID])) {\n $css_class[] = 'page_item_has_children';\n }\n\n if (!empty($current_page && empty($pretend_id))) {\n $_current_page = get_post($current_page);\n if ($_current_page && in_array( $page->ID, $_current_page->ancestors)) {\n $css_class[] = 'current_page_ancestor';\n }\n if ($page->ID === $current_page) {\n $css_class[] = 'current_page_item';\n } elseif ($_current_page && $page->ID === $_current_page->post_parent) {\n $css_class[] = 'current_page_parent';\n }\n } elseif ($page->ID === get_option('page_for_posts')) {\n $css_class[] = 'current_page_parent';\n } elseif (!empty($pretend_id) && $page->ID === $pretend_id) {\n $css_class[] = 'current_page_item';\n $css_class[] = 'pretend_current_page_item';\n }\n\n $css_classes = implode(' ', apply_filters('page_css_class', $css_class, $page, $depth, $args, $current_page));\n\n // empty title\n if ($page->post_title === '') {\n $page->post_title = '#' . $page->ID;\n }\n\n $args['link_before'] = empty($args['link_before'] ) ? '' : $args['link_before'];\n $args['link_after'] = empty($args['link_after'] ) ? '' : $args['link_after'];\n\n $title = apply_filters( 'the_title', $page->post_title, $page->ID );\n\n $output .= sprintf(\n '<li class=\"%s\"><a href=\"%s\">%s%s%s</a>',\n $css_classes,\n get_permalink( $page->ID ),\n $args['link_before'],\n $title,\n $args['link_after']\n );\n\n // add caret for items with children\n // if ($args['has_children'] == true) {\n // $output .= '<button class=\"caret\">+</button>';\n // }\n\n }", "function get_active_nav($value)\n{\n\treturn ($value === TRUE) ? 'active' : '';\n}", "private function beginning()\n {\n if ($this->current_page - 1 >= 1) {\n return '<li><a href=\"' . ($this->current_page - 1) . '\">«</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">«</a></li>';\n }\n }", "function bounce_tab_innertabs($current = 'connection') {\n $tabs = array(\n 'connection' => __('Settings', WYSIJA),\n 'actions' => __('Actions & Notifications', WYSIJA)\n );\n $html_content = '<h3 id=\"wysija-innertabs\" class=\"nav-tab-wrapper\">';\n foreach ($tabs as $tab => $name) {\n $class = ( $tab == $current ) ? ' nav-tab-active' : '';\n $html_content.= \"<a class='nav-tab$class' href='#$tab'>$name</a>\";\n }\n $html_content.='</h2>';\n return $html_content;\n }", "function check_current_menu($page_name, $current_page) {\n\tif ($page_name === $current_page) return \"current\";\n\telse return \"\";\n}", "function add_specific_menu_location_atts( $atts, $item, $args ) {\n // check if the item is in the primary menu\n if( $args->theme_location == 'top_navigation' ) {\n // add the desired attributes:\n $atts['class'] = 'btn btn-primary';\n }\n return $atts;\n}", "private function _get_nav_text($navitem_name,$active_page)\n {\n $navitem_name = trim(preg_replace('/\\s+/',' ',$navitem_name));# Remove extra whitespace\n $navitem_name = str_replace(' ','_',$navitem_name);# Replace spaces with undescores\n $navitem_name = strtolower($navitem_name);\n \n // * 'Home page ' would now be 'home_page' (CI view naming convention)\n\n $active_page = strtolower($active_page);\n\n return ($navitem_name == $active_page) ? 'active' : '';\n }", "function public_navigation($current_subject, $current_page) {\r\n\t\t$output = \"<ul class=\\\"subjects\\\">\";\r\n\t\t$subject_set = find_all_subjects(true);\r\n\t\t\t// Using returned data (from db query) to create a list of menu_names from the subjects table\r\n\t\t\t// (setting it within the new $subject array)\r\n\r\n\t\twhile($subject = mysqli_fetch_assoc($subject_set)) {\r\n\t\t\t$output .= \"<li\";\r\n\t\t\tif ($current_subject && $subject[\"id\"] == $current_subject[\"id\"]) {\r\n\t\t\t\t$output .= \" class=\\\"selected\\\"\";\r\n\t\t\t}\r\n\t\t\t$output .= \">\";\r\n\t\t\t$output .= \"<a href=\\\"index.php?subject=\";\r\n\t\t\t$output .= urlencode($subject[\"id\"]); \r\n\t\t\t$output .= \"\\\">\";\r\n\t\t\t$output .= htmlentities($subject[\"menu_name\"]);\r\n\t\t\t$output .= \"</a>\";\r\n\t\t\t\r\n\t\t\tif($current_subject[\"id\"] == $subject[\"id\"] || $current_page[\"subject_id\"] == $subject[\"id\"]) {\r\n\t\t\t\t$page_set = find_pages_for_subject($subject[\"id\"]);\r\n\t\t\t\t$output .= \"<ul class=\\\"pages\\\">\";\r\n\t\t\t\twhile($page = mysqli_fetch_assoc($page_set)) {\r\n\t\t\t\t\t$output .= \"<li\";\r\n\t\t\t\t\tif ($current_page && $page[\"id\"] == $current_page[\"id\"]) {\r\n\t\t\t\t\t\t$output .= \" class=\\\"selected\\\"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$output .= \">\";\r\n\t\t\t\t\t$output .= \"<a href=\\\"index.php?page=\";\r\n\t\t\t\t\t$output .= urlencode($page[\"id\"]);\r\n\t\t\t\t\t$output .= \"\\\">\";\r\n\t\t\t\t\t$output .= htmlentities($page[\"menu_name\"]);\r\n\t\t\t\t\t$output .= \"</a>\";\r\n\t\t\t\t\t$output .= \"</li>\"; \r\n\t\t\t\t}\r\n\t\t\t\t$output .= \"</ul>\";\r\n\t\t\t\tmysqli_free_result($page_set);\r\n\t\t\t}\r\n\t\t\t$output .= \"</li>\";\r\n\t\t}\r\n\t\tmysqli_free_result($subject_set);\r\n\t\t$output .= \"</ul>\";\r\n\t\treturn $output;\r\n\t}", "private function PH_PageMenu(){\n $site_menu = self::$xvi_api->GetSiteMenu();\n $page_menu = self::$xvi_api->GetPageMenu();\n \n $menu =\"\";\n foreach($site_menu as $menu_item=>$menu_path) {\n if (strcmp($menu_item,$page_menu[\"item\"])) { /*not selected menu item*/\n $menu .= \"<li><a href=\\\"\".$menu_path.\"\\\"<span></span>\".$menu_item.\"</a></li>\";\n } else { /* it is selected menu*/\n $menu .= \"<li><a class=\\\"sel\\\" href=\\\"\".$menu_path.\"\\\"<span></span>\".$menu_item.\"</a></li>\";\n }\n }\n return $menu;\n }", "function navigation($current_subject, $current_page) {\r\n\t\t$output = \"<ul class=\\\"subjects\\\">\";\r\n\t\t$subject_set = find_all_subjects(false);\r\n\t\t\t// Using returned data (from db query) to create a list of menu_names from the subjects table\r\n\t\t\t// (setting it within the new $subject array)\r\n\r\n\t\twhile($subject = mysqli_fetch_assoc($subject_set)) {\r\n\t\t\t$output .= \"<li\";\r\n\t\t\tif ($current_subject && $subject[\"id\"] == $current_subject[\"id\"]) {\r\n\t\t\t\t$output .= \" class=\\\"selected\\\"\";\r\n\t\t\t}\r\n\t\t\t$output .= \">\";\r\n\t\t\t$output .= \"<a href=\\\"manage_content.php?subject=\";\r\n\t\t\t$output .= urlencode($subject[\"id\"]); \r\n\t\t\t$output .= \"\\\">\";\r\n\t\t\t$output .= htmlentities($subject[\"menu_name\"]);\r\n\t\t\t$output .= \"</a>\";\r\n\t\t\t\r\n\t\t\t$page_set = find_pages_for_subject($subject[\"id\"], false);\r\n\t\t\t$output .= \"<ul class=\\\"pages\\\">\";\r\n\t\t\twhile($page = mysqli_fetch_assoc($page_set)) {\r\n\t\t\t\t$output .= \"<li\";\r\n\t\t\t\tif ($current_page && $page[\"id\"] == $current_page[\"id\"]) {\r\n\t\t\t\t\t$output .= \" class=\\\"selected\\\"\";\r\n\t\t\t\t}\r\n\t\t\t\t$output .= \">\";\r\n\t\t\t\t$output .= \"<a href=\\\"manage_content.php?page=\";\r\n\t\t\t\t$output .= urlencode($page[\"id\"]);\r\n\t\t\t\t$output .= \"\\\">\";\r\n\t\t\t\t$output .= htmlentities($page[\"menu_name\"]);\r\n\t\t\t\t$output .= \"</a>\";\r\n\t\t\t\t$output .= \"</li>\"; \r\n\t\t\t}\r\n\t\t\tmysqli_free_result($page_set);\r\n\t\t\t$output .= \"</ul>\";\r\n\t\t\t$output .= \"</li>\";\r\n\t\t}\r\n\t\tmysqli_free_result($subject_set);\r\n\t\t$output .= \"</ul>\";\r\n\t\treturn $output;\r\n\t}", "function gymfitness_a_class($atts,$item,$args) {\n \n $atts['class'] = 'nav-link pl-3 pr-3';\n \n return $atts;\n}", "function makeLinks($linkArray)\n{\n $myReturn = '';\n\n foreach($linkArray as $url => $text)\n {\n if($url == THIS_PAGE)\n {//selected page - add class reference\n $myReturn .= '<li><a class=\"selected\" href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\n }else{\n $myReturn .= '<li><a href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\n } \n }\n \n return $myReturn; \n}", "function menuPrepareItems(&$items) {\n foreach ($items as &$item) {\n $item['active'] = menuItemIsActive($item['url']) ? 'active' : 'inactive';\n }\n\n return $items;\n}", "function active_menu($controller) {\n\t\t$CI =& get_instance();\n\n\t\t$query = $CI->db->query(\"\n\t\t\tSELECT *\n\t\t\tFROM \tmenu\n\t\t\tWHERE\n\t\t\t\t\tcontroller = '$controller'\n\t\t\");\n\t\t$active_menu = array();\n\t\tif ($query->num_rows()) {\n\t\t\t$active_menu = $query->row_array();\n\t\t}\n\t\treturn $active_menu;\n\t}" ]
[ "0.8341339", "0.8165046", "0.7965421", "0.78872764", "0.78828305", "0.78491735", "0.765666", "0.7469503", "0.7420117", "0.74094", "0.7059026", "0.70317334", "0.70317334", "0.69742525", "0.6833408", "0.6788152", "0.6770765", "0.67653537", "0.6664979", "0.66643363", "0.6645619", "0.6578569", "0.6574365", "0.6541052", "0.65202296", "0.6509247", "0.6431902", "0.6431881", "0.64310735", "0.64249706", "0.6402078", "0.6344278", "0.6303418", "0.6280866", "0.628063", "0.6260495", "0.62208754", "0.6115525", "0.607826", "0.6073614", "0.6063536", "0.6062963", "0.6060073", "0.60596293", "0.60367966", "0.6021067", "0.60139996", "0.60068697", "0.6006592", "0.59634185", "0.5929323", "0.5928766", "0.5790144", "0.5787855", "0.5783641", "0.5735098", "0.57085", "0.56835437", "0.56736714", "0.5639175", "0.5625824", "0.5616018", "0.56108755", "0.5609149", "0.5604775", "0.5586469", "0.55855256", "0.55726254", "0.5567559", "0.55673504", "0.5549553", "0.55247205", "0.549234", "0.54712", "0.54502803", "0.54395056", "0.5439332", "0.5437767", "0.5387961", "0.53515863", "0.53503156", "0.5341132", "0.534069", "0.5325421", "0.53250456", "0.5315711", "0.5298315", "0.5294272", "0.5283252", "0.5282313", "0.5280004", "0.52706087", "0.5266713", "0.52631575", "0.52576935", "0.5249679", "0.5248426", "0.52132803", "0.5210633", "0.52097094" ]
0.78551066
5
echo 'tag id is: '.$tagid;
public static function removeTagFromObject(DatabaseObject $product, $tagid, $seller_type, $userID){ //echo 'product type is: '.$product->product_type; echo 'tag id is: '.$tagid.'<br />'; echo 'seller type is: '.$seller_type.'<br />'; echo 'product id: '.$product->getId();'<br />'; if($seller_type == 'storeSeller'){ echo 'here'; $product->_db->delete('products_tags', array("product_id = '".$product->getId()."'", "tag_id = '".$tagid."'", "User_id = '".$userID."'" )); }elseif($seller_type == 'generalSeller'){ echo 'here2'; $product->_db->delete('user_products_tag', array( "product_id = '".$product->getId()."'", "tag_id = '".$tagid."'", "User_id = '".$userID."'" )); } //echo "here"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BeginTag($str){\r\n echo \"+TAG:\".$str;\r\n}", "function BeginTag($str){\r\n echo \"+TAG:\".$str;\r\n}", "public function getTagId(){\n return $this->tagId;\n }", "function echoTag ($id,$tag,$highlight,$text,$markObjects)\r{\r\t\r\techo \"<span id=$id>\";\r\tif ($markObjects) {\r\t\tif ($tag == 'EVENT') { echo \"<span class=event>\"; } \r\t\telseif ($tag == 'TIMEX3') { echo \"<span class=timex>\"; } \r\t\telse { echo \" <span class=signal>\"; }\r\t}\r\tif ($highlight) { echo '<strong>'; }\r\tif ($id{0} == 'e') { $tagtype = 'event'; }\r\telseif ($id{0} == 't') { $tagtype = 'timex'; }\r\telseif ($id{0} == 's') { $tagtype = 'signal'; }\r\techo \"<span style=\\\"cursor:crosshair\\\" onClick=\\\"MM_goToURL('parent','displayTag.php?tagtype=$tagtype&text=$text')\\\">\";\r\techo $text;\r\techo \"</span>\";\r\tif ($highlight) { echo '</strong>'; }\r\tif ($markObjects) {\r\t\techo '</span><sub>'.$id.'</sub>';\r\t}\r\techo \"</span>\";\r}", "public function tag(): string;", "function getTagId()\n {\n return $this->tagId;\n }", "function tag($id)\n{\n global $app;\n\n $details = $app->calibre->tagDetails($id);\n if (is_null($details)) {\n $app->getLog()->debug(\"no tag\");\n $app->notFound();\n }\n $app->render('tag_detail.html', [\n 'page' => mkPage(getMessageString('tag_details'), 4, 3),\n 'tag' => $details['tag'],\n 'books' => $details['books']]);\n}", "public function getTag(): string;", "public function tagDetails($id);", "function print_debug($content, $tag) {\n $output = '<span style=\"display:none\" id=\"';\n $output .= $tag;\n $output .= '\">';\n print_r($output);\n print_r($content);\n print_r('</span>');\n}", "function get_tag_name( $tag ) {\n $tag_name = get_tag_data( $tag , 'tag_name' );\n return $tag_name;\n}", "public function getTagId() {\n\t\treturn $this->tagId;\n\t}", "public function getTagId()\n {\n return $this->tagId;\n }", "public function get_tag()\n {\n }", "public function getTag()\n {\n return $this->_params['tag'];\n }", "public function getTag()\n\t{\n\t\treturn $this->data['tag'];\n\t}", "public function tag(): string\n {\n return $this->tag;\n }", "function display($tag , $value) {\n echo $tag . $value ;\n }", "public function getTagId() {\n return (int)$this->tag_id;\n }", "function deletetag()\n{\n\t$tag\t\t= \t$_POST['tag'];\n\t\n\t$rs \t= mysql_query (\"SELECT id tagnodes WHERE name=$tag\");\n\t$row \t= mysql_fetch_array($rs);\n\t$id \t= $firstname_row['id'];\n\t\n\tshowSuccessMessage();\n}", "function getTag($tag)\n {\n //print \"getting tag\\n\";\n return $this->_tagDTD->toTagStr($tag);\n }", "protected function get_tag() {\n\t\treturn self::TAG;\n\t}", "public function getTag(): string\n {\n return $this->tag;\n }", "public function getTag()\n {\n }", "private function getTag()\n {\n return $this->tag;\n }", "public function getTag();", "public function getTag();", "public function tag()\n\t{\n\t\treturn $this->tag;\n\t}", "public function tag()\r\n\t{\r\n\t\treturn $this->tag;\r\n\t}", "public function tag()\r\n\t{\r\n\t\treturn $this->tag;\r\n\t}", "public function tag() { return $this->_m_tag; }", "public function tag() { return $this->_m_tag; }", "public function tag() { return $this->_m_tag; }", "public function tag() { return $this->_m_tag; }", "public function tag() { return $this->_m_tag; }", "public function getTagId() : int\n {\n return $this->tagId;\n }", "function addition_tag($con, $tag)\n{\n echo $con ? $tag : \"\";\n}", "function printID()\n {\n echo str_replace(' ', '', $this->position).substr($this->name, 0,2);;\n }", "function getTag(): string\n\t{\n\t\treturn $this->username.\"#\".$this->discriminator;\n\t}", "protected function registerTag(): string\n {\n return 'var';\n }", "function get_tag()\n {\n\t $id = 'id=\"'.$this->OP_[id]->get().'\"';\n\t $name='name=\"'.$this->OP_[name]->get().'\"';\n\t $value='value=\"'.$this->OP_[value]->get().'\"';\n\t $type='type=\"hidden\"';\n\t $my_value = \"<input $id $name $type $value>\";\n\t return $my_value;\n }", "function getSelectedAdTag() {\n\treturn constant($_GET['adTag']);\n}", "function get_tag_link($tag)\n {\n }", "function output_tag($name='',$content='',$attrs='')\n{\n echo tag($name,$content,$attrs);\n}", "function get_tag_id_by_name($tag_name) {\n\tglobal $wpdb;\n\treturn $wpdb->get_var(\"SELECT term_id FROM \".$wpdb->terms.\" WHERE `name` = '\".$tag_name.\"'\");\n}", "function tagName(){\n return 'TAG NAME HERE';\n}", "function output_single_tag($name='', $attrs='')\n{\n echo single_tag($name,$attrs);\n}", "public function getIteneraryTagID()\n {\n return $this->IteneraryTagID;\n }", "function getTagID($tag)\n{\n //Including the access php file\n include(\"access.php\");\n\n //Creating try-catch block to get tag IDs and handling any exceptions.\n try \n {\n $results = $db->prepare(\"SELECT tag_id FROM tags\n WHERE tag = ?\");\n $results->bindValue(1,$tag,PDO::PARAM_STR);\n $results->execute();\n } \n catch (Exception $e)\n {\n //Creating a error message\n echo \"Sorry!, tags IDs weren't found.\";\n exit;\n }\n\n //Returning the results\n return $results->fetch(PDO::FETCH_ASSOC);\n}", "public function getTagline(){\r\n\t\t\treturn $this->tagline;\r\n\t\t}", "public\n\tfunction getTagLabel(): string {\n\t\treturn $this->tagLabel;\n\t}", "public function tagged( $tag );", "public function getTag() {\n return $this->_tag;\n }", "function showDetailsPair($tag, $value) {\n\t/**\n\t* 2016-03-16 INFO: AHH\n\t* Don't use <p> to space because the style sheet changes the color on a p\n\t*/\n\techo \"<div style=\\\"padding-top:20px;\\\">$tag<br />$value</div>\";\n}", "public function show(tag $tag)\n {\n //\n }", "function GetTagName();", "function get_keytagid_data($data)\n\t {\n\t return $this->Tag_process->get_id_by_text($data);\n\t }", "public function getTagIdAction($tag=null)\n {\n $tag = strtolower($tag);\n\n $sql = \"SELECT * FROM mvc_tag WHERE name='\" . $tag . \"'\";\n $all = $this->db->executeFetchAll($sql);\n\n $tagId = $all[0]->id;\n\n return $tagId;\n }", "public function getTag()\n {\n return $this->tag;\n }", "public function getTag()\n {\n return $this->tag;\n }", "public function getTag()\n {\n return $this->tag;\n }", "function doTagStuff(){}", "public function getTag()\n {\n return $this->name;\n }", "public function idAction($tagId = null)\n\t{\n\t\t$tag = $this->tags->find($tagId);\n\t\t$tagName = $tag->tag;\n\t\t\n\t\t$tagsQuestions = $this->tags->getQuestonsWithTag($tagName);\n\t\t\t\n\t\t$this->theme->setTitle(\"Visa tagg\");\n\t\t$this->views->add('stack/view-tags', [\n\t\t\t'tag' => $tag,\n\t\t\t'tagsQuestions' => $tagsQuestions\n\t\t]);\n\n\t}", "public function getTag()\n {\n return $this->get('tag');\n }", "function gettagdata()\n{\n\t$cf = new Fwcore();\n\t\n\t$data = array();\n\t$data['auth_token'] = $_POST['auth_token'];\n\t$data['tag_id'] = $_POST['category_id'];\n $data['api_version'] = $_POST['api_version'];\n\t$data['app_id'] = isset($_POST['app_id']) != '' ? $_POST['app_id'] : '';\n\t$cf->viewProductsTagList($data);\n}", "public function find_tag_by_desc() {\n $tag_desc = $_POST['tag'];\n $srv = new LogService($this->getEntityManager(), $this->app, $this->getUser());\n $tag = $srv->find_tag_by_description($tag_desc);\n $json_tag = json_encode(['id' => $tag['id']]);\n echo $json_tag;\n }", "public function print_tags() {\n\t\tforeach ($this->photo_tags as $tag) {\n\t\t\techo '\n\t\t\t\t<div class=\"caption-tag\">\n\t\t\t\t\t<span class=\"crosshair\">&#127919;</span>';\n\t\t\t// Handle the different levels of completeness for an\n\t\t\techo\n\t\t\t (isset($tag['article']) ? \n\t\t\t '<a href=\"#\" class=\"item\">' . $tag['article'] . '</a>' : '');\n\t\t\techo \n\t\t\t\t(isset($tag['gender']) ?\n\t\t\t\t '<span class=\"seperator\"> - </span>\n\t\t\t\t\t<a href=\"#\" class=\"item\">' . $tag['gender'] . '</a>' : '');\n\t\t\techo\n\t\t\t (isset($tag['brand']) ?\n\t\t\t\t '<span class=\"seperator\"> - </span>\n\t\t\t\t\t<a href=\"#\" class=\"item\">' . $tag['brand'] . '</a>' : '');\n\t\t\techo '</div>';\n\t\t}\n\t}", "public function __toString()\n {\n return $this->tag;\n }", "public static function get_tag_id($tag_name) {\n global $wpdb;\n $query = \"SELECT id FROM XTB_TAGS WHERE name = '{$tag_name}'\";\n return $wpdb->get_var($query);\n }", "public function show($id){\n return Tag::find($id);\n }", "public function getTag($tag){\n\t\tif(is_string($tag)){\n\t\t\t$query = Queries::gettagbyname($tag);\n\t\t}else{\n\t\t\t$query = Queries::gettagbyid($tag);\n\t\t}\n\t\t$singletag = $this->query($query);\n\t\tif(count($singletag)==0)return false;\n\t\treturn $singletag[0];\n\t}", "function printTags(){\n\n\t\t/* Start HTML */\n\t\t$output = '<ul class=\"taglist\">';\n\t\t$tags = explode(',',$this->tags);\n\t\tforeach($tags as $tag){\n\t\t\t$output .= '<li class=\"tag\"><a href=\"#!/search&tags='.urlencode(strtolower(str_replace(' ','',$tag))).'\">'.$tag.'</a></li>';\n\t\t}\n\t\t$output .= '</ul>';\n\n\t\t/* Return HTML */\n\t\treturn $output;\n\t}", "function tag($tag_name, $op, $pref = '', $nl = false, $extra = '')\n{\n echo $pref . '<' ;\n if ($op == 'close') {\n echo '/' ;\n }\n echo $tag_name ;\n if ($extra != '') {\n echo ' ' . $extra ;\n }\n echo '>' ;\n if ($nl == true) {\n NL() ;\n }\n}", "function template_tag_handler( $id = \"\", $pos = \"\", $dload = \"\", $play = \"\", $list = \"\" ) {\n\t\t\t\n\t\t\t$this->putTag_runCount++;\n\t\t\tif ( $this->theSettings['disable_template_tag'] == \"true\" ) { return; }\n\t\t\t\n\t\t\tif ( !empty($id) && !is_numeric($id) ) {\n\t\t\t\t$this->external_call = true;\n\t\t\t\t$shortcodes_return = do_shortcode( $id );\n\t\t\t\t$this->external_call = false;\n\t\t\t}\n\t\t\techo $shortcodes_return;\n\t\t\treturn;\t\t\t\n\t\t}", "function stag($tag=false, $class='', $style='', $id='', $extra='')\n\t{\n\t\tif($tag == false)\n\t\t{\n\t\t\t$tag = $this->default_tag['tag'];\n\t\t\t$class = $this->default_tag['class'];\n\t\t\t$style = $this->default_tag['style'];\n\t\t\t$extra = $this->default_tag['extra'];\n\t\t}\n\t\t$class = ($class != '' ? ' class=\"' . $class . '\"' : '');\n\t\t$style = ($style != '' ? ' style=\"' . $style . '\"' : '');\n\t\t$id = ($id != '' ? ' id=\"' . $id . '\"' : '');\n\t\t$extra = ($extra != '' ? ' ' . $extra : '');\n\t\treturn $this->xecho('<' . $tag . $class . $style . $id . $extra . ' />');\n\t}", "function handle_tag_command($command) {\n $output = '';\n $name = $this->checkAndGet($command, 'name');\n $from = $this->checkAndGet($command, 'from');\n $tagger = $this->checkAndGetAuthor($command, 'tagger');\n $message = $this->checkAndGet($command, 'message');\n\n $output .= sprintf(\"tag %s\\n\", $name);\n $output .= sprintf(\"from %s\\n\", $from);\n $output .= $this->handleAuthor('tagger', $tagger);\n $output .= $this->handleData($message);\n\n return $output;\n }", "function cb2014_print_book_tags( $echo = true ) {\n global $book;\n\n $tags = get_book_tags($book->id);\n\n if ( count($tags) < 1 )\n return;\n\n $i = 0;\n $string = '';\n foreach ( (array) $tags as $tag ) {\n if ( $i++ != 0 )\n $string .= ', ';\n $link = book_tag_url($tag, 0);\n $string .= \"<li><a href='$link' rel='tag'>$tag</a></li>\";\n }\n\n if ( $echo )\n echo $string;\n return $string;\n}", "private function addTag()\n {\n $params = array();\n $params['db_link'] = $this->db;\n $params['ticket_id'] = $_REQUEST['ticket_id'];\n \n $data = array();\n $tagTitle = stripslashes(trim($_REQUEST['tag']));\n $tag = Utils::sanitize($tagTitle);\n \n $Tickets = new Tickets($params);\n $Tickets->addTag($tag, $tagTitle);\n \n echo '[{\"isError\":0, \"message\":\"Successfully added tag\"}]';\n exit;\n }", "function db_get_tag_description($tag)\n{\n $sql = \"SELECT description FROM project_tags where tag=$1\";\n $res = pg_query_params($sql, array($tag));\n return pg_fetch_result($res, 'description');\n}", "function tag_escape($tag_name)\n {\n }", "function tagins($stuffing)\r\n{\r\n\treturn \"<\".$stuffing.\">\";\r\n}", "public function getTag()\n {\n return implode(',', $this->tag);\n }", "function action_attach_tags_print_title() {\n echo '<tr class=\"form-title\">';\n echo '<td colspan=\"2\">';\n echo lang_get( 'tag_attach_long' );\n echo '</td></tr>';\n\t}", "function insertTagToTalent($tagid) {\n\t\t$mysqli = $this->getConnection();\n\t\t$tagid = $mysqli->real_escape_string ( $tagid );\n\t\t$query = \"insert into talent_has_tag(talent_talentid,tag_tagid) values((SELECT talentid FROM talent ORDER BY talentid DESC limit 1),$tagid)\";\n\t\treturn $mysqli->query ( $query );\n\t}", "public function getTid()\n {\n \treturn $this->getParameter('tid');\n }", "public function tagAs($objid, $tag);", "function gtags_group_tags() {\n\techo gtags_get_group_tags();\n}", "function is_valid_tagid($tagid){\n $data = array(\"tag_id\"=>$tagid);\n $status = CallAPI(\"ussd.myfarmnow.com/api/verifytagid\", $data);\n if($status == 1){\n return true;\n }elseif($status == 0){\n return false;\n }else{\n return \" invalid tag number\";\n }\n}", "function get_tag_by_event($event_id) {\n\t\t$data = $this->db->query('SELECT tag_title \n\t\t\t\tFROM tag JOIN event_tag ON(tag.tag_id = event_tag.tag_id)\n\t\t\t\tWHERE event_id='.$event_id.'');\n\t\treturn $data->result();\n\t}", "function get_tag_data( $tag, $key ) {\n if (!empty($tag))\n return $tag->$key;\n else\n echo 'ERROR: There is no data in the tag object.';\n die;\n}", "function get_tag_color( $tag ) {\n $tag_color = get_tag_data( $tag , 'tag_color' );\n return $tag_color;\n}", "public function __toString() {\n return $this->tag();\n }", "public function tagActionGet($id = 0)\n {\n if ($id <= 0 || !is_numeric($id)) {\n return $this->di->get(\"response\")->redirect(\"tags\");\n }\n\n $userControll = new UserControll;\n $currUser = $userControll->hasLoggedInUser($this->di);\n\n if ($currUser == null) {\n return $this->di->get(\"response\")->redirect(\"login\");\n }\n\n $id = (int) $id;\n $postDb = new Post();\n $user = new User();\n $postDb->setDb($this->di->get(\"dbqb\"));\n $user->setDb($this->di->get(\"dbqb\"));\n $postData = $postDb->findPostsForMyTag($id, $this->di);\n $postWithThisTag = $postData[\"data\"];\n $tagName = $postData[\"tagName\"];\n\n $page = $this->di->get(\"page\");\n $viewName = \"anax/v2/tags/spesific\";\n\n $page->add(\n $viewName,\n [\n \"data\" => $postWithThisTag,\n \"tagName\" => $tagName,\n \"usr\" => $user,\n \"postDb\" => $postDb,\n ]\n );\n\n return $page->render([\n \"title\" => \"Tag - $tagName\",\n ]);\n }", "public function show(Tag $tag)\n {\n //\n }", "public function show(Tag $tag)\n {\n //\n }", "public function show(Tag $tag)\n {\n //\n }", "function PrintTitle($article_id, $title_tag)\n\t{\n\t\tif (file_exists('articles/' . $article_id) == false){\n\t\t\techo '<' . $title_tag . '>\"NO ARTICLE\"</' . $title_tag . '>';\n\t\t}else{\n\t\t\t$path = TITLES_FILE;\n\t\t\t$title = GetTitle($path, $article_id);\n\t\t\t$rich_title = '<' . $title_tag . '>\"' . $title . '\"</' . $title_tag . '>';\n\t\t\techo \"$rich_title\";\n\t\t}\n\t}", "public function getTag(): string|null;", "function getTagText($tag)\n{\n include(\"access.php\");\n\n //Using a try-catch block to get user's tag text and handle errors\n try \n {\n $results = $db->prepare(\"SELECT tag FROM tags\n WHERE tag_id = ?\");\n $results->bindValue(1,$tag,PDO::PARAM_INT);\n $results->execute();\n } \n catch (Exception $e)\n {\n //Creating a error message\n echo \"Sorry!, no user's tags text input was found.\";\n exit;\n }\n\n //Returning all the results\n return $results->fetch(PDO::FETCH_ASSOC);\n}", "function tagins($stuffing) {\n return \"<\".$stuffing.\">\";\n }" ]
[ "0.67655367", "0.67655367", "0.66644675", "0.6649347", "0.65769863", "0.65241843", "0.64749473", "0.646469", "0.6405009", "0.63599485", "0.63361174", "0.63018936", "0.6276919", "0.6265715", "0.6254754", "0.6245383", "0.62332416", "0.6213899", "0.62061304", "0.6203094", "0.61648077", "0.6158862", "0.6135285", "0.6128093", "0.60990256", "0.6077324", "0.6077324", "0.6038507", "0.6027609", "0.6027609", "0.5990605", "0.5990605", "0.5990605", "0.5990605", "0.5990605", "0.5982397", "0.597598", "0.59707475", "0.5950214", "0.5940526", "0.5917662", "0.59175456", "0.59175223", "0.59029067", "0.588022", "0.58747715", "0.5869545", "0.58595604", "0.5854896", "0.58247876", "0.58126545", "0.57929397", "0.5787213", "0.5769475", "0.57686764", "0.57622904", "0.5759411", "0.57462645", "0.5739347", "0.5739347", "0.5739347", "0.5724322", "0.5706499", "0.57004786", "0.5694073", "0.56753486", "0.56570077", "0.5631621", "0.56309366", "0.5622947", "0.56170326", "0.561488", "0.5608287", "0.56026036", "0.5592832", "0.55860037", "0.5575647", "0.55747753", "0.55541366", "0.55515593", "0.5545873", "0.5543049", "0.553412", "0.55332595", "0.553296", "0.55234385", "0.55109197", "0.55064946", "0.55051196", "0.5499486", "0.5492589", "0.5491562", "0.54904664", "0.5489209", "0.54834026", "0.54834026", "0.54834026", "0.5472565", "0.5467959", "0.54586786", "0.5448827" ]
0.0
-1
this can set the product status of any uploaded product to anything.
public static function updateProductStatus($db, $productTable, $uploaderID, $productID, $status){ $select = $db->select(); $select->from($productTable,'*') ->where('uploader_id=?', $uploaderID) ->where('product_id=?', $productID); $product = $db->fetchAll($select); if(count($product)==1){ $data = array( 'status'=> ''.$status.'' ); $db->update($productTable, $data, "product_id = '".$productID."' and uploader_id='".$uploaderID."'"); return true; }else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function massStatusAction()\r\n {\r\n $productIds = (array)$this->getRequest()->getParam('product');\r\n $storeId = (int)$this->getRequest()->getParam('store', 0);\r\n $status = (int)$this->getRequest()->getParam('status');\r\n\r\n try {\r\n $this->_validateMassStatus($productIds, $status);\r\n Mage::getSingleton('catalog/product_action')\r\n ->updateAttributes($productIds, array('status' => $status), $storeId);\r\n if(isset($status)){\r\n $importModel = Mage::getModel('imaginato_importexport/import_observer');\r\n $simpleIds = $importModel->getSimples($productIds,'id');\r\n if(!empty($simpleIds) && $status == Mage_Catalog_Model_Product_Status::STATUS_ENABLED){\r\n $skus = $importModel->checkSimpleImage($simpleIds,$storeId);\r\n if(!empty($skus)){\r\n Mage::getSingleton('core/session')->addNotice(\"please check product \". implode(' , ',$skus) . ' no images');\r\n }\r\n }\r\n }\r\n $this->_getSession()->addSuccess(\r\n $this->__('Total of %d record(s) have been updated.', count($productIds))\r\n );\r\n }\r\n catch (Mage_Core_Model_Exception $e) {\r\n $this->_getSession()->addError($e->getMessage());\r\n } catch (Mage_Core_Exception $e) {\r\n $this->_getSession()->addError($e->getMessage());\r\n } catch (Exception $e) {\r\n $this->_getSession()\r\n ->addException($e, $this->__('An error occurred while updating the product(s) status.'));\r\n }\r\n\r\n $this->_redirect('*/*/', array('store'=> $storeId));\r\n }", "function tep_set_product_status($products_id, $status) {\n $OSCOM_Db = Registry::get('Db');\n\n if ($status == '1') {\n return $OSCOM_Db->save('products', [\n 'products_status' => '1',\n 'products_last_modified' => 'now()'\n ], [\n 'products_id' => (int)$products_id\n ]);\n } elseif ($status == '0') {\n return $OSCOM_Db->save('products', [\n 'products_status' => '0',\n 'products_last_modified' => 'now()'\n ], [\n 'products_id' => (int)$products_id\n ]);\n } else {\n return -1;\n }\n }", "public function change_product_status(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\n\t\t\t$product_id = $this->uri->segment(5,0);\r\n\t\t\t$status = ($mode == '0')?'UnPublish':'Publish';\r\n\t\t\t$newdata = array('status' => $status);\r\n\t\t\t$condition = array('id' => $product_id);\r\n\t\t\t$this->product_model->update_details(PRODUCT,$newdata,$condition);\r\n\t\t\t$this->setErrorMessage('success','Product Status Changed Successfully');\r\n\t\t\tredirect('admin/product/display_product_list');\r\n\t\t}\r\n\t}", "function olc_set_product_status($products_id, $status) {\n\tif ($status == '1' || $status == '0') {\n\t\t$status = SQL_UPDATE . TABLE_PRODUCTS . \" set products_status = '\".$status.\"',\n\t\t\tproducts_last_modified = now() where products_id = '\" . $products_id . APOS;\n\t\treturn olc_db_query($status );\n\t} else {\n\t\treturn -1;\n\t}\n}", "public function change_user_product_status(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\n\t\t\t$product_id = $this->uri->segment(5,0);\r\n\t\t\t$status = ($mode == '0')?'UnPublish':'Publish';\r\n\t\t\t$newdata = array('status' => $status);\r\n\t\t\t$condition = array('seller_product_id' => $product_id);\r\n\t\t\t$this->product_model->update_details(USER_PRODUCTS,$newdata,$condition);\r\n\t\t\t$this->setErrorMessage('success','Product Status Changed Successfully');\r\n\t\t\tredirect('admin/product/display_user_product_list');\r\n\t\t}\r\n\t}", "function set_product_status($products_id, $status) {\n\t\tif ($status == '1') {\n\t\t\treturn olc_db_query(\"update \".TABLE_PRODUCTS.\" set products_status = '1', products_last_modified = now() where products_id = '\".$products_id.\"'\");\n\t\t}\n\t\telseif ($status == '0') {\n\t\t\treturn olc_db_query(\"update \".TABLE_PRODUCTS.\" set products_status = '0', products_last_modified = now() where products_id = '\".$products_id.\"'\");\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "function tep_set_product_status($products_id, $status) {\n if ($status == '1') {\n return tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '1', products_last_modified = now() where products_id = '\" . $products_id . \"'\");\n } elseif ($status == '2') {\n return tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '2', products_last_modified = now() where products_id = '\" . $products_id . \"'\");\n } elseif ($status == '0') {\n return tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '0', products_last_modified = now() where products_id = '\" . $products_id . \"'\");\n } elseif ($status == '3') {\n return tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '3', products_last_modified = now() where products_id = '\" . $products_id . \"'\");\n } else {\n return -1;\n }\n}", "public function setEmptyProducts(){\n foreach ($this->products as $i => $product) {\n $counts = $product->variant->maxCounts;\n //print_R($product);\n $allCount=0;\n foreach ($counts as $count){\n $allCount = $allCount+$count->count;\n }\n if($allCount<=0 || $product->variant->status==0 || $product->product->status==0 ){\n $product->status=0;\n $product->save(true);\n }\n if($product->count > $allCount){\n $product->count = $allCount;\n $product->save(true);\n }\n if($product->count==0){\n\n //unset($this->products[$i]);\n //$product->status=0;\n //$product->save(true);\n $this->removeProduct($product->id);\n }\n }\n foreach ($this->emptyProducts as $i => $emptyProduct) {\n $emptyCounts = $emptyProduct->variant->maxCounts;\n $emptyAllCount=0;\n foreach ($emptyCounts as $emptyCount){\n $emptyAllCount = $emptyAllCount+$emptyCount->count;\n }\n if($emptyAllCount>0 && $emptyProduct->variant->status==1 && $emptyProduct->product->status==1){\n $emptyProduct->status=1;\n $emptyProduct->save(true);\n }\n }\n }", "public function productDisableStatus($customerId){\n $productCollections = Mage::getModel ( 'catalog/product' )->getCollection ()->addAttributeToFilter ( 'userid', $customerId)->addAttributeToFilter ( 'type_id', array (\n 'eq' => 'property'\n ) );\n /**\n * Iterating the loop\n */\n foreach ( $productCollections as $product ) {\n /**\n * Get Product Id\n */\n $productId = $product->getEntityId ();\n $data = array (\n 'propertyapproved' => 0,\n 'status' => 0\n );\n $model = Mage::getModel ( 'catalog/product' )->load ( $productId )->addData ( $data );\n $model->setId ( $productId )->save ();\n }\n }", "public function change_product_status_global(){\r\n\r\n\t\tif($_POST['checkboxID']!=''){\r\n\r\n\t\t\tif($_POST['checkboxID']=='0'){\r\n\t\t\t\tredirect('admin/product/add_product_form/0');\r\n\t\t\t}else{\r\n\t\t\t\tredirect('admin/product/add_product_form/'.$_POST['checkboxID']);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tif(count($_POST['checkbox_id']) > 0 && $_POST['statusMode'] != ''){\r\n\t\t\t\t$data = $_POST['checkbox_id'];\r\n\t\t\t\tif (strtolower($_POST['statusMode']) == 'delete'){\r\n\t\t\t\t\tfor ($i=0;$i<count($data);$i++){\r\n\t\t\t\t\t\tif($data[$i] == 'on'){\r\n\t\t\t\t\t\t\tunset($data[$i]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach ($data as $product_id){\r\n\t\t\t\t\t\tif ($product_id!=''){\r\n\t\t\t\t\t\t\t$old_product_details = $this->product_model->get_all_details(PRODUCT,array('id'=>$product_id));\r\n\t\t\t\t\t\t\t$this->update_old_list_values($product_id,array(),$old_product_details);\r\n\t\t\t\t\t\t\t$this->update_user_product_count($old_product_details);\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\t$this->product_model->activeInactiveCommon(PRODUCT,'id');\r\n\t\t\t\tif (strtolower($_POST['statusMode']) == 'delete'){\r\n\t\t\t\t\t$this->setErrorMessage('success','Product records deleted successfully');\r\n\t\t\t\t}else {\r\n\t\t\t\t\t$this->setErrorMessage('success','Product records status changed successfully');\r\n\t\t\t\t}\r\n\t\t\t\tredirect('admin/product/display_product_list');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function change_user_product_status_global(){\r\n\r\n\t\tif(count($_POST['checkbox_id']) > 0 && $_POST['statusMode'] != ''){\r\n\t\t\t$data = $_POST['checkbox_id'];\r\n\t\t\tif (strtolower($_POST['statusMode']) == 'delete'){\r\n\t\t\t\tfor ($i=0;$i<count($data);$i++){\r\n\t\t\t\t\tif($data[$i] == 'on'){\r\n\t\t\t\t\t\tunset($data[$i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tforeach ($data as $product_id){\r\n\t\t\t\t\tif ($product_id!=''){\r\n\t\t\t\t\t\t$old_product_details = $this->product_model->get_all_details(USER_PRODUCTS,array('seller_product_id'=>$product_id));\r\n\t\t\t\t\t\t$this->update_user_created_lists($product_id);\r\n\t\t\t\t\t\t$this->update_user_likes($product_id);\r\n\t\t\t\t\t\t$this->update_user_product_count($old_product_details);\r\n\t\t\t\t\t\t$this->product_model->commonDelete(USER_ACTIVITY,array('activity_id'=>$product_id));\r\n\t\t\t\t\t\t$this->product_model->commonDelete(NOTIFICATIONS,array('activity_id'=>$product_id));\r\n\t\t\t\t\t\t$this->product_model->commonDelete(PRODUCT_COMMENTS,array('product_id'=>$product_id));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->product_model->activeInactiveCommon(USER_PRODUCTS,'seller_product_id');\r\n\t\t\tif (strtolower($_POST['statusMode']) == 'delete'){\r\n\t\t\t\t$this->setErrorMessage('success','Product records deleted successfully');\r\n\t\t\t}else {\r\n\t\t\t\t$this->setErrorMessage('success','Product records status changed successfully');\r\n\t\t\t}\r\n\t\t\tredirect('admin/product/display_user_product_list');\r\n\t\t}\r\n\t}", "public function manageProducts()\r\n {\r\n $multi_submit = $this->getRequest()->getPost('multi_submit');\r\n $entityIds = $this->getRequest()->getParam('id');\r\n $delete = $this->getRequest()->getPost('multi');\r\n /**\r\n * Check if submit buttom submitted.\r\n */\r\n if ($multi_submit) {\r\n if (count($entityIds) > 0 && $delete == 'delete') {\r\n foreach ($entityIds as $entityIdData) {\r\n Mage::register('isSecureArea', true);\r\n Mage::helper('marketplace/marketplace')->deleteProduct($entityIdData);\r\n $this->getRequest()->setPost('id', null);\r\n Mage::unregister('isSecureArea');\r\n }\r\n Mage::getSingleton('core/session')->addSuccess($this->__(\"selected Products are Deleted Successfully\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n\r\n\r\n }\r\n\r\n /*----------------Disable ----------------*/\r\n if (count($entityIds) > 0 && $delete == 'disable') {\r\n $currentStoreId = Mage::app()->getStore()->getStoreId();\r\n Mage::app ()->setCurrentStore ( Mage_Core_Model_App::ADMIN_STORE_ID );\r\n foreach ($entityIds as $entityIdData) {\r\n Mage::register('isSecureArea', true);\r\n Mage::getModel('catalog/product_status')->updateProductStatus($entityIdData, Mage::app()->getStore()->getStoreId() , Mage_Catalog_Model_Product_Status::STATUS_DISABLED);\r\n Mage::unregister('isSecureArea');\r\n $this->getRequest()->setPost('id', null);\r\n }\r\n Mage::app ()->setCurrentStore ( $currentStoreId );\r\n\r\n Mage::getSingleton('core/session')\r\n ->addSuccess($this->__(\"selected Products has been disabled Successfully.\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n }\r\n\r\n if (count($entityIds) == 0 && $delete == 'disable') {\r\n Mage::getSingleton('core/session')->addError($this->__(\"Please select a product to update status\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n }\r\n\r\n /*----------------Disable End----------------*/\r\n\r\n /*----------------Sold Out ----------------*/\r\n if (count($entityIds) > 0 && $delete == 'soldout') {\r\n $currentStoreId = Mage::app()->getStore()->getStoreId();\r\n Mage::app ()->setCurrentStore ( Mage_Core_Model_App::ADMIN_STORE_ID );\r\n foreach ($entityIds as $entityIdData) {\r\n Mage::register('isSecureArea', true);\r\n Mage::helper('marketplace/marketplace')->outOfStock($entityIdData);\r\n Mage::unregister('isSecureArea');\r\n $this->getRequest()->setPost('id', null);\r\n }\r\n Mage::app ()->setCurrentStore ( $currentStoreId );\r\n Mage::getSingleton('core/session')\r\n ->addSuccess($this->__(\"selected Products status has been sold Out Successfully and Un Publish\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n }\r\n\r\n if (count($entityIds) == 0 && $delete == 'soldout') {\r\n Mage::getSingleton('core/session')->addError($this->__(\"Please select a product to update status\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n }\r\n /*--------------------- END -------------------------*/\r\n /*----------------paused ----------------*/\r\n if (count($entityIds) > 0 && $delete == 'paused') {\r\n $currentStoreId = Mage::app()->getStore()->getStoreId();\r\n Mage::app ()->setCurrentStore ( Mage_Core_Model_App::ADMIN_STORE_ID );\r\n foreach ($entityIds as $entityIdData) {\r\n Mage::register('isSecureArea', true);\r\n Mage::helper('marketplace/marketplace')->pausedStock($entityIdData);\r\n Mage::unregister('isSecureArea');\r\n $this->getRequest()->setPost('id', null);\r\n }\r\n Mage::app ()->setCurrentStore ( $currentStoreId );\r\n Mage::getSingleton('core/session')\r\n ->addSuccess($this->__(\"selected Products status has been sold Out Successfully and Un Publish\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n }\r\n\r\n if (count($entityIds) == 0 && $delete == 'paused') {\r\n Mage::getSingleton('core/session')->addError($this->__(\"Please select a product to update status\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n }\r\n /*--------------------- END -------------------------*/\r\n }\r\n $filterPrice = $this->getRequest()->getParam('filter_price');\r\n $filterStatus = $this->getRequest()->getParam('filter_status');\r\n $ProductStatus = $this->getRequest()->getParam('product_status');\r\n $filterId = $this->getRequest()->getParam('filter_id');\r\n $filterName = $this->getRequest()->getParam('filter_name');\r\n $filterQuantity = $this->getRequest()->getParam('filter_quantity');\r\n $filterProductType = $this->getRequest()->getParam('filter_product_type');\r\n $cusId = Mage::getSingleton('customer/session')->getCustomer()->getId();\r\n $products = Mage::getModel('catalog/product')->getCollection();\r\n $products->addAttributeToSelect('*');\r\n $products->addAttributeToFilter('seller_id', array(\r\n 'eq' => $cusId,\r\n ));\r\n\r\n $products = Mage::helper('marketplace/product')->productFilterByAttribute('name', $filterName, $products);\r\n $products = Mage::helper('marketplace/product')->productFilterByAttribute('entity_id', $filterId, $products);\r\n $products = Mage::helper('marketplace/product')->productFilterByAttribute('price', $filterPrice, $products);\r\n $products = Mage::helper('marketplace/product')->productFilterByAttribute('status', $filterStatus, $products);\r\n $products = Mage::helper('marketplace/product')\r\n ->productFilterByAttribute('seller_product_status', $ProductStatus, $products);\r\n\r\n /**\r\n * confirming filter product type is not empty\r\n */\r\n if (!empty ($filterProductType)) {\r\n $products->addAttributeToFilter('type_id', array(\r\n 'eq' => $filterProductType,\r\n ));\r\n }\r\n /**\r\n * Check filter quantity is not equal to empty\r\n */\r\n if ($filterQuantity != '') {\r\n $products->joinField('qty', 'cataloginventory/stock_item', 'qty', 'product_id=entity_id',\r\n '{{table}}.stock_id=1', 'left')->addAttributeToFilter('qty', array(\r\n 'eq' => $filterQuantity,\r\n ));\r\n }\r\n\r\n $products->addAttributeToFilter('visibility', array(\r\n 'eq' => Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,\r\n ));\r\n $products->addAttributeToSort('entity_id', 'DESC');\r\n\r\n return $products;\r\n }", "public function setActive(Request $request){\n $product = Product::findOrFail($request->id);\n $product->update(['status'=>$request->status]);\n Cache::tags('products')->flush();\n Cache::tags('categories')->flush();\n return response()->json($product->status,200);\n }", "public function product_update_post()\n\t\t\t\t{\n\t\t\t\t}", "public static function chnageUploadingProductStatus($optionId)\n {\n /*$query = 'UPDATE `walmart_product` `wp` INNER JOIN `walmart_product_variants` `wpv` on `wp`.`product_id`=`wpv`.`product_id` SET `wp`';*/\n $status = WalmartProductModel::PRODUCT_STATUS_PROCESSING;\n $query = \"UPDATE `walmart_product_variants` `wpv` SET `wpv`.`status`='{$status}' WHERE `wpv`.`option_id`='{$optionId}'\";\n Data::sqlRecords($query, null, 'update');\n }", "protected static function set_status()\n {\n }", "public function product_status_update(Request $request)\n {\n $this->validate($request, [\n \"post_id\" => \"required\",\n \"status\" => \"required\",\n ]);\n\n $product = Product::find($request->post_id);\n if (!empty($product)) {\n $this->removeThisCache($product->slug, $product->id);\n $product->status = $request->status;\n $product->update();\n }\n exit;\n }", "public function unactive_product($product_id) {\n $this->AuthLogin();\n DB::table('tbl_product')->where('product_id',$product_id)->update(['product_status'=> 0]);\n return Redirect::to('all-product');\n }", "function setProduct( $product )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n if ( get_class( $product ) == \"ezproduct\" )\n {\n $this->ProductID = $product->id();\n }\n }", "public function update_status()\n\t{\n\t\t$product_id = $this->input->post('product_id');\n\t\t$data = array('is_active' => $this->input->post('is_active'));\n\n\t\t$update = $this->products->update($product_id, $data);\n\n\t\tif ($update)\n\t\t{\n\t\t\tif ($this->input->post('is_active') == 1)\n\t\t\t{\n\t\t\t\techo 'true';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 'false';\n\t\t\t}\n\t\t}\n\t}", "static function UpdateProductStatus($time)\n\t{\n\t\tif(!($category = DB::select('product_category','code=\\'GL\\'')))\n\t\t{\n\t\t\t$category = array();\n\t\t}\n\t\t$sql = '\n\t\t\t\tselect \n\t\t\t\t\thk_product.code as id, name_'.Portal::language().' as name, price,product_category.code\n\t\t\t\tfrom\n\t\t\t\t\thk_product\n\t\t\t\t\tinner join product_category on hk_product.category_id = product_category.id\n\t\t\t\twhere\n\t\t\t\t\ttype=\\'SERVICE\\' and '.IDStructure::direct_child_cond($category['structure_id']).'\n\t\t\t\t\tand status <> \\'NO_USE\\'\n\t\t\t\torder by\n\t\t\t\t\tproduct_category.structure_id\n\t\t\t';\n\t\t$date = Date_Time::convert_time_to_ora_date($time);\n\t\tif($products = DB::fetch_all($sql)){} else $products = array();\n\t\tforeach($products as $key=>$value)\n\t\t{\n\t\t\t$sql = 'select\n\t\t\t\t\t\tid\n\t\t\t\t\tfrom\n\t\t\t\t\t\thk_product_status\n\t\t\t\t\twhere\n\t\t\t\t\t\ttime = \\''.$date.'\\' \n\t\t\t\t\t\tand product_id = \\''.$key.'\\' \n\t\t\t\t\t\tand from_table = \\'hk_product\\'';\n\t\t\tif(!DB::exists($sql)){\n\t\t\t\t$status['time'] = $date;\n\t\t\t\t$status['product_id'] = $key;\n\t\t\t\t$status['from_table'] = 'hk_product';\n\t\t\t\t$status['status'] = 'avaiable';\n\t\t\t\tDB::insert('hk_product_status',$status);\n\t\t\t}\n\t\t}\n\t}", "public function updateStatus()\n {\n $this->status = Cart::CART_STATUS_ORDERED;\n $this->save();\n }", "public function execute(\\Magento\\Framework\\Event\\Observer $observer)\n {\n $vendor = $observer->getVendor();\n $productCollection = $this->collectionFactory->create()->addAttributeToFilter('vendor_id', $vendor->getId());\n foreach($productCollection as $product){\n $product->setStatus(\\Magento\\Catalog\\Model\\Product\\Attribute\\Source\\Status::STATUS_DISABLED)\n ->getResource()\n ->saveAttribute($product, 'status');\n }\n }", "public function product_image_status_update($product_image_page_url) {\n\t\t$color_image_id = $_REQUEST['cid'];\n\t\tif ($_REQUEST['current_status'] == 'Inactive') {\n\t\t\t$product_image_status = 'Active';\n\t\t} else {\n\t\t\t$product_image_status = 'Inactive';\n\t\t}\n\t\t$this->db->update('product_image_tbl', array('product_image_status' => ($product_image_status)), \"color_image_id='\" . $color_image_id . \"'\");\n\t\t$_SESSION['product_image_msg'] = messagedisplay('product_image\\'s Status is updated successfully', 1);\n\t\theader('location: ' . $product_image_page_url);\n\t\texit();\n\t}", "public function changeStatus(Product $product)\n {\n $product->status = !$product->status;\n $product->save();\n $notification = array(\n 'messege' => 'Product status changed successfully',\n 'alert-type' => 'success'\n );\n return back()->with($notification);\n }", "function statusUpdate($id)\n {\n $product = DB::table('tbl_admin_image')\n ->select('status')\n ->where('id','=',$id)\n ->first();\n\n //Check user status\n if($product->status == '1'){\n $status = '0';\n }else{\n $status = '1';\n }\n\n //update product status\n $values = array('status' => $status );\n DB::table('tbl_admin_image')->where('id',$id)->update($values);\n\n session()->flash('msg','Product status has been updated successfully.');\n return back();\n }", "function setstatus($pr_id, $cloud_status) {\n\t\tswitch ($cloud_status) {\n\t\t\tcase 'new':\n\t\t\t\t$cr_status=1;\n\t\t\t\tbreak;\n\t\t\tcase 'approve':\n\t\t\t\t$cr_status=2;\n\t\t\t\tbreak;\n\t\t\tcase 'active':\n\t\t\t\t$cr_status=3;\n\t\t\t\tbreak;\n\t\t\tcase 'deny':\n\t\t\t\t$cr_status=4;\n\t\t\t\tbreak;\n\t\t\tcase 'deprovision':\n\t\t\t\t$cr_status=5;\n\t\t\t\tbreak;\n\t\t\tcase 'done':\n\t\t\t\t$cr_status=6;\n\t\t\t\tbreak;\n\t\t\tcase 'no-res':\n\t\t\t\t$cr_status=7;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\texit(1);\n\t\t\t\tbreak;\n\t\t}\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"update \".$this->_db_table.\" set pr_status=$cr_status where pr_id=$pr_id\");\n\n\t}", "public function setPending()\n {\n $this->attributes['status'] = 'pending';\n self::save();\n }", "function jx_upd_bulkprodsrcstatus()\r\n\t{\r\n\t\t$user = $this->auth();\r\n\t\t$pid_list = $this->input->post('prod');\r\n\t\t$output = array();\r\n\t\tforeach($pid_list as $pid=>$stat)\r\n\t\t{\r\n\t\t\t$this->db->query(\"update m_product_info set is_sourceable=? where product_id=? and is_sourceable != ? limit 1\",array($stat,$pid,$stat));\r\n\t\t\t$output['status'] = $this->db->affected_rows();\r\n\t\t\tif($output['status'])\r\n\t\t\t{\r\n\t\t\t\t$t_inp=array(\"product_id\"=>$pid,\"is_sourceable\"=>$stat,\"created_on\"=>time(),\"created_by\"=>$user['userid']);\r\n\t\t\t\t$this->db->insert(\"products_src_changelog\",$t_inp);\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$output['status'] = 'success';\r\n\t\t\r\n\t\techo json_encode($output);\r\n\t}", "protected function _fcpoSetOrderStatus() {\n $blIsAmazonPending = $this->_oFcpoHelper->fcpoGetSessionVariable('fcpoAmazonPayOrderIsPending');\n $blOrderOk = $this->_fcpoValidateOrderAgainstProblems();\n\n if ($blIsAmazonPending) {\n $this->_setOrderStatus('PENDING');\n $this->oxorder__oxfolder = new oxField('ORDERFOLDER_PROBLEMS', oxField::T_RAW);\n $this->save();\n } elseif ($blOrderOk === true) {\n // updating order trans status (success status)\n $this->_setOrderStatus('OK');\n } else {\n $this->_setOrderStatus('ERROR');\n }\n }", "function setUsageStatus($opm_productid,$statusid) {\n\n\t\t$this->load->model('approvalstatus_model');\n\t\n\t\tif (checkPerms('can_edit_usage_rights',true)) {\n\t\t\n\t\t\t// fetch status name\n\t\t\t\n\t\t\tif ($statusName = $this->approvalstatus_model->fetchUsageStatus($statusid)) {\n\t\t\t\t\n\t\t\t\t$message = \"Usage rights was changed to \". $statusName .\" by \" . $this->userinfo->username;\n\t\t\t\t\n\t\t\t\tif ($this->products_model->setUsageStatus($opm_productid,$statusid)) {\n\t\t\t\t\n\t\t\t\t\t$this->opm->addHistoryItem($opm_productid,$message);\n\t\t\t\t\n\t\t\t\t\t$this->opm->displayAlert(\"Usage rights has been changed.\",\"/products/view/\" . $opm_productid);\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$this->opm->displayError(\"Error saving status\",\"/products/view/\" . $opm_productid);\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}\t\t\n\t\t\n\t\t}\n\n }", "function setExploitStatus($opm_productid,$statusid) {\n\n\t\t$this->load->model('approvalstatus_model');\n\t\n\t\tif (checkPerms('can_edit_exploit_status',true)) {\n\t\t\n\t\t\t// fetch status name\n\t\t\t\n\t\t\tif ($statusName = $this->approvalstatus_model->fetchExploitStatus($statusid)) {\n\t\t\t\t\n\t\t\t\t$message = \"Exploitation status was changed to \". $statusName .\" by \" . $this->userinfo->username;\n\t\t\t\t\n\t\t\t\tif ($this->products_model->setExploitStatus($opm_productid,$statusid)) {\n\t\t\t\t\n\t\t\t\t\t$this->opm->addHistoryItem($opm_productid,$message);\n\t\t\t\t\n\t\t\t\t\t$this->opm->displayAlert(\"Exploitation status has been changed.\",\"/products/view/\" . $opm_productid);\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$this->opm->displayError(\"Error saving status\",\"/products/view/\" . $opm_productid);\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}\t\t\n\t\t\n\t\t}\n\n }", "public function changeStatus($orderId=null,$status=null){\n $allowedStatuses = ShopCore::$orderStatuses;\n if(!$orderId){\n $orderId = (int)$_POST['id'];\n }\n if(!$status){\n $status = $_POST['status'];\n }\n $order = new DBObject('sr_shop_order',$orderId);\n\n if(!$order->id){\n $this->sendJSON(array('success'=>false,'message'=>'Product not found'));\n }\n if(!$allowedStatuses[$status]){\n $this->sendJSON(array('success'=>false,'message'=>'Product not found'));\n }\n if($order->get('status')==$status){\n $this->get($orderId);\n return;\n }\n switch ($order->get('status')){\n case 'new':\n case 'processing':\n switch($status){\n case 'shipped':\n case 'done':\n // -w\n //-r\n $this->updateWarehouse($orderId,-1,-1);\n if($status=='done' && $order->get('customer_id')!='0'){\n $this->updateDiscount($order->get('customer_id'),$order->get('total'));\n }\n break;\n case 'cancelled':\n //-r\n $this->updateWarehouse($orderId,0,-1);\n break;\n }\n break;\n case 'shipped':\n case 'done':\n if($order->get('status')=='done' && $order->get('customer_id')!='0'){\n $this->updateDiscount($order->get('customer_id'),$order->get('total'),true);\n }\n switch($status){\n case 'new':\n case 'processing':\n // +w\n // +r\n $this->updateWarehouse($orderId,1,1);\n break;\n case 'cancelled':\n //+w\n $this->updateWarehouse($orderId,1,0);\n break;\n }\n break;\n\n case 'cancelled':\n switch($status){\n case 'new':\n case 'processing':\n // +r\n $this->updateWarehouse($orderId,0,1);\n break;\n default:\n if(!$allowedStatuses[$status]){\n $this->sendJSON(array('success'=>false,'message'=>'Action denied'));\n }\n break;\n }\n break;\n }\n $order->set('status',$status);\n $order->save();\n $this->get($orderId);\n }", "public function UpdateProductImport( $product_id, $data ) {\n $product_id = $product_id['row'];\n $load_without_img = (boolean)$this->getSetting( 'foks_img' );\n $languages = $this->getLanguages();\n\n $sql_q = \"UPDATE \" . DB_PREFIX . \"product SET model = '\" . $this->db->escape( $data['model'] ) . \"', \";\n $sql_q .= \"sku = '\" . $this->db->escape( $data['sku'] ) . \"', \";\n $sql_q .= \"quantity = '\" . (int)$data['quantity'] . \"', \";\n $sql_q .= \"minimum = 1, subtract = 1, stock_status_id = 7, \";\n $sql_q .= \"date_available = '\" . $this->db->escape( $data['date_available'] ) . \"', manufacturer_id = '\" . (int)$data['manufacturer_id'] . \"', \";\n $sql_q .= \"shipping = 1, price = '\" . (float)$data['price'] . \"', \";\n $sql_q .= \"status = {$data['status']}, \";\n $sql_q .= \"sort_order = 1, date_modified = NOW() WHERE product_id = '\" . (int)$product_id . \"'\";\n\n $this->db->query( $sql_q );\n\n if ( isset( $data['image'] ) && !empty($data['image'] && !$load_without_img) ) {\n $thumb = $this->imgUrlUpload($data['image'], (int)$product_id);\n\n $this->db->query( \"UPDATE \" . DB_PREFIX . \"product SET image = '\" . $thumb . \"' WHERE product_id = '\" . (int)$product_id . \"'\" );\n }\n\n $this->db->query( \"DELETE FROM \" . DB_PREFIX . \"product_description WHERE product_id = '\" . (int)$product_id . \"'\" );\n $this->db->query( \"DELETE FROM \" . DB_PREFIX . \"product_attribute WHERE product_id = '\" . (int)$product_id . \"'\" );\n\n if ( isset( $data['attributes'] ) && !empty($data['attributes']) ) {\n\n foreach ( $data['attributes'] as $attr_id => $attr_id_val ) {\n\n foreach ( $languages as $lang ) {\n $this->db->query( \"DELETE FROM \" . DB_PREFIX . \"product_attribute WHERE product_id = '\" . (int)$product_id . \"' AND attribute_id = '\" . (int)$attr_id . \"' AND language_id = '\" . (int)$lang . \"'\" );\n }\n\n foreach ( $languages as $lang ) {\n $this->db->query( \"INSERT INTO \" . DB_PREFIX . \"product_attribute SET product_id = '\" . (int)$product_id . \"', attribute_id = '\" . (int)$attr_id . \"', language_id = '\" . (int)$lang . \"', text = '\" . $this->db->escape( $attr_id_val ) . \"'\" );\n }\n\n }\n\n }\n\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_image WHERE product_id = '\" . (int)$product_id . \"'\");\n\n if ( !empty( $data['images'] ) && !$load_without_img ) {\n $im = 1;\n\n foreach ( $data['images'] as $product_image ) {\n $img = $this->imgUrlUpload($product_image, (int)$product_id, true, $im);\n $this->db->query( \"INSERT INTO \" . DB_PREFIX . \"product_image SET product_id = '\" . (int)$product_id . \"', image = '\" . $img. \"', sort_order = '\" . $im . \"'\" );\n $im++;\n }\n }\n\n foreach ( $languages as $lang ) {\n $this->db->query( \"INSERT INTO \" . DB_PREFIX . \"product_description SET product_id = '\" . (int)$product_id . \"', language_id = '\" . (int)$lang . \"', name = '\" . $this->db->escape( $data['name'] ) . \"', description = '\" . $this->db->escape( $data['description'] ) . \"', meta_title = '\" . $this->db->escape( $data['name'] ) . \"', meta_description = '\" . $this->db->escape( $data['description'] ) . \"', meta_keyword = ''\" );\n }\n\n $this->db->query( \"DELETE FROM \" . DB_PREFIX . \"product_to_category WHERE product_id = '\" . (int)$product_id . \"'\" );\n\n if ( isset( $data['category_id'] ) ) {\n $this->db->query( \"INSERT INTO \" . DB_PREFIX . \"product_to_category SET product_id = '\" . (int)$product_id . \"', category_id = '\" . (int)$data['category_id'] . \"'\" );\n }\n\n $this->cache->delete( 'product' );\n\n if ( $this->config->get( 'config_seo_pro' ) ) {\n $this->cache->delete( 'seopro' );\n }\n }", "function jx_upd_prodsrcstatus()\r\n\t{\r\n\t\t$user = $this->auth();\r\n\t\t$pid = $this->input->post('pid');\r\n\t\t$stat = !$this->input->post('stat');\r\n\t\t\r\n\t\t$output = array();\r\n\t\t$this->db->query(\"update m_product_info set is_sourceable=? where product_id=? and is_sourceable != ? limit 1\",array($stat,$pid,$stat));\r\n\t\t$output['status'] = $this->db->affected_rows();\r\n\t\t$t_inp=array(\"product_id\"=>$pid,\"is_sourceable\"=>$stat,\"created_on\"=>time(),\"created_by\"=>$user['userid']);\r\n\t\t$this->db->insert(\"products_src_changelog\",$t_inp);\r\n\t\techo json_encode($output);\r\n\t}", "public function save($product, array $data, $status)\n {\n // $product->style_id = isset($data['style_id']) ?: null;\n // $product->a_id = isset($data['a_id']) ?: null;\n // $product->b_id = isset($data['b_id']) ?: null;\n // $product->brand_id = isset($data['brand_id']) ?: null;\n // $product->cad_id = isset($data['cad_id']) ?: null;\n // $product->file_id = isset($data['file_id']) ?: null;\n // $product->fee = isset($data['fee']) ?: null;\n // $product->introduction = isset($data['introduction']) ?: null;\n\n\n if(isset($data['product_no']))\n {\n $product->product_no = $data['product_no'];\n }\n \n if(isset($data['style_id']))\n {\n $product->style_id = $data['style_id'];\n }\n \n if(isset($data['a_id']))\n {\n $product->a_id = $data['a_id'];\n }\n \n if(isset($data['b_id']))\n {\n $product->b_id = $data['b_id'];\n }\n \n if(isset($data['brand_id']))\n {\n $product->brand_id = $data['brand_id'];\n }\n \n if(isset($data['cad_id']))\n {\n $product->cad_id = $data['cad_id'];\n }\n \n if(isset($data['file_id']))\n {\n $product->file_id = $data['file_id'];\n }\n \n if(isset($data['fee']))\n {\n $product->fee = $data['fee'];\n }\n \n if(isset($data['introduction']))\n {\n $product->introduction = $data['introduction'];\n }\n \n if(isset($data['images']))\n {\n $images = explode(',',$data['images']);\n $product->image_count = count($images);\n }\n\n $product->status_no = $status;\n $product->zip_path = null;\n $product->save();\n\n return $product;\n }", "function setSyncItemsCodeProduct()\n {\n }", "public function setProductApproval($productApproval, $product, $productData, $productId) {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n $product = $objectManager->create ( 'Magento\\Catalog\\Model\\Product' )->load ( $productId );\n if ($productApproval == 1) {\n $product->setStatus ( 1 );\n $product->setProductApproval(1);\n \n } else {\n $product->setProductApproval ( 0 );\n $product->setStatus(2);\n }\n \n $product->save();\n }", "public function testUpdateProductUsingPOST()\n {\n }", "protected function _beforeSave()\r\n {\r\n \t// invoke the parent method\r\n \tparent::_beforeSave();\r\n // check the product type (has to be a package product)\r\n $typeInstance = $this->getTypeInstance(true);\r\n // check if a ID is available, if not the package is new\r\n if ($this->getId() == 0 &&\r\n $typeInstance instanceof Faett_Package_Model_Product_Type) {\r\n $this->_isNew = true;\r\n $this->setHasOptions(1);\r\n }\r\n }", "public function updateProduct(request $request)\n { \n $data = $request->all();\n if(!empty($data['store_id']))\n {\n $storeId = $data['store_id'];\n $item = (object)$data;\n $checkProduct = StoreProduct::where(['product_id' => $item->id,'store_id' => $storeId])->first();\n\n $productData = [\n \"product_id\" => $item->id,\n \"store_id\" => $storeId,\n \"title\" => $item->title,\n \"vendor\" => $item->vendor,\n \"product_type\" => $item->product_type,\n \"handle\" => $item->handle,\n \"tags\" => $item->tags,\n \"published_scope\" => $item->published_scope,\n ];\n if($checkProduct) \n {\n StoreProduct::where(['product_id'=>$item->id])->update($productData);\n $storeProductsId = $checkProduct->id;\n }\n else\n {\n $responseModel = StoreProduct::create($productData);\n $storeProductsId = $responseModel->id;\n } \n \n /*\n * Update product images\n */ \n foreach ($item->variants as $items) \n { \n $items = (object)$items;\n\n $poductVariantData = [ \n \"store_products_id\" => $storeProductsId,\n \"store_id\" => $storeId,\n \"variant_id\" => $items->id,\n \"product_id\" => $items->product_id,\n \"title\" => $items->title,\n \"price\" => $items->price,\n \"compare_at_price\" => $items->compare_at_price,\n \"sku\" => $items->sku,\n \"position\" => $items->position,\n \"fulfillment_service\" => $items->fulfillment_service,\n \"inventory_management\"=> $items->inventory_management,\n \"inventory_quantity\" => $items->inventory_quantity,\n \"option1\" => $items->option1,\n \"option2\" => $items->option2,\n \"option3\" => $items->option3,\n \"image_id\" => $items->image_id,\n ];\n\n $checkVariant = StoreProductVariants::where(['product_id' => $item->id,'variant_id' => $items->id])->first();\n\n if($checkProduct) \n {\n StoreProductVariants::where(['variant_id'=>$items->id])->update($poductVariantData);\n }\n else\n {\n StoreProductVariants::create($poductVariantData);\n } \n }\n\n /*\n * Update product images\n */ \n foreach ($item->images as $itemimg) \n { \n $itemimg = (object)$itemimg;\n $post_data_image = [\n \"store_products_id\" => $storeProductsId,\n \"store_id\" => $storeId,\n \"image_id\" => $itemimg->id,\n \"product_id\" => $itemimg->product_id,\n \"src\" => $itemimg->src,\n \"alt\" => $itemimg->alt,\n \"position\" => $itemimg->position,\n ];\n\n $checkVariant = StoreProductImages::where(['product_id' => $item->id,'image_id' => $items->id])->first();\n\n if($checkProduct) \n {\n StoreProductImages::where(['image_id'=>$items->id])->update($post_data_image);\n }\n else\n {\n StoreProductImages::create($post_data_image);\n } \n }\n return response()->json(['status' =>true, 'message' =>'Data import','data' =>\"got product\"]); \n }\n else\n {\n return response()->json(['status' =>true, 'message' =>'Data not found','data'=>[]]);\n }\n }", "private function updateProductVariants($params)\n {\n if ($params['variants']) {\n foreach ($params['variants'] as $productParams) {\n $product = Product::find($productParams['id']);\n $product->update($productParams);\n\n $product->status = $params['status'];\n $product->save();\n\n ProductInventory::updateOrCreate(['product_id' => $product->id], ['qty' => $productParams['qty']]);\n }\n }\n }", "public function deleteProduct(){\n if($_POST['action'] != 'deleteProduct'){\n echo json_encode(['success' => false]);\n return false;\n }\n $model = parent::model('UpdateProductModel');\n $id = $_POST['id'];\n $name = $model->getProductById($id)->name;\n $deleteProduct = $model->deleteProduct($id);\n // var_dump($deleteProduct);die;\n if(!$deleteProduct){\n $deleteStatus = $model->deleteProductStatus($id);\n if($deleteStatus){\n echo json_encode([\n 'id' => $id,\n 'name' => $name,\n 'action' => 'updateStatus',\n 'success' => true,\n 'message' => \"Product name have include in bill, CAN'T DELETE PERMANENTLY, DataBase have updated 'PRODUCT STATUS' to DELETED ( not able to use anymore )\"\n ]);\n }else{\n echo json_encode([\n 'action' => 'updateStatus',\n 'success' => false,\n 'message' => \"there is an error, can't not update status deleted !\"\n ]);\n }\n }else{\n echo json_encode([\n 'id' => $id,\n 'name' => $name,\n 'action' => 'deletePermanently',\n 'success' => true\n ]);\n\n }\n \n }", "public function will_fail_with_a_404_if_product_we_want_to_update_not_found()\n {\n $response = $this->actingAs($this->create('User', [], false), 'api')->json('PUT', 'api/products/-1');\n\n $response->assertStatus(404);\n }", "public function beforeSave()\n {\n if ($this->getStatus() == null) {\n $this->setStatus(self::STATUS_NEW);\n }\n }", "function pafd_action_save_status() {\n\n\tif ( 'pa_file' == K::get_var( 'post_type', $_POST ) ) {\n\n\t\tglobal $post;\n\n\t\t$nonce = K::get_var( 'pafd-status-nonce', $_POST );\n\t\t$action = 'pafd_save_status';\n\t\t$status = (int) K::get_var( 'pafd-status', $_POST);\n\n\t\t// Check nonce\n\t\tif ( ! wp_verify_nonce( $nonce, $action ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ignore autosave\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Save the status\n\t\twp_set_object_terms( $post->ID, $status, 'pafd_status' );\n\t}\n}", "private function completeImportProduct()\n {\n if (!empty($this->data['new_features'])) {\n $feature_types_model = $this->getModel('typeFeatures');\n /**\n * @var shopTypeFeaturesModel $feature_types_model\n */\n foreach ($this->data['new_features'] as $feature) {\n if (!empty($feature['types'])) {\n $feature_types_model->updateByFeature($feature['id'], $feature['types'], false);\n }\n }\n }\n $this->fixSkuName();\n }", "public function processSave() {\n\t\t\t//set == 0 for edit existing product\n\t\t\t//when produc has been added then by deafult its not active\n\t\t\tglobal $currentIndex;\n\t\t\t$currentindex = $currentIndex;\n\t\t\t\n\t\t\t$is_proceess = Tools::getValue('set');\n\t\t\t\n\t\t\t$product_name = Tools::getValue('product_name');\n\t\t\t$product_price = Tools::getValue('product_price');\n\t\t\t$product_quantity = Tools::getValue('product_quantity');\n\t\t\t$product_description = Tools::getValue('product_description');\n\t\t\t$product_category = Tools::getValue('product_category');\n\t\t\t$short_description = Tools::getValue('short_description');\n\t\t\t\n\t\t\tif($product_name=='') {\n\t\t\t\t$this->errors[] = Tools::displayError('Product name is requried field.');\n\t\t\t} else {\n\t\t\t\t$is_valid_name = Validate::isGenericName($product_name);\n\t\t\t\tif(!$is_valid_name) {\n\t\t\t\t\t$this->errors[] = Tools::displayError($this->l('Product name must not have Invalid characters <>;=#{}'));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($product_price=='') {\n\t\t\t\t$this->errors[] = Tools::displayError('Product price is requried field.');\n\t\t\t} else {\n\t\t\t\tif(!is_numeric($product_price)) {\n\t\t\t\t\t$this->errors[] = Tools::displayError('Product price is should be numeric.');\n\t\t\t\t} else if($product_price<=0) {\n\t\t\t\t\t$this->errors[] = Tools::displayError('Product price is should be greater than 0.');\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\tif($product_quantity=='') {\n\t\t\t\t$this->errors[] = Tools::displayError('Product quantity requried field.');\n\t\t\t} else {\n\t\t\t\t$product_quantity = (int)$product_quantity;\n\t\t\t\tif(!is_int($product_quantity)) {\n\t\t\t\t\t$this->errors[] = Tools::displayError('Product quantity should be integer.'.$product_quantity);\n\t\t\t\t} else if($product_quantity<=0) {\n\t\t\t\t\t$this->errors[] = Tools::displayError('Product quantity should be greater than 0.');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($product_category == false){\n\t\t\t\t$this->errors[] = Tools::displayError('Please select atleast one category.');\n\t\t\t}\n\t\t\t\n\t\t\tif($is_proceess==1) {\n\t\t\t\tif (empty($this->errors)) {\n\t\t\t\t\t$customer_id = Tools::getValue('shop_customer');\n\t\t\t\t\t$obj_seller_product = new SellerProductDetail();\n\t\t\t\t\t$obj_mp_shop = new MarketplaceShop();\n\t\t\t\t\t$marketplace_shop = $obj_mp_shop->getMarketPlaceShopInfoByCustomerId($customer_id);\n\t\t\t\t\t\n\t\t\t\t\t$id_shop = $marketplace_shop['id'];\n\t\t\t\t\t$id_seller = MarketplaceShop::findMpSellerIdByShopId($id_shop);\n\t\t\t\t\t\n\t\t\t\t\t$obj_seller_product->id_seller = $id_seller;\n\t\t\t\t\t$obj_seller_product->price = $product_price;\n\t\t\t\t\t$obj_seller_product->quantity = $product_quantity;\n\t\t\t\t\t$obj_seller_product->product_name = $product_name;\n\t\t\t\t\t$obj_seller_product->description = $product_description;\n\t\t\t\t\t$obj_seller_product->short_description = $short_description;\n\t\t\t\t\t$obj_seller_product->id_category = $product_category[0];\n\t\t\t\t\t$obj_seller_product->ps_id_shop = $this->context->shop->id;\n\t\t\t\t\t$obj_seller_product->id_shop = $id_shop;\n\t\t\t\t\t$obj_seller_product->save();\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t$seller_product_id = $obj_seller_product->id;\n\t\t\t\t\t\n\t\t\t\t\t//Add into category table\n\t\t\t\t\t$obj_seller_product_category = new SellerProductCategory();\n\t\t\t\t\t$obj_seller_product_category->id_seller_product = $seller_product_id;\n\t\t\t\t\t$obj_seller_product_category->is_default = 1;\n\t\t\t\t\t$i=0;\n\t\t\t\t\tforeach($product_category as $p_category){\n\t\t\t\t\t\t$obj_seller_product_category->id_category = $p_category;\n\t\t\t\t\t\tif($i != 0)\n\t\t\t\t\t\t\t$obj_seller_product_category->is_default = 0;\n\t\t\t\t\t\t$obj_seller_product_category->add();\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\t//Close\n\t\t\t\t\t\n\t\t\t\t\t$address = \"../modules/marketplace/img/product_img/\";\n\t\t\t\t\t\n\t\t\t\t\tif(isset($_FILES['product_image'])) {\n\t\t\t\t\t\t$length = 6;\n\t\t\t\t\t\t$characters= \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\t\t\t\t\t\t$u_id= \"\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor ($p=0;$p<$length;$p++) {\n\t\t\t\t\t\t\t$u_id= $u_id.$characters[mt_rand(0, strlen($characters))];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($_FILES['product_image']['size']>0) {\n\t\t\t\t\t\t\t$result1 = Db::getInstance()->insert(\n\t\t\t\t\t\t\t\t\t\t\t\t'marketplace_product_image', array(\n\t\t\t\t\t\t\t\t\t\t\t\t'seller_product_id' => (int) $seller_product_id,\n\t\t\t\t\t\t\t\t\t\t\t\t'seller_product_image_id' => pSQL($u_id)\n\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t$image_name = $u_id . \".jpg\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmove_uploaded_file($_FILES[\"product_image\"][\"tmp_name\"],$address.$image_name);\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\tif(isset($_FILES['images'])) {\n\t\t\t\t\t\t$other_images = $_FILES[\"images\"]['tmp_name'];\n\t\t\t\t\t\t$count = count($other_images);\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$count = 0;\n\t\t\t\t\t}\t\t\n\t\t\t\t\t\n\t\t\t\t\tfor ($i = 0; $i < $count; $i++) {\n\t\t\t\t\t\t$length = 6;\n\t\t\t\t\t\t$characters = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\t\t\t\t\t\t$u_other_id = \"\";\n\t\t\t\t\t\tfor ($p = 0; $p < $length; $p++) {\n\t\t\t\t\t\t\t$u_other_id .= $characters[mt_rand(0, strlen($characters))];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$result2 = Db::getInstance()->insert('marketplace_product_image', array(\n\t\t\t\t\t\t\t'seller_product_id' => (int) $seller_product_id,\n\t\t\t\t\t\t\t'seller_product_image_id' => pSQL($u_other_id)\n\t\t\t\t\t\t));\n\t\t\t\t\t\t$image_name = $u_other_id . \".jpg\";\n\t\t\t\t\t\t$address = \"../modules/marketplace/img/product_img/\";\n\t\t\t\t\t\tmove_uploaded_file($other_images[$i], $address . $image_name);\n\t\t\t\t\t}\n\t\t\t\t\tHook::exec('actionAddproductExtrafield', array('marketplace_product_id' => $seller_product_id));\n\t\t\t\t\tTools::redirectAdmin($currentIndex.'&conf=4&token='.$this->token);\n\t\t\t\t} else {\n\t\t\t\t\t$this->display = 'add';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (empty($this->errors)) {\n\t\t\t\t\t$id = Tools::getValue('market_place_product_id');\n\t\t\t\t\t$obj_seller_product = new SellerProductDetail($id);\n\t\t\t\t\t\n\t\t\t\t\t$obj_seller_product->price = $product_price;\n\t\t\t\t\t$obj_seller_product->quantity = $product_quantity;\n\t\t\t\t\t$obj_seller_product->product_name = $product_name;\n\t\t\t\t\t$obj_seller_product->description = $product_description;\n\t\t\t\t\t$obj_seller_product->short_description = $short_description;\n\t\t\t\t\t$obj_seller_product->id_category = $product_category[0];\n\t\t\t\t\t//save category\n\t\t\t\t\t$obj_seller_product->save();\n\n\t\t\t\t\t//Update new categories\n\t\t\t\t\tDb::getInstance()->delete('marketplace_seller_product_category','id_seller_product = '.$id); //Delete previous\n\t\t\t\t\t//Add new category into table\n\t\t\t\t\t$obj_seller_product_category = new SellerProductCategory();\n\t\t\t\t\t$obj_seller_product_category->id_seller_product = $id;\n\t\t\t\t\t$obj_seller_product_category->is_default = 1;\n\t\t\t\t\t$i=0;\n\t\t\t\t\tforeach($product_category as $p_category){\n\t\t\t\t\t\t$obj_seller_product_category->id_category = $p_category;\n\t\t\t\t\t\tif($i != 0)\n\t\t\t\t\t\t\t$obj_seller_product_category->is_default = 0;\n\t\t\t\t\t\t$obj_seller_product_category->add();\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\t//Update Close\n\t\t\t\t\t\n\t\t\t\t\t$is_active = $obj_seller_product->active;\n\t\t\t\t\t\n\t\t\t\t\tif($is_active == 1){\n\t\t\t\t\t\t$obj_mpshop_pro = new MarketplaceShopProduct();\n\t\t\t\t\t\t$product_deatil = $obj_mpshop_pro->findMainProductIdByMppId($id);\n\t\t\t\t\t\t$main_product_id = $product_deatil['id_product'];\n\t\t\t\t\t\tif(isset($_FILES['product_image']) && $_FILES['product_image'][\"tmp_name\"]!='') {\n\t\t\t\t\t\t\t$seller_product_image=$_FILES['product_image'];\n\t\t\t\t\t\t\t$length = 6;\n\t\t\t\t\t\t\t$characters = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\t\t\t\t\t\t\t$u_id = \"\"; \n\t\t\t\t\t\t\tfor ($p =0;$p<$length;$p++) {\n\t\t\t\t\t\t\t\t$u_id .= $characters[mt_rand(0, strlen($characters))];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$image_name =$u_id.\".jpg\";\n\t\t\t\t\t\t\t$address = \"../modules/marketplace/img/product_img/\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (move_uploaded_file($_FILES[\"product_image\"][\"tmp_name\"], $address.$image_name)) {\n\t\t\t\t\t\t\t\t$insert = Db::getInstance()->insert('marketplace_product_image',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'seller_product_id' =>(int)$id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'seller_product_image_id' =>pSQL($u_id),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'active' =>0,\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\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\t$image_dir = '../modules/marketplace/img/product_img';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$is_update = $obj_seller_product->updatePsProductByMarketplaceProduct($id, $image_dir,1,$main_product_id);\n\t\t\t\t\t}\n\t\t\t\t\telse if($is_active == 0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif(isset($_FILES['product_image']) && $_FILES['product_image'][\"tmp_name\"]!='') {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$seller_product_image=$_FILES['product_image'];\n\t\t\t\t\t\t\t$length = 6;\n\t\t\t\t\t\t\t$characters = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\t\t\t\t\t\t\t$u_id = \"\"; \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tfor ($p =0;$p<$length;$p++) {\n\t\t\t\t\t\t\t\t\t$u_id .= $characters[mt_rand(0, strlen($characters))];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$image_name =$u_id.\".jpg\";\n\t\t\t\t\t\t\t$address = \"../modules/marketplace/img/product_img/\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$result1=Db::getInstance()->insert('marketplace_product_image', array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'seller_product_id' =>(int)$id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'seller_product_image_id' =>pSQL($u_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmove_uploaded_file($_FILES[\"product_image\"][\"tmp_name\"],$address.$image_name);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tHook::exec('actionUpdateproductExtrafield', array('marketplace_product_id' =>Tools::getValue('market_place_product_id')));\n\t\t\t\t\tTools::redirectAdmin($currentIndex.'&conf=4&token='.$this->token);\n\t\t\t\t} else {\n\t\t\t\t\t$this->display = 'edit';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function update_product_inventory()\n\t{\n\t\t/* Prepare statement */\n\t\tif (!$stmt_product_info = $this->mysqli->prepare('SELECT \n\t\tproduct.out_of_stock,\n\t\tproduct.out_of_stock_enabled,\n\t\tIF(product_variant.id IS NOT NULL,product_variant.qty,product.qty) AS qty\n\t\tFROM\n\t\tproduct \n\t\tLEFT JOIN\n\t\tproduct_variant\n\t\tON\n\t\t(product.id = product_variant.id_product AND product_variant.id = ?)\n\t\tWHERE\n\t\tproduct.id = ?\t\t\n\t\tAND\n\t\tproduct.track_inventory=1\n\t\tLIMIT 1')) throw new Exception('An error occured while trying to prepare get product track inventory info statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\n\t\t/* Prepare statement */\n\t\tif (!$stmt_upd_product_variant = $this->mysqli->prepare('UPDATE \n\t\tproduct_variant \n\t\tSET\n\t\tqty = ?,\n\t\tactive = ?\n\t\tWHERE\n\t\tid = ?')) throw new Exception('An error occured while trying to prepare update product variant qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\t\t\n\t\t/* Prepare statement */\n\t\tif (!$stmt_upd_product = $this->mysqli->prepare('UPDATE \n\t\tproduct\n\t\tSET\n\t\tqty = ?,\n\t\tactive = ?\n\t\tWHERE\n\t\tid = ?')) throw new Exception('An error occured while trying to prepare update product qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\n\t\t\n\t\t/* Prepare statement */\n\t\tif (!$stmt_option_info = $this->mysqli->prepare('SELECT \n\t\tout_of_stock\n\t\tFROM\n\t\toptions\n\t\tWHERE\n\t\tid = ?\n\t\tAND\n\t\ttrack_inventory=1\n\t\tLIMIT 1')) throw new Exception('An error occured while trying to prepare get options track inventory info.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\n\t\t\n\t\t/* Prepare statement */\n\t\tif (!$stmt_upd_option = $this->mysqli->prepare('UPDATE \n\t\toptions\n\t\tSET\n\t\tqty = IF(qty <= ?,0,qty - ?)\n\t\tWHERE\n\t\tid = ?')) throw new Exception('An error occured while trying to prepare update options qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\t\t\n\t\t$products = $this->get_products();\t\t\t\t\n foreach ($products as $row_product) {\n // Update Sub_product ELSE Update Product\n\t\t\tif (sizeof($row_product['sub_products'])) {\n foreach ($row_product['sub_products'] as $row_sub_product) {\n\t\t\t\t\t// sub product qty multipled by parent product qty\n\t\t\t\t\t$qty = $row_product['qty']*$row_sub_product['qty'];\n\t\t\t\t\t\n\t\t\t\t\tif (!$stmt_product_info->bind_param(\"ii\",$row_sub_product['id_product_variant'], $row_sub_product['id_product'])) throw new Exception('An error occured while trying to bind params to get product info statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\n\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t$stmt_product_info->execute();\n\t\t\t\t\t\n\t\t\t\t\t/* store result */\n\t\t\t\t\t$stmt_product_info->store_result();\t\t\n\t\t\t\t\t\n\t\t\t\t\tif ($stmt_product_info->num_rows) {\t\t\t\t\n\t\t\t\t\t\t/* bind result variables */\n\t\t\t\t\t\t$stmt_product_info->bind_result($out_of_stock,$out_of_stock_enabled,$qty_remaining);\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$stmt_product_info->fetch();\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$qty_in_stock = $qty_remaining-$qty;\n\t\t\t\t\t\tif ($qty_in_stock < 0) $qty_in_stock = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$active = $out_of_stock_enabled && $qty_in_stock == $out_of_stock ? 0:1;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($row_sub_product['id_product_variant']){\n\t\t\t\t\t\t\tif (!$stmt_upd_product_variant->bind_param(\"iii\", $qty_in_stock, $active,$row_sub_product['id_product_variant'])) throw new Exception('An error occured while trying to bind params to update product variant qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\t\tif (!$stmt_upd_product_variant->execute()) throw new Exception('An error occured while trying to update product variant qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif (!$stmt_upd_product->bind_param(\"iii\", $qty_in_stock, $active,$row_sub_product['id_product'])) throw new Exception('An error occured while trying to bind params to update product qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\t\tif (!$stmt_upd_product->execute()) throw new Exception('An error occured while trying to update product qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n }\n }else{\n\t\t\t\t// product qty\n\t\t\t\t$qty = $row_product['qty'];\n\t\t\t\t\n\t\t\t\tif (!$stmt_product_info->bind_param(\"ii\", $row_product['id_product_variant'], $row_product['id_product'])) throw new Exception('An error occured while trying to bind params to get product info statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\n\t\t\t\t/* Execute the statement */\n\t\t\t\t$stmt_product_info->execute();\n\t\t\t\t\n\t\t\t\t/* store result */\n\t\t\t\t$stmt_product_info->store_result();\t\t\n\t\t\t\t\n\t\t\t\tif ($stmt_product_info->num_rows) {\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\t\t\t/* bind result variables */\n\t\t\t\t\t$stmt_product_info->bind_result($out_of_stock,$out_of_stock_enabled, $qty_remaining);\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$stmt_product_info->fetch();\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$qty_in_stock = $qty_remaining-$qty;\n\t\t\t\t\tif ($qty_in_stock < 0) $qty_in_stock = 0;\n\t\t\t\t\t\n\t\t\t\t\t$active = $out_of_stock_enabled && $qty_in_stock == $out_of_stock ? 0:1;\n\t\t\t\t\t\n\t\t\t\t\tif($row_product['id_product_variant']){\n\t\t\t\t\t\tif (!$stmt_upd_product_variant->bind_param(\"iii\", $qty_in_stock, $active,$row_product['id_product_variant'])) throw new Exception('An error occured while trying to bind params to update product variant qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\tif (!$stmt_upd_product_variant->execute()) throw new Exception('An error occured while trying to update product variant qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif (!$stmt_upd_product->bind_param(\"iii\",$qty_in_stock, $active,$row_product['id_product'])) throw new Exception('An error occured while trying to bind params to update product qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\tif (!$stmt_upd_product->execute()) throw new Exception('An error occured while trying to update product qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n // Update Options\n\t\t\tif(sizeof($this->get_product_options($row_product['id']))){\n $options = $this->get_product_options($row_product['id']);\n foreach ($options as $row_product_option_group) { \n foreach ($row_product_option_group['options'] as $row_product_option) {\n\t\t\t\t\t\t// sub product qty multipled by parent product qty\n\t\t\t\t\t\t$qty = $row_product['qty']*$row_product_option['qty'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!$stmt_option_info->bind_param(\"i\", $row_product_option['id_options'])) throw new Exception('An error occured while trying to bind params to get option info statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\t\t\n\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\t$stmt_option_info->execute();\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* store result */\n\t\t\t\t\t\t$stmt_option_info->store_result();\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($stmt_option_info->num_rows) {\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\t\t\t\t\t/* bind result variables */\n\t\t\t\t\t\t\t$stmt_option_info->bind_result($out_of_stock);\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$stmt_option_info->fetch();\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!$stmt_upd_option->bind_param(\"iii\", $qty, $qty,$row_product_option['id_options'])) throw new Exception('An error occured while trying to bind params to update option qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\t\tif (!$stmt_upd_option->execute()) throw new Exception('An error occured while trying to update option qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n }\n }\n \t}\n\t\t\n\t\t$stmt_product_info->close();\n\t\t$stmt_upd_product_variant->close();\n\t\t$stmt_upd_product->close();\n\t\t$stmt_option_info->close();\n\t\t$stmt_upd_option->close();\n\t\t\t\t\t\t\t\t\t\t\t\n\t}", "public function pausedStock($entityIds){\r\n $productSellerId = Mage::getModel ( 'catalog/product' )->load ( $entityIds )->getSellerId ();\r\n if ($productSellerId == Mage::getSingleton ( 'customer/session' )->getCustomerId ()) {\r\n $_Product = Mage::getModel ( 'catalog/product' )->load($entityIds);\r\n $stockData = array ();\r\n $_Product->setStatus('2'); \r\n $_Product->setSeller_product_status('1026'); // Paused status \r\n $_Product->setStockData ( $stockData );\r\n $_Product->save (); \r\n return true;\r\n }\r\n \r\n }", "public function updateStatus(Request $request) {\n $product = Product::where('code',$request->code)->get();\n $product[0]->status = $request->status;\n $product[0]->pickup = $request->pickup;\n return response()->json([\"product\" => $product,\n \"status\" => $product[0]->save(),\n \"number\" => 201]);\n }", "public function products_could_be_queried_with_published_status()\n {\n $publishedProductQty = random_int(1, 10);\n factory(Product::class, $publishedProductQty)\n ->states('published')\n ->create();\n\n $unpublishedProductQty = random_int(1, 10);\n factory(Product::class, $unpublishedProductQty)\n ->states('unpublished')\n ->create();\n\n //status\n //act + assert\n $queryResult = $this->productFilter->getList(['published' => true]);\n $this->assertCount($publishedProductQty, $queryResult);\n\n //act + assert\n $queryResult = $this->productFilter->getList(['published' => false]);\n $this->assertCount($unpublishedProductQty, $queryResult);\n }", "function setSampAppStatus($opm_productid,$onoff) {\n\n\t\t$this->load->model('approvalstatus_model');\n\n\t\tif (checkPerms('can_edit_samp_approval',true)) {\n\t\t\n\t\t\tif ($onoff) {\n\t\t\t\n\t\t\t\t$statusid = 1;\n\t\t\t\t$message = \"Sample approval status was changed to Approved by \" . $this->userinfo->username;\n\t\t\t\t$arrData['approvalstatus'] = \"Approved\";\n\t\t\t\n\t\t\t} else {\n\t\t\t\n\t\t\t\t$statusid = 0;\n\t\t\t\t$message = \"Sample approval status was changed to Pending by \" . $this->userinfo->username;\n\t\t\t\t$arrData['approvalstatus'] = \"set to Pending\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif ($this->products_model->setSampAppStatus($opm_productid,$statusid)) {\n\t\t\t\t\n\t\t\t\t// send email\n\t\t\t\t\n\t\t\t\t$arrData['username'] = $this->userinfo->username;\n\t\t\t\t$arrData['productInfo'] = $this->products_model->fetchProductInfo($opm_productid);\n\t\t\t\t\n\t\t\t\t$this->opm->sendProductEmail($opm_productid,\"sample_approval_status_changed\",$arrData);\n\t\t\t\t\n\t\t\t\t$this->opm->addHistoryItem($opm_productid,$message);\n\t\t\t\t\n\t\t\t\t$this->approvalstatus_model->updateApprovalStatus($opm_productid);\n\t\t\t\t\n\t\t\t\t$this->opm->displayAlert(\"Sample approval status has been changed.\",\"/products/view/\" . $opm_productid);\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\n\t\t\t\t$this->opm->displayError(\"Error saving status\",\"/products/view/\" . $opm_productid);\n\t\t\t\treturn true;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\n\t\t}\n\n }", "public function GetStatus()\n\t{\treturn new ProductStatus($this->details['tstatus']);\t\n\t}", "public function updateProductStatus($id)\n { \n DB::beginTransaction();\n\n try {\n $product = $this->productRepository->updateStatus($id);\n\n } catch (Exception $e) {\n DB::rollBack();\n Log::info($e->getMessage());\n\n throw new InvalidArgumentException('Unable to update the product.');\n }\n\n DB::commit();\n\n return $product;\n\n }", "public function disableProducts(&$data) {\n\t\t// TODO maybe add limit?\n\t\n\t\tif (!empty($data) && is_array($data)) {\n\t\t\t$this->db->query(\"UPDATE \" . DB_PREFIX . \"product SET status = '0', date_modified = NOW() WHERE status = '1' && product_id IN(\".implode(',', $data).\") \");\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function catalogProductSaveBefore($productType,$product){\n /**\n * Check $productType has been set to 'property'\n */\n if ($productType == 'property') {\n /**\n * Getting Product's user Id\n */\n $customerId = $product->getUserid ();\n /**\n * Loading customer Details\n */\n $customer = Mage::getModel ( 'customer/customer' )->load ( $customerId );\n /**\n * checking empty or not\n */\n if ($customer->getId () == '') {\n $product->setCanSaveCustomOptions ( true );\n Mage::throwException ( Mage::helper ( 'adminhtml' )->__ ( 'User id was invalid' ) );\n }\n }\n }", "public function setProductActive($id, $value) {\n $stmt = $this->db->prepare(\"update product set is_active = :is_active where id = :id;\");\n $stmt->bindValue(\"is_active\", $value, PDO::PARAM_BOOL);\n $stmt->bindValue(\"id\", $id, PDO::PARAM_INT);\n $stmt->execute();\n }", "public function UserListChangeStatus(): void{\n \n if(!ArtworkVerifier::setStatusList($_POST) || !Session::isLogin()){\n exit;\n }\n \n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id)){\n UserList::values([ 'user_list.status' => $_POST['status'] ])\n ->where('user_id' ,Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->update();\n exit;\n }\n }", "public function changeStatus(ProductAttributeList $attribute)\n {\n // echo \"<pre>\";print_r($vendor);die;\n if($attribute->status == 'Active'){\n $attribute->status ='Inactive';\n }else{\n $attribute->status ='Active';\n }\n\n if($attribute->save()) {\n\n return redirect(route('attributes.index'))->with('success', trans('messages.attribute.change_status'));\n }\n\n return redirect(route('attributes.index'))->with('error', trans('messages.error'));\n }", "function update_inventory($store_prod_id, $store_qty, $discontinued, $attribute_id, $status = 1, $website_id = 1, $stock_id = 1)\n\t{\n\t\t$resource\t= Mage::getSingleton('core/resource');\n\t\t$invStockItemTable = $resource->getTableName('cataloginventory_stock_item');\n\t\t$invStockStatusTable = $resource->getTableName('cataloginventory_stock_status');\n\t\t$prodDateTimeTable = $resource->getTableName('catalog_product_entity_datetime');\n\t\t\n\t\t$write \t= $resource->getConnection('core_write');\n\t\t$read = $resource->getConnection('core_read');\n\t\t\n\t\tif ($store_qty <= 0 || $discontinued == 1) {\n\t\t\t$status = 0;\n\t\t} else {\n\t\t\t$status = 1;\n\t\t}\n\t\t\n\t\tif (is_null($store_qty)) {\n\t\t\t$store_qty = 0;\n\t\t\t$status = 0;\n\t\t}\n\t\t\n\t\t$sql\t= \"UPDATE \" . $invStockItemTable . \" \n\t\t\t\t\tSET\tqty = :qty, \n\t\t\t\t\t\tis_in_stock = :is_in_stock \n\t\t\t\t\tWHERE product_id = :product_id \";\n\t\t$binds\t= array(\n\t\t\t'qty'\t\t\t=> $store_qty,\n\t\t\t'is_in_stock'\t=> $status,\n\t\t\t'product_id'\t=> $store_prod_id,\n\t\t);\n\t\t$result = $write->query($sql, $binds);\n\t\t\n\t\t$sql\t= \"SELECT * FROM \" . $invStockStatusTable . \" \n\t\t\t\t\tWHERE product_id\t= :product_id \n\t\t\t\t\tAND website_id \t= :website_id \n\t\t\t\t\tAND stock_id \t= :stock_id \";\n\t\t$binds\t= array(\n\t\t\t'product_id'\t=> $store_prod_id,\n\t\t\t'website_id'\t=> $website_id,\n\t\t\t'stock_id'\t\t=> $stock_id,\n\t\t); \n\t\t$chk = $read->fetchRow($sql, $binds);\n\t\tif (empty($chk)) {\n\t\t\t$sql\t= \"INSERT INTO \" . $invStockStatusTable . \" \n\t\t\t\t\t\t\tSET qty = :qty, \n\t\t\t\t\t\t\tstock_status = :stock_status, \n\t\t\t\t\t\t\tstock_id = :stock_id, \n\t\t\t\t\t\t\twebsite_id = :website_id, \n\t\t\t\t\t\t\tproduct_id = :product_id \";\n\t\t\t\t\t\t\t\n\t\t\t$binds\t= array(\n\t\t\t\t'qty'\t\t\t=> $store_qty,\n\t\t\t\t'stock_status'\t=> $status,\n\t\t\t\t'stock_id'\t\t=> $stock_id,\n\t\t\t\t'website_id'\t=> $website_id,\n\t\t\t\t'product_id'\t=> $store_prod_id,\n\t\t\t);\n\t\t\t$result2 = $write->query($sql, $binds);\n\t\t} else { // do update \n\t\t\t$sql\t= \"UPDATE \" . $invStockStatusTable . \"\n\t\t\t\t\t\t\tSET\tqty = :qty, stock_status = :stock_status \n\t\t\t\t\t\t\tWHERE product_id = :product_id \";\n\t\t\t$binds\t= array(\n\t\t\t\t'qty'\t\t\t=> $store_qty,\n\t\t\t\t'stock_status'\t=> $status,\n\t\t\t\t'product_id'\t=> $store_prod_id,\n\t\t\t);\n\t\t\t$result2 = $write->query($sql, $binds);\n\t\t}\n\t\t\n\t\t// Update saleswarp_last_inventory_update fields \n\t\t$sql = \"SELECT * FROM \" . $prodDateTimeTable . \" \n\t\t\t\t\tWHERE entity_type_id = 4 \n\t\t\t\t\tAND entity_id = $store_prod_id\n\t\t\t\t\tAND attribute_id = $attribute_id\";\n\t\t$chk = $read->fetchAll($sql);\n\t\t\n\t\tif (empty($chk)) { // insert it \n\t\t\t$sql\t= \"INSERT INTO \" . $prodDateTimeTable . \" \n\t\t\t\t\t\tSET value = NOW(), \n\t\t\t\t\t\tentity_type_id = 4,\n\t\t\t\t\t\tstore_id = 0, \n\t\t\t\t\t\tentity_id = $store_prod_id, \n\t\t\t\t\t\tattribute_id = $attribute_id\";\n\t\t$insert_result = $write->query($sql);\n\t\t} else { // update it \n\t\t$sql\t= \"UPDATE \" . $prodDateTimeTable . \" \n\t\t\t\t\t\tSET value = NOW()\n\t\t\t\t\t\tWHERE entity_type_id = 4 \n\t\t\t\t\t\tAND entity_id = $store_prod_id\n\t\t\t\t\t\tAND attribute_id = $attribute_id\"; \n\t\t$update_result = $write->query($sql);\n\t\t}\n\t\t\n\t\tif ($result && $result2) {\n\t\t\treturn \"Saved inventory record\";\n\t\t} else {\n\t\t\treturn \"FAILED save() inventory update\";\n\t\t}\n\t}", "public function update_product() {\n\t\t$values=array(\"product_name\"=>$_POST['product_name'],\"description\"=>$_POST['description']);\t\t\t\t\n\t\t$where =array(\"id\"=>$_POST['product_id']);\n\t\tif($this->update(\"products\",$values,$where)) {\t\t\t\n\t\t\techo true;\n\t\t}\n\t\telse\n\t\t\techo 'Error while updating';\n\t}", "function importSimpleProducts( $importProducts, $objectManager ) {\n \n // Path to media folder \n $filesystem = $objectManager->create('Magento\\Framework\\Filesystem');\n $mediaDirectory = $filesystem->getDirectoryWrite(\\Magento\\Framework\\App\\Filesystem\\DirectoryList::MEDIA);\n $mediaPath = $mediaDirectory->getAbsolutePath();\n \n foreach( $importProducts as $importProduct ) {\n \n try { \n $product = $objectManager->create('\\Magento\\Catalog\\Model\\Product');\n $product->setWebsiteIds(array(1));\n $product->setAttributeSetId(4);\n $product->setTypeId('simple');\n $product->setCreatedAt(strtotime('now')); \n $product->setName($importProduct[1]); \n $product->setSku($importProduct[3]);\n $product->setWeight($importProduct[16]);\n $product->setStatus(1);\n $category_id= array(30,24);\n $product->setCategoryIds($category_id); \n $product->setTaxClassId(0); // (0 - none, 1 - default, 2 - taxable, 4 - shipping)\n $product->setVisibility(4); // catalog and search visibility\n $product->setColor(24);\n $product->setPrice($importProduct[11]) ;\n $product->setCost(1); \n $product->setMetaTitle($importProduct[1]);\n $product->setMetaKeyword($importProduct[26]);\n $product->setMetaDescription($importProduct[28]);\n $product->setDescription($importProduct[27]);\n $product->setShortDescription($importProduct[27]);\n $product->setStockData(\n array(\n 'use_config_manage_stock' => 0, \n 'manage_stock' => 1, // manage stock\n 'min_sale_qty' => 1, // Shopping Cart Minimum Qty Allowed \n 'max_sale_qty' => 2, // Shopping Cart Maximum Qty Allowed\n 'is_in_stock' => 1, // Stock Availability of product\n 'qty' => (int)$importProduct[6]\n )\n );\n \n $product->save();\n echo \"Upload simple product id :: \".$product->getId().\"\\n\";\n }\n catch(Exception $e)\n {\n echo 'Something failed for product import ' . $importProduct[1] . PHP_EOL;\n print_r($e);\n }\n} \n}", "public function execute(EventObserver $observer)\n {\n $product = $observer->getEvent()->getProduct();\n if ($product instanceof \\Magento\\Catalog\\Model\\Product) {\n $this->stockHelper->assignStatusToProduct($product);\n }\n }", "public function activate_product($product_id)\n\t{\n\t\t$data = array(\n\t\t\t\t'product_status' => 1\n\t\t\t);\n\t\t$this->db->where('product_id', $product_id);\n\t\t\n\t\tif($this->db->update('product', $data))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function updateAlternateImageStatus(Request $request){\n if($request->ajax()){\n $data = $request->all();\n // echo \"<pre>\"; print_r($data); die;\n if($data['status'] == 'Active'){\n $status = 0;\n }else{\n $status = 1;\n }\n ProductImage::where('id', $data['image_id'])->update(['status'=>$status]);\n return response()->json([\n 'status' => $status,\n 'image_id' => $data['image_id']\n ]);\n }\n }", "public function updateBulkProductsInventory($products);", "public function productquantity() {\n\n $this->checkPlugin();\n\n if ($_SERVER['REQUEST_METHOD'] === 'PUT') {\n //update products\n $requestjson = file_get_contents('php://input');\n $requestjson = json_decode($requestjson, true);\n\n if (!empty($requestjson) && count($requestjson) > 0) {\n $this->updateProductsQuantity($requestjson);\n } else {\n $this->response->setOutput(json_encode(array('success' => false)));\n }\n } else {\n $json['success'] = false;\n $json['error'] = \"Invalid request method, use PUT method.\";\n $this->sendResponse($json);\n }\n }", "public function setStatus(?CloudPcGalleryImageStatus $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "public function changeAllStatus()\n\t{\n\t\t$model_name=$this->input->post('type',TRUE);\n\t\t$pk_id=$this->input->post('pk_id',TRUE);\n\t\t$status=$this->input->post('is_active',TRUE);\n\t\t$this->$model_name->update($pk_id, array( 'is_active' => $status));\n\t}", "public function changeAllStatus()\n\t{\n\t\t$model_name=$this->input->post('type',TRUE);\n\t\t$pk_id=$this->input->post('pk_id',TRUE);\n\t\t$status=$this->input->post('is_active',TRUE);\n\t\t$this->$model_name->update($pk_id, array( 'is_active' => $status));\n\t}", "public function getUpdateProductStatus(Request $request)\n\t {\n\t \t\t$user = null;\n\t \t\t$nope = false;\n\t \t\t$v = \"\";\n\t\t\n\t \t\t$signals = $this->helpers->signals;\n\t \t\t$plugins = $this->helpers->getPlugins();\n\t \t\t$cpt = ['user','signals','plugins'];\n \n\t \n\t \t\tif(Auth::check())\n\t \t\t{\n\t\t\t\n\t \t\t\t$user = Auth::user();\n\t\t\t\n\t \t\t\tif($this->helpers->isAdmin($user))\n\t \t\t\t{\n\t \t\t\t\t$hasPermission = $this->helpers->hasPermission($user->id,['view_apartments','edit_apartments']);\n\t \t\t\t\t#dd($hasPermission);\n\t \t\t\t\t\n\t \t\t\t\tif($hasPermission)\n\t \t\t\t\t{\n\t\t\t\t\t\t$req = $request->all();\n\t\t\t\t\t\t#dd($req);\n\t\t\t\t $validator = Validator::make($req, [ \n\t\t\t\t 'xf' => 'required'\n\t\t\t\t ]);\n \n\t\t\t\t if($validator->fails())\n\t\t\t\t {\n\t\t\t\t \treturn redirect()->intended('products');\n\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$ss = \"pending\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tswitch($req['type'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase \"enable\":\n\t\t\t\t\t\t\t\t $ss = \"enabled\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcase \"disable\":\n\t\t\t\t\t\t\t\t $ss = \"disabled\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$dd = [\n\t\t\t\t\t\t\t 'xf' => $req['xf'],\n\t\t\t\t\t\t\t 'status' => $ss\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t $this->helpers->updateProductStatus($dd);\n \t \t\t\t\t\t $ss = \"update-product-status\";\n \t \t\t\t\t\t session()->flash($ss,\"ok\");\n \t \t\t\t return redirect()->intended(\"products\");\n\t\t\t\t\t }\n\t \t\t\t\t}\n\t \t\t\t\telse\n\t \t\t\t\t{\n\t \t\t\t\t\tsession()->flash(\"permissions-status-error\",\"ok\");\n\t \t\t\t\t\treturn redirect()->intended('/');\n\t \t\t\t\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\tAuth::logout();\n\t \t\t\t\t$u = url('/');\n\t \t\t\t\treturn redirect()->intended($u);\n\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\t$v = \"login\";\n\t \t\t}\n\t \t\treturn view($v,compact($cpt));\n\t\t\n\t }", "private function updateProductVisibility(ProductInterface $product, Request $request): void\n {\n $visible = $request->request->get('visible') === '1' ? true : false;\n\n if ($visible) {\n $product->enable();\n } else {\n $product->disable();\n }\n }", "public function setActive()\n {\n $this->update(['status' => static::STATUS_ACTIVE]);\n }", "function statusUpdate($id)\n {\n $product = DB::table('tbl_Why_Choose_Us')\n ->select('status')\n ->where('id','=',$id)\n ->first();\n\n //Check user status\n if($product->status == '1'){\n $status = '0';\n }else{\n $status = '1';\n }\n //update product status\n $values = array('status' => $status );\n DB::table('tbl_Why_Choose_Us')->where('id',$id)->update($values);\n\n session()->flash('msg','Product status has been updated successfully.');\n return back();\n }", "function updateGiftProduct()\n\t{\n\n\t\tinclude('classes/Lib/ThumbImage.php');\n\t\t\n\t\t$category_id = implode(\",\",$_POST['selcatgory']);\n// \t\t$category_parent_id=(int)$_POST['selsubcatgory'];\n// \t\t$sub_category_parent_id =(int)$_POST['selsubundersubcatgory'];\n\t\t$title=$_POST['product_title'];\n\t\t$description=addslashes(htmlentities($_POST['desc']));\n\t\t$sku=$_POST['sku'];\n\t\t$tag=$_POST['tag'];\n\t\t$product_video=htmlentities($_POST['videotag']);\n\t\t\n\t\tif($_POST['intro_date']!='')\n\t\t$intro_date= $_POST['intro_date'];\n\t\telse\n\t\t$intro_date= date('Y/m/d');\n\t\t\n\t\t\n\t\t\t\n\t\tif($_POST['is_feautured']=='on')\n\t\t\t$is_feautured=1;\n\t\telse\n\t\t\t$is_feautured=0;\n\t\t\t\n\t\tif($_POST['status']=='on')\n\t\t\t$status=1;\n\t\telse\n\t\t\t$status=0;\t\n\t\t\n\t\t\n\t\t\n\t\t$price=(float)$_POST['price'];\n\t\t$msrp_org=(float)$_POST['msrp_org'];\n\t\t$msrp=$_POST['msrp'];\n\t\t\n\t\t$meta_keywords=$_POST['meta_keywords'];\n\t\t$meta_desc=$_POST['meta_desc'];\n\t\t\n\t\t\t\n\t\t$sql=\"update products_table set category_id = '\".$category_id.\"',sku = '\".$sku.\"',title = '\".$title.\"',description = '\".$description.\"',msrp = '\".$msrp_org.\"',price = '\".$price.\"',status = '\".$status.\"',tag = '\".$tag.\"',meta_desc = '\".$meta_desc.\"',meta_keywords = '\".$meta_keywords.\"',intro_date = '\".$intro_date.\"',is_featured = '\".$is_feautured.\"' where product_id =\".((int)$_GET['prodid'] );\n\t\t\n\t\t$obj1234=new Bin_Query();\n\t\tif($obj1234->updateQuery($sql))\n\t\t{\n\t\t\n\t\t\t\n\t\t\t// For Image Uploading//\n\t\n\t\t\tif(count($_FILES['ufile']['tmp_name']) > 0)\n\t\t\t{\n\t\t\t\t$obj_insert= new Bin_Query();\n\t\t\t\t$product_id=(int)$_GET['prodid'];\n\t\t\t\t\tfor($i=0;$i<count($_FILES['ufile']['name']);$i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$imgfilename= $_FILES['ufile']['name'][$i];\n\t\t\t\t\t\tif($imgfilename!='')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$imagefilename = date(\"Y-m-d-His\").$imagefilename ; // generate a new name\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$image=\"images/products/\". $imgfilename; // updated into DB\n\t\t\t\t\t\t\t$thumb_image=\"images/products/thumb/\".$imgfilename; // updated into DB\n\t\t\t\t\t\t\t$large_image=\"images/products/large_image/\".$imgfilename; // updated large image into DB\n\t\t\t\t\t\t\t$stpath=ROOT_FOLDER.$image;\n\t\t\t\t\t\t\t$imageDir=ROOT_FOLDER.\"images/products\";\n\t\t\t\t\t\t\t$thumbDir=ROOT_FOLDER.\"images/products/thumb\";\n\t\t\t\t\t\t\t$largeDir=ROOT_FOLDER.\"images/products/large_image\";\n\t\t\t\t\t\t\tif(move_uploaded_file($_FILES[\"ufile\"][\"tmp_name\"][$i],$stpath))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tnew Lib_ThumbImage('thumb',$stpath,$thumbDir,THUMB_WIDTH,THUMB_HEIGHT);\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tnew Lib_ThumbImage('thumb',$stpath,$imageDir,IMAGE1_WIDTH,IMAGE1_HEIGHT);\n\t\t\t\t\t\t\t\tnew Lib_ThumbImage('thumb',$stpath,$largeDir,IMAGE2_WIDTH,IMAGE2_HEIGHT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($i==0)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tif($_POST['ufile_id'][$i]!='')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$spl=\"UPDATE product_images_table SET image_path='$image', thumb_image_path='$thumb_image',large_image_path='$large_image' WHERE product_images_id='\".$_POST['ufile_id'][$i].\"'\";\n\t\t\t\t\t\t\t\t\t$obj_insert->updateQuery($spl);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$spl=\"INSERT INTO product_images_table(product_id,image_path,thumb_image_path,type,large_image_path) VALUES('\".$product_id.\"','$image','$thumb_image','main','$large_image')\";\n\t\t\t\t\t\t\t\t\t$obj_insert->updateQuery($spl);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$update=\"UPDATE products_table set image='$image',thumb_image='$thumb_image',large_image_path='$large_image' where product_id='\".$product_id.\"'\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$obj_insert->updateQuery($update);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($_POST['ufile_id'][$i]!='')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$spl=\"UPDATE product_images_table SET image_path='$image', thumb_image_path='$thumb_image',large_image_path='$large_image' WHERE product_images_id='\".$_POST['ufile_id'][$i].\"'\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$spl=\"INSERT INTO product_images_table(product_id,image_path,thumb_image_path,type,large_image_path) VALUES('\".$product_id.\"','$image','$thumb_image','sub','$large_image')\";\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$obj_insert->updateQuery($spl);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t$output='\t<div class=\"alert alert-success\">\n\t\t\t\t<button data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>Product <b>'.$title.'</b> has been updated successfully</div>';\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$output='\t<div class=\"alert alert-error\">\n\t\t\t\t<button data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>Product <b>'.$title.'</b> has not been updated</div>';\n\t\n\t\t}\n\t\t\n\t\treturn $output;\n\t\t\t\t\t\n\t}", "public function deactivate_product($product_id)\n\t{\n\t\t$data = array(\n\t\t\t\t'product_status' => 0\n\t\t\t);\n\t\t$this->db->where('product_id', $product_id);\n\t\t\n\t\tif($this->db->update('product', $data))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function setGalleryStatus() {\n $post = Input::all();\n $userData = AppSession::getLoginData();\n if (!$userData) {\n return Response()->json(array('success' => false, 'message' => 'Please, login to change gallery status.'));\n }\n $gallery = GalleryModel::where('id', $post['id'])\n ->where('ownerId', $userData->id)\n ->first();\n if ($gallery) {\n //check gallery items\n if ($post['status'] == GalleryModel::PRIVATESTATUS) {\n if ($gallery->type == GalleryModel::IMAGE) {\n $items = AttachmentModel::where('parent_id', $gallery->id)->count();\n } else {\n $items = VideoModel::where('galleryId', $gallery->id)->count();\n }\n if ($items == 0) {\n return Response()->json(['success' => false, 'message' => 'Gallery must has at least 1 item before publish']);\n }\n if ($gallery->type == GalleryModel::VIDEO) {\n $check = VideoModel::where('galleryId', $gallery->id)\n ->where('status', VideoModel::PROCESSING)\n ->count();\n if ($check > 0) {\n return Response()->json(['success' => false, 'message' => 'Videos are processing.']);\n }\n }\n }\n $gallery->status = ($post['status'] == GalleryModel::PUBLICSTATUS) ? GalleryModel::PRIVATESTATUS : GalleryModel::PUBLICSTATUS;\n $gallery->save();\n return Response()->json(array('success' => true, 'message' => 'update status successfully.', 'gallery' => $gallery));\n }\n return Response()->json(array('success' => false, 'message' => 'update fail.'));\n }", "public function testSetStatus()\n {\n $this->todo('stub');\n }", "public function update(Request $request, $id)\n {\n if (!Gate::allows('products_manage')) {\n return abort(401);\n }\n\n $rules = [\n 'name' => 'required|min:3|max:50|unique:products,name,'.$id,\n 'description' => 'required|min:3|max:10000',\n 'price' => 'required|numeric|min:1',\n 'category_id' => 'required',\n 'subcategory_id' => 'required',\n 'measurement_id' => 'required',\n 'status' => 'required',\n 'image' => 'image',\n ];\n\n $validator = Validator::make($request->all(), $rules);\n\n if ($validator->fails()) {\n\n $valErrors = $validator->messages();\n return redirect()->back()->withInput()\n ->withErrors($validator->errors());\n }\n\n $product = Product::findOrFail($id);\n\n if($request->status == 0){\n $orders = Order::whereIn('status',[0,1])->pluck('basket_id')->toArray();\n if(count($orders) > 0){\n $baskets = Basket::whereIn('id',$orders)->pluck('id')->toArray();\n if(count($baskets) > 0){\n $item = Item::whereIn('basket_id',$baskets)->where('itemable_id',$product->id)->where('itemable_type','App\\Product')->first();\n if($item){\n return redirect()->route('products.index')->with('error', 'لا يمكن تعطيل المنتج لوجوده فى طلبات جارية ');\n }\n }\n }\n }\n\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->category_id = $request->category_id;\n $product->subcategory_id = $request->subcategory_id;\n $product->measurement_id = $request->measurement_id;\n $product->status = $request->status;\n if ($request->hasFile('image')):\n $product->image = uploadImage($request, 'image', $this->public_path);\n endif;\n\n $product->save();\n session()->flash('success', 'لقد تم تعديل المنتج بنجاح' . $product->name);\n return redirect(route('products.index'));\n \n }", "public function update(ProductRequest $request, Product $product)\n {\n// $data = $request->all();\n// foreach ($checkboxes as $checkbox) {\n// if(!isset($data[$checkbox]) {\n// $data[$checkbox] = 0;\n// }\n// }\n\n\n $data = $request->all();\n if(!isset($data['featured'])) {\n $data['featured'] = 0;\n }\n if(!isset($data['recommended'])) {\n $data['recommended'] = 0;\n }\n\n $tagsIDs = $this->getTagsIDs($data['tags']);\n unset($data['tags']);\n $product->tags()->sync($tagsIDs);\n $product->update($data);\n\n return redirect()->route('products');\n\n }", "public function change_status(Request $request,$id)\n { \n Order::where('id',$id)->update([\n 'order_status'=>$request->order_status,\n 'updated_at'=>date('Y-m-d H:i:s')\n ]);\n Orderproduct::where('order_id',$id)->update([\n 'order_pro_status'=>$request->order_status\n ,'updated_at'=>date('Y-m-d H:i:s')\n ]);\n Session::flash('flash_message_success', 'Order updated successfully');\n return redirect()->back();\n }", "public function beforeUpdate()\n {\n $product = self::find($this->id);\n self::$product_group = $product->group_id;\n }", "public function onBeforeWrite() {\n parent::onBeforeWrite();\n\n // See if this order was just marked paid, if so reduce quantities for\n // items.\n if($this->isChanged(\"Status\") && $this->Status == \"paid\") {\n foreach($this->Items() as $item) {\n $product = $item->MatchProduct;\n\n if($product->ID && $product->Quantity) {\n $new_qty = $product->Quantity - $item->Quantity;\n $product->Quantity = ($new_qty > 0) ? $new_qty : 0;\n $product->write();\n }\n }\n }\n }", "public function changeStatusAjaxAction()\n\t{\n\t\t$data = $this->getRequest()->getPost();\n\t\tif($data){\n\t\t\tif($data['lb_item_status']!=\"\"){\n\t\t\t\t$order = Mage::getModel('sales/order')->load($data['order_id']);\n\t\t\t\t$orderStatus = $order->getStatus();\n\t\t\t\t$lbOrderItemInstance = Mage::getModel('dropship360/orderitems')->getCollection()->addFieldToFilter('item_id', $data['lb_item_id']);\n\t\t\t\ttry{\n\t\t\t\t\tif($lbOrderItemInstance->count() > 0){\t\t\t\n\t\t\t\t\t\tforeach($lbOrderItemInstance as $item){\n\t\t\t\t\t\t\t$itemStatusHistory = Mage::helper('dropship360')->getSerialisedData($item, $data['lb_item_status'], $orderStatus);\n\t\t\t\t\t\t\t$item->setLbItemStatus($data['lb_item_status']);\n\t\t\t\t\t\t\t$item->setItemStatusHistory($itemStatusHistory);\n\t\t\t\t\t\t\t$item->setUpdatedBy('User');\n\t\t\t\t\t\t\t$item->setUpdatedAt(Mage::getModel('core/date')->gmtDate());\n\t\t\t\t\t\t\t$item->save();\t\n\t\t\t\t\t\t\tif($data['lb_item_status']==$item->getLbItemStatus()){\n\t\t\t\t\t\t\t\t$data['msg'] = $item->getSku().' status successfully changed to '.$data['lb_item_status'];\n\t\t\t\t\t\t\t\tMage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('dropship360')->__($data['msg']));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$data['msg'] = $item->getSku().' status unable to change to '.$data['lb_item_status'];\n\t\t\t\t\t\t\t\tMage::getSingleton('adminhtml/session')->addError(Mage::helper('dropship360')->__($data['msg']));\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\tif($data['lb_item_status'] == 'Transmitting'){\n\t\t\t\t\t\tMage::getModel('dropship360/logicbroker')->setupNotification();\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t$result = Mage::helper('core')->jsonEncode($data);\n\t\t\t\t\tMage::app()->getResponse()->setBody($result);\n\t\t\t\t}catch(Exception $e){\t\t\t\n\t\t\t\t\tMage::getSingleton('adminhtml/session')->addError($e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t$data['msg'] = 'Unable to perform the required operation';\n\t\t}\t\n\t}", "public function resetOriginalStatus() {\n $this->orig_status = $this->getStatus();\n }", "private function updateProductsQuantity($products)\n {\n\n $json = array('success' => true);\n\n $this->load->model('catalog/product');\n $this->load->model('rest/restadmin');\n\n foreach ($products as $productItem) {\n\n if (isset($productItem['product_id']) && ctype_digit($productItem['product_id'])) {\n //if don't update product option quantity, product quantity must be set\n if(!isset($productItem['product_option'])){\n if(!isset($productItem['quantity']) || !ctype_digit($productItem['quantity'])) {\n $json['success'] = false;\n $json['error'] = \"Invalid quantity:\".$productItem['quantity'].\", product id:\".$productItem['product_id'];\n }\n } else {\n foreach ($productItem['product_option'][0]['product_option_value'] as $option) {\n if(!isset($option['quantity']) || !ctype_digit($option['quantity'])) {\n $json['success'] = false;\n $json['error'] = \"Invalid quantity:\".$option['quantity'].\", product id:\".$productItem['product_id'];\n break;\n }\n }\n }\n\n if ($json['success']) {\n $id = $productItem['product_id'];\n\n $product = $this->model_rest_restadmin->checkProductExists($id);\n\n if (!empty($product)) {\n $this->model_rest_restadmin->editProductQuantity($id, $productItem);\n } else {\n $json['success'] = false;\n $json['error'] = \"The specified product does not exist, id: \".$productItem['product_id'];\n }\n }\n } else {\n $json['success'] = false;\n $json['error'] = \"Invalid product id:\".$productItem['product_id'];\n }\n }\n\n $this->sendResponse($json);\n }", "private function setSoldIndividually() {\n $this->product->set_sold_individually($this->wcData->isSoldIndividually());\n }", "public function update(Request $request, $id)\n {\n if(Auth::check()){\n $user_id = auth::user()->id;\n if($user_id==2){\n return redirect('/delivery/payment');\n } \n }\n $products = Product::findOrFail($id); \n if($request->product_name == $products->product_name){\n Session::flash('message', \"Update Failed you inputted old product name.\");\n return Redirect::back();\n }\n \n $this->validate($request,[\n 'product_name' => 'required|unique:products'\n ]);\n $products->product_name = Purifier::clean($request->product_name);\n $products->category_id = Purifier::clean($request->category_id);\n $products->category_name = Purifier::clean($request->category_name);\n $products->subcategory_name = Purifier::clean($request->subcategory_name);\n $products->subcategory_id = Purifier::clean($request->subcategory_id);\n $products->product_status = Purifier::clean($request->product_status);\n $products->product_price = Purifier::clean($request->product_price);\n $products->product_qty = Purifier::clean($request->product_qty);\n $products->product_desc = Purifier::clean($request->product_desc);\n $products->product_sale = Purifier::clean($request->product_sale);\n $products->product_percent = Purifier::clean($request->product_percent);\n $products->save();\n\n Category::where('id','=',$request->category_id)->update(['category_status'=>$request->product_status]);\n SubCategory::where('id','=',$request->subcategory_id)->update(['subcategory_status'=>$request->product_status]);\n\n MostFavorites::where('product_id','=',$id)->update(['product_status'=>$request->product_status]);\n Favorites::where('product_id','=',$id)->update(['product_status'=>$request->product_status]);\n Wishlist::where('product_id','=',$id)->update(['product_status'=>$request->product_status]);\n return redirect('product');\n\n\n }", "public function setSuccess()\n {\n $this->attributes['status'] = 2;\n self::save();\n }", "protected function setStatus($status)\n {\n $this->file->set('status', $status);\n }", "public function status($uid, $status) {\n\n $image = $this->getItemImageModel()->where('uuid', $uid)->first();\n if (empty($image)) {\n return redirect()->back()->with('error_message', 'resources not found');\n }\n if ($status == 'active') {\n $image->archive = 0;\n } elseif ($status == 'block') {\n $image->archive = 1;\n } elseif ($status == 'default') {\n $this->getItemImageModel()->where('item_id', $image->item->id)->update(['is_default' => 0]);\n $image->is_default = 1;\n }\n if ($image->save()) {\n return redirect()->back()->with('success_message', 'Image status has been changed');\n }\n }", "function save_custom_field( $post_id ) {\r\n $user = wp_get_current_user();\r\n $_warehouse_flag = isset( $_POST['_warehouse_flag'] ) ? $_POST['_warehouse_flag'] : '';\r\n $product = wc_get_product( $post_id );\r\n \r\n if($_warehouse_flag==1){\r\n\t $product->update_meta_data( '_warehouse_flag', 'A' );\r\n }\r\n if($_warehouse_flag==2){\r\n\t $product->update_meta_data( '_warehouse_flag', 'V' );\r\n }\r\n $_enable_warehouse = isset( $_POST['_enable_warehouse'] ) ? $_POST['_enable_warehouse'] : '0';\r\n \r\n \r\n $product->update_meta_data( '_enable_warehouse', $_enable_warehouse );\r\n if($_enable_warehouse==1){\r\n\t $categories = [ 'Warehouse Product'];\r\n\t wp_set_object_terms( $post_id, $categories, 'warehouses' );\r\n }\r\n else{\r\n\t $categories = [ 'Warehouse Product'];\r\n\t wp_set_object_terms( $post_id, null, 'warehouses' );\r\n }\r\n \r\n $product->save();\r\n \r\n \r\n}", "private function setProductParameters(string $action): void\n {\n //====================================================================//\n // Check if object if in Remote Create Mode\n $isLockedForCreation = Splash::object(\"Product\")->isLocked();\n\n //====================================================================//\n // Store Global Action Parameters\n $this->objectType = \"Product\";\n if ('PRODUCT_CREATE' == $action) {\n $this->action = SPL_A_CREATE;\n $this->comment = \"Product Created on Dolibarr\";\n } elseif ('PRODUCT_MODIFY' == $action) {\n $this->action = SPL_A_UPDATE;\n $this->comment = \"Product Updated on Dolibarr\";\n } elseif ('PRODUCT_SET_MULTILANGS' == $action) {\n $this->action = ($isLockedForCreation ? SPL_A_CREATE : SPL_A_UPDATE);\n $this->comment = \"Product Description Updated on Dolibarr\";\n } elseif ('STOCK_MOVEMENT' == $action) {\n $this->action = ($isLockedForCreation ? SPL_A_CREATE : SPL_A_UPDATE);\n $this->comment = \"Product Stock Updated on Dolibarr\";\n } elseif ('PRODUCT_PRICE_MODIFY' == $action) {\n $this->action = ($isLockedForCreation ? SPL_A_CREATE : SPL_A_UPDATE);\n $this->comment = \"Product Price Updated on Dolibarr\";\n } elseif ('PRODUCT_DELETE' == $action) {\n $this->action = SPL_A_DELETE;\n $this->comment = \"Product Deleted on Dolibarr\";\n }\n //====================================================================//\n // Commit Delete for Base Product if Required\n $this->onProductVariantChanges($action);\n }", "public function outOfStock($entityIds){\r\n $productSellerId = Mage::getModel ( 'catalog/product' )->load ( $entityIds )->getSellerId ();\r\n if ($productSellerId == Mage::getSingleton ( 'customer/session' )->getCustomerId ()) {\r\n $_Product = Mage::getModel ( 'catalog/product' )->load($entityIds);\r\n $stockData = array ();\r\n $_Product->setStatus('2'); \r\n $_Product->setSeller_product_status('1027'); // sold out status \r\n $stockData ['qty'] = 0;\r\n $stockData ['is_in_stock'] = 0;\r\n $_Product->setStockData ( $stockData );\r\n //Mage::app ()->setCurrentStore ( Mage_Core_Model_App::ADMIN_STORE_ID );\r\n //$storeId = Mage::app ()->getStore ()->getStoreId (); \r\n $_Product->save (); \r\n return true;\r\n }\r\n \r\n }", "public function update(Request $request, Product $product)\n {\n\n $request->validate([\n 'name' => 'required|max:255',\n 'sku' => 'required',\n 'price' => 'required|regex:/^\\d+(\\.\\d{1,2})?$/',\n 'special_price' => 'regex:/^\\d+(\\.\\d{1,2})?$/',\n 'quantity' => 'required|numeric',\n ]);\n \n $product->update([\n\n 'name' => $request->name,\n 'sku' => $request->sku,\n 'description' => $request->description,\n 'short_description' => $request->short_description,\n 'quantity' => $request->quantity,\n 'weight' => $request->has('weight') ? $request->weight : 0 ,\n 'price' => $request->has('price') ? $request->price : 0 ,\n 'special_price' => $request->special_price ,\n 'status' => $request->has('status') ,\n 'featured' => $request->has('featured') ,\n 'brand_id' => $request->brand_id,\n 'tag_id' => $request->tag_id\n\n ]);\n\n if($request->has('categories'))\n {\n $product->categories()->sync($request->get('categories'));\n }\n\n\n\n // if($request->hasFile('thumbs'))\n // {\n // foreach ($request->file('thumbs') as $file) \n // {\n // $product->addMedia($file)->toMediaCollection('thumb');\n\n // }\n // }\n\n // if($request->hasFile('cover'))\n // {\n // $product->removeCover();\n // $product->addCover($request->file('cover'));\n // }\n\n return redirect()->route('admin.products.index')->with( 'message','Product Update Successfully');\n\n }", "public function changeStatus()\n {\n }", "function changeMissionProductAction()\n\t{\n\t\tif($this->_request->isPost() && $_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n\t\t{\n\t\t\t$missionParams = $this->_request->getParams();\n\t\t\t$mission_id=$missionParams['mission_id'];\n\n\t\t\tif($mission_id)\n\t\t\t{\n\t\t\t\t$product_type=$missionParams['product_type'];\n\n\t\t\t\t$update = array();\n\t\t\t\t$update['product_type'] = $product_type;\n\t\t\t\t$quoteMission_obj=new Ep_Quote_QuoteMissions();\n\t\t\t\t$quoteMission_obj->updateQuoteMission($update,$mission_id);\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public function actionUpdateIsActive()\n {\n $ids = Yii::app()->request->getPost('ids');\n $status = (int)Yii::app()->request->getPost('status');\n $models = StoreMarket::model()->findAllByPk($ids);\n foreach($models as $market)\n {\n if(in_array($status, array(0,1)))\n {\n $market->is_active=$status;\n $market->save();\n }\n }\n echo Yii::t('StoreModule.admin', 'Изменения успешно сохранены.');\n }", "private function product_batch()\n\t{\n\t\t// add call to trigger datagrab here\n\t\t//file_get_contents(ee()->config->item('base_url') . '?ACT=25&id=9');\n\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\t\t$update_count = ee()->sync_db->count_all_results('products');\n\n\t\tif($update_count > 0)\n\t\t{\t\n\t\t\t// create curl resource \n\t $ch = curl_init(); \n\n\t // set url \n\t curl_setopt($ch, CURLOPT_URL, ee()->config->item('base_url') . '?ACT=25&id=' . ee()->config->item('integration_product_import_id')); \n\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0); \n\t curl_setopt($ch, CURLOPT_TIMEOUT, 300); \n\t curl_exec($ch); \n\t curl_close($ch);\n \t}\n\t}" ]
[ "0.7189019", "0.71006304", "0.66880864", "0.66135436", "0.6611631", "0.6582802", "0.65453637", "0.63936883", "0.630471", "0.6194651", "0.61705655", "0.6019946", "0.5966995", "0.59582734", "0.5922359", "0.59183854", "0.5889792", "0.58762056", "0.58279127", "0.57793605", "0.5748959", "0.57077676", "0.5646337", "0.56336033", "0.55756944", "0.5564675", "0.5563838", "0.5530458", "0.5529734", "0.55140597", "0.55137587", "0.550351", "0.5482876", "0.5476739", "0.5461731", "0.5452835", "0.5451719", "0.5449358", "0.54451126", "0.5443047", "0.54342914", "0.54079807", "0.54060626", "0.5400288", "0.53903645", "0.53817105", "0.5378886", "0.5376173", "0.5371204", "0.5361994", "0.5348658", "0.534863", "0.5337025", "0.5332906", "0.53264236", "0.53185046", "0.53184825", "0.5316046", "0.53121585", "0.53051406", "0.53038657", "0.5294085", "0.5291319", "0.52857363", "0.5284948", "0.5277166", "0.527318", "0.5273074", "0.52729875", "0.5260311", "0.5260311", "0.5249445", "0.52410257", "0.52322567", "0.52321017", "0.5224706", "0.52238554", "0.5216415", "0.5214661", "0.52143824", "0.51986915", "0.51967883", "0.51917017", "0.51914984", "0.5183234", "0.51742375", "0.517238", "0.51713735", "0.51693165", "0.5166855", "0.51645356", "0.51561403", "0.5148201", "0.51443475", "0.5139349", "0.51367474", "0.5122521", "0.51180047", "0.51137084", "0.51132834" ]
0.59857976
12
IMAGES FOR POSTS / PRODUCTS / EVENTS / MEMBERSHIPS
public static function setImageOrder($db, $databaseColumn, $order, $image) { if(!is_array($order)) { //echo "your order is not an array"; return; } $newOrder = array(); //echo "here at imageorder"; foreach($order as $image_id) { //echo "image id is: ".$image_id; if(array_key_exists($image_id, $image)) { //echo "image id is: ".$image_id; $newOrder[]=$image_id; } } $newOrder = array_unique($newOrder); //echo 'neworder is: '; //Zend_Debug::dump($newOrder); //echo 'images are: '; //Zend_Debug::dump($image); if(count($newOrder) != count($image)) { //echo 'here at not equal'; return; } $rank =1; //echo count($newOrder); //echo "<br/>at foreach"; foreach($newOrder as $image_id) { //echo "<br/>before update"; //echo "here at update image: $image_id, rank: $rank<br/>"; $db->update($databaseColumn, array('ranking'=>$rank), 'image_id='.$image_id); //echo "at update"; $rank++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _putimages() {\n parent::_putimages();\n $this->_putformxobjects();\n }", "public function productimages() {\n\n $this->checkPlugin();\n\n if ( $_SERVER['REQUEST_METHOD'] === 'POST' ){\n //upload and save image\n if (!empty($this->request->get['other']) && $this->request->get['other'] == 1) {\n $this->addProductImage($this->request);\n } else {\n $this->updateProductImage($this->request);\n }\n }\n }", "protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }", "function minorite_image($variables) {\n $attributes = $variables['attributes'];\n $attributes['src'] = file_create_url($variables['path']);\n\n foreach (array('alt', 'title') as $key) {\n\n if (isset($variables[$key])) {\n $attributes[$key] = $variables[$key];\n }\n }\n\n return '<img' . drupal_attributes($attributes) . ' />';\n}", "function msd_post_image() {\n\tglobal $post;\n\t//setup thumbnail image args to be used with genesis_get_image();\n\tif(get_post_type()=='page'){\n\t $size = 'sidebar-image'; // Change this to whatever add_image_size you want\n } else {\n $size = 'post-thumb'; // Change this to whatever add_image_size you want\n }\n\t$default_attr = array(\n\t\t\t'class' => \"aligncenter attachment-$size $size\",\n\t\t\t'alt' => $post->post_title,\n\t\t\t'title' => $post->post_title,\n\t);\n\n\t// This is the most important part! Checks to see if the post has a Post Thumbnail assigned to it. You can delete the if conditional if you want and assume that there will always be a thumbnail\n\tif ( has_post_thumbnail()) {\n\t\tprintf( '%s', genesis_get_image( array( 'size' => $size, 'attr' => $default_attr ) ) );\n\t}\n\n}", "function fe_show_product_image() {\n // wc_get_template( 'single-product/product-image.php' );\n include_once(FESTIVAL_EVENTS_PLUGIN_PATH . 'templates/single-product/product-image.php');\n }", "function mob_images() {\n\tupdate_option( 'thumbnail_size_w', 360 );\n\tupdate_option( 'thumbnail_size_h', 220 );\n\tupdate_option( 'thumbnail_crop', 1 );\n\n\tupdate_option( 'medium_size_w', 654 );\n\tupdate_option( 'medium_size_h', 9999 );\n\tupdate_option( 'medium_crop', 0 );\n\n\tupdate_option( 'medium_large_size_w', 0 );\n\tupdate_option( 'medium_large_size_h', 0 );\n\n\tupdate_option( 'large_size_w', 850 );\n\tupdate_option( 'large_size_h', 400 );\n\tupdate_option( 'large_crop', 1 );\n\n\tadd_image_size( 'archive-blog', 360, 170, true );\t\n}", "protected function imageName() {}", "function storeImages()\n {\n }", "function show_images() {\n global $app;\n $images = new entities\\Image();\n $cursor = $images->getRange($app, 0);\n $posts = array();\n \n foreach ($cursor->toArray() as $post) {\n $posts[] = $post;\n }\n return $app['twig']->render('admin/admin_images.twig', array('images' => $posts));\n}", "function generate_post_image()\n {\n // If there's no featured image, return.\n if (!has_post_thumbnail()) {\n return;\n }\n\n // If we're not on any single post/page or the 404 template, we must be showing excerpts.\n if (!is_singular() && !is_404()) {\n echo apply_filters('generate_featured_image_output', sprintf( // WPCS: XSS ok.\n '<div class=\"post-image\">\n\t\t\t\t\t%3$s\n\t\t\t\t\t<a href=\"%1$s\">\n\t\t\t\t\t\t%2$s\n\t\t\t\t\t</a>\n\t\t\t\t</div>',\n esc_url(get_permalink()),\n get_the_post_thumbnail(\n get_the_ID(),\n apply_filters('generate_page_header_default_size', 'full'),\n array(\n 'itemprop' => 'image',\n )\n ),\n apply_filters('generate_inside_featured_image_output', '')\n ));\n }\n }", "function bethel_add_image_to_pages() {\n\tglobal $post;\n\tif ($post) {\n\t\t$image_id = get_post_thumbnail_id ($post->ID);\n\t\tif ($image_id) {\n\t\t\tif ($post->post_type != 'bethel_stories' && $post->page_template != 'stories.php') {\n\t\t\t\t$image = wp_get_attachment_image_src($image_id, 'bethel_supersize');\n\t\t\t\tif ($image) {\n\t\t\t\t\tif ($image[1] < 800) { //width\n\t\t\t\t\t\t$image[2] = round($image [2] / $image[1] * 800);\n\t\t\t\t\t}\n\t\t\t\t\t$image[2] = ($image[2] > 400) ? 400 : $image[2]; //height\n\t\t\t\t\techo \"<style type=\\\"text/css\\\">.entry-header { height: {$image[2]}px; background-image: url('{$image[0]}')}</style>\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\techo \"<style type=\\\"text/css\\\">\n .content .entry-header { margin-top: 75px; margin-top: 7.5rem }\n .content .entry-content { padding-top: 25px; padding-top: 2.5rem; }\n </style>\";\n\t\t}\n\t}\n}", "public function preview_image()\n {\n return 'contact-area/02.png';\n }", "public function preview_image()\n {\n return 'contact-area/04.png';\n }", "function addArticleImage($object) {\n /* you can itentify the article with $object->reference->ShopId */ \n $object->Item->ShopId = 'yourReturnedArticlebildIdOnMarketplace_'.rand(1000, 9999); \n}", "function cpc_broker_list_image( $theuser ){\n\n\tglobal $cp_options;\n\t\n\t// args\n\t$args = array(\n\t\t'author'=>$theuser,\n\t\t'post_type' => array( 'ad_listing' )\n\t);\n\t\n\t// The Query\n\t$author_query = new WP_Query( $args );\n\t\n\t// The Loop\n\tif ( $author_query->have_posts() ) {\n\t\tob_start(); ?>\n\t\t<ul>\n\t\t<?php while ( $author_query->have_posts() ) {\n\t\t\t$author_query->the_post(); ?>\n\t\t\t<li>\n\t\t\t\t<a href=\"<?php echo the_permalink(); ?>\"><h4><?php echo the_title(); ?></h4></a>\n\t\t\t\t<?php if ( $cp_options->ad_images ) cp_ad_loop_thumbnail(); ?>\n\t\t\t</li>\n\t\t<?php } ?>\n\t\t</ul>\n\t<?php\n\t} else {\n\t\t// no posts found\n\t}\n\t/* Restore original Post Data */\n\twp_reset_postdata();\n\treturn ob_get_clean();\n}", "public function actionimages()\n {\n $module = \"DocumentAttachments\";\n $urlquerystring = $_SERVER['QUERY_STRING'];\n $paraArr = explode(\"/\", $urlquerystring);\n $ticketId = $paraArr['2'];\n $model = new Troubleticket;\n $imagedata = $model->getimage($module, $ticketId);\n header(\"Content-Type: image/jpeg\");\n header(\"Content-Disposition: inline;filename=\" . $imagedata['result']['filename']);\n echo base64_decode($imagedata['result'][filecontent]);\n die;\n }", "function item_image($imageType = null, $props = array(), $index = 0, $item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n $imageFile = $item->getFile($index);\n $fileMarkup = new Omeka_View_Helper_FileMarkup;\n return $fileMarkup->image_tag($imageFile, $props, $imageType);\n}", "function dfcg_help_images() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Image Management', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'Quite simply, the Featured Images option is the best and easiest to use. The manual methods (Full and Partial) are primarily there for reasons of backwards compatibility, for those users who have been using the DCG since its earliest versions.', DFCG_DOMAIN ) ;?></p>\n\t\n\t<p><em><?php _e( 'Note: it is quite possible that the manual image management options will be removed in future. Therefore users are encouraged to use the Featured Image option - it is easier and more flexible.', DFCG_DOMAIN ); ?></em></p>\n\t\n\t<p><?php _e( 'If you select the Partial URL option you will be prompted to enter the URL to the root folder for your images. You must enter a URL here otherwise the DCG will not find your images.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}", "function column_image($item){\n return sprintf('<img src=\"%1$s\">',\n /*$1%s*/ site_url().$item['image']\n );\n }", "public function get_title() {\n\t\treturn esc_html__( 'Woo Product Images', 'woocommerce-builder-elementor' );\n\t}", "public function get_image_link()\n {\n }", "public function imagesAction()\n {\n $logedUser = $this->getServiceLocator()\n ->get('user')\n ->getUserSession();\n $permission = $this->getServiceLocator()\n ->get('permissions')\n ->havePermission($logedUser[\"idUser\"], $logedUser[\"idWebsite\"], $this->moduleId);\n if ($this->getServiceLocator()\n ->get('user')\n ->checkPermission($permission, \"edit\")) {\n \n \n if ($this->getServiceLocator()\n ->get('user')\n ->checkPermission($permission, \"edit\") || $logedUser[\"idCompany\"] == 1) {\n $request = $this->getRequest();\n }\n \n $images = $this->getImageTable()->fetchAll($logedUser[\"idWebsite\"]);\n $this->layout(\"layout/images.phtml\");\n return array(\n \"images\" => $images,\n \"idWebsite\" => $logedUser[\"idWebsite\"]\n );\n } else {\n return $this->redirect()->toRoute(\"noPermission\");\n }\n }", "public function getImageUrl()\n {\n return WEB_SERVER_BASE_URL . '/badges/images/' . $this->data['id'];\n }", "function get_post_galleries_images($post = 0)\n {\n }", "function shift_image_sizes() {\n\n\t// image size for members archive\n\tadd_image_size( 'shift_team_thumb', 600, 600, true );\n\n}", "function generate_image_sizes() {\n\t$display_options = get_customizer_settings()[ WPM_PREFIX . 'collection_style' ];\n\n\tadd_image_size(\n\t\tWPM_PREFIX . 'list_thumb',\n\t\t$display_options['list_image_max_width'],\n\t\t$display_options['list_image_max_height']\n\t);\n}", "public function actionPublishWighImg()\n {\n $imgDir = Yii::getAlias('@frontend') . DIRECTORY_SEPARATOR . 'web';\n $sql = \"SELECT ci.id, ci.category_id, cc.name AS category_name, cc.lang, ci.published, ci.sku, civ.articul, civ.img_url\nFROM catalog_item ci \nLEFT JOIN catalog_item_variant civ ON civ.product_id = ci.id\nLEFT JOIN catalog_category cc ON cc.id = ci.category_id\nWHERE ci.published = 0\";\n $items = CatalogItemVariant::findBySql($sql)\n ->asArray()\n ->all();\n if (!empty($items)) {\n $i = $j = 0;\n foreach ($items as $it) {\n // echo print_r($it, 1) . PHP_EOL;\n $imgPathFull = $imgDir . $it['img_url'];\n if (file_exists($imgPathFull)) {\n echo 'File exists: ' . $imgPathFull . PHP_EOL;\n $j ++;\n\n $ci = CatalogItem::findOne(['id' => $it['id'], 'published' => 0]);\n if (!empty($ci)) {\n $ci->published = 1;\n $ci->save();\n }\n }\n $i ++;\n }\n echo 'Checked ' . $i . ' items. Found ' . $j . ' items with images.' . PHP_EOL;\n }\n }", "public function getImage( $post_id ) {}", "public function define_image_sizes(){\n add_image_size('icon', 96, 96, true);\n add_image_size('item_details_featured', 600, 600, true);\n add_image_size('item_details_featured_sm', 480, 480, true);\n add_image_size('post_preview', 300, 300, true);\n\n }", "public function get_name() {\n\t\treturn 'single-product-images';\n\t}", "public function image_sizes() {\n add_image_size('careerfy-job-medium', 358, 204, true); // posts for team grid and medium\n add_image_size('careerfy-posts-msmal', 85, 58, true); // posts for team grid and medium\n add_image_size('careerfy-emp-msmal', 132, 47, true); //\n add_image_size('careerfy-candidate-2', 350, 450, true); // posts for team grid and medium\n add_image_size('careerfy-testimonial-thumb', 268, 268, true); // posts for team grid and medium\n add_image_size('careerfy-service', 247, 252, true); // posts for team grid and medium\n }", "public function getImage() {\n if ($this->item_image == null) {\n return Yii::app()->request->baseUrl . \"/images/box/default.jpg\";\n } else {\n return Yii::app()->request->baseUrl . \"/images/box/\" . $this->item_image;\n }\n }", "function getName() \t\t { return 'NP_ImageCreateThumbnail'; }", "function setArticleImage($object) { \n /* you can itentify the item with $object->Item->ShopId */ \n /* you can itentify the article with $object->reference->ShopId */ \n}", "function GetImage()\n {\n //Obtient les images par défaut de chaque produit de la fiche\n $ficheProduct = new EeCommerceFicheProductProduct($this->Core);\n $ficheProduct->AddArgument(new Argument(\"EeCommerceFicheProductProduct\", \"FicheId\", EQUAL, $this->IdEntite));\n $products = $ficheProduct->GetByArg();\n \n $html = \"<div>\";\n \n foreach($products as $product)\n {\n $img = new Image($product->Product->Value->ImageDefault->Value);\n $img->Alt = $img->Title = $product->Product->Value->NameProduct->Value;\n \n $html .= \"<div class='col-md-4' >\" . $img->Show().\"</div>\"; \n }\n \n $html .= \"</div>\";\n \n return $html;\n \n }", "function display_image($entity)\n{\n\tglobal $config;\n\t\n\techo '\n\t\t\t<div class=\"heading-block clearfix\">\n\t\t\t\t<div class=\"heading-thumbnail\">';\n\t\t\t\t\n\t\n\tif (isset($entity->thumbnailUrl))\n\t{\n\t\techo '<img src=\"' . $config['thumbnail_cdn'] . get_thumbnail_url($entity->thumbnailUrl) . '\" />';\t\t\n\t}\t\n\telse\n\t{\n\t\techo '<img src=\"images/no-icon.svg\" />';\n\t}\n\t\t\n\techo '\n\t\t\t\t</div>\n\t\t\t\t<div class=\"heading-body\">\n\t\t\t\t\t<div class=\"heading-title\">';\n\t\t\t\t\t\n\techo get_literal_display($entity->name);\n\techo '\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"heading-description\">';\n\t\t\t\t\t\n\tif (isset($entity->description))\n\t{\n\t\techo '<div class=\"caption\">' . get_literal_display($entity->description) . '</div>';\n\t}\t\t\t\n\t\n\techo '<div id=\"identifiers\">';\n\techo '<ul class=\"identifier-list\">';\n\techo '<li><a class=\"external\" href=\"' . $entity->{'@id'} . '\" target=\"_new\">' . $entity->{'@id'} . '</a></li>';\n\techo '</ul>';\n\techo '</div>';\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\techo '\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>';\n\t\t\t\n\t// Display image\n\techo '<div>';\t\n\techo '<img class=\"image\" src=\"' .$entity->contentUrl->{'@id'} . '\" />';\t\n\techo '</div>';\n\n\n\n\techo '\n\t\t<script>figure_is_part_of(\"' . $entity->{'@id'} . '\", \"cited_by\");</script> \n\t';\n}", "public function presentation_images()\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$this->load->model('presentation_images_model', 'pim');\n\t\t\t$data['presentation_images'] = $this->pim->get_all();\n $data['presentation_act'] = $this->pim->get_link();\n\t\t\t$this->load->view('presentation_images-admin', $data);\n\t\t}", "public function add_image() {\n\t $this->use_layout=false;\n\t $this->page = new $this->model_class(Request::get('id'));\n\t\t$this->join_name = \"images\";\n\t if(Request::post(\"id\")) {\n\t\t $this->image = new WildfireFile(Request::post('id'));\n\t\t $this->image->join_order = Request::post('order');\n\t\t $this->page->images = $this->image;\n\t }\n\t}", "function newsdot_post_thumbnail() {\n\t\tif ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( is_singular() ) :\n\t\t\t?>\n\n\t\t\t<div class=\"post-thumbnail mb-4\">\n\t\t\t\t<figure>\n\t\t\t\t\t<?php\n\t\t\t\t\tthe_post_thumbnail();\n\t\t\t\t\tif ( get_the_post_thumbnail_caption() ) {\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<figcaption><?php the_post_thumbnail_caption(); ?></figcaption>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</figure>\n\t\t\t</div><!-- .post-thumbnail -->\n\n\t\t<?php else : ?>\n\n\t\t\t<a class=\"post-thumbnail\" href=\"<?php the_permalink(); ?>\" aria-hidden=\"true\" tabindex=\"-1\">\n\t\t\t\t<?php\n\t\t\t\t\tthe_post_thumbnail(\n\t\t\t\t\t\t'newsdot-wide-image',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'alt' => the_title_attribute(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'echo' => false,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</a>\n\n\t\t\t<?php\n\t\tendif; // End is_singular().\n\t}", "function wcfm_view_manage_posts() {\n\t\tglobal $WCFM, $typenow;\n\n\t\tif ( in_array( $typenow, wc_get_order_types( 'order-meta-boxes' ) ) ) {\n\t\t\techo '<a style=\"float: right;\" href=\"' . get_wcfm_orders_url() . '\"><img src=\"' . $WCFM->plugin_url . '/assets/images/wcfm-30x30.png\" alt=\"' . __( 'WCFM Home', 'wc-frontend-manager' ) . '\" /></a>';\n\t\t} elseif ( 'product' == $typenow ) {\n\t\t\techo '<a style=\"float: right;\" href=\"' . get_wcfm_products_url() . '\"><img src=\"' . $WCFM->plugin_url . '/assets/images/wcfm-30x30.png\" alt=\"' . __( 'WCFM Home', 'wc-frontend-manager' ) . '\" /></a>';\n\t\t} elseif ( 'shop_coupon' == $typenow ) {\n\t\t\techo '<a style=\"float: right;\" href=\"' . get_wcfm_coupons_url() . '\"><img src=\"' . $WCFM->plugin_url . '/assets/images/wcfm-30x30.png\" alt=\"' . __( 'WCFM Home', 'wc-frontend-manager' ) . '\" /></a>';\n\t\t}\n\t}", "public function actionImg()\n {\n $title = '微站设置/音乐设置';\n //title of webpage,you can find title in /web/pub/top.php eg:wechat demo\n $keywords = 'wechat demo';\n //title of webpage,you can find title in /web/pub/top.php eg:''\n $description = '';\n return $this -> render('img',[\n 'title' => $title,//title of webpage,you can find title in the head of /web/pub/top.php\n 'keywords' => $keywords,//keywords of webpage,you can find keywords in the head of /web/pub/top.php\n 'description' => $description//description of webpage,you can find description in the head of /web/pub/top.php\n ]);\n }", "function image() {\n return data_field_admin::field_icon($this);\n }", "function TS_VCSC_Add_Posts_Image_Lean() {\r\n\t\t\t\tvc_lean_map('TS_VCSC_Posts_Image_Grid_Standalone',\t\t\tarray($this, 'TS_VCSC_Add_Posts_Image_Elements'), null);\r\n\t\t\t}", "function get_mob_template_imgs($mob_oper) {\n return $this->Trader_mdl->get_mobprefix($mob_oper);\n }", "public function getImage() {\n return Mage::helper('landingpage/image')->getImageUrl($this->getData('image'));\n }", "public function addImages()\n {\n $offices = $this->service->getOffices();\n\n return view('admin.office.addimages',['offices' => $offices]);\n }", "public function images()\n {\n return $this->hasMany(ProductImageProxy::modelClass(), 'seller_product_id');\n }", "public static function theme_images() {\r\n add_image_size('slideshow-980', 980, 420, true);\r\n add_image_size('slideshow-1200', 1180, 550, true);\r\n add_image_size('slideshow-1560', 1540, 550, true);\r\n add_image_size('slideshow-720', 600, 550, true);\r\n add_image_size('grid-thumbnail', 370, 270, true);\r\n add_image_size('icon-60', 60, 60, true);\r\n add_image_size('icon-100', 100, 100, true);\r\n add_image_size('icon-40', 40, 40, true);\r\n }", "function _sf_get_spot_listing_image($post_id, $post_title = null) {\n\t\t\n\t\t//// GETS OUR FEATURED IMAGE\n\t\t$image = btoa_get_featured_image($post_id);\n\t\t\n\t\t//// GENERATES OUR MARKUP\n\t\t$markup = '';\n\t\t\n\t\t//// LINK TAG\n\t\t$markup .= '<a href=\"'.get_permalink($post_id).'\" title=\"'.$post_title.'\" class=\"spot-image\">';\n\t\t\n\t\t///// IF IT'S FEATURED\n\t\tif(get_post_meta($post_id, 'featured', true) == 'on') { $markup .= '<span class=\"featured\">'.__('Featured', 'btoa').'</span>'; }\n\t\t\n\t\t///// IMAGE\n\t\t$markup .= '<img src=\"'.ddTimthumb($image, 500, 350).'\" alt=\"'.$post_title.'\" title=\"'.$post_title.'\" />';\n\t\t\n\t\t//// CLOSES LINK TAG\n\t\t$markup .= '</a>';\n\t\t\n\t\treturn $markup;\n\t\t\n\t}", "function post_image($data)\n\t{\n\t\tglobal $db;\n\t\t$query = 'SELECT board_image_filename FROM gv_board_post_image WHERE (board_post_id = ' . $data . ') AND (board_image_block = 0) ORDER BY board_image_id ASC LIMIT 1';\n\t\t$result = mysql_query($query, $db) or die(mysql_error($db));\n\n\t\tif(mysql_num_rows($result) !== 0)\n\t\t{\n\t\t\t$row = mysql_fetch_assoc($result);\n\t\t\textract($row);\n\t\t\t$the_image = $board_image_filename;\n\t\t}\n\t\tif(mysql_num_rows($result) == 0)\n\t\t{\n\t\t\t\t$the_image = \"default.png\";\n\t\t}\n\t\treturn $the_image;\n\t}", "function url_images(): string\n{\n return \\plugins_url(\"images/\", BOOKCLUBFILE);\n}", "public function get_image_title()\n {\n }", "function get_images() \t{\n \t\treturn $this->getImages();\n \t}", "function bethel_add_image_to_stories() {\n\tglobal $post;\n\tif ($post && ($post->post_type=='bethel_stories' || $post->page_template == 'stories.php')) {\n\t\techo \"<div class=\\\"bethel-featured-image-wrapper\\\">\";\n\t\tthe_post_thumbnail('bethel_column_width');\n\t\t$caption = apply_filters ('bethel_featured_image_caption', '');\n\t\tif ($caption != '') {\n\t\t\techo \"<div class=\\\"bethel-featured-image-caption\\\">{$caption}</div>\";\n\t\t}\n\t\tdo_action ('bethel_after_featured_image');\n\t\techo \"</div>\";\n\t}\n}", "public function getImageUrl();", "function wp_save_image($post_id)\n {\n }", "public function gen_thumbnail()\n {\n }", "public function gen_thumbnail()\n {\n }", "public function images()\n {\n return get_field('images');\n }", "function getSrcAltImage($postID,$size=false){\n\t$imgID = get_post_thumbnail_id($postID);\n\t$img = wp_get_attachment_image_src($imgID,$size, false, '');\n\t$imgAlt = get_post_meta($imgID,'_wp_attachment_image_alt', true);\n\t$imgAttr = array(\n\t\t'url' => $img,\n\t\t'alt' => $imgAlt\n\t);\n\tif(is_shop()){\n\t\techo '<section class=\"shop-image\">';\n\t\techo '<img class=\"img-max\" src=\"' . $imgAttr['url'][0] . '\" alt=\"\" />';\n\t\techo '</section>';\n\t}else{\n\t\treturn $imgAttr;\n\t}\n}", "public function getMediaImageUrl() {\n return $this->objectManager->get ( 'Magento\\Store\\Model\\StoreManagerInterface' )->getStore ()->getBaseUrl ( \\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA ) . 'catalog/product';\n }", "protected function getImageAttributes() {}", "function jigoshop_custom_image($args=array()) {\n\trequire_once (ABSPATH . '/wp-admin/includes/image.php');\n\n\t$defaults = array('image'=>null, 'echo'=>true, 'width'=>60, 'height'=>60);\n\t$args = wp_parse_args($args, $defaults);\n\n\textract($args);\n\n\tif (isset($_POST['image']) && defined('DOING_AJAX') && DOING_AJAX){\n\t\t$image = isset($_POST['image']) ? $_POST['image'] : null;\n\t\t$width = isset($_POST['width']) ? $_POST['width'] : $width;\n\t\t$height = isset($_POST['height']) ? $_POST['height'] : $height;\n\t}\n\n\t$src = jigoshop_custom_image_src($image, $width, $height);\n\n\tif ($echo){\n\t\techo '<img src=\"' . $src . '\" width=\"' . $width . '\" height=\"' . $height . '\" class=\"jigoshop-media-preview\"/>';\n\t}\n\n\tif (defined('DOING_AJAX') && DOING_AJAX){\n\t\texit();\n\t} else {\n\t\treturn $src;\n\t}\n}", "function shop_uc_product_image($variables) {\n static $rel_count = 0;\n $images = $variables['images'];\n\n // Get the current product image widget.\n $image_widget = uc_product_get_image_widget();\n\n $first = array_shift($images);\n\n //$output = '<div class=\"product-image\"><div class=\"main-product-image\">'; // Sudhakar\n $output = '<div class=\"product_img_big\">';\n $output .= '<a href=\"' . image_style_url('uc_product_full', $first['uri']) . '\" title=\"' . $first['title'] . '\"';\n if ($image_widget) {\n $image_widget_func = $image_widget['callback'];\n $output .= $image_widget_func($rel_count);\n } \n $output .= '>';\n $output .= theme('image_style', array(\n 'style_name' => 'uc_product',\n 'path' => $first['uri'],\n 'alt' => $first['alt'],\n 'title' => $first['title'],\n\t'width' => 100, // Sudhakar\n\t'height' => 92, // Sudhakar\n ));\n // $output .= '</a></div>'; // Sudhakar\n $output .= '</a>';\n\n if (!empty($images)) {\n $output .= '<div class=\"more-product-images\">';\n foreach ($images as $thumbnail) {\n // Node preview adds extra values to $images that aren't files.\n if (!is_array($thumbnail) || empty($thumbnail['uri'])) {\n continue;\n }\n $output .= '<a href=\"' . image_style_url('uc_product_full', $thumbnail['uri']) . '\" title=\"' . $thumbnail['title'] . '\"';\n if ($image_widget) {\n $output .= $image_widget_func($rel_count);\n }\n $output .= '>';\n $output .= theme('image_style', array(\n 'style_name' => 'uc_thumbnail',\n 'path' => $thumbnail['uri'],\n 'alt' => $thumbnail['alt'],\n 'title' => $thumbnail['title'],\n ));\n $output .= '</a>';\n }\n $output .= '</div>';\n }\n\n $output .= '</div>';\n $rel_count++;\n\n return $output;\n}", "public function register_rest_episode_images() {\n\t\tregister_rest_field(\n\t\t\tssp_post_types(),\n\t\t\t'episode_featured_image',\n\t\t\tarray(\n\t\t\t\t'get_callback' => array( $this, 'get_rest_featured_image' ),\n\t\t\t\t'update_callback' => null,\n\t\t\t\t'schema' => null,\n\t\t\t)\n\t\t);\n\t}", "function print_images()\n {\n $images = $this->service->imageList();\n $image_choice = 0;\n foreach ($images as $image) {\n printf(\"%d) %s: Image %s requires min. %dMB of RAM and %dGB of disk\\n\",\n $image_choice, $image->id, $image->name, $image->minRam,\n $image->minDisk);\n $image_choice += 1;\n }\n }", "function amap_ma_get_entity_img($u, $namecleared) {\n if (!$namecleared)\n return false;\n\n if (elgg_instanceof($u, 'user') || elgg_instanceof($u, 'group')) {\n $entity_img = elgg_view('output/img', array(\n 'src' => $u->getIconURL('tiny'),\n 'alt' => $namecleared,\n 'class' => \"mapicon\",\n ));\n } else if (elgg_instanceof($u, 'object', 'agora')) {\n $entity_img = elgg_view('output/url', array(\n 'href' => \"agora/view/{$u->guid}/\" . elgg_get_friendly_title($namecleared),\n 'text' => elgg_view('agora/thumbnail', array('classfdguid' => $u->guid, 'size' => 'tiny', 'tu' => $u->time_updated)),\n 'class' => \"mapicon\",\n ));\n } else if (elgg_instanceof($u, 'object', 'page') || elgg_instanceof($u, 'object', 'page_top')) {\n $entity_img = elgg_view('output/img', array(\n 'src' => $u->getIconURL('tiny'),\n 'alt' => $namecleared,\n 'class' => \"mapicon\",\n ));\n }\n return $entity_img;\n}", "public function amazon_product_image_url_meta_box() {\n\t\trequire __DIR__ . '/partials/amazon-product-import-amazon-product-image-url-meta-box.php';\n\t}", "public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }", "public function image()\n {\n return view('panel.user.form-image', [\n 'id' => $this->getId(),\n 'breadcrumbs' => $this->getBreadcrumb('Imagem')\n ]);\n }", "protected function _render()\r\n\t{\r\n\t\tCore::getLang()->load(\"Signature\");\r\n\t\t$config = $this->getConfig()->getChildren(\"image\");\r\n\t\t$statsConfig = $config->getChildren(\"stats\");\r\n\t\t$planetsConfig = $config->getChildren(\"planets\");\r\n\r\n\t\t$user = $this->getUser();\r\n\t\t$img = imagecreatefrompng(AD.\"img/\".$config->getString(\"background\"));\r\n\r\n\t\tif($statsConfig->getInteger(\"show\"))\r\n\t\t{\r\n\t\t\t$result = Core::getQuery()->select(\"user\", array(\"userid\"));\r\n\t\t\t$totalUser = fNumber(Core::getDB()->num_rows($result));\r\n\t\t\tCore::getDB()->free_result($result);\r\n\t\t\t$this->_addParamToImage($img, \"stats\", Core::getLang()->get(\"RANK\").\" \".$user->getFormattedRank().\"/\".$totalUser);\r\n\t\t}\r\n\r\n\t\tif($planetsConfig->getInteger(\"show\"))\r\n\t\t{\r\n\t\t\t$result = Core::getQuery()->select(\"planet\", array(\"planetid\"), \"\", \"userid = '{$user->getUserid()}' AND ismoon = 0\");\r\n\t\t\t$planets = Core::getLang()->get(\"NUMBER_OF_COLONY\").\" \".fNumber(Core::getDB()->num_rows($result) - 1);\r\n\t\t\tCore::getDB()->free_result($result);\r\n\t\t\t$this->_addParamToImage($img, \"planets\", $planets);\r\n\t\t}\r\n\r\n\t\t$this->_addParamToImage($img, \"username\", $user->getUsername());\r\n\t\t$this->_addParamToImage($img, \"gamename\", Core::getConfig()->get(\"pagetitle\"));\r\n\t\t$this->_addParamToImage($img, \"planet\", $user->getHomePlanet()->getPlanetname().\" [\".$user->getHomePlanet()->getCoords(false).\"]\");\r\n\t\t$this->_addParamToImage($img, \"points\", Core::getLang()->get(\"POINTS\").\" \".$user->getFormattedPoints());\r\n\r\n\t\tif($user->getAid())\r\n\t\t{\r\n\t\t\t$this->_addParamToImage($img, \"alliance\", Core::getLang()->get(\"ALLIANCE\").\" \".$user->getAlliance()->getTag());\r\n\t\t}\r\n\r\n\t\timagepng($img, $this->getCachePath().$this->getUserId().self::IMAGE_FILE_EXTENSION, $config->getInteger(\"quality\"));\r\n\t\timagedestroy($img);\r\n\t\treturn $this;\r\n\t}", "function statsImage($merchantData) {\n \t if ( ! isset($merchantData->stat_links) || ! is_array($merchantData->stat_links) || count($merchantData->stat_links) < 1 )\n \t return '';\n \t \n \t $images = '';\n \t \n \t foreach ( $merchantData->stat_links as $link ) {\n \t if ( isset($link->url) && preg_match('/^http/', $link->url) )\n \t $images .= '<img src=\"' . $link->url . '\" class=\"praized-merchant-stats-img\" width=\"1\" height=\"1\" border=\"0\" alt=\"Statistics Target\" style=\"margin:0; padding:0; border:none;\" />';\n \t }\n \t \n \t return $images;\n \t}", "function get_representative_images() {\n global $post;\n $images = array('http://www.heyreverb.com/wp-content/themes/spiegelmagazine-pro/images/logo.png');\n if ( has_post_thumbnail($post->ID) ) { // check if the post has a Post Thumbnail assigned to it.\n $image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail');\n array_unshift($images, $image_url[0]);\n }\n return $images;\n}", "function setVakoImage($object) { \n /* you can itentify the item with $object->Item->ShopId */ \n /* you can itentify the vako with $object->reference->ShopId */ \n}", "function deco_collection_thumbs_number(){\n\t\t$collection_thumbs_setting=get_theme_option('Collection Thumbs');\n\t\tif ($collection_thumbs_setting == 'yes'){\n\t\t\techo '<div id=\"index-collection-img\">';\n \t while (loop_items_in_collection(4)):\n\t\t\techo link_to_item((item_square_thumbnail()), array('item' => item('id')));\n\t\t\tendwhile;\n\t\t\techo'</div>';\n\t\t} \n}", "function my_post_image_html( $html, $post_id, $post_image_id )\r\n{\r\n\t$src = wp_get_attachment_image_src ( get_post_thumbnail_id ( $post_id ));\r\n\t\r\n\t$html = '<img src=\"'.$src[0].'\" alt=\"'.esc_attr( get_post_field( 'post_title', $post_id ) ).'\">';\r\n\t\r\n\treturn $html;\r\n}", "public function imageAction() {\n\n if ($this->_user == 'user') {\n $this->_redirect('/');\n }\n\n $testCaseExpId = (integer) $this->getRequest()->getParam('eid');\n try {\n $testCaseExpectation = new Yourdelivery_Model_Testing_TestCaseExpectation($testCaseExpId);\n } catch (Yourdelivery_Exception_Database_Inconsistency $exc) {\n $this->error('Requested site does not exists.');\n $this->_redirect('/testing_cms/');\n return;\n }\n $this->view->testCaseExp = $testCaseExpectation;\n }", "function section_text_nr_customfield() {\n\t\t_e('<p>If you use a Custom Field to show images in your posts, you can have nrelate show those images.</p>','nrelate');\n}", "private function SetProductImages()\n\t{\n\n\t\t$GLOBALS['ProductThumbWidth'] = ISC_PRODUCT_IMAGE::getSizeWidth(ISC_PRODUCT_IMAGE_SIZE_STANDARD);\n\t\t$GLOBALS['ProductThumbHeight'] = ISC_PRODUCT_IMAGE::getSizeHeight(ISC_PRODUCT_IMAGE_SIZE_STANDARD);\n\n\t\t$GLOBALS['ProductMaxTinyWidth'] = ISC_PRODUCT_IMAGE::getSizeWidth(ISC_PRODUCT_IMAGE_SIZE_TINY);\n\t\t$GLOBALS['ProductMaxTinyHeight'] = ISC_PRODUCT_IMAGE::getSizeHeight(ISC_PRODUCT_IMAGE_SIZE_TINY);\n\n\n\t\t$GLOBALS['ProductTinyBoxWidth'] = $GLOBALS['ProductMaxTinyWidth']+4;\n\t\t$GLOBALS['ProductTinyBoxHeight'] = $GLOBALS['ProductMaxTinyHeight']+4;\n\n\n\t\t$GLOBALS['ProductMaxZoomWidth'] = ISC_PRODUCT_IMAGE::getSizeWidth(ISC_PRODUCT_IMAGE_SIZE_ZOOM);\n\t\t$GLOBALS['ProductMaxZoomHeight'] = ISC_PRODUCT_IMAGE::getSizeHeight(ISC_PRODUCT_IMAGE_SIZE_ZOOM);\n\n\t\t$GLOBALS['ProductZoomWidth'] = ISC_PRODUCT_IMAGE::getSizeWidth(ISC_PRODUCT_IMAGE_SIZE_ZOOM);\n\t\t$GLOBALS['ProductZoomHeight'] = ISC_PRODUCT_IMAGE::getSizeHeight(ISC_PRODUCT_IMAGE_SIZE_ZOOM);\n\n\n\t\t$productImages = ISC_PRODUCT_IMAGE::getProductImagesFromDatabase($GLOBALS['ProductId'], null, false, true);\n\t\t$GLOBALS['NumProdImages'] = count($productImages);\n\n\t\t$GLOBALS['CurrentProdThumbImage'] = 0;\n\t\t$thumb = '';\n\t\t$curZoomImage = '';\n\t\t$GLOBALS['SNIPPETS']['ProductTinyImages'] = '';\n\t\t$GLOBALS['HideImageCarousel'] = 'display:none;';\n\t\t$GLOBALS['HideMorePicturesLink'] = 'display:none;';\n\t\t$thumbImageDescription = '';\n\t\t$i = 0;\n\n\t\t$GLOBALS['ProdImageJavascript'] = '';\n\t\t$GLOBALS['ProdImageZoomJavascript'] = '';\n\t\t$GLOBALS['LightBoxImageList'] = '';\n\t\t$GLOBALS['ZoomImageMaxWidth'] = 0;\n\t\t$GLOBALS['ZoomImageMaxHeight'] = 0;\n\t\t$GLOBALS['ZoomImageMaxWidthHeight'] = 0;\n\t\t$GLOBALS['HideAlwaysLinkedMorePicturesLink'] = 'display: none';\n\n\t\tif ($GLOBALS['NumProdImages']) {\n\t\t\t//Show image carousel\n\n\t\t\tif ($GLOBALS['NumProdImages'] == 2) {\n\t\t\t\t$var = \"MorePictures1\";\n\t\t\t} else if ($GLOBALS['NumProdImages'] == 1) {\n\t\t\t\t$var = \"SeeLargerImage\";\n\t\t\t} else {\n\t\t\t\t$var = \"MorePictures2\";\n\t\t\t}\n\n\t\t\t$GLOBALS['SeeMorePictures'] = sprintf(GetLang($var), count($productImages) - 1);\n\t\t\t$GLOBALS['HideAlwaysLinkedMorePicturesLink'] = '';\n\n\t\t\tif (GetConfig('ProductImagesTinyThumbnailsEnabled')) {\n\t\t\t\t$GLOBALS['HideImageCarousel'] = '';\n\t\t\t} else {\n\t\t\t\t$GLOBALS['HideMorePicturesLink'] = '';\n\t\t\t}\n\n\t\t\t$continue=false;\n\n\t\t\tforeach ($productImages as $productImage) {\n\n\t\t\t\t$thumbURL = '';\n\t\t\t\t$zoomImageURL = '';\n\n\t\t\t\ttry{\n\t\t\t\t\t$thumbURL = $productImage->getResizedUrl(ISC_PRODUCT_IMAGE_SIZE_STANDARD, true);\n\t\t\t\t\t//$GLOBALS['ProductThumbURL'] = $thumbURL;\n\t\t\t\t} catch (Exception $exception) {\n\t\t\t\t\t// do nothing, will result in returning blank string, which is fine\n\t\t\t\t}\n\n\t\t\t\ttry{\n\t\t\t\t\t$zoomImageURL = $productImage->getResizedUrl(ISC_PRODUCT_IMAGE_SIZE_ZOOM, true);\n\t\t\t\t} catch (Exception $exception) {\n\t\t\t\t\t// do nothing, will result in returning blank string, which is fine\n\t\t\t\t}\n\n\t\t\t\tif($thumbURL == '' && $zoomImageURL == '') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$resizedZoomDimension = $productImage->getResizedFileDimensions(ISC_PRODUCT_IMAGE_SIZE_ZOOM);\n\t\t\t\t$resizedTinyDimension = $productImage->getResizedFileDimensions(ISC_PRODUCT_IMAGE_SIZE_TINY);\n\n\t\t\t\t//calculate the max zoom image width and height\n\t\t\t\tif ($GLOBALS['ZoomImageMaxWidth'] < $resizedZoomDimension[ISC_PRODUCT_IMAGE_DIMENSIONS_WIDTH]) {\n\n\t\t\t\t\t$GLOBALS['ZoomImageMaxWidth'] = $resizedZoomDimension[ISC_PRODUCT_IMAGE_DIMENSIONS_WIDTH];\n\t\t\t\t\t//the height of the image has got the max width needed to calulate the image fancy box size.\n\t\t\t\t\t$GLOBALS['ZoomImageMaxWidthHeight'] = $resizedZoomDimension[ISC_PRODUCT_IMAGE_DIMENSIONS_HEIGHT];\n\t\t\t\t}\n\n\t\t\t\tif ($GLOBALS['ZoomImageMaxHeight'] < $resizedZoomDimension[ISC_PRODUCT_IMAGE_DIMENSIONS_HEIGHT]) {\n\t\t\t\t\t$GLOBALS['ZoomImageMaxHeight'] = $resizedZoomDimension[ISC_PRODUCT_IMAGE_DIMENSIONS_HEIGHT];\n\t\t\t\t\t//the width of the image has got the max height needed to calulate the image fancy box size.\n\t\t\t\t\t$GLOBALS['ZoomImageMaxHeightWidth'] = $resizedZoomDimension[ISC_PRODUCT_IMAGE_DIMENSIONS_HEIGHT];\n\t\t\t\t}\n\n\t\t\t\t$GLOBALS['ImageDescription'] = isc_html_escape($productImage->getDescription());\n\t\t\t\tif($GLOBALS['ImageDescription'] == '') {\n\t\t\t\t\t$GLOBALS['ImageDescription'] = GetLang(\"Image\") . \" \" . ($i + 1);\n\t\t\t\t}\n\n\t\t\t\t//show image carousel\n\t\t\t\tif(GetConfig('ProductImagesTinyThumbnailsEnabled')==1) {\n\n\t\t\t\t\t$GLOBALS['ProdImageJavascript'] .= \"\n\t\t\t\t\t\tThumbURLs[\".$i.\"] = \" . isc_json_encode($thumbURL) . \";\n\t\t\t\t\t\tProductImageDescriptions[\".$i.\"] = \" . isc_json_encode($GLOBALS['ImageDescription']) . \";\n\t\t\t\t\t\";\n\t\t\t\t\t$GLOBALS['TinyImageOverJavascript'] = \"showProductThumbImage(\".$i.\")\";\n\t\t\t\t\t//$GLOBALS['ProductTinyImageURL'] = $productImage->getResizedUrl(ISC_PRODUCT_IMAGE_SIZE_TINY, true);\n\n\t\t\t\t\ttry{\n\t\t\t\t\t\t$GLOBALS['ProductTinyImageURL'] = $productImage->getResizedUrl(ISC_PRODUCT_IMAGE_SIZE_TINY, true);\n\t\t\t\t\t\t//$GLOBALS['ProductThumbURL'] = $thumbURL;\n\t\t\t\t\t} catch (Exception $exception) {\n\t\t\t\t\t\t// do nothing, will result in returning blank string, which is fine\n\t\t\t\t\t}\n\n\t\t\t\t\t$GLOBALS['ProductThumbIndex'] = $i;\n\t\t\t\t\tif(GetConfig('ProductImageMode') == 'lightbox') {\n\t\t\t\t\t\t$GLOBALS['TinyImageClickJavascript'] = \"showProductImageLightBox(\".$i.\"); return false;\";\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$GLOBALS['TinyImageClickJavascript'] = \"showProductImage('\".GetConfig('ShopPath').\"/productimage.php', \".$GLOBALS['ProductId'].\", \".$i.\");\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$GLOBALS['TinyImageWidth'] = $resizedTinyDimension[ISC_PRODUCT_IMAGE_DIMENSIONS_WIDTH];\n\t\t\t\t\t$GLOBALS['TinyImageHeight'] = $resizedTinyDimension[ISC_PRODUCT_IMAGE_DIMENSIONS_HEIGHT];\n\t\t\t\t\t$GLOBALS['TinyImageTopPadding'] = floor(($GLOBALS['ProductMaxTinyHeight'] - $GLOBALS['TinyImageHeight']) / 2);\n\t\t\t\t\t$GLOBALS['SNIPPETS']['ProductTinyImages'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"ProductTinyImage\");\n\t\t\t\t\t$continue = true;\n\t\t\t\t}\n\n\t\t\t\tif(GetConfig('ProductImagesImageZoomEnabled') == 1) {\n\t\t\t\t\t//check if zoom image is large enough for image zoomer\n\t\t\t\t\tif($resizedZoomDimension[ISC_PRODUCT_IMAGE_DIMENSIONS_WIDTH]<ISC_PRODUCT_IMAGE_MIN_ZOOM_WIDTH && $resizedZoomDimension[ISC_PRODUCT_IMAGE_DIMENSIONS_HEIGHT]<ISC_PRODUCT_IMAGE_MIN_ZOOM_HEIGHT) {\n\t\t\t\t\t\t$zoomImageURL = '';\n\t\t\t\t\t}\n\t\t\t\t\t$GLOBALS['ProdImageZoomJavascript'] .= \"\n\t\t\t\t\t\tZoomImageURLs[\".$i.\"] = \" . isc_json_encode($zoomImageURL) . \";\n\t\t\t\t\t\";\n\t\t\t\t\t$continue = true;\n\t\t\t\t}\n\n\t\t\t\t//\t$GLOBALS['ProductZoomImageURL'] = $zoomImageURL;\n\n\t\t\t\t//this image is the product page thumbnail\n\t\t\t\tif($i==0) {\n\t\t\t\t\t//get the thumb image for product page\n\t\t\t\t\t$thumb = $thumbURL;\n\t\t\t\t\t$curZoomImage = $zoomImageURL;\n\t\t\t\t\t$thumbImageDescription = $GLOBALS['ImageDescription'];\n\t\t\t\t\t//if there is no need to loop through images anymore, get out from the loop.\n\t\t\t\t\tif($continue === false) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\t\t$GLOBALS['VisibleImageTotal'] = $i+1;\n\n\t\t$GLOBALS['ShowImageZoomer'] = GetConfig('ProductImagesImageZoomEnabled');\n\t\tif ($GLOBALS['ShowImageZoomer']) {\n\t\t\t$GLOBALS['SNIPPETS']['ProductImageZoomer'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"ProductImageZoomer\");\n\t\t}\n\t\t$GLOBALS['ZoomImageURL'] = $curZoomImage;\n\n\t\t//if no product thumb images\n\t\tif($thumb == '') {\n\t\t\tif(GetConfig('DefaultProductImage') == 'template') {\n\t\t\t\t$thumb = $GLOBALS['IMG_PATH'].'/ProductDefault.gif';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$thumb = GetConfig('ShopPath').'/'.GetConfig('DefaultProductImage');\n\t\t\t}\n\t\t}\n\n\t\t// need to check for variation images\n\t\t$GLOBALS['ImageDescription'] = $thumbImageDescription;\n\t\t$GLOBALS['ThumbImageURL'] = $thumb;\n\n\t\tif ($GLOBALS['NumProdImages']) {\n\t\t\t$GLOBALS['SNIPPETS']['ProductThumbImage'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('FastProductThumbImage');\n\t\t} else {\n\t\t\t$GLOBALS['SNIPPETS']['ProductThumbImage'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('ProductThumbImagePlaceholder');\n\t\t}\n\t}", "public function getMyImagefeedsAction()\n {\n\t echo Zend_Json::encode( \\Extended\\wall_post::getUserWall_lite( Auth_UserAdapter::getIdentity()->getId() , $this->getRequest()->getParam(\"offset\"), 10, Extended\\wall_post::WALL_TYPE_SOCIALISE ) );\n\t die;\n }", "function altlab_timeline_featured_image($entry, $form){\n $timeline_type = rgar($entry, '3');//entry field ID is 3\n if ($timeline_type == 'First computer I owned' ){//response\n $img_id = 6895;//id of image in wp media library\n }\n if ($timeline_type == 'First time online'){\n $img_id = 6899;\n }\n if ($timeline_type == 'First email'){\n $img_id = 6900;\n }\n if ($timeline_type == 'First cell phone'){\n $img_id = 6898;\n }\n \n set_post_thumbnail( $entry['post_id'], $img_id );\n}", "function tema_image_post() {\n\t\tif(has_post_thumbnail()) {\n?>\n\t\t\t<a href=\"<?php the_permalink(); ?>\" title=\"<?php the_title(); ?>\" class=\"post-thumbnail\">\n\t\t\t\t<?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'temaku'); ?>\n\t\t\t\t<img src=\"<?php echo $image[0]; ?>\" alt=\"<?php the_title(); ?>\" width=\"100%\" />\n\t\t\t</a>\n<?php\n\t\t} else {\n?>\n\t\t\t<a href=\"<?php the_permalink(); ?>\" rel=\"bookmark\" title=\"<?php the_title(); ?>\">\n\t\t\t\t<img src=\"<?php echo get_template_directory_uri(); ?>/images/default-image.png\" alt=\"<?php the_title(); ?>\" width=\"100%\">\n\t\t\t</a>\n<?php\n\t\t}\n\t}", "function type_url_form_image()\n {\n }", "public function addImagesSizes() {\n\t\t// add_image_size( 'small', 225, 9999 );\n\t\t// add_image_size( 'hero', 1600, 9999 );\n\t}", "public function Image() {\n\t\treturn $this()->{self::RelationshipName}();\n\t}", "function newsletter_image($ref, $size){\r\n\t\r\n\t$default_attr = array(\r\n\t\t'class'\t=> \"attachment-$size\",\r\n\t\t'alt' => trim(strip_tags( get_post_meta($ref, '_wp_attachment_image_alt', true) ))\r\n\t);\r\n\t\r\n\t$retour->image\t\t= wp_get_attachment_image( $ref, $size , false, $default_attr);\r\n\t$retour->legende\t= '<p style=\"font-family:Tahoma, Arial, sans-serif;color:#666666;font-size:11px;margin:7px 0;padding:0;font-style:italic;\">' . get_post_meta($ref, '_wp_attachment_image_alt', true) . '</p>';\r\n\t\r\n\treturn $retour;\r\n}", "function wpbm_slider_images(){\n global $wpdb;\n include( 'inc/admin/wpbm-slider-image.php' );\n die();\n }", "public function getImageAction()\n {\n $homebanner = $this->_getInitialBanner();\n $em = $this->getDoctrine()->getManager();\n $tagname = $homebanner->getName(); // Get image tag for home page banner slides\n\n $images = '';\n // TODO: add ability to use comma separated tags\n if (!empty($tagname)) {\n $images = $em->createQueryBuilder()\n ->select('bl')\n ->from('CmsXutBundle:Gist', 'bl')\n ->where('bl.type = :gisttype')\n ->setParameter('gisttype', 'image')\n ->addOrderBy('bl.date_created');\n\n $tag = $em->getRepository('CmsXutBundle:Tag')->findOneByName($tagname);\n if (count($tag) > 0) {\n $images = $images->innerJoin('bl.tags', 'tg')\n ->andWhere('tg.id = :tag')\n ->setParameter('tag', $tag->getId());\n\n $images = $images->getQuery()\n ->getResult();\n } else {\n $images = '';\n }\n }\n\n return $this->render('CmsHomeBannerBundle:Homebanner:images.html.twig', array(\n 'images' => $images,\n 'banner' => $homebanner\n ));\n }", "public function getHostImageUrl() {\n return $this->objectManager->get ( 'Magento\\Store\\Model\\StoreManagerInterface' )->getStore ()->getBaseUrl ( \\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA ) . 'Airhotels/Customerprofileimage/Resized';\n }", "public function getImage() {}", "public function show_product_images(){\n// $default_variation_id=WPB_Common_Functions::get_default_variation_id();\n// $initial_product_id = ($default_variation_id) ? $default_variation_id : $product->id;\n// $initial_product_id = WPB_Common_Functions::get_selected_varaiton( $initial_product_id );\n// $image_ids = WPB_Common_Functions::get_all_image_ids( $initial_product_id );\n// $default_image=$image_ids[0];\n// $other_images=$image_ids;\n// unset($other_images[0]);\n\n ?>\n <div class=\"im-sd-sec\" id=\"im-sd-sec\">\n\n <a href=\"\" id=\"wpb_main_image_link\"> <img src=\"\" class=\"img-responsive\" id=\"wpb_main_images\"></a>\n\n <div class=\"sm-img-cl\" id=\"wpb_additional_images\"></div>\n\n </div>\n <?php\n }", "protected function processImage() {}", "public function loginImageUrl()\r\n\t{\t\r\n\t\treturn \"media/ezloginlite/images/\";\r\n\t}", "public function get_icon()\n {\n return 'eicon-post-list';\n }", "protected function buildImagesFields()\n {\n $groupName = Translate::getAdminTranslation(\"Images\", \"AdminProducts\");\n\n //====================================================================//\n // PRODUCT IMAGES\n //====================================================================//\n\n //====================================================================//\n // Product Images List\n $this->fieldsFactory()->create(SPL_T_IMG)\n ->identifier(\"image\")\n ->inList(\"images\")\n ->name(Translate::getAdminTranslation(\"Images\", \"AdminProducts\"))\n ->group($groupName)\n ->microData(\"http://schema.org/Product\", \"image\")\n ->isReadOnly(self::isSourceCatalogMode())\n ->addOption(\"shop\", MSM::MODE_ALL)\n ;\n\n //====================================================================//\n // Product Images => Position\n $this->fieldsFactory()->create(SPL_T_INT)\n ->identifier(\"position\")\n ->inList(\"images\")\n ->name(Translate::getAdminTranslation(\"Position\", \"AdminProducts\"))\n ->microData(\"http://schema.org/Product\", \"positionImage\")\n ->group($groupName)\n ->isReadOnly(self::isSourceCatalogMode())\n ->addOption(\"shop\", MSM::MODE_ALL)\n ->isNotTested()\n ;\n\n //====================================================================//\n // Product Images => Is Cover\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->identifier(\"cover\")\n ->inList(\"images\")\n ->name(Translate::getAdminTranslation(\"Cover\", \"AdminProducts\"))\n ->microData(\"http://schema.org/Product\", \"isCover\")\n ->group($groupName)\n ->isReadOnly(self::isSourceCatalogMode())\n ->addOption(\"shop\", MSM::MODE_ALL)\n ->isNotTested()\n ;\n\n //====================================================================//\n // Product Images => Is Visible Image\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->identifier(\"visible\")\n ->inList(\"images\")\n ->name(Translate::getAdminTranslation(\"Visible\", \"AdminProducts\"))\n ->microData(\"http://schema.org/Product\", \"isVisibleImage\")\n ->group($groupName)\n ->isReadOnly(self::isSourceCatalogMode())\n ->addOption(\"shop\", MSM::MODE_ALL)\n ->isNotTested()\n ;\n }", "public function showImage()\n {\n }", "function render_block_core_post_featured_image($attributes, $content, $block)\n {\n }", "private function buildImagesFields()\n {\n $groupName = Translate::getAdminTranslation(\"Images\", \"AdminProducts\");\n\n //====================================================================//\n // PRODUCT IMAGES\n //====================================================================//\n\n //====================================================================//\n // Product Images List\n $this->fieldsFactory()->create(SPL_T_IMG)\n ->Identifier(\"image\")\n ->InList(\"images\")\n ->Name(Translate::getAdminTranslation(\"Images\", \"AdminProducts\"))\n ->Group($groupName)\n ->MicroData(\"http://schema.org/Product\", \"image\");\n\n //====================================================================//\n // Product Images => Position\n $this->fieldsFactory()->create(SPL_T_INT)\n ->Identifier(\"position\")\n ->InList(\"images\")\n ->Name(Translate::getAdminTranslation(\"Position\", \"AdminProducts\"))\n ->MicroData(\"http://schema.org/Product\", \"positionImage\")\n ->Group($groupName)\n ->isNotTested();\n\n //====================================================================//\n // Product Images => Is Cover\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->Identifier(\"cover\")\n ->InList(\"images\")\n ->Name(Translate::getAdminTranslation(\"Cover\", \"AdminProducts\"))\n ->MicroData(\"http://schema.org/Product\", \"isCover\")\n ->Group($groupName)\n ->isNotTested();\n\n //====================================================================//\n // Product Images => Is Visible Image\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->Identifier(\"visible\")\n ->InList(\"images\")\n ->Name(Translate::getAdminTranslation(\"Visible\", \"AdminProducts\"))\n ->MicroData(\"http://schema.org/Product\", \"isVisibleImage\")\n ->Group($groupName)\n ->isNotTested();\n }", "public function getImageUrl() \n {\n // return a default image placeholder if your source avatar is not found\n $imagen = isset($this->imagen) ? $this->imagen : 'default_product.jpg';\n return Url::to('@web/img/producto/'). $imagen;\n }", "function business_register_taxonomy_for_images() {\n register_taxonomy_for_object_type( 'category', 'attachment' );\n\tregister_taxonomy_for_object_type( 'content_type', 'attachment' );\n}" ]
[ "0.63640726", "0.61508673", "0.6022081", "0.60200876", "0.5988205", "0.59473413", "0.5940394", "0.58791983", "0.58733326", "0.58606696", "0.5837641", "0.58295256", "0.5814326", "0.58072424", "0.57605183", "0.5738988", "0.57173747", "0.5707675", "0.56993335", "0.5694651", "0.56880164", "0.5686835", "0.5667734", "0.5663361", "0.56537056", "0.56455445", "0.5633728", "0.5623701", "0.5620658", "0.5603459", "0.55828756", "0.55526924", "0.55505306", "0.55462164", "0.5532332", "0.5519561", "0.55144703", "0.55114067", "0.5488738", "0.5487559", "0.54588157", "0.5456617", "0.5449306", "0.54388845", "0.5433474", "0.5431002", "0.5429635", "0.54278445", "0.54261774", "0.5413303", "0.54054064", "0.54012823", "0.53881574", "0.5372883", "0.5372738", "0.5371238", "0.5370641", "0.5352411", "0.5352411", "0.5351833", "0.5344476", "0.5342599", "0.5341032", "0.53324574", "0.5328851", "0.5327238", "0.53227675", "0.5321134", "0.5321092", "0.5320195", "0.53153026", "0.5299781", "0.5298025", "0.5290814", "0.528984", "0.5285277", "0.5282376", "0.5280103", "0.5270063", "0.5268607", "0.5267807", "0.5265443", "0.5264199", "0.52559745", "0.5251414", "0.52497107", "0.5245353", "0.5243043", "0.5241972", "0.5240526", "0.5236927", "0.52357495", "0.52344954", "0.5234079", "0.5234049", "0.5233065", "0.5232694", "0.5230414", "0.52287394", "0.5227957", "0.5221499" ]
0.0
-1
protected $hidden = []; protected $dates = []; / | | FUNCTIONS | / | | RELATIONS |
public function post() { return $this->belongsTo(Post::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function hidden()\n {\n return [];\n }", "public function setHidden(){\n $this->_hidden = true;\n }", "public function getHiddenFields()\n {\n return [\n 'createdAt',\n 'updatedAt',\n 'version',\n 'locale'\n ];\n }", "public function getHidden(){\n return $this->_hidden;\n }", "public function getHidden(): bool;", "public function getDateFilterVisibility()\n {\n return $this->_dateFilterVisibility;\n }", "public function getDates()\n {\n return array_merge(parent::getDates(), [static::PUBLISHED_AT]);\n }", "public function getHiddenFlag() {}", "public function withHidden($hidden=true);", "public function getDates()\n {\n return $this->dates;\n }", "public function getDates()\n {\n return ['created_at', 'updated_at'];\n }", "protected function hiddenColumns(): array\n {\n return [];\n }", "function getEyeGraphDates() {\n return $this->eyegraphDates;\n }", "public function getDates()\n {\n return ['created_at', 'updated_at', 'openingbalancedate'];\n }", "function visible_range() {\n\t\treturn new DateRange(\n\t\t\t$this->attribute(\"show date\"),\n\t\t\t$this->attribute(\"hide date\"),\n\t\t\t$this\n\t\t);\n\t}", "public function get_hidden_columns()\n {\n return array();\n }", "public function get_hidden_columns()\n {\n return array();\n }", "function is_hidden() {\n return $this->hidden;\n }", "function is_hidden() {\n return $this->hidden;\n }", "function is_hidden() {\n return $this->hidden;\n }", "public function getDates()\n\t{\n\t\treturn $this->dates;\n\t}", "public function get_hidden_columns()\r\n {\r\n return array();\r\n }", "public function setHidden(array $hidden)\n {\n $this->hidden = $hidden;\n\n return $this;\n }", "public function setHidden(array $hidden)\n {\n $this->hidden = $hidden;\n\n return $this;\n }", "static function listHiddenExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE visible = FALSE ORDER BY creation_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $exhibit);\n\t\t}\n\t\treturn $list;\n\t}", "public function setHiddenFlag($hidden = true) {}", "public function isHidden() {\n return false;\n }", "final public static function hidden()\n {\n return (new static)->hidden;\n }", "public function getHideInList() {}", "public function get_hidden_columns() {\n\t\treturn array();\n\t}", "protected function datesAttribute()\n {\n return str_repeat(PHP_EOL, 2).str_repeat(' ', 4).'/**'.PHP_EOL.str_repeat(' ', 5).'* {@inheritDoc}'.PHP_EOL.str_repeat(' ', 5).'*/'.PHP_EOL.str_repeat(' ', 4).\"protected \\$dates = ['deleted_at'];\";\n }", "private function getHiddenFieldsWithoutAccess(): array\n\t{\n\t\treturn [\n\t\t\t'STORE_TO',\n\t\t\t'STORE_TO_INFO',\n\t\t\t'STORE_TO_TITLE',\n\t\t\t'STORE_TO_AMOUNT',\n\t\t\t'STORE_TO_RESERVED',\n\t\t\t'STORE_TO_AVAILABLE_AMOUNT',\n\t\t\t'STORE_FROM',\n\t\t\t'STORE_FROM_INFO',\n\t\t\t'STORE_FROM_TITLE',\n\t\t\t'STORE_FROM_AMOUNT',\n\t\t\t'STORE_FROM_RESERVED',\n\t\t\t'STORE_FROM_AVAILABLE_AMOUNT',\n\t\t\t'PURCHASING_PRICE',\n\t\t\t'BASE_PRICE',\n\t\t\t'TOTAL_PRICE',\n\t\t\t'AMOUNT',\n\t\t];\n\t}", "function getActivityDates(){\n\t\t\treturn $this->articleEvents->getDates();\n\t\t}", "public function getHidden()\n {\n return $this->hidden;\n }", "public function getHidden()\n {\n return $this->hidden;\n }", "public function getHidden()\n {\n return $this->hidden;\n }", "public function getHidden()\n {\n return $this->hidden;\n }", "public function get_hidden_columns()\n\t{\n\t\treturn array();\n\t}", "public function isHidden()\n {\n return false;\n }", "private function data()\n {\n return [\n 'start_date'=>date('Y-m-d', strtotime('-7 days')),\n 'end_date'=>date('Y-m-d')\n ];\n }", "public function getDates()\n\t{\n\t\treturn [\n\t\t\t'created_at',\n\t\t\t'updated_at',\n\t\t\t'deleted_at',\n\t\t\t'published_at',\n\t\t\t'registered_at',\n\t\t\t'confirmed_at',\n\t\t\t'blocked_at',\n\t\t];\n\t}", "public function get_hidden_columns()\r\n\t{\r\n\t\treturn [ ];\r\n\t}", "public function getDates()\n\t{\n\t\treturn array('date');\n\t}", "public function isHidden() {\r\n return false;\r\n }", "public function isHidden() {\r\n return false;\r\n }", "protected function getHidden()\n {\n return $this->hidden;\n }", "public function dates()\n {\n return $this->hasMany('App\\Date', 'owner_id');\n }", "public function getDateDebut();", "public function getHidden() {\n\t\treturn $this->hidden;\n\t}", "public function getHidden() {\n\t\treturn $this->hidden;\n\t}", "public function datePublishedProvider()\n {\n return [[null]];\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function getDateShown()\n {\n return !$this->getAlbum()->HideImageDate;\n }", "function isHidden()\n {\n return $this->_hidden;\n }", "public function getHidden()\n\t{\n\t\treturn $this->hidden;\n\t}", "public function getDates()\n {\n $this->getFields()->each(function ($field) {\n if ($field instanceof FieldTypeDateInterface) {\n $this->dates[] = $field->getDBKey();\n }\n });\n\n if ($this->hasField(static::CREATED_AT) and $this->hasField(static::UPDATED_AT)) {\n $this->timestamps = true;\n }\n\n return parent::getDates();\n }", "public function getPublishedAttribute()\n {\n return true;\n }", "public function toArray()\n {\n $this->makeHidden(['pulse_survey', 'action_plan', 'user']);\n return parent::toArray();\n }", "public function isHidden(): bool\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function get_visibility()\n {\n }", "public function setDates($dates);", "public function isHidden()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public function getDateVisite() {\n return $this->dateVisite;\n }", "public function isHidden();", "public function isHidden();", "public function isHidden();", "public function isHidden();", "function getVisible() { return $this->readVisible(); }", "public function setHidden($hidden) {\n\t\t$this->hidden = $hidden;\n\t}", "public function setHidden($hidden) {\n\t\t$this->hidden = $hidden;\n\t}", "function getVisible() { return $this->readVisible(); }", "protected function getHiddenFacets(): array {\n return [];\n }", "public function be_hidden() {\n return $this->belongsToMany('App\\Topic', 'hide_topic', 'topic_id', 'user_id')->withTimestamps();\n }", "function setVisable() {\n $visable = array(\n //type // length // default // NotNull // Indexed // Sequence/Auto // unique // default value\n 'integer' => array( 1,1,1,1,1,1,0),\n 'decimal' => array( 1,1,1,1,0,1,0.0),\n 'float' => array( 1,1,1,1,0,1,0.0),\n 'double' => array( 1,1,1,1,0,1,0),\n 'text' => array( 1,1,1,1,0,1,''),\n 'cblob' => array( 1,0,0,0,0,0),\n 'blob' => array( 1,0,0,0,0,0),\n 'boolean' => array( 1,1,1,1,0,0),\n 'date' => array( 0,1,1,1,0,1,''),\n 'timestamp'=> array( 0,1,1,1,0,1,''),\n 'time' => array( 0,1,1,1,0,1,'')\n );\n \n $vis = $visable[$this->type];\n foreach(array('length','default','notnull','isIndex','sequence','unique') as $k=>$v) {\n if ($vis[$k]) {\n $this->widgets[$v]->show();\n $this->visable[$v] = 1;\n } else {\n $this->widgets[$v]->hide();\n $this->visable[$v] = 0;\n }\n }\n // hide defaults for sequences.\n //print_r(array($this->sequence,$vis[4]));\n if ($this->sequence && $vis[4]) {\n unset($this->default);\n $this->widgets['default']->hide();\n $this->visable['default'] = 0;\n $this->widgets['notnull']->set_active(true);\n $this->notnull = 1;\n $this->widgets['isIndex']->set_active(true);\n $this->isIndex = 1;\n }\n // set defaults if not null and !sequence and it's empty.\n if ($this->notnull && !$this->sequence && !strlen(@$this->default)) {\n $this->default = $vis[6];\n $this->widgets['default']->set_text($this->default);\n }\n \n if ($this->visable['default'] && \n isset($this->default) && \n $this->default == '' && \n isset($vis[6]) && \n ($this->default !== $vis[6])) \n {\n $this->default = $vis[6];\n $this->widgets['default']->set_text($this->default);\n }\n \n \n }", "public function filterVisible(): self;", "function display( )\r\n\t{\r\n\t\t$this->_setModelState();\r\n\t $model = $this->getModel( $this->get( 'suffix' ) );\r\n\t $state = $model->getState();\r\n\t \t\t\r\n\t\t$date->current = $state->filter_date_from; \r\n\t\t\r\n\t\t$date->month = date( 'm', strtotime($date->current) );\r\n\t\t$date->year = date( 'Y', strtotime($date->current) );\r\n\t\t\r\n\t\t// date time variables\r\n\t\t$date->days = $this->getDays( $date->current );\r\n\t\t$date->hours = $this->getHours( );\r\n\t\t\r\n\t\t// datetime matrix\r\n\t\t$datetime = array( );\r\n\t\tfor ( $i = 0; $i < 3; $i++ )\r\n\t\t{\r\n\t\t\tfor ( $j = 0; $j < 24; $j++ )\r\n\t\t\t{\r\n\t\t\t\t$dayskey = $date->days[$i];\r\n\t\t\t\t$hourskey = $date->hours[$j];\r\n\t\t\t\t$datetime[$dayskey][$hourskey] = '';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$date->datetime = $datetime;\r\n\t\t\r\n\t\t// navigation dates\r\n\t\t$date->nextthreedate = date( 'Y-m-d', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextmonth = date( 'm', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextyear = date( 'Y', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->prevthreedate = date( 'Y-m-d', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevmonth = date( 'm', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevyear = date( 'Y', strtotime( $date->current . ' -3 days' ) );\r\n\t\t\r\n\t\t// aditional variables\r\n\t\t$date->startday = date( 'd', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonth = date( 'm', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonthname = date( 'F', strtotime( $date->days[0] ) );\r\n\t\t$date->startyear = date( 'Y', strtotime( $date->days[0] ) );\r\n\t\t$date->endday = date( 'd', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonth = date( 'm', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonthname = date( 'F', strtotime( $date->days[2] ) );\r\n\t\t$date->endyear = date( 'Y', strtotime( $date->days[2] ) );\r\n\t\t$date->nonworkingdays = $this->getNonWorkingDays( );\r\n\t\t\r\n\t\t$view = $this->getView( $this->get( 'suffix' ), 'html' );\r\n\t\t$view->assign( 'date', $date );\r\n\t\t\r\n\t\tparent::display( );\r\n\t}", "public function GetNoticias(){\r\n return $this -> __buscar; \r\n \r\n }", "public function __construct() {\n parent::__construct ();\n $this->setHiddenCustomer ( [ 'id','is_active','creator_id','updator_id','created_at','updated_at' ] );\n }", "function getVisible() {return $this->readVisible();}", "function getEvenements() {\n return $this->evenements;\n}", "public function initialize() {\n\t\t\tparent::initialize();\n\n\t\t\t// vars\n\t\t\t$this->name = 'hidden';\n\t\t\t$this->label = __( 'Hidden', 'acf' );\n\t\t}" ]
[ "0.65195674", "0.62058175", "0.61619484", "0.614714", "0.6105571", "0.6016904", "0.5896342", "0.588878", "0.5869252", "0.5866382", "0.5846682", "0.57893133", "0.57874954", "0.5785872", "0.57644343", "0.5762414", "0.5762414", "0.5756126", "0.5756126", "0.5756126", "0.57554793", "0.57542723", "0.57278335", "0.57278335", "0.57106936", "0.57099104", "0.57050586", "0.5687678", "0.56834775", "0.5681802", "0.5657468", "0.5645919", "0.5641827", "0.5631727", "0.5631727", "0.5631727", "0.5631727", "0.56137365", "0.5607938", "0.5601436", "0.5595614", "0.55820584", "0.55800194", "0.5577844", "0.5577844", "0.5557053", "0.55536294", "0.5543296", "0.55417037", "0.55417037", "0.5531934", "0.5526017", "0.5526017", "0.5526017", "0.5525078", "0.55169606", "0.5497357", "0.54916745", "0.54736555", "0.5472518", "0.5471492", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.54707515", "0.5450509", "0.54393953", "0.5407379", "0.5402766", "0.53922373", "0.53922373", "0.53922373", "0.53922373", "0.53870213", "0.5374928", "0.5374928", "0.5370047", "0.5365391", "0.53548455", "0.5347891", "0.5342937", "0.5331194", "0.5329619", "0.5326345", "0.5324967", "0.5312152", "0.5292555" ]
0.0
-1
Change status and expiry date
public function changeStatusAndExpiryDate($status, $expiryDate = '') { $this->setStatus($status); if ($expiryDate !== '') { $this->setExpiredDate($expiryDate); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setExpired()\n {\n $this->attributes['status'] = 'expired';\n self::save();\n }", "public function setExpired()\n {\n $this->attributes['status'] = 'expired';\n self::save();\n }", "public function updateStatusProposal()\n { \n $now = Mage::getSingleton('core/date')->gmtDate(\"Y-m-d\"); \n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_PROPOSAL);\n $collection->getSelect()->where('expiry < \\''.$now.'\\' AND no_expiry = \\'0\\'');\n $collection->load(); \n\n foreach ($collection as $item) { \n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_PROPOSAL_EXPIRED);\n $item->save(); \n }\n }", "function tep_expire_specials() {\n tep_db_query(\"update \" . TABLE_SPECIALS . \" set status = 0, date_status_change = now() where status = '1' and now() >= expires_date and expires_date > 0\");\n}", "public function expire() {\n logit_r($this, 'expire'); \n $status = ($this->status == UserLoginReq::STATUS_NOTIFIED) ? UserLoginReq::STATUS_PAST_GRACE : UserLoginReq::STATUS_EXPIRED;\n logit_r($status, 'status');\n $this->status = $status;\n $this->save(true);\n }", "public function actionUpdateVacancyApplicantExpire() {\n $connection = Yii::app()->db;\n $sqlRaw = \"UPDATE h_vacancy_applicant SET status_id = 3 where status_id = 1 AND created_date < \" . strtotime(\"-30 day\");\n Yii::app()->db->createCommand($sqlRaw)->execute();\n }", "public function updateVisitsToExpired() {\n\t\ttry {\n\n\t\t\t$command = Yii::app()->db->createCommand(\"UPDATE visit\n LEFT JOIN card_generated ON card_generated.id = visit.card\n SET visit_status = \" . VisitStatus::EXPIRED . \",card_status =\" . CardStatus::NOT_RETURNED . \"\n WHERE CURRENT_DATE > date_expiration AND visit_status = \" . VisitStatus::ACTIVE . \"\n AND card_status =\" . CardStatus::ACTIVE . \" and card_type=\" . CardType::MULTI_DAY_VISITOR . \"\")->execute();\n\n\t\t\techo \"Affected Rows : \" . $command . \"<br>\";\n\t\t\tif ($command > 0) {\n\t\t\t\techo \"Update visit to expired status successful.\";\n\t\t\t} else {\n\t\t\t\techo \"No record to update.\";\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} catch (Exception $ex) {\n\t\t\techo 'Query failed', $ex->getMessage();\n\t\t\treturn false;\n\t\t}\n\t}", "public function updateLicenseStatus()\n {\n $transient = get_transient($this->slug);\n\n // If set and valid, return.\n if (VALID === $transient) {\n error_log('Active...');\n return;\n }\n // If expired, do something to never req again.\n\n // If not then, perform a check\n // error_log('Checking ...');\n // $response = $this->checkLicenseKey();\n }", "public function expiryDate();", "public function changestatusAction()\n {\n $user_params=$this->_request->getParams();\n $automail=new Ep_Message_AutoEmails();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvcontacts_obj = new Ep_Ftv_FtvContacts();\n $ftvpausetime_obj = new Ep_Ftv_FtvPauseTime();\n\n if($user_params['status'] == 'closed')\n $data = array(\"status\"=>$user_params['status'], \"cancelled_at\"=>date('Y-m-d H:i:s'));////////updating\n elseif($user_params['status'] == 'done')\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>date('Y-m-d H:i:s'));////////updating\n else\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>NULL, \"cancelled_at\"=>NULL);////////updating\n $query = \"identifier= '\".$user_params['requestId'].\"'\";\n $requestdetails = $ftvrequest_obj->requestDetailsById($user_params['requestId']);\n $contactId = $requestdetails[0]['request_by'];\n $contactdetails = $ftvcontacts_obj->getFtvContactDetails($contactId);\n $contactName = $contactdetails[0]['first_name'].\" \".$contactdetails[0]['last_name'];\n $parameters['ftvobject'] = $requestdetails[0]['request_object'];\n $parameters['ftvcontactName'] = $contactName;\n $ftvrequest_obj->updateFtvRequests($data,$query);\n ////making the time resume if its in pause////\n $inpause = $ftvpausetime_obj->inPause($user_params['requestId']);\n if($inpause == 'yes')\n {\n $data = array(\"resume_at\"=>date('Y-m-d H:i:s'));////////updating\n $query = \"ftvrequest_id = '\".$user_params['requestId'].\"' AND resume_at IS NULL \";\n $ftvpausetime_obj->updateFtvPauseTime($data,$query);\n }\n if($user_params['status'] == 'done')\n {\n if($this->adminLogin->userId != '110823103540627' ) ///when not johny head of BO user for FTV changed\n {\n $parameters['ftvrequestlink'] = \"/ftvchaine/ftvch-requests?submenuId=ML11-SL6\";\n $parameters['ftvType'] = \"chaine\";\n $automail->messageToEPMail('110823103540627',114,$parameters);// to johny\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n else // in case jhony change the status\n {\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n }\n\n }", "public function update_status();", "public function updateStatusRequest()\n { \n $now = Mage::getSingleton('core/date')->gmtDate(); \n $items = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $items->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\n $items->getSelect()->group('store_id');\n if($items->getSize() >0 ){\n $data = $items->getData();\n\n foreach($data as $unit) { \n $storeId = $unit['store_id'];\n $day = Mage::getStoreConfig('qquoteadv/general/expirtime_proposal', (int)$storeId); \n \n $now = Mage::getSingleton('core/date')->gmtDate(); \n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\n $collection->getSelect()\n ->where('created_at<INTERVAL -' . $day . ' DAY + \\'' . $now . '\\'');\n $collection->load(); \n\n foreach ($collection as $item) { \n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST_EXPIRED);\n $item->save(); \n }\n }\n }\n }", "function updateMemberExpiryDate($userId, $date) {\r\n $sql = $this->db->prepare(\"UPDATE USER SET expiry=:expiry_date WHERE UserID=:user_id\");\r\n if($sql->execute(array(\r\n 'user_id' => $userId,\r\n 'expiry_date' => $date\r\n )))\r\n return true;\r\n else {\r\n return false;\r\n }\r\n }", "function updatestatus() {\n global $_lib;\n\n $dataH = array();\n $dataH['ID'] = $this->transaction->ID;\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\n $dataH['RemittanceStatus'] = 'sent';\n \n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\n\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\n }", "public function setStatusExpire($v)\n {\n if ($v !== null) {\n $v = (int) $v;\n }\n\n if ($this->status_expire !== $v) {\n $this->status_expire = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_STATUS_EXPIRE] = true;\n }\n\n return $this;\n }", "public function setExpiry( $expiry );", "function set_account_status($acc_number,$status,$tp_start,$tp_end,$rolover_start,$rolover_end)\n\t{\n\t if ($status != 0 )\n\t {\n\t\t$data['timeline'] = date('H:i:s d-m-Y',$tp_start).\" - \".date('H:i:s d-m-Y',$tp_end);\n\t\t$data['timeline1'] = date('H:i:s d-m-Y',$rolover_start).\" - \".date('H:i:s d-m-Y',$rolover_end);\n\t }\n\t else\n\t {\n\t\t$data['timeline'] = \"Not calculated\";\n\t\t$data['timeline1'] = \"Not calculated\";\n\t }\n\t return $this->db->where('login',$acc_number)\n\t \t ->limit(1)\n\t \t ->update('pamm_accounts', $data);\n\t}", "function _sf_set_spot_expiry_date($post) {\n\t\t\n\t\t///// FIRSTLY LET'S ADD A METABOX FOR OUR EXPIRY DATE\n\t\t$exp_date = time() + (ddp('submission_days') * (60*60*24));\n\t\t\n\t\t$midnight_time = $exp_date;\n\t\t\n\t\tupdate_post_meta($post->ID, 'expiry_date', $midnight_time);\n\t\t\n\t\t///// SETS UP OUR CRON JOB\n\t\twp_schedule_single_event($midnight_time, 'expire_spot_submission', array($post->ID, $post->post_title, $post->post_author, ''.$midnight_time.''));\n\t\t\n\t}", "public function changeStatus()\n {\n }", "public function savety2receipt(Request $request) {\n $receptDate = Carbon::now()->format('Y-m-d');\n $expDate = Carbon::now()->addDays(365)->format('Y-m-d');\n //echo $receptDate; echo \"<br>\"; echo $expDate; echo \"<br>\"; exit;\n DB::table('ty2queuepatients')->where('id', $_POST['ty2qid'])->update(['receipt_no' => $_POST['receptno'], 'receipt_date' => $receptDate, 'expiry_date' => $expDate, 'action' => 1, 'q_status' =>0]);\n return 1;\n \n }", "function modifyDate($mode, $date, $amount);", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function updateStatus()\n {\n $this->status = Cart::CART_STATUS_ORDERED;\n $this->save();\n }", "public function status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->policy_duration,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/policy-duration/lists','refresh');\t\t\n\t}", "function CheckDataUpdate($action){\n $new_value = date(\"y-m-d H:i:s\"); //Ngày cập nhật là ngày hiện tại\n $action->set_value(\"bannerSlide_update_date\",$new_value);\n\t\t\t\n $action->set_value(\"bannerSlide_by\",$_COOKIE['login_fullname']);//người cập nhật \n\t}", "function SetAExpire($TL, $sToken, $uid){\n if((checkUsrPermissions($sToken) == \"ar\") | (checkUsrPermissions($sToken) == \"an\")){\n if(chkUsrExist((int)$uid)){\n $ex = GetExp($TL);\n if($ex == \"Err :: Select One Of This : [1h,12h,1d,1w,2w,1m,3m,1y,3y,5y,lifetime]\"){\n return \"Err :: Check TimeLimit\";\n }else{\n $_SESSION['db']->prepare(\"UPDATE users SET `expire-date`=:ex WHERE id=:id\")->execute(['id' => $uid,'ex' => $ex]);\n $_SESSION['db']->prepare(\"UPDATE users SET `Subscription-create-date`=:cd WHERE id=:id\")->execute(['id' => $uid,'cd' => gmdate('Y-m-d h:i:s')]);\n return \"done\"; \n }\n }else{\n return \"UserID Not Exist !!\";\n } \n }else{\n return \"Err :: May u are not admin !\";\n }\n}", "function _sf_set_spot_expiry_date_new($post) {\n\t\t\n\t\t//// LETS GET THE EXPIRY DATE AND MAKE SURE IT'S IN THE FUTURE\n\t\tif(is_object($post)) { if($post->post_type == 'spot') {\t\t\t\n\t\t\t\n\t\t\t$exp_date = get_post_meta($post->ID, 'expiry_date', true);\n\t\t\t$now = time();\n\t\t\t\n\t\t\t//// IF ITS IN THE FUTURE\n\t\t\tif($exp_date > $now) {\n\t\t\t\t\n\t\t\t\t//// SCHEDULE EVENT\n\t\t\t\twp_schedule_single_event($exp_date, 'expire_spot_submission', array($post->ID, $post->post_title, $post->post_author, $exp_date));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} }\n\t\t\n\t}", "public function changeOrderStatus(){\r\n $cookies = new CookieModel();\r\n $cookie_id = $cookies -> read();\r\n $Form = M('userinfo');\r\n $condition_in['stuid'] = $cookie_id;\r\n $data = $Form->where($condition_in)->find();\r\n if (! $data['manager']) $this->redirect('/');\r\n \t$key = $_REQUEST['id'];\r\n \t//$key = 2;\r\n \t$condition['id'] = $key;\r\n \t$form = M(\"orderinfo\");\r\n \t$data = $form->where($condition)->find();\r\n \t//echo $data;\r\n \tif ($data['status'] == \"下单成功\") $data['status'] = \"烹饪中\";\r\n \telse if ($data['status'] == \"烹饪中\") $data['status'] = \"送餐途中\"; \r\n \telse if ($data['status'] == \"送餐途中\") $data['status'] = \"餐已收到\";\r\n \t$form->save($data);\r\n \t//$this->display();\r\n }", "public function setExpiryDate($date)\n {\n $this->expiryDate = $date;\n }", "static function autoExpiryUpdated($value) {\n if($value > 0) {\n DB::execute('UPDATE ' . TABLE_PREFIX . 'users SET password_expires_on = ? WHERE password_expires_on IS NULL', DateTimeValue::makeFromString(\"+$value months\"));\n } else {\n DB::execute('UPDATE ' . TABLE_PREFIX . 'users SET password_expires_on = NULL');\n } // if\n\n AngieApplication::cache()->removeByModel('users');\n }", "public function incrementExpiresAt();", "function setStatus($statusid, $status) {\n\tglobal $gStatusTable;\n\n\t$cmd = \"UPDATE $gStatusTable SET status = $status, timeOfLastChange = \" . time() . \" WHERE statusid = $statusid;\";\n\tdoSimpleCommand($cmd);\n}", "public function setExpirationDate(int $expiration_date);", "public function updateJobsExpired()\n\t{\n\t\t$today_date = Carbon::now()->format('Y-m-d');\n\n\t\t//This will do the query\n\t\t$query = Job::where([\n\t\t\t'status' => 1\n\t\t])->whereDate('closed_date', '<', $today_date)->update([\n\t\t\t'status' => 0\n\t\t]);\n\n\t}", "private static function updateExpire($record)\n {\n// $params = Yii::$app->getParams();\n// $interval = $params['restful_token_expired_seconds'];\n $interval = 30 * 24 * 60 * 60;\n $record->expire_date = date('Y-m-d H:i:s', time() + $interval);\n $record->save(false, array('expire_date'));\n }", "function setStatus($new_status)\n {\n $this->status = $new_status;\n }", "public function activeAlerts(){\n $today=Date('Y-m-d');\n $data=array(\n 'status'=>'active'\n );\n $this->db->where('reminderDate <=',$today);\n $this->db->where('status !=','done');\n $this->db->update('regularcost',$data);\n }", "function tep_set_banner_status($banners_id, $status, $site_id) {\n if ($status == '1') {\n return tep_db_query(\"update \" . TABLE_BANNERS . \" set status = '1',\n expires_impressions = NULL, expires_date = NULL, date_status_change = NULL\n where banners_id = '\" . $banners_id . \"' and site_id ='\".$site_id.\"'\");\n } elseif ($status == '0') {\n return tep_db_query(\"update \" . TABLE_BANNERS . \" set status = '0', date_status_change = now() where banners_id = '\" . $banners_id . \"' and site_id ='\".$site_id.\"'\");\n } else {\n return -1;\n }\n}", "public function review_schedule($sch_id, $status, $comm){\r\n\t $dates = date('Y-m-d');\r\n\r\n$res = $this->db->query('UPDATE leave_schedule SET status='.$status.', sup_update_date=\"'.$dates.'\", super_comment=\"'.$comm.'\" WHERE sched_id='.$sch_id);\r\n\t return $res;\r\n\t }", "protected static function set_status()\n {\n }", "public function changeCommissionStatus($agent_id, $start_date, $end_date, $current_status, $new_status)\n\t{ \n $values = array('status'=>$new_status);\n $this->update($values,\" agent_id = {$agent_id} and status = '{$current_status}' and inserted_date between '{$start_date}' and '{$end_date}'\"); \n }", "public function setExpirationDate(?Date $value): void {\n $this->getBackingStore()->set('expirationDate', $value);\n }", "public function changestatus_post()\r\n {\r\n $userid=$this->uri->segment(3);\r\n\r\n $user=$this->user_m->get($userid);\r\n if($user->status==\"1\"){\r\n $data=array(\r\n \"status\"=> \"0\"\r\n );\r\n }\r\n else{\r\n $data=array(\r\n \"status\"=> \"1\"\r\n ); \r\n }\r\n if ($succes_status = $this->user_m->update_data($userid,$data)){\r\n if($user->status==\"1\"){\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Deactivated\"\r\n )\r\n );\r\n }\r\n else{\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Activated\"\r\n )\r\n ); \r\n }\r\n }\r\n else\r\n {\r\n $this->response(\r\n array(\r\n 'Status_code' => \"401\",\r\n 'Message' => \"ops something went wrong\"\r\n )\r\n ); \r\n }\r\n }", "public function updateStatusOnNewDay() {\n // Update advs\n UIAdv::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update advgroups\n UIAdvGroup::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update campaign\n UICampaign::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update project\n UIProject::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n }", "public function update_INVOICE_Change_Status_Completed(){\n $this->update_INVOICE_Change_Status_Ongoing();\n $dateToday=date_default_timezone_set(\"Y-m-d\");\n $strInsertQry=\"update sidhus_invoice set Status='Completed Events' where sidhus_invoice.eventDate < '\".$dateToday.\"'\";\n // $stmt = $this->con->prepare($strInsertQry);\n // $stmt->bind_param(\"sssssssssssiisssssiiiii\",$cust_fullname,$cust_address,$theme_name,$color_combo,$cust_mobileno,$cust_alternate_mobileno,$cust_emailId,$event_address,$event_pincode,$event_location,$event_landmark,$event_id,$subcat_id,$venue_type,$eventDate,$eventTime,$concept_type,$notes_or_Remarks,$transportation_Rate,$Tax_percentage,$Advance,$Total,$invoice_no);\n//return $strInsertQry;\n $stmt = $this->con->prepare($strInsertQry);\n // $stmt->bind_param(\"ss\", $newpassword, $username);\n $result = $stmt->execute();\n $stmt->close();\n return $result;// $num_affected_rows>=0;\n\n }", "private function changeStatusLicense() {\n if ($this->get_request_method() != \"POST\") {\n $error = array('status_code' => \"0\", 'message' => \"wrong method\", 'response_code' => \"406\");\n $this->response($this->json($error), 406);\n }\n\n $arr = array();\n if(@$_POST['reqparams']) {\n $post = $_POST['reqparams'];\n $LicenseID = $post['LicenseID'];\n $StatusID = $post['StatusID'];\n } else {\n $LicenseID = $_POST['LicenseID'];\n $StatusID = $_POST['StatusID'];\n }\n\n $sql = mysql_query(\"UPDATE `SCP_Licenses` SET `StatusID`='$StatusID' WHERE `LicenseID` = '$LicenseID'\", $this->db);\n\n if($sql) {\n $error = array('status_code' => \"1\", 'status' => \"success\", 'message' => \"Changed License Status Successfully\", 'response_code' => \"200\", 'response_data' => $arr);\n $this->response($this->json($error), 200);\n } else {\n $error = array('status_code' => \"0\", 'status' => \"error\", 'message' => \"validation error\", 'response_code' => \"200\", 'response_data' => $arr);\n $this->response($this->json($error), 200);\n }\n }", "public function check_and_update_license_status() {\n\n\t\tswitch ( $status = $this->client->get_status() ) {\n\n\t\t\tcase 'valid' :\n\t\t\tcase 'expired' :\n\t\t\t\t$this->set_license_status( $status );\n\t\t\t\tbreak;\n\t\t\tcase 'site_inactive' :\n\t\t\t\tif ( ! is_wp_error( $this->client->activate() ) ) {\n\t\t\t\t\t$this->set_license_status( 'valid' );\n\t\t\t\t} else {\n\t\t\t\t\t$this->set_license_status( $status );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t$this->set_license_status( 'invalid' );\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}", "public function change_user_status(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\n\t\t\t$user_id = $this->uri->segment(5,0);\r\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\r\n\t\t\t$newdata = array('status' => $status);\r\n\t\t\t$condition = array('id' => $user_id);\r\n\t\t\t$this->seller_model->update_details(USERS,$newdata,$condition);\r\n\t\t\t$this->setErrorMessage('success','Seller Status Changed Successfully');\r\n\t\t\tredirect('admin/seller/display_seller_list');\r\n\t\t}\r\n\t}", "public function UpdateClaimread(){\n if($this->Useconfig['level_id']!=5){\n\t $this->_db->update(CLAIM_TICKET,array('customer_read_status'=>'0','operator_read_status'=>'1','update_date'=>new Zend_Db_Expr('NOW()')), \"claim_id=\".$this->getData['claim_id']);\n\t}\n\tif($this->Useconfig['level_id']==5){\n\t $this->_db->update(CLAIM_TICKET,array('customer_read_status'=>'1','operator_read_status'=>'0','update_date'=>new Zend_Db_Expr('NOW()')), \"claim_id=\".$this->getData['claim_id']);\n\t}\n\treturn;\n }", "function setstatus($pr_id, $cloud_status) {\n\t\tswitch ($cloud_status) {\n\t\t\tcase 'new':\n\t\t\t\t$cr_status=1;\n\t\t\t\tbreak;\n\t\t\tcase 'approve':\n\t\t\t\t$cr_status=2;\n\t\t\t\tbreak;\n\t\t\tcase 'active':\n\t\t\t\t$cr_status=3;\n\t\t\t\tbreak;\n\t\t\tcase 'deny':\n\t\t\t\t$cr_status=4;\n\t\t\t\tbreak;\n\t\t\tcase 'deprovision':\n\t\t\t\t$cr_status=5;\n\t\t\t\tbreak;\n\t\t\tcase 'done':\n\t\t\t\t$cr_status=6;\n\t\t\t\tbreak;\n\t\t\tcase 'no-res':\n\t\t\t\t$cr_status=7;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\texit(1);\n\t\t\t\tbreak;\n\t\t}\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"update \".$this->_db_table.\" set pr_status=$cr_status where pr_id=$pr_id\");\n\n\t}", "function updatePaymentStatus(){\r\n $payment = new managePaymentModel();\r\n $payment->cust_ID = $_SESSION['cust_ID'];\r\n $payment->updatePaymentStatus();\r\n }", "public function change_seller_request(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\n\t\t\t$user_id = $this->uri->segment(5,0);\r\n\t\t\t$status = ($mode == '0')?'Rejected':'Approved';\r\n\t\t\t$newdata = array('status' => $status);\r\n\t\t\t\r\n\t\t\t$condition = array('id' => $user_id);\r\n\t\t\t$this->seller_model->update_details(STORE_CLAIMS,$newdata,$condition);\r\n\t\t\t$this->setErrorMessage('success','Claim Request '.$status.' Successfully');\r\n\t\t\tredirect('admin/seller/display_seller_requests');\r\n\t\t}\r\n\t}", "public function refreshTaskStatus(){\n\n $webCronResult = $this->webCronResults()->orderBy('code', 'desc')->first();\n\n if ($webCronResult) {\n\n if ($webCronResult->code >= 300) {\n // bad status\n $this->status = 0 ;\n }else{\n // good status\n $this->status = 2 ;\n };\n\n $this->save();\n\n };\n\n }", "public function update(): void\n {\n $this->updateQuality();\n $this->updateSellIn();\n $this->expiresAfterSale();\n }", "public function setPaid()\n {\n $this->update([\n 'status' => self::STATUS_PAID,\n 'paid_date' => Carbon::now(),\n ]);\n }", "public function set_approved_date( $date ) {\n\t\t$this->set_prop( 'approved_date', $date ) ;\n\t}", "public function updateTimesheetStatus(Request $request){\n\t\t$timesheetid = $request->id;\n\t\t$status = $request->status;\n\t\t$timesheet = \\App\\Models\\Timesheet::where('id', $timesheetid)->first();\n\t\t$user = User::where('id', $timesheet->user_id)->first();\n\n\t\tMail::to($user->email)->send(new TimeSheetApproved($user, $status));\n\n\t\t$timesheet->client_approved = $status;\n\t\t$timesheet->save();\n\n\t\treturn response()->json(['status'=>true,'message'=>'status updated successfully'], 200);\n\t}", "abstract public function setStatus($status);", "public function postUpdateStatus(){\n\t\t$expense_id = Input::get('expense_id');\n\t\t$status = Input::get('status');\n\t\t$expense = Expense::find($expense_id);\n\t\t$expense->status = $status;\n\t\t$expense->save();\n\t}", "public function change_seller_status(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\n\t\t\t$user_id = $this->uri->segment(5,0);\r\n\t\t\t$store_id = $this->uri->segment(6,0);\r\n\t\t\t$status = ($mode == '0')?'Rejected':'Approved';\r\n\t\t\t$newdata = array('status' => $status);\r\n\t\t\t$condition = array('id' => $user_id);\r\n\t\t\t\r\n\t\t\t$rej_status=array('status' => 'rejected');\r\n\t\t\t$condition3=array('store_id'=>$store_id);\r\n\t\t\t\r\n\t\t\t$this->seller_model->update_details(STORE_CLAIMS,$rej_status,$condition3);\r\n\t\t\t\r\n\t\t\t$this->seller_model->update_details(STORE_CLAIMS,$newdata,$condition);\r\n\t\t\t\r\n\t\t\t$condition1 = array('store_id' => $store_id);\r\n\t\t\t$condition2 = array('id' => $store_id);\r\n\t\t\t\r\n\t\t\t//$this->data['approvedDetails'] = $this->seller_model->get_all_details(STORE_CLAIMS,$condition1);\r\n\t\t\t\r\n\t\t\t//print_r($condition);\r\n\t\t\t\r\n\t\t\t$this->data['approvedDetails'] = $this->seller_model->get_all_details(STORE_CLAIMS,$condition);\r\n\t\t\t\r\n\t\t\t$newdata1 = array(\r\n\t 'store_name' => $this->data['approvedDetails']->row()->store_name,\r\n\t\t\t\t 'user_id' => $this->data['approvedDetails']->row()->user_id,\r\n\t\t\t\t 'description' => $this->data['approvedDetails']->row()->description\r\n\t\t\t\t );\t\t \r\n\t\t\t//print_r($newdata1); exit;\r\n\t\t\t$this->seller_model->update_details(SHOPS,$newdata1,$condition2);\r\n\t\t\t$this->setErrorMessage('success','Claim Status Changed Successfully');\r\n\t\t\t//redirect('admin/seller/display_seller_list');\r\n\t\t\tredirect('admin/seller/display_seller_requests');\r\n\t\t}\r\n\t}", "function getExpiredStatus($record){\n\n\n $expiredStatus = \"\";\n\n $currentDate = date(\"Y-m-d\");\n\n if ($record['dueDate'] < $currentDate ){\n\n $expiredStatus = \"LATE\";\n\n }\n\n elseif ($record['dueDate'] == $currentDate){\n $expiredStatus = \"DUE\";\n }\n\n return $expiredStatus;\n\n}", "public function editSaveQuery() {\n\t\t$this->expiredStatusToQuery('expired', 'expiration');\n\t}", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->guest_post_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "public function status_change_action(){\n\t $table = $this->input->post('table');\n\t $state = $this->input->post('state');\n\t $primary_field = $this->input->post('primary_field');\n\t $primary_key = $this->input->post('primary_key');\n\t if($state=='true'){\n\t $status = \"Y\";\n\t $status_text = \"Approved\";\n\t }else{\n\t $status = \"N\";\n\t $status_text = \"Rejected\";\n\t }\n\t $statusReturn = $this->common_model->update_row(array('fr_status'=>$status), array($primary_field=>$primary_key), $table);\n\t if($statusReturn){\n\t echo \"1\";\n\t }else{\n\t echo \"0\";\n\t }\n\t}", "function twe_set_banner_status($banners_id, $status) {\n global $db;\n if ($status == '1') {\n $db->Execute(\"update \" . TABLE_BANNERS . \" set status = '1', date_status_change = now(), date_scheduled = NULL where banners_id = '\" . $banners_id . \"'\");\n } elseif ($status == '0') {\n $db->Execute(\"update \" . TABLE_BANNERS . \" set status = '0', date_status_change = now() where banners_id = '\" . $banners_id . \"'\");\n } else {\n return -1;\n }\n }", "public function status()\t{\n\t\t\t$this->veiculo->update($this->input->post('id'), array('veiculo_status' => $this->input->post('status')));\n\t\t}", "function changeStatus() {\n\n $newStatus = $_GET['newstatus'];\n\n foreach ($_POST['status'] as $key => $val) {\n \n DB::update(CFG::$tblPrefix . \"ticket\", array(\"status\" => $newStatus), \" id=%d \", $key);\n \n }\n }", "public function changeStatus($status)\n {\n $changestatus = User::findOrFail($status);\n \n if (isset($changestatus) && !empty($changestatus)) {\n if ($changestatus->active == 1) {\n $changestatus->update(['active' => 0]);\n return redirect()->back()->withFlashSuccess('Successfully Deactive User');\n }else{\n $changestatus->update(['active' => 1]); \n return redirect()->back()->withFlashSuccess('Successfully Activeted User');\n }\n }\n }", "function updateStatus(&$status, &$statusflag)\n {\n Requirements::customCSS('.col-ScheduledStatusDataColumn i {\n width: 16px;\n height: 16px;\n display: block;\n float: left;\n margin-right: 6px;\n }', 'ScheduledStatusDataColumn_Icons');\n if ( $this->owner->getEmbargoIsSet() ) {\n if ( $this->owner->getScheduledStatus() ) {\n // Under Embargo\n $status .= '<i class=\"font-icon-eye btn--icon-md text-danger\" title=\"Embargo active\"></i>'.$this->owner->dbObject(\"Embargo\")->Nice();\n } else {\n // Embargo expired\n $status .= '<i class=\"font-icon-eye btn--icon-md text-info\" title=\"Embargo expired\"></i>'.$this->owner->dbObject(\"Embargo\")->Nice();\n }\n }\n if ( $this->owner->getExpiryIsSet() ) {\n if ( $this->owner->getEmbargoIsSet() ) {\n $status .= '<br />'; // add a break if both set\n }\n if ( $this->owner->getExpiredStatus() ) {\n // Expired/unpublished\n $status .= '<i class=\"font-icon-eye-with-line btn--icon-md text-danger\" title=\"Expired/unpublished\"></i>'.$this->owner->dbObject(\"Expiry\")->Nice();\n } else {\n // Scheduled to expire\n $status .= '<i class=\"font-icon-eye-with-line btn--icon-md text-warning\" title=\"Scheduled to expire\"></i>'.$this->owner->dbObject(\"Expiry\")->Nice();\n }\n }\n }", "function changeTodoStatus() {\n\n if ( !checkAuthToken() ) return;\n $todoId = isset( $_POST['todoId'] ) ? (int)$_POST['todoId'] : \"\"; \n $newStatus = isset( $_POST['newStatus'] ) ? $_POST['newStatus'] : \"\"; \n\n if ( !$todoId || !$newStatus ) {\n echo \"error\";\n return;\n }\n\n if ( $todo = Todo::getById( (int)$_POST['todoId'] ) ) {\n if ( $todo->userId == User::getLoggedInUser()->id ) {\n $todo->completed = ( $newStatus == \"true\" ) ? 1 : 0;\n $todo->update();\n echo \"success\";\n } else {\n echo \"error\";\n }\n \n } else {\n echo \"error\";\n }\n}", "public function completeIssueFee($status)\n {\n $this->status = $status;\n }", "public function activar()\n {\n $this->estatus = 1;\n $this->save();\n }", "public function updateStatus()\n {\n $this->Invoice->updateInvoiceStatus($this->input->post('id'));\n }", "function fa_status_expired(){\n\tglobal $fa_pro;\n\treturn $fa_pro->get_status_expired();\n}", "public function editassigntimeAction()\n {\n $prevurl = getenv(\"HTTP_REFERER\");\n $user_params=$this->_request->getParams();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvpausetime_obj = new Ep_Ftv_FtvPauseTime();\n $requestId = $user_params['requestId'];\n $requestsdetail = $ftvrequest_obj->getRequestsDetails($requestId);\n\n ($user_params['editftvspentdays'] == '') ? $days=0 : $days=$user_params['editftvspentdays'];\n ($user_params['editftvspenthours'] == '') ? $hours=0 : $hours=$user_params['editftvspenthours'];\n ($user_params['editftvspentminutes'] == '') ? $minutes=0 : $minutes=$user_params['editftvspentminutes'];\n ($user_params['editftvspentseconds'] == '') ? $seconds=0 : $seconds=$user_params['editftvspentseconds'];\n\n /*if($user_params['addasigntime'] == 'addasigntime') ///when time changes in mail content in publish ao popup//\n {\n /*$editdate = date('Y-m-d', strtotime($user_params['editftvassigndate']));\n $edittime = date('H:i:s', strtotime($user_params['editftvassigntime']));\n $editdatetime =$editdate.\" \".$edittime;\n $data = array(\"assigned_at\"=>$editdatetime);////////updating\n $query = \"identifier= '\".$user_params['requestId'].\"'\";\n $ftvrequest_obj->updateFtvRequests($data,$query);\n $parameters['ftvType'] = \"chaine\";\n // $newseconds = $this->allToSeconds($user_params['editftvspentdays'],$user_params['editftvspenthours'],$user_params['editftvspentminutes'],$user_params['editftvspentseconds']);\n echo \"<br>\".$format = \"P\".$days.\"DT\".$hours.\"H\".$minutes.\"M\".$seconds.\"S\";\n echo \"<br>\".$requestsdetail[0]['assigned_at'];\n $time=new DateTime($requestsdetail[0]['assigned_at']);\n $time->sub(new DateInterval($format));\n echo \"<br>\".$assigntime = $time->format('Y-m-d H:i:s');\n $data = array(\"assigned_at\"=>$assigntime);////////updating\n echo $query = \"identifier= '\".$requestId.\"'\";\n $ftvrequest_obj->updateFtvRequests($data,$query);\n $this->_redirect($prevurl);\n }\n elseif($user_params['subasigntime'] == 'subasigntime')\n {\n $format = \"P\".$days.\"DT\".$hours.\"H\".$minutes.\"M\".$seconds.\"S\";\n $time=new DateTime($requestsdetail[0]['assigned_at']);\n $time->add(new DateInterval($format));\n $assigntime = $time->format('Y-m-d H:i:s');\n $data = array(\"assigned_at\"=>$assigntime);////////updating\n $query = \"identifier= '\".$requestId.\"'\";\n $ftvrequest_obj->updateFtvRequests($data,$query);\n $this->_redirect($prevurl);\n }*/\n $inpause = $ftvpausetime_obj->inPause($requestId);\n $requestsdetail[0]['inpause'] = $inpause;\n $ptimes = $ftvpausetime_obj->getPauseDuration($requestId);\n $assigntime = $requestsdetail[0]['assigned_at'];\n //echo $requestId; echo $requestsdetail[0]['assigned_at'];\n\n if(($requestsdetail[0]['status'] == 'done' || $inpause == 'yes') && $requestsdetail[0]['assigned_at'] != null)\n {\n if($requestsdetail[0]['status'] == \"closed\")\n $time1 = ($requestsdetail[0]['cancelled_at']); /// created time\n elseif ($requestsdetail[0]['status'] == \"done\")\n $time1 = ($requestsdetail[0]['closed_at']); /// created time\n else{\n if($inpause == 'yes') {\n $time1 = ($requestsdetail[0]['pause_at']);\n }else {\n $time1 = (date('Y-m-d H:i:s'));///curent time\n }\n }\n $pausedrequests = $ftvpausetime_obj->pausedRequest($requestId);\n if($pausedrequests == 'yes')\n {\n $time2 = $this->subDiffFromDate($requestId, $requestsdetail[0]['assigned_at']);\n }else{\n $time2 = $requestsdetail[0]['assigned_at'];\n }\n $difference = $this->timeDifference($time1, $time2);\n\n }elseif($requestsdetail[0]['assigned_at'] != null){\n $time1 = (date('Y-m-d H:i:s'));///curent time\n\n $pausedrequests = $ftvpausetime_obj->pausedRequest($requestId);\n if($pausedrequests == 'yes')\n {\n $updatedassigntime = $this->subDiffFromDate($requestId, $requestsdetail[0]['assigned_at']);\n }else{\n $updatedassigntime = $requestsdetail[0]['assigned_at'];\n }\n $time2 = $updatedassigntime;\n $difference = $this->timeDifference($time1, $time2);\n }\n ////when user trying to edit the time spent///\n if($user_params['editftvassignsubmit'] == 'editftvassignsubmit') ///when button submitted in popup//\n {\n $newseconds = $this->allToSeconds($days,$hours,$minutes,$seconds);\n $previousseconds = $this->allToSeconds($difference['days'],$difference['hours'],$difference['minutes'],$difference['seconds']);\n if($newseconds > $previousseconds){\n $diffseconds = $newseconds-$previousseconds;\n $difftime = $this->secondsTodayshours($diffseconds);\n $format = \"P\".$difftime['days'].\"DT\".$difftime['hours'].\"H\".$difftime['minutes'].\"M\".$difftime['seconds'].\"S\";\n $requestsdetail[0]['assigned_at'];\n $time=new DateTime($requestsdetail[0]['assigned_at']);\n $time->sub(new DateInterval($format));\n $assigntime = $time->format('Y-m-d H:i:s');\n $data = array(\"assigned_at\"=>$assigntime);////////updating\n $query = \"identifier= '\".$requestId.\"'\";\n $ftvrequest_obj->updateFtvRequests($data,$query);\n $this->_redirect($prevurl);\n }elseif($newseconds < $previousseconds){\n $diffseconds = $previousseconds-$newseconds;\n $difftime = $this->secondsTodayshours($diffseconds);\n $format = \"P\".$difftime['days'].\"DT\".$difftime['hours'].\"H\".$difftime['minutes'].\"M\".$difftime['seconds'].\"S\";\n $time=new DateTime($requestsdetail[0]['assigned_at']);\n $time->add(new DateInterval($format));\n $assigntime = $time->format('Y-m-d H:i:s');\n $data = array(\"assigned_at\"=>$assigntime);////////updating\n $query = \"identifier= '\".$requestId.\"'\";\n $ftvrequest_obj->updateFtvRequests($data,$query);\n $this->_redirect($prevurl);\n }else\n $this->_redirect($prevurl);\n }\n /*$this->_view->reqasgndate = date(\"d-m-Y\", strtotime($reqdetails[0]['assigned_at']));\n $this->_view->reqasgntime = date(\"g:i A\", strtotime($reqdetails[0]['assigned_at']));*/\n $this->_view->days = $difference['days'];\n $this->_view->hours = $difference['hours'];\n $this->_view->minutes = $difference['minutes'];\n $this->_view->seconds = $difference['seconds'];\n $this->_view->requestId = $user_params['requestId'];\n $this->_view->requestobject = $requestsdetail[0]['request_object'];\n $this->_view->current_duration= $difference['days'].\"j \".$difference['hours'].\"h \".$difference['minutes'].\"m \".$difference['seconds'].\"s \";\n\n $this->_view->extendparttime = 'no';\n $this->_view->extendcrtparttime = 'no';\n $this->_view->editftvassigntime = 'yes';\n $this->_view->nores = 'true';\n $this->_view->render(\"ongoing_extendtime_writer_popup\");\n\n }", "public function updateDateCreated()\n\t\t{\n\t\t\t$db = $this->getDatabaseInstance(self::DB_INST_WRITE);\n\n\t\t\t$query = \"UPDATE status_history\n\t\t\t\t\t SET date_created=?\n\t\t\t\t\t WHERE application_id=?\n\t\t\t\t\t\tAND application_status_id=?\";\n\n\t\t\t$values = array($this->date_created, $this->application_id, $this->application_status_id);\n\n\t\t\t$st = $db->prepare($query);\n\t\t\t$st->execute($values);\n\n $this->setDataSynched();\n }", "public function approveEvent(){\n \t\n \t$data=$this->request->all();\n \t\n \t // print_r($data['value']);die();\n \t$status=$data['value'];\n \t$state['status']=$status;\n \t$event=Event::where('_id',$data['id'])->update($state);\n\n \tif($event){\n \t\treturn \"Success\";\n \t}\n \t// print_r($event);die();\n \t // return view('');\n }", "public function updateTopicModifiedDate()\n {\n $this->setAttribute( 'modified', time() );\n $this->store();\n }", "function setExploitStatus($opm_productid,$statusid) {\n\n\t\t$this->load->model('approvalstatus_model');\n\t\n\t\tif (checkPerms('can_edit_exploit_status',true)) {\n\t\t\n\t\t\t// fetch status name\n\t\t\t\n\t\t\tif ($statusName = $this->approvalstatus_model->fetchExploitStatus($statusid)) {\n\t\t\t\t\n\t\t\t\t$message = \"Exploitation status was changed to \". $statusName .\" by \" . $this->userinfo->username;\n\t\t\t\t\n\t\t\t\tif ($this->products_model->setExploitStatus($opm_productid,$statusid)) {\n\t\t\t\t\n\t\t\t\t\t$this->opm->addHistoryItem($opm_productid,$message);\n\t\t\t\t\n\t\t\t\t\t$this->opm->displayAlert(\"Exploitation status has been changed.\",\"/products/view/\" . $opm_productid);\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$this->opm->displayError(\"Error saving status\",\"/products/view/\" . $opm_productid);\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}\t\t\n\t\t\n\t\t}\n\n }", "public function set_dates(){\n // if the id is not set, this means its anew item being created\n if(property_exists($this, 'created_on') && empty($this->id)){\n $this->created_on = date('Y-m-d H:i:s');\n }\n\n // if id is set, its an update\n if(property_exists($this, 'last_updated_on') && isset($this->id)){\n $this->last_updated_on = date('Y-m-d H:i:s');\n }\n }", "function setExpireDate($ed) {\n\t\tif ($ed) {\n\t\t\t$newtime = dateTimeConvert($ed);\n\t\t\tif ($newtime === false) return;\n\t\t\t$this->set('expiredate', $newtime);\n\t\t} else {\n\t\t\t$this->set('expiredate', NULL);\n\t\t}\n\t}", "function xl_set_expiration($id, $timestamp) {\n\n\t$date = date('m/d/Y', $timestamp);\n\n $formatted_date = DateTime::createFromFormat('m/d/Y', $date);\n\n $month = intval($formatted_date->format('m'));\n $day = intval($formatted_date->format('d'));\n $year = intval($formatted_date->format('y'));\n\n //Manually set post to expire at the end of the day.\n $hour = 23;\n $minute = 59;\n\n $ts = get_gmt_from_date(\"$year-$month-$day $hour:$minute:0\",'U');\n\n $opts = array(\n 'expireType' => 'delete',\n 'id' => $id\n );\n\n _scheduleExpiratorEvent($id, $ts, $opts);\n}", "public function markAsActivate() : bool\n {\n $this->is_active = 1;\n $this->paid = 1;\n //$this->grace_period_ends = new RawValue('NULL');\n $this->ends_at = null; //new rawValue('NULL');\n $this->next_due_payment = $this->ends_at;\n $this->is_cancelled = 0;\n return $this->update();\n }", "function updateModified() {\n\n\t\t\tif (!$this->requestAction('admins/checkAdminLoggedIn')) {\n\t\t\t\t// Set the modified date for the editation and leave registration number unchanged\n\t\t\t\t$this->Session->write('Registration.Registration.modified', date('Y-m-d H:i:s'));\n\t\t\t}\n\t}", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif(!empty($data['t']) && !empty($data['list'])) $result = $this->_bid->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t$data['msg'] = !empty($result['boolean']) && $result['boolean']? 'The bid status has been changed.': 'ERROR: The bid status could not be changed.';\n\t\t\n\t\t$data['area'] = 'refresh_list_msg';\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function change_status(){\n $data = array(\n 'status' => $this->input->post('status') ,\n 'status_changer' => $this->data[\"user_id\"] ,\n );\n $task_id = $this->input->post('task_id') ;\n \n $this->m_task->save($data , $task_id);\n }", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->news_letter_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "function set_change_sale_date_enable() {\n $this->sale_lib->set_change_sale_date_enable($this->input->post('change_sale_date_enable'));\n if (!$this->sale_lib->get_change_sale_date()) {\n $this->sale_lib->set_change_sale_date(date(get_date_format()));\n }\n }", "private function manageStatus()\n {\n $this->updateStatus();\n $this->checkStatus();\n }", "public function getStatusExpire()\n {\n return $this->status_expire;\n }", "public function changeStatus(Request $request)\n {\n $id = $request->id;\n\n /* non active the previous school year */\n SchoolYear::where('status_active', 1)->update([\n 'status_active' => 0,\n 'status_passed' => 2\n ]);\n\n /* enable status of the new school year */\n $update = SchoolYear::where('id', $id)->update([\n 'status_active' => 1,\n 'status_passed' => 0\n ]);\n\n if ($update) {\n $json = ['status' => 200, 'message' => 'Tahun ajar berhasil diubah'];\n } else {\n $json = ['status' => 500, 'message' => 'Tahun ajar gagal diubah'];\n }\n\n return response()->json($json);\n }", "function companydates(){\n $this->auth(COMP_ADM_LEVEL);\n $contest_id = $this->uri->segment(3);\n $data = $this->_getCompanyDataByContestId($contest_id);\n if($this->session->userdata('role_level') > SUPPORT_ADM_LEVEL){\n $data['editable'] = TRUE;\n } else {\n $data['editable'] = FALSE;\n }\n $this->load->view('admin/company_admin/v_dates', $data);\n }", "public function updateStatusFlags(&$flags)\n {\n $embargo = $this->owner->getIsPublishScheduled();\n $expiry = $this->owner->getIsUnPublishScheduled();\n\n if ($embargo || $expiry) {\n unset($flags['addedtodraft'], $flags['modified']);\n }\n\n if ($embargo && $expiry) {\n $flags['embargo_expiry'] = [\n 'text' => _t(__CLASS__ . '.BADGE_PUBLISH_UNPUBLISH', 'Embargo+Expiry'),\n 'title' => sprintf(\n '%s: %s, %s: %s',\n _t(__CLASS__ . '.PUBLISH_ON', 'Scheduled publish date'),\n $this->owner->PublishOnDate,\n _t(__CLASS__ . '.UNPUBLISH_ON', 'Scheduled un-publish date'),\n $this->owner->UnPublishOnDate\n ),\n ];\n } elseif ($embargo) {\n $flags['embargo'] = [\n 'text' => _t(__CLASS__ . '.BADGE_PUBLISH', 'Embargo'),\n 'title' => sprintf(\n '%s: %s',\n _t(__CLASS__ . '.PUBLISH_ON', 'Scheduled publish date'),\n $this->owner->PublishOnDate\n ),\n ];\n } elseif ($expiry) {\n $flags['expiry'] = [\n 'text' => _t(__CLASS__ . '.BADGE_UNPUBLISH', 'Expiry'),\n 'title' => sprintf(\n '%s: %s',\n _t(__CLASS__ . '.UNPUBLISH_ON', 'Scheduled un-publish date'),\n $this->owner->UnPublishOnDate\n ),\n ];\n }\n }", "public function setLastStatusUpdate($value) {\n\t\t$value = date('d-M-Y', strtotime($value));\n\t\tself::$_lastStatusUpdate = $value;\n\t}", "public function travel_quote_status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->travel_quote,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/travel-quote/lists','refresh');\t\t\n\t}", "public function update_availability()\n\t{\n\t\tdate_default_timezone_set(\"Asia/Kolkata\");\n\t\t$res=date('Y-m-d H:i', time());\n\t\techo $res;\n\t\t$data=$this->Setting_model->check_end(); \n\t\tforeach($data as $key)\n\t\t{ $id=$key->id;\n\t\t\t$user_id= $key->user_id;\n\t\t\t//echo $id; echo $user_id;\n\t\t\t$date_time=$key->dates .' '.$key->end_time;\n\t\t\tif($res==$date_time)\n\t\t\t{\n\t\t\t\t//echo \"yess\";\n\t\t\t \t$this->Setting_model->update_time($id,$user_id);\n\t\t\t}\n\t\t}\n\t}", "public function updatedStateEmployee(){\n $this->clearTime();\n }", "public function changeticketstatusAction(){\n\n try{\n\n global $objSession;\n\n\t $this->ModelObj->updateTicketreadstatus();\n\n\t $this->ModelObj->changeTicketstatus(); \n\n\t $objSession->successMsg = \"Ticket Status Updated Successfully\";\n\n exit;\n\n\t }\n\n\t catch (Exception $e) {\n\n $this->ModelObj->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n\n }\n\n }", "public function setStatus($status);", "public function setStatus($status);" ]
[ "0.7183463", "0.7183463", "0.7059148", "0.6953278", "0.67223597", "0.65672636", "0.64993197", "0.6431935", "0.63558227", "0.63170606", "0.626311", "0.6158627", "0.615733", "0.6098472", "0.6089891", "0.60752016", "0.59720194", "0.5956502", "0.5948063", "0.59300673", "0.5930061", "0.5929598", "0.5924559", "0.58980966", "0.5863668", "0.58628273", "0.5860145", "0.58428013", "0.5841419", "0.5832871", "0.5832403", "0.58193034", "0.58185005", "0.5803627", "0.57944715", "0.57924217", "0.5784518", "0.5781318", "0.57715726", "0.5768846", "0.576836", "0.57556546", "0.5747729", "0.57315", "0.5718524", "0.57123035", "0.57094574", "0.5704953", "0.570256", "0.569781", "0.56972426", "0.5696047", "0.56936157", "0.56892395", "0.56884557", "0.5671538", "0.5653465", "0.5650668", "0.5646389", "0.56406516", "0.56325924", "0.5631513", "0.56198657", "0.56193185", "0.56137836", "0.56102383", "0.5607864", "0.56053954", "0.56018335", "0.55991936", "0.55978054", "0.55866134", "0.5560437", "0.55487067", "0.5545777", "0.55435044", "0.55403805", "0.5528447", "0.55280334", "0.55207926", "0.5520693", "0.5517221", "0.55166113", "0.55161947", "0.5510042", "0.55076516", "0.55007035", "0.54962283", "0.5491208", "0.5489472", "0.54881227", "0.5487827", "0.5481472", "0.54631436", "0.5460264", "0.54531485", "0.54520595", "0.5442548", "0.5433867", "0.5433867" ]
0.77045345
0
Calculated values to be added to a bundle
public function getCalculatedBundleValues() { return [ 'futureSuspension' => $this->getFutureSuspension(), 'currentSuspension' => $this->getCurrentSuspension(), 'currentWithdrawal' => $this->getCurrentWithdrawal() ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function bundle();", "public function calculateBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude = null);", "public function getAdditionalBundleQty($args)\n {\n $repo = $this->entityManager->getRepository('ZSELEX_Entity_Bundle');\n $qty = $args ['qty'];\n $type = $args ['type'];\n $shop_id = $args ['shop_id'];\n\n $additional = $repo->getAll(array(\n 'entity' => 'ZSELEX_Entity_ServiceBundle',\n 'where' => array(\n 'a.bundle_type' => 'additional',\n 'a.shop' => $shop_id\n ),\n 'joins' => array(\n 'JOIN a.bundle b'\n ),\n 'fields' => array(\n 'a.quantity',\n 'b.bundle_id'\n )\n ));\n\n // echo \"<pre>\"; print_r($additional); echo \"</pre>\"; exit;\n // $qty = 0;\n if ($additional) {\n foreach ($additional as $key) {\n\n $additional_qty = $repo->get(array(\n 'entity' => 'ZSELEX_Entity_BundleItem',\n 'where' => array(\n 'a.servicetype' => $type,\n 'a.bundle' => $key ['bundle_id']\n ),\n 'fields' => array(\n 'a.qty',\n 'a.qty_based'\n )\n ));\n //echo \"<pre>\"; print_r($additional_qty); echo \"</pre>\"; exit;\n // if ($additional_qty) {\n if ($additional_qty && $additional_qty ['qty_based']) {\n $qty += $additional_qty ['qty'] * $key ['quantity'];\n }\n }\n }\n\n //echo \"qty :\".$qty; exit;\n\n return $qty;\n }", "public function bundle();", "private function _getExtraAmountValues(){\n return Tools::convertPrice($this->_getCartRulesValues() + $this->_getWrappingValues());\n }", "abstract protected function calculateValue();", "public function initTotal()\n {\n // Return val.\n $temp = 0;\n // Add cone price.\n $temp += $this->coneType['price'];\n // Add all scoops of ice cream.\n foreach ($this->scoops as $scoop) {\n $temp += $scoop['price'];\n }\n // Return total item cost.\n return $temp;\n }", "public function provideTotal()\n {\n return [\n [[1, 2, 5, 8], 16],\n [[-1, 2, 5, 8], 14],\n [[1, 2, 8], 11]\n ];\n }", "function hook_credit_info() {\n $results = array();\n $results['foo_bundle'] = array (\n 'bundle' => 'foo',\n // callback function must return value between 0 and 1.\n 'callback' => 'foo_result_calculate',\n \n );\n return $results;\n}", "protected function _initTotals()\n {\n $this->_totals = array();\n $this->_totals['subtotal'] = new Varien_Object(array(\n 'code' => 'subtotal',\n 'value' => $this->getSource()->getSubtotal(),\n 'base_value' => $this->getSource()->getBaseSubtotal(),\n 'bluesnap_value' => $this->getSource()->getBluesnapSubtotal(),\n 'label' => $this->helper('sales')->__('Subtotal')\n ));\n\n /**\n * Add shipping\n */\n if (!$this->getSource()->getIsVirtual() && ((float)$this->getSource()->getShippingAmount() || $this->getSource()->getShippingDescription())) {\n $this->_totals['shipping'] = new Varien_Object(array(\n 'code' => 'shipping',\n 'value' => $this->getSource()->getShippingAmount(),\n 'base_value' => $this->getSource()->getBaseShippingAmount(),\n 'bluesnap_value' => $this->getSource()->getBluesnapShippingAmount(),\n 'label' => $this->helper('sales')->__('Shipping & Handling')\n ));\n }\n\n /**\n * Add discount\n */\n if (((float)$this->getSource()->getDiscountAmount()) != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = $this->helper('sales')->__('Discount (%s)', $this->getSource()->getDiscountDescription());\n } else {\n $discountLabel = $this->helper('sales')->__('Discount');\n }\n $this->_totals['discount'] = new Varien_Object(array(\n 'code' => 'discount',\n 'value' => $this->getSource()->getDiscountAmount(),\n 'base_value' => $this->getSource()->getBaseDiscountAmount(),\n 'bluesnap_value' => $this->getSource()->getBluesnapDiscountAmount(),\n 'label' => $discountLabel\n ));\n }\n\n $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'strong' => true,\n 'value' => $this->getSource()->getGrandTotal(),\n 'base_value' => $this->getSource()->getBaseGrandTotal(),\n 'bluesnap_value' => $this->getSource()->getBluesnapGrandTotal(),\n 'label' => $this->helper('sales')->__('Grand Total'),\n 'area' => 'footer'\n ));\n\n\n //end parent totals\n\n $this->_totals['paid'] = new Varien_Object(array(\n 'code' => 'paid',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalPaid(),\n 'base_value' => $this->getSource()->getBaseTotalPaid(),\n 'bluesnap_value' => $this->getSource()->getBluesnapTotalPaid(),\n 'label' => $this->helper('sales')->__('Total Paid'),\n 'area' => 'footer'\n ));\n $this->_totals['refunded'] = new Varien_Object(array(\n 'code' => 'refunded',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalRefunded(),\n 'base_value' => $this->getSource()->getBaseTotalRefunded(),\n 'bluesnap_value' => $this->getSource()->getBluesnapTotalRefunded(),\n 'label' => $this->helper('sales')->__('Total Refunded'),\n 'area' => 'footer'\n ));\n $this->_totals['due'] = new Varien_Object(array(\n 'code' => 'due',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalDue(),\n 'base_value' => $this->getSource()->getBaseTotalDue(),\n 'bluesnap_value' => $this->getSource()->getBluesnapTotalDue(),\n\n 'label' => $this->helper('sales')->__('Total Due'),\n 'area' => 'footer'\n ));\n return $this;\n }", "public function total(){\n $total = $this->qualification + $this->referee_report + $this->interview;\n }", "public function getSum(): float;", "private function parse_total(){\n\t\t$production_formats = new \\gcalc\\db\\production\\formats();\n\t\t$product_constructor_name = '\\gcalc\\db\\product\\\\' . str_replace( '-', '_', $this->get_slug() );\n\t\t$product_constructor_exists = class_exists( $product_constructor_name );\n\t\t$product_constructor_cost_equasion_exists = $product_constructor_exists ? method_exists( $product_constructor_name, 'get_calc_data' ) : false;\n\n\n\n\t\t/*\n\t\tEquasion can be stored in product constructor or formats array.\n\t\tFormats array is a temporary means to keep data so product constructor is a preferred way\n\t\t */\n\t\t$total_cost_equasion = \n\t\t\t$product_constructor_cost_equasion_exists ? \n\t\t\t\t$product_constructor_name::get_calc_data( )\n\t\t\t\t: $production_formats->get_total_cost_equasion( $this->get_product_id() );\n\n\t\t$total_cost_equasion_string = $total_cost_equasion['equasion'];\n\n\t\t$total_cost_equasion = $total_cost_equasion_string;\n\t\t$total_pcost_equasion = $total_cost_equasion_string;\n\n\t\t\n\t\t/**\n\t\t * Keeps selling prices of used processes\n\t\t * @var array\n\t\t */\n\t\t$total_cost_array = array();\n\t\t/**\n\t\t * Keeps production costs of used processes\n\t\t * @var array\n\t\t */\n\t\t$total_pcost_array = array();\n\t\t/**\n\t\t * Keeps markups of used proceses\n\t\t * @var array\n\t\t */\n\t\t$total_markup_array = array();\n\t\t/**\n\t\t * All used in calculation formats\n\t\t * @var array\n\t\t */\n\t\t$used_formats_array = array();\n\t\t/**\n\t\t * All used in calculation media\t\t \n\t\t * @var array\n\t\t */\n\t\t$used_media_array = array();\n\n\t\t//checking credentials for data filter\t\t\n\t\t$credetials = $this->login();\n\t\t$al = $credetials['access_level'];\n\n\t\tforeach ($this->done as $key => $value) {\t\n\t\t\tif ( preg_match( '/'.$value->total['name'].'/', $total_cost_equasion_string )) {\n\t\t\t\t$total_cost_equasion = str_replace($value->total['name'], $value->total['total_price'], $total_cost_equasion);\t\t\t\t\t\t\n\t\t\t\t$total_pcost_equasion = str_replace($value->total['name'], $value->total['production_cost'], $total_pcost_equasion);\t\t\n\n\t\t\t\t$total_cost_array[ $value->total['name'] ] = $value->total['total_price'];\n\t\t\t\t$total_pcost_array[ $value->total['name'] ] = $value->total['production_cost'];\n\t\t\t\t$total_markup_array[ $value->total['name'] ] = $value->total['markup'];\n\t\t\t}\t\n\n\t\t\t//used formats total\n\t\t\tif ( preg_match( '/_format/', $value->total['name'] )) {\n\t\t\t\t$production_format_pieces = $value->total['extended']['production_format']['pieces'];\n\t\t\t\t$common_format_name = $value->total['extended']['production_format']['common_format']['name'];\n\t\t\t\t$common_format_width = $value->total['extended']['production_format']['common_format']['width'];\n\t\t\t\t$common_format_height = $value->total['extended']['production_format']['common_format']['height'];\n\n\t\t\t\t$production_format_format = $value->total['extended']['production_format']['format'];\n\t\t\t\t$production_format_width = $value->total['extended']['production_format']['width'];\n\t\t\t\t$production_format_height = $value->total['extended']['production_format']['height'];\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t* Filtering data\n\t\t\t\t*/\n\t\t\t\tif ( $al > 0) {\n\t\t\t\t\t\n\t\t\t\t\tif ($al > 5) { // admin, master only\n\t\t\t\t\t\t\n\t\t\t\t\t\t$format_str = $production_format_pieces .' '. __('slots', 'gcalc') .' '. $common_format_name .'('.$common_format_width.'x'.$common_format_height.')' \n\t\t\t\t\t\t\t.' @ '. $production_format_format.'('.$production_format_width.'x'.$production_format_height.')';\n\n\t\t\t\t\t} else { // no data for account, inner\n\t\t\t\t\t\t$format_str = '';\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t} else { // 0 - anonymous\n\t\t\t\t\t$format_str = $common_format_width.'x'.$common_format_height;\n\n\t\t\t\t}\n\n\n\t\t\t\t$used_formats_array[ $value->total['name'] ] = $format_str;\n\t\t\t}\n\t\t\t\n\t\t\t//used papers total\n\t\t\tif ( preg_match( '/_paper/', $value->total['name'] )) {\n\t\t\t\t$sheet_cost = $value->total['extended']['sheet_cost'];\n\t\t\t\t$sheets_quantity = $value->total['extended']['sheets_quantity'];\n\t\t\t\t$paper_price_per_kg = $value->total['extended']['paper']['price_per_kg'];\n\t\t\t\t$paper_label = $value->total['extended']['paper']['label'];\t\t\t\t\n\t\t\t\t$paper_thickness = $value->total['extended']['paper']['thickness'];\n\n\t\t\t\t/*\n\t\t\t\t* Filtering data\n\t\t\t\t*/\n\t\t\t\tif ( $al > 0) {\n\t\t\t\t\tif ($al > 5) { // admin, master only\n\t\t\t\t\t\t\n\t\t\t\t\t\t$media_str = $sheets_quantity .' x ' . $paper_label . ' (' . $paper_thickness . 'mm)'\n\t\t\t\t\t\t.' @ ' . $sheet_cost . ' PLN / '. __('sheet','gcalc') .' (' . $paper_price_per_kg . '/kg) ';\n\n\t\t\t\t\t} else { // no data for account, inner\n\t\t\t\t\t\t$media_str = '';\t\n\t\t\t\t\t}\n\t\t\t\t} else { // 0 - anonymous\n\t\t\t\t\t$media_str = $paper_label;\n\n\t\t\t\t}\n\n\t\t\t\t$used_media_array[ $value->total['name'] ] = $media_str;\n\n\t\t\t}\n\t\t}\n\t\teval('$total_cost_ = ' . $total_cost_equasion . ';');\n\t\teval('$total_pcost_ = ' . $total_pcost_equasion . ';');\n\n\t\t$average_markup = count($total_markup_array) > 0 ? array_sum( $total_markup_array ) / count($total_markup_array) : 1;\n\n\n\n\n\t\t$total_ = array(\n\t\t\t'equasion' => $total_cost_equasion_string,\t\t\t\n\t\t\t'used_formats' => $used_formats_array,\n\t\t\t'used_media' => $used_media_array,\n\n\t\t\t'total_markup' => $total_markup_array,\n\t\t\t'total_cost_equasion' => $total_cost_array,\n\t\t\t'total_pcost_equasion' => $total_pcost_array,\n\t\t\t\n\t\t\t'average_markup' => ( ( $total_cost_ - $total_pcost_ ) / $total_pcost_ ) + 1, \n\t\t\t'total_cost_' => $total_cost_,\n\t\t\t'total_pcost_' => $total_pcost_\n\t\t);\n\n\t\t\t\t/*\n\t\t\t\t* Filtering total data\n\t\t\t\t*/\n\t\t\t\tif ( $al > 0) {\n\t\t\t\t\tif ($al > 5) { // admin, master only\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t} else { // no data for account, inner\n\t\t\t\t\t\t\n\t\t\t\t\t\tunset($total_['used_formats']);\n\t\t\t\t\t\tunset($total_['used_media']);\n\t\t\t\t\t}\n\t\t\t\t} else { // 0 - anonymous\n\t\t\t\t\t$media_str = $paper_label;\n\n\t\t\t\t}\n\n\n\t\t$total_ = $this->merge_children_totals( $total_ );\n\t\t$this->total_ = $total_;\n\n\t}", "public function total();", "public function total();", "public function total();", "public function calcularValorLlamada();", "public function total()\n {\n \treturn $this->price()*$this->quantity;\n }", "public function itemTotal(): float;", "public function getTotalAttribute(): float;", "private function setTotalAmounts()\n {\n $taxable\t= 0.00;\n $expenses = 0.00;\n $outlays\t= 0.00;\n\n foreach ($this->invoiceDetails as $invoiceDetail) {\n $amount = $invoiceDetail->getAmount();\n switch ($invoiceDetail->getType())\n {\n case 'incoming':\n $taxable += $amount;\n break;\n case 'expense':\n $taxable += $amount;\n $expenses += $amount;\n break;\n case 'outlay':\n $outlays += $amount;\n break;\n }\n }\n\n $this->setTotalTaxable($taxable);\n $this->setTotalExpenses($expenses);\n $this->setTotalOutlays($outlays);\n }", "public function bundleFieldDefinitions() {\n $fields = [];\n\n $fields['amws_sku'] = $this->stringBundleFieldDefinition('SKU');\n $fields['amws_standard_product_id_type'] = $this->stringBundleFieldDefinition('Standard product ID type');\n $fields['amws_standard_product_id_value'] = $this->stringBundleFieldDefinition('Standard product ID value');\n $fields['amws_launch_date'] = $this->timestampBundleFieldDefinition('Launch date');\n $fields['amws_release_date'] = $this->timestampBundleFieldDefinition('Release date');\n $fields['amws_condition'] = $this->listStringBundleFieldDefinition('Condition', ['New' => 'New']);\n $fields['amws_rebate_start_date'] = $this->timestampBundleFieldDefinition('Rebate start date');\n $fields['amws_rebate_end_date'] = $this->timestampBundleFieldDefinition('Rebate end date');\n $fields['amws_item_package_quantity'] = $this->decimalBundleFieldDefinition('Item package quantity');\n $fields['amws_number_of_items'] = $this->decimalBundleFieldDefinition('Number of items');\n $fields['amws_rebate_message'] = $this->stringBundleFieldDefinition('Rebate message');\n $fields['amws_rebate_name'] = $this->stringBundleFieldDefinition('Rebate name');\n $fields['amws_dd_title'] = $this->stringBundleFieldDefinition('Title');\n $fields['amws_dd_brand'] = $this->stringBundleFieldDefinition('Brand');\n $fields['amws_dd_designer'] = $this->stringBundleFieldDefinition('Designer');\n $fields['amws_dd_description'] = $this->textLongBundleFieldDefinition('Description');\n $fields['amws_dd_bullet_point'] = $this->textLongBundleFieldDefinition('Bullet points', '', TRUE);\n $fields['amws_dd_merchant_catalog_number'] = $this->stringBundleFieldDefinition('Merchant catalog number');\n $fields['amws_dd_msrp'] = $this->stringBundleFieldDefinition('MSRP');\n $fields['amws_dd_max_order_quantity'] = $this->decimalBundleFieldDefinition('Maximum order quantity');\n $fields['amws_dd_serial_number_required'] = $this->booleanBundleFieldDefinition('Serial number required?');\n $fields['amws_dd_prop65'] = $this->booleanBundleFieldDefinition('Proposition 65');\n $fields['amws_dd_legal_disclaimer'] = $this->textLongBundleFieldDefinition('Legal disclaimer');\n $fields['amws_dd_manufacturer'] = $this->stringBundleFieldDefinition('Manufacturer');\n $fields['amws_dd_mfr_part_number'] = $this->stringBundleFieldDefinition('Manufacturer part number');\n $fields['amws_dd_memorabilia'] = $this->booleanBundleFieldDefinition('Memorabilia');\n $fields['amws_dd_autographed'] = $this->booleanBundleFieldDefinition('Autographed');\n $fields['amws_dd_gift_wrap_available'] = $this->booleanBundleFieldDefinition('Gift wrapping available');\n $fields['amws_dd_gift_message_available'] = $this->booleanBundleFieldDefinition('Gift message available');\n $fields['amws_dd_discontinued_by_mfr'] = $this->booleanBundleFieldDefinition('Discontinued by the manufacturer');\n $fields['amws_dd_max_aggregate_quantity'] = $this->decimalBundleFieldDefinition('Maximum aggregate shipping quantity');\n\n return $fields;\n }", "public function getTotal();", "public function getTotal();", "public function costInstallments(){\n\n\n for($x = 1; $x<=12; $x++){\n\n if($x == 1){\n $cost[$x] = 0;\n }\n $cost[$x] = Mage::getStoreConfig(self::XPATH_CONFIG_INSTALMENT_COST.$x);\n }\n\n\n return $cost;\n }", "public function getTotal() {\n\n }", "function calculatePriceForRabatt(){\r\n// @ToDo remove static Values \r\n\r\n\t $basketIns = array_merge($this->basket->get_articles_by_article_type_uid_asuidlist(1)); //,$this->basket->get_articles_by_article_type_uid_asuidlist($this->pObj->conf['couponNormalType']),$this->basket->get_articles_by_article_type_uid_asuidlist($this->pObj->conf['couponRelatedType'])); // 4 and 5\r\n\t $value = array('net'=>0,'gross'=>0);\r\n\t \r\n\t foreach ($basketIns as $itemObjId) {\r\n\t\t$temp = $this->basket->basket_items[$itemObjId];\r\n\t\t$temp->recalculate_item_sums();\r\n\t\t\r\n\t\t$value['net'] += $temp->get_item_sum_net();\r\n\t\t$value['gross'] += $temp->get_item_sum_gross();\r\n\t }\r\n\r\n\t if($value['net']< 0){\r\n\t\t$value['net'] = 0;\r\n\t }\r\n\r\n\t if($value['gross'] < 0){\r\n\t\t$value['gross'] = 0;\r\n\t }\r\n\t return $value;\r\n\t}", "protected function populateBundleData($collection)\n {\n foreach ($collection as $product) {\n $id = $product->getEntityId();\n $this->bundleData[$id][self::BUNDLE_PRICE_TYPE_COL] = $this->getTypeValue($product->getPriceType());\n $this->bundleData[$id][$this->shipmentTypeColumn] = $this->getShipmentTypeValue(\n $product->getShipmentType()\n );\n $this->bundleData[$id][self::BUNDLE_SKU_TYPE_COL] = $this->getTypeValue($product->getSkuType());\n $this->bundleData[$id][self::BUNDLE_PRICE_VIEW_COL] = $this->getPriceViewValue($product->getPriceView());\n $this->bundleData[$id][self::BUNDLE_WEIGHT_TYPE_COL] = $this->getTypeValue($product->getWeightType());\n $this->bundleData[$id][self::BUNDLE_VALUES_COL] = $this->getFormattedBundleOptionValues($product);\n }\n return $this;\n }", "protected function getTotal()\n {\n $total = 0;\n foreach ($this->entries as $entry) {\n $total += $entry['price'] * $entry['quantity'];\n }\n\n return $total;\n }", "protected function _initTotals()\n {\n $source = $this->getSource();\n\n $this->_totals = [];\n $this->_totals['subtotal'] = new \\Magento\\Framework\\DataObject(\n ['code' => 'subtotal', 'value' => $source->getSubtotal(), 'label' => __('Subtotal')]\n );\n\n if ((double)$this->getOrder()->getPayment()->getAdditionalInformation('paypal_custom_fee') != 0) {\n $this->_totals['paypal_fee'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'paypal_fee',\n 'field' => 'paypal_fee',\n 'value' => $this->getOrder()->getPayment()->getAdditionalInformation('paypal_custom_fee'),\n 'label' => $this->getOrder()->getPayment()->getAdditionalInformation('base_paypal_custom_fee_description'),\n ]\n );\n }\n\n\n /**\n * Add discount\n */\n if ((double)$this->getSource()->getDiscountAmount() != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = __('Discount (%1)', $source->getDiscountDescription());\n } else {\n $discountLabel = __('Discount');\n }\n $this->_totals['discount'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'discount',\n 'field' => 'discount_amount',\n 'value' => $source->getDiscountAmount(),\n 'label' => $discountLabel,\n ]\n );\n }\n\n /**\n * Add shipping\n */\n if (!$source->getIsVirtual() && ((double)$source->getShippingAmount() || $source->getShippingDescription())) {\n $label = __('Shipping & Handling');\n if ($this->getSource()->getCouponCode() && !isset($this->_totals['discount'])) {\n $label = __('Shipping & Handling (%1)', $this->getSource()->getCouponCode());\n }\n\n $this->_totals['shipping'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'shipping',\n 'field' => 'shipping_amount',\n 'value' => $this->getSource()->getShippingAmount(),\n 'label' => $label,\n ]\n );\n }\n\n $this->_totals['grand_total'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'grand_total',\n 'field' => 'grand_total',\n 'strong' => true,\n 'value' => $source->getGrandTotal(),\n 'label' => __('Grand Total'),\n ]\n );\n\n /**\n * Base grandtotal\n */\n if ($this->getOrder()->isCurrencyDifferent()) {\n $this->_totals['base_grandtotal'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'base_grandtotal',\n 'value' => $this->getOrder()->formatBasePrice($source->getBaseGrandTotal()),\n 'label' => __('Grand Total to be Charged'),\n 'is_formated' => true,\n ]\n );\n }\n return $this;\n }", "protected function _afterLoad()\n {\n\n $value = $this->getValue();\n $value = $this->currencyexponent->makeArrayFieldValue($value);\n $this->setValue($value);\n }", "public function get_total()\n {\n }", "public function individual_products_total() {\n\n foreach($this->remaining_category_price as $remaining_category_prices){\n $this->individual_products_total += $remaining_category_prices['price'];\n }\n\n }", "public function sumItems(): float\n\t{\n\t\treturn $this->storage->sum();\n\t}", "function dokan_add_to_cart_fragments( $fragment ) {\n $fragment['amount'] = WC()->cart->get_cart_total();\n\n return $fragment;\n}", "public function getValorTotal(){\n $sum = 0;\n foreach($this->itens as $i):\n $sum += $i->getPreco() * $i->getQuantidade();\n endforeach;\n\n return $sum;\n }", "public function getQuantity(): float;", "protected function _initTotals()\n {\n $this->_totals = array();\n\n //overridden store ship\n $storeship = Bm_Cmon::getWholesalerShipping($this->getOrder()->getRealOrderId());\n\n\n $_subtotal = 0;\n foreach ($this->getOrder()->getAllItems() as $orderItem) {\n\n \tif(Bm_Cmon::checkSkuOwner($orderItem->getSku())){\n \t\t$_subtotal+= $orderItem->getQtyOrdered()*$orderItem->getOriginalPrice();\n\n \t}\n \n \n\n }\n\n $this->_totals['subtotal'] = new Varien_Object(array(\n 'code' => 'subtotal',\n 'value' => $_subtotal,\n 'base_value'=> $this->getSource()->getBaseSubtotal(),\n 'label' => $this->helper('sales')->__('Subtotal')\n ));\n\n /**\n * overridden ship value\n */\n if (!$this->getSource()->getIsVirtual() && ((float) $this->getSource()->getShippingAmount() || $this->getSource()->getShippingDescription()))\n {\n \n $this->_totals['shipping'] = new Varien_Object(array(\n 'code' => 'shipping',\n 'value' => $storeship['value'], //$this->getSource()->getShippingAmount(),\n 'base_value'=> $this->getSource()->getBaseShippingAmount(),\n 'label' => $this->helper('sales')->__('Shipping & Handling')\n ));\n }\n\n /**\n * Add discount\n */\n\n /*\n if (((float)$this->getSource()->getDiscountAmount()) != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = $this->helper('sales')->__('Discount (%s)', $this->getSource()->getDiscountDescription());\n } else {\n $discountLabel = $this->helper('sales')->__('Discount');\n }\n $this->_totals['discount'] = new Varien_Object(array(\n 'code' => 'discount',\n 'value' => $this->getSource()->getDiscountAmount(),\n 'base_value'=> $this->getSource()->getBaseDiscountAmount(),\n 'label' => $discountLabel\n ));\n }\n\t\t*/\n\n\t\t//FIXME: implements discount logic\n $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'strong' => true,\n 'value' => $_subtotal+$this->getSource()->getDiscountAmount()*(-1)+$storeship['value'],\n 'base_value'=> $this->getSource()->getBaseGrandTotal(),\n 'label' => $this->helper('sales')->__('Grand Total'),\n 'area' => 'footer'\n ));\n\n return $this;\n }", "function getMetaData()\n {\n $meta = parent::getMetaData();\n\n $meta[\"sum_bankcodes\"] = floatval($this->sum_bankcodes);\n $meta[\"sum_accounts\"] = floatval($this->sum_accounts);\n\n return $meta;\n }", "function calculateAll(){\n try{\n $sum = 0;\n foreach($this->content as $inventary){\n foreach($inventary as $key=>$item){\n $sum1 = 0;\n foreach($item as $value)\n $sum1=$sum1+$value->weight*$value->price;\n echo \"value of \".$key.\" = \".$sum1.\"\\n\";\n }\n $sum = $sum + $sum1;\n }\n \n echo \"value of all inventary=\".$sum.\"\\n\";\n } catch (Exception $e) {\n echo $e;\n }\n }", "public function getTotalAttribute()\n {\n return $this->price * $this->quantity;\n }", "function serialize_bundle_meta( $bundle_id ) {\n\n\t\tglobal $wpdb;\n\n\t\t$bundled_item_ids \t= maybe_unserialize( get_post_meta( $bundle_id, '_bundled_ids', true ) );\n\t\t$default_attributes = maybe_unserialize( get_post_meta( $bundle_id, '_bundle_defaults', true ) );\n\t\t$allowed_variations = maybe_unserialize( get_post_meta( $bundle_id, '_allowed_variations', true ) );\n\n\t\t$bundle_data = array();\n\n\t\tforeach ( $bundled_item_ids as $bundled_item_id ) {\n\n\t\t\t$bundle_data[ $bundled_item_id ] = array();\n\n\t\t\t$filtered \t\t\t= get_post_meta( $bundle_id, 'filter_variations_' . $bundled_item_id, true );\n\t\t\t$o_defaults\t\t\t= get_post_meta( $bundle_id, 'override_defaults_' . $bundled_item_id, true );\n\t\t\t$hide_thumbnail\t\t= get_post_meta( $bundle_id, 'hide_thumbnail_' . $bundled_item_id, true );\n\t\t\t$item_o_title \t\t= get_post_meta( $bundle_id, 'override_title_' . $bundled_item_id, true );\n\t\t\t$item_title \t\t= get_post_meta( $bundle_id, 'product_title_' . $bundled_item_id, true );\n\t\t\t$item_o_desc \t\t= get_post_meta( $bundle_id, 'override_description_' . $bundled_item_id, true );\n\t\t\t$item_desc\t\t\t= get_post_meta( $bundle_id, 'product_description_' . $bundled_item_id, true );\n\t\t\t$item_qty\t\t\t= get_post_meta( $bundle_id, 'bundle_quantity_' . $bundled_item_id, true );\n\t\t\t$discount\t\t\t= get_post_meta( $bundle_id, 'bundle_discount_' . $bundled_item_id, true );\n\t\t\t$visibility\t\t\t= get_post_meta( $bundle_id, 'visibility_' . $bundled_item_id, true );\n\n\t\t\t$sep = explode( '_', $bundled_item_id );\n\n\t\t\t$bundle_data[ $bundled_item_id ][ 'product_id' ] \t\t\t\t= $sep[0];\n\n\n\t\t\t$bundle_data[ $bundled_item_id ][ 'filter_variations' ] \t\t= $filtered == 'yes' ? 'yes' : 'no';\n\n\t\t\tif ( isset( $allowed_variations[ $bundled_item_id ] ) )\n\t\t\t\t$bundle_data[ $bundled_item_id ][ 'allowed_variations' ] \t= $allowed_variations[ $bundled_item_id ];\n\n\n\t\t\t$bundle_data[ $bundled_item_id ][ 'override_defaults' ] \t\t= $o_defaults == 'yes' ? 'yes' : 'no';\n\n\t\t\tif ( isset( $default_attributes[ $bundled_item_id ] ) )\n\t\t\t\t$bundle_data[ $bundled_item_id ][ 'bundle_defaults' ] \t\t= $default_attributes[ $bundled_item_id ];\n\n\n\t\t\t$bundle_data[ $bundled_item_id ][ 'hide_thumbnail' ] \t\t\t= $hide_thumbnail == 'yes' ? 'yes' : 'no';\n\n\n\t\t\t$bundle_data[ $bundled_item_id ][ 'override_title' ] \t\t\t= $item_o_title == 'yes' ? 'yes' : 'no';\n\n\t\t\tif ( $item_o_title == 'yes' )\n\t\t\t\t$bundle_data[ $bundled_item_id ][ 'product_title' ] \t\t= $item_title;\n\n\n\t\t\t$bundle_data[ $bundled_item_id ][ 'override_description' ] \t\t= $item_o_desc == 'yes' ? 'yes' : 'no';\n\n\t\t\tif ( $item_o_desc == 'yes' )\n\t\t\t\t$bundle_data[ $bundled_item_id ][ 'product_description' ] \t= $item_desc;\n\n\n\t\t\t$bundle_data[ $bundled_item_id ][ 'bundle_quantity' ] \t\t\t= $item_qty;\n\t\t\t$bundle_data[ $bundled_item_id ][ 'bundle_discount' ] \t\t\t= $discount;\n\n\t\t\t$bundle_data[ $bundled_item_id ][ 'visibility' ] \t\t\t\t= $visibility == 'hidden' ? 'hidden' : 'visible';\n\n\t\t\t$bundle_data[ $bundled_item_id ][ 'hide_filtered_variations' ] \t= 'no';\n\t\t}\n\n\t\tupdate_post_meta( $bundle_id, '_bundle_data', $bundle_data );\n\n\t\t$wpdb->query( $wpdb->prepare( \"DELETE FROM `$wpdb->postmeta` WHERE `post_id` LIKE %s AND (\n\t\t\t`meta_key` LIKE %s OR\n\t\t\t`meta_key` LIKE %s OR\n\t\t\t`meta_key` LIKE %s OR\n\t\t\t`meta_key` LIKE %s OR\n\t\t\t`meta_key` LIKE %s OR\n\t\t\t`meta_key` LIKE %s OR\n\t\t\t`meta_key` LIKE %s OR\n\t\t\t`meta_key` LIKE %s OR\n\t\t\t`meta_key` LIKE %s OR\n\t\t\t`meta_key` LIKE %s OR\n\t\t\t`meta_key` LIKE %s OR\n\t\t\t`meta_key` LIKE ('_bundled_ids') OR\n\t\t\t`meta_key` LIKE ('_bundle_defaults') OR\n\t\t\t`meta_key` LIKE ('_allowed_variations')\n\t\t)\", $bundle_id, 'filter_variations_%', 'override_defaults_%', 'bundle_quantity_%', 'bundle_discount_%', 'hide_thumbnail_%', 'override_title_%', 'product_title_%', 'override_description_%', 'product_description_%', 'hide_filtered_variations_%', 'visibility_%' ) );\n\n\t\treturn $bundle_data;\n\t}", "private function init(): void\n {\n $this->value_signs = [\n '+' => 'plus',\n '-' => 'minus',\n ];\n\n // init number formatter\n $formatter = new NumberFormatter($this->getValueLocale(), NumberFormatter::SPELLOUT);\n\n // generate number value array with translated labels per locale\n for ($index = $this->getValueRange()[0]; $index <= $this->getValueRange()[1]; $index++) {\n $this->value_numbers[$index] = $formatter->format($index);\n }\n }", "function set_bundle_cnt($ordno,$mall,$type='p'){\n\t\t\n\t\tif($type=='p'){\n\t\t\t$default_val=0;\n\t\t\t$calu=\"+\";\n\t\t}else if($type=='m'){\n\t\t\t$default_val=2;\n\t\t\t$calu=\"-\";\n\t\t}\n\t\t\n\t\tif($mall){\n\t\t\t$add_where=\" and mall_no=:mall_no\";\n\t\t\t$param[':mall_no']=$mall;\n\t\t}\n\t\t$qry=\"update order_list set bundle=if(bundle='\".$default_val.\"',bundle\".$calu.\"2,bundle\".$calu.\"1) where bundle>0 and ordno=:ordno\".$add_where;\n\t\t$param[':ordno']=$ordno;\n\t\t$this->db->query($qry,$param);\n\t\t\n\t}", "public function getTotalAttribute() {\n return $this->products()->get(['price', 'amount'])->sum(function($product) {\n return $product->price * $product->amount;\n });\n }", "public function catalogProductLoadAfter(Varien_Event_Observer $observer)\n{\n // set the additional options on the product\n if(Mage::getStoreConfigFlag('mycustom_section/mycustom_group2/field1')){\n $action = Mage::app()->getFrontController()->getAction();\n if ($action->getFullActionName() == 'checkout_cart_add')\n {\n\n \n $product = $observer->getProduct();\n // Mage::log($product);\n \n$totalCredits = Mage::getModel('kartparadigm_storecredit/creditinfo')->getCreditsOfProduct($product->getId());\n\n if($totalCredits > 0) {\n\n // if ($options = $action->getRequest()->getParam('extra_option'))\n //{\n //$product = $observer->getProduct();\n // Mage::log($product);\n\n // add to the additional options array\n $additionalOptions = array();\n if ($additionalOption = $product->getCustomOption('additional_options'))\n {\n $additionalOptions = (array) unserialize($additionalOption->getValue());\n }\n\n \n $additionalOptions[] = array(\n 'label' => \"Credits\",\n 'value' => $totalCredits,\n );\n\n \n // add the additional options array with the option code additional_options\n $observer->getProduct()\n ->addCustomOption('additional_options', serialize($additionalOptions));\n //}\n }\n }\n }\n}", "public function getTotalAmount();", "public function sum();", "public function getTotal()\n {\n return $this->getQty() * $this->getProduct()->getPrice();\n }", "public function getProductQuantity()\n {\n }", "public function getAmount();", "public function getAmount();", "public function getAmount();", "public function getAmount();", "public function total(): float;", "public function total(): float;", "public function getQuantity();", "public function getQuantity();", "public function getQuantity();", "public function calculate();", "public function calculate();", "public function calcTotal()\n {\n\n $productBusinessService = new ProductBusinessService();\n\n // create an array to hold all subtotals\n $subtotals_array = array();\n $this->total_price = 0;\n\n foreach ($this->items as $item => $qty) {\n\n // get the price of the product from the database\n $product = $productBusinessService->getProductByID($item);\n\n // calculate the total (price * quantity)\n $product_subtotal = $product->getPrice() * $qty;\n\n // add that subtotal to the subtotal array\n $subtotals_array = $subtotals_array + array($item => $product_subtotal);\n\n // add the item subtotal to the cart total\n $this->total_price += $product_subtotal;\n }\n\n // set the subtotals array\n $this->subtotals = $subtotals_array;\n }", "function calculerTotal () {\n\t $total = 0;\n\t \n\t foreach ($this->lignes as $lp) {\n\t $prod = $lp->prod;\n\t $prixLigne = $prod->prix * $lp->qte ;\n\t $total = $total + $prixLigne ;\n\t }\n\t \n\t return $total;\n\t }", "public function getCalculateOnItems() {\r\n return Mage::getStoreConfig('giftwrap/calculation/amount_on_number_items');\r\n }", "private function compute()\n {\n if ($this->computed) {\n return true;\n }\n\n $this->load('items');\n\n foreach ($this->items as $item) {\n $this->_total += ($item->amount) / 100;\n $this->_gst += ($item->gst) / 100;\n $this->_pst += ($item->pst) / 100;\n }\n\n $this->computed = true;\n }", "public function getFormattedTotalAttribute(): string;", "public function reporteMensualTotal(){\n\n }", "public function sum() {\r\n $summedData = 123;\r\n\r\n return $summedData;\r\n }", "public function getTotal(): float;", "private function addValues($selected){\n $id = $this->answersId[$selected];\n $answersModel = new Answer();\n $answer = $answersModel->find($id);\n\n $this->score['heritage'] += $answer->heritage;\n $this->score['populated'] += $answer->populated;\n $this->score['weather'] += $answer->weather;\n $this->score['relax'] += $answer->relax;\n $this->score['sightseeing'] += $answer->sightseeing;\n }", "public function getAmount(): float;", "public function getQuantity()\n {\n return parent::getQuantity();\n }", "function getTotalsForDisplay()\n {\n $amount = $this->getSource()->formatPriceTxt($this->getAmount());\n\n if ($this->getAmountPrefix()) {\n $amount = $this->getAmountPrefix() . $amount;\n }\n\n $title = __($this->getTitle());\n if ($this->getTitleSourceField()) {\n $label = $title . ' (' . $this->getTitleDescription() . '):';\n } else {\n $label = $title . ':';\n }\n\n $fontSize = $this->getFontSize() ? $this->getFontSize() : 7;\n $total = ['amount' => $amount, 'label' => $label, 'font_size' => $fontSize];\n return [$total];\n }", "public function getInsuranceAmount();", "public function process_bundle_rates() {\n if ( isset( $_POST['remove_configurations'] ) ) {\n if ( isset( $_POST['remove'] ) ) {\n $bundle_rates = self::get_bundle_rates();\n foreach ( $_POST['remove'] as $key ) {\n unset( $bundle_rates[$key] );\n }\n \n update_option('woocommerce_enda_bundle_rates', array_values( $bundle_rates ));\n } \n }\n elseif ( isset( $_POST['woocommerce_enda_bundle_rates'] ) ) {\n update_option('woocommerce_enda_bundle_rates', array_values( $_POST['woocommerce_enda_bundle_rates'] ) ); \n } \n\n $this->bundle_rates = self::get_bundle_rates();\n }", "function set_values() {\n\t\tparent::set_values();\n\t\t$currency = new currency($this->_currency_id);\n\t\t\n\t\t$this->order_id->value = $this->_order_id;\n\t\t$this->timestamp->value = date(\"j M Y\");\n\t\t$this->total_amount->value = $currency->format_money($this->_total_amount);\n\t}", "public function getPaymentAmount()\n {\n return $this->bonus + parent::getSalary();\n }", "function update($units, $total){}", "private function setCalculate() {\n\n if($this->getType() == 2) {\n $det = new CalculateTwo($this->array);\n $this->result = $det->getResult();\n $this->rule = $det->getRule();\n $this->ruleExplanation = $det->getRuleExplanation();\n }\n elseif($this->getType() == 3) {\n\n $det = new CalculateThree($this->array);\n $this->result = $det->getResult();\n $this->rule = $det->getRule();\n $this->ruleExplanation = $det->getRuleExplanation();\n }\n else {\n $this->getPivot();\n $this->result = $this->setResult();\n $this->rule = $this->getPivotRule();\n $this->ruleExplanation = $this->process;\n }\n }", "public function getCalculatedData(): array\n\t{\n\t\t$result = parent::getCalculatedData(); // return mixed value in base method\n\n\t\treturn is_array($result) ? $result : [];\n\t}", "function addQuantities($apples, $oranges, $bananas)\r\n{\r\n $temp = ReadFromFile();\r\n $temp[\"apples\"] += $apples;\r\n $temp[\"oranges\"] += $oranges;\r\n $temp[\"bananas\"] += $bananas;\r\n\r\n WriteToFile($temp);\r\n}", "protected function _initTotals()\n {\n $source = $this->getSource();\n\n $this->_totals = array();\n $this->_totals['subtotal'] = new Varien_Object(array(\n 'code' => 'subtotal',\n 'value' => $source->getSubtotal(),\n 'label' => $this->__('Subtotal')\n ));\n\n\n /**\n * Add shipping\n */\n if (!$source->getIsVirtual() && ((float) $source->getShippingAmount() || $source->getShippingDescription()))\n {\n $this->_totals['shipping'] = new Varien_Object(array(\n 'code' => 'shipping',\n 'field' => 'shipping_amount',\n 'value' => $this->getSource()->getShippingAmount(),\n 'label' => $this->__('Shipping & Handling')\n ));\n }\n\n /**\n * Add discount\n */\n if (((float)$this->getSource()->getDiscountAmount()) != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = $this->__('Discount (%s)', $source->getDiscountDescription());\n } else {\n $discountLabel = $this->__('Discount');\n }\n $this->_totals['discount'] = new Varien_Object(array(\n 'code' => 'discount',\n 'field' => 'discount_amount',\n 'value' => $source->getDiscountAmount(),\n 'label' => $discountLabel\n ));\n }\n\n $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'field' => 'grand_total',\n 'strong'=> true,\n 'value' => $source->getGrandTotal(),\n 'label' => $this->__('Grand Total')\n ));\n\n /**\n * Base grandtotal\n */\n if ($this->getOrder()->isCurrencyDifferent()) {\n $this->_totals['base_grandtotal'] = new Varien_Object(array(\n 'code' => 'base_grandtotal',\n 'value' => $this->getOrder()->formatBasePrice($source->getBaseGrandTotal()),\n 'label' => $this->__('Grand Total to be Charged'),\n 'is_formated' => true,\n ));\n }\n return $this;\n }", "protected function _initTotals()\r\n {\r\n parent::_initTotals();\r\n\r\n $order = $this->getSource()->getOrder();\r\n $amount = $order->getCmpaymentsFeeAmount();\r\n $method = $order->getPayment()->getMethodInstance();\r\n\r\n $tax = $order->getCmpaymentsFeeTaxAmount();\r\n\r\n if ($amount && $amount > 0) {\r\n $label = ($method instanceof Comaxx_CmPayments_Model_Method_Abstract) ? $method->getPmName() . ' ' . $this->helper('cmpayments')\r\n ->__('payment fee') : 'Payment fee';\r\n\r\n $this->addTotalBefore(\r\n new Varien_Object(\r\n array(\r\n 'code' => 'cmpayments_payment_fee',\r\n 'value' => $amount,\r\n 'base_value' => $amount,\r\n 'label' => $label,\r\n ), array('tax')\r\n )\r\n );\r\n\r\n //update totals for creditmemo since Magento does not use order/invoice grand totals\r\n $creditmemo = $this->getCreditMemo();\r\n //set tax\r\n $creditmemo->setBaseTaxAmount($creditmemo->getBaseTaxAmount() + $tax);\r\n $creditmemo->setTaxAmount($creditmemo->getTaxAmount() + $tax);\r\n //set grand total\r\n $creditmemo->setBaseGrandTotal($creditmemo->getBaseGrandTotal() + $amount + $tax);\r\n $creditmemo->setGrandTotal($creditmemo->getGrandTotal() + $amount + $tax);\r\n\r\n //set creditmemo values on total overview\r\n $grandTotal = $this->getTotal('grand_total');\r\n $grandTotal->setBaseValue($creditmemo->getBaseGrandTotal());\r\n $grandTotal->setValue($creditmemo->getGrandTotal());\r\n }\r\n\r\n return $this;\r\n }", "public function getSum()\n {\n return array_sum($this->values);\n }", "protected function calculatePrices()\n {\n }", "private function _callBundlesConfig(): array\n {\n $contents = require $this->getProjectDir().'/config/bundles.php';\n /**\n * Load the current micro-service extra bundle\n */\n $extra_bundle_file = sprintf('%s/extra.bundles.php' , APPLICATION_LIB_PATH ) ;\n\n ##\n if(file_exists($extra_bundle_file)) {\n ##\n $contents = array_merge($contents , require $extra_bundle_file) ;\n }\n ##\n return $contents;\n }", "public function getTotal() \n {\n $tax = $this->getTax(); \n return $this->_subtotal + $tax; \n }", "public function sum() {\n\t\treturn array_sum($this->_value);\n\t}", "public function getSubtotalAttribute()\n {\n if ( $this->picked > 0 ) {\n return (float) $this->price * (float) $this->picked;\n }\n return (float) $this->price * (float) $this->quantity;\n }", "public function updateTotal() {\n //get the scans for this user\n $scans = $this->scans();\n //create running total\n $newTotal = 0; \n //for each scan, add the total pups and virus to the total\n foreach ($scans as $scan) {\n $newTotal += $scan->pups + $scan->troj_mal;\n }\n //sets and saves the new total for this user\n $this->total = $newTotal;\n $this->save();\n }", "public function values()\n {\n }", "function inventory_total($inventory) {\n $inventory_total = 0;\n foreach ($inventory as $product_id => $quantity) {\n $inventory_total += $quantity;\n }\n return $inventory_total;\n}", "public function getTotal()\n {\n return $this->getAmount() * $this->getPrice();\n }", "public function getWeightTotal(): float;", "private function _calculateTotal()\n {\n\n if (!is_null($this->shipping_option_id)) {\n $this->total = $this->unit_price * $this->quantity - $this->promotion_amount -\n $this->discount_amount;\n $this->save();\n return;\n }\n\n if ($this->quantity == 0) {\n if ($this->total > 0) {\n $this->total = '0.00';\n $this->save();\n }\n return;\n }\n\n if (is_null($pricing = $this->getPricing()) && $this->unit_price_overridden == 'false') {\n if ($this->total > 0) {\n $this->total = '0.00';\n $this->save();\n }\n return;\n }\n\n if ($this->unit_price_overridden != 'true') {\n $this->unit_price = $pricing->price;\n }\n\n // Reset promotion to capture any adjustments affecting discount\n if (!is_null($promotion = $this->promotion)) {\n $this->save();//flush current values to db for promo calculations\n $promotion->calculate($this->invoice);\n $this->refresh();\n }\n\n /**\n * Multipay discount\n */\n if (!$this->invoice->discount_id && 'incomplete' == $this->invoice->status) {\n $discount = $this->invoice->user->account()->discounts()->active()->first();\n } else {\n $discount = $this->invoice->discount;\n }\n if ($discount) {\n // flush current values to db prior to calculations\n if (count($this->getDirty())) {\n $this->save();\n }\n $discount->calculate($this->invoice);\n $this->refresh();\n }\n\n $this->total = $this->getSubTotal() - $this->promotion_amount - $this->discount_amount;\n $this->save();\n }", "public function getProductQuantityMap() {\n $output = array();\n $products = $this->getFieldItems('commerce_product');\n $quantity = $this->getEntity()->quantity;\n foreach ($products as $product) {\n $product_id = $product['product_id'];\n if (array_key_exists($product_id, $output)) {\n $output[$product_id] += $quantity;\n }\n else {\n $output[$product_id] = $quantity;\n }\n }\n\n return $output;\n }", "protected function populate_value()\n {\n }", "public function calculateData() {\n\t\t$prefix = $this->config['prefixes']['calculated'];\n\t\t$this->data[$prefix.'self'] = (int) $this->calculateSelf();\n\t\t$this->data[$prefix.'email'] = $this->calculateEmail();\n\t\t$this->data[$prefix.'gravatar'] = $this->calculateGravatar(80);\n\t\treturn true;\n\t}", "function calculate()\n {\n $this->first_period = $this->second_period = $this->rebill_times = null;\n foreach ($this->getCalculators() as $calc)\n $calc->calculate($this);\n // now summarize all items to invoice totals\n $priceFields = array(\n 'first_subtotal' => null,\n 'first_discount' => 'first_discount',\n 'first_tax' => 'first_tax',\n 'first_shipping' => 'first_shipping',\n 'first_total' => 'first_total',\n 'second_subtotal' => null,\n 'second_discount' => 'second_discount',\n 'second_tax' => 'second_tax',\n 'second_shipping' => 'second_shipping',\n 'second_total' => 'second_total',\n );\n foreach ($priceFields as $k => $kk)\n $this->$k = 0.0;\n foreach ($this->getItems() as $item) {\n $this->first_subtotal += moneyRound($item->first_price * $item->qty);\n $this->second_subtotal += moneyRound($item->second_price * $item->qty);\n foreach ($priceFields as $k => $kk)\n $this->$k += $kk ? $item->$kk : 0;\n }\n foreach ($priceFields as $k => $kk)\n $this->$k = moneyRound($this->$k);\n /// set periods, it has been checked for compatibility in @see add()\n $mostExpensiveItem = null;\n foreach ($this->getItems() as $item) {\n if (!$mostExpensiveItem || $item->first_price > $mostExpensiveItem->first_price) {\n $mostExpensiveItem = $item;\n }\n $this->currency = $item->currency;\n if (empty($this->first_period) && $item->rebill_times)\n $this->first_period = $item->first_period;\n if (empty($this->second_period))\n $this->second_period = $item->second_period;\n if (empty($this->rebill_times))\n $this->rebill_times = $item->rebill_times;\n $this->rebill_times = max($this->rebill_times, $item->rebill_times);\n }\n\n // First period is empty, invoice has only one time items,\n // set first period from most expensive item.\n if (empty($this->first_period) && $mostExpensiveItem) {\n $this->first_period = $mostExpensiveItem->first_period;\n }\n\n if ($this->currency == Am_Currency::getDefault())\n $this->base_currency_multi = 1.0;\n else {\n $this->base_currency_multi = $this->getDi()->currencyExchangeTable->getRate($this->currency,\n sqlDate(!empty($this->tm_added) ? $this->tm_added : $this->getDi()->sqlDateTime));\n if (!$this->base_currency_multi)\n $this->base_currency_multi = 1;\n }\n $this->getDi()->hook->call(Am_Event::INVOICE_CALCULATE, array('invoice' => $this));\n\n $this->terms = null;\n if ((count($this->getItems()) == 1) &&\n ($item = $this->getItem(0)) &&\n ($item->item_type == 'product') &&\n ($pr = $item->tryLoadProduct()) &&\n ($bp = $pr->getBillingPlan()) &&\n $bp->terms) {\n\n if (((float)$bp->first_price == (float)$this->first_total) &&\n ($bp->first_period == $this->first_period) &&\n ((float)$bp->second_price == (float)$this->second_total) &&\n ($bp->second_period == $this->second_period) &&\n ($bp->rebill_times == $this->rebill_times)\n ) {\n $this->terms = $bp->terms;\n }\n }\n\n $this->terms = $this->getDi()->hook->filter($this->terms,\n Am_Event::INVOICE_TERMS, array('invoice' => $this));\n\n return $this;\n }", "public function getAmount()\n {\n return $this->getSource()->getDataUsingMethod($this->getSourceField());\n }" ]
[ "0.59713465", "0.5820497", "0.5798543", "0.5718041", "0.54431045", "0.53664666", "0.5359772", "0.53267306", "0.5305539", "0.5264244", "0.5225543", "0.52207255", "0.51919717", "0.51809734", "0.51809734", "0.51809734", "0.5173846", "0.51483124", "0.51305467", "0.5128365", "0.51214474", "0.5050719", "0.50169295", "0.50169295", "0.49874976", "0.49862856", "0.49573076", "0.495438", "0.4949726", "0.49480957", "0.4947811", "0.4947093", "0.4939394", "0.49388206", "0.4938701", "0.49316654", "0.49196658", "0.49195614", "0.4919464", "0.49188235", "0.4916582", "0.49147394", "0.4897662", "0.48796228", "0.48793125", "0.48763567", "0.4871488", "0.48668915", "0.48664558", "0.48654166", "0.48524496", "0.48524496", "0.48524496", "0.48524496", "0.4849814", "0.4849814", "0.48497707", "0.48497707", "0.48497707", "0.48453745", "0.48453745", "0.4845325", "0.48452416", "0.48441", "0.48420545", "0.48411438", "0.483529", "0.48297933", "0.48205507", "0.4816781", "0.48084354", "0.48067722", "0.4797684", "0.47916952", "0.47852457", "0.4783768", "0.47832087", "0.47778484", "0.47777498", "0.47766167", "0.4771342", "0.4766624", "0.47435066", "0.4738586", "0.4737527", "0.47365388", "0.4735759", "0.47260803", "0.47121683", "0.46982157", "0.4691418", "0.46893528", "0.468658", "0.46758378", "0.46693632", "0.46600628", "0.465964", "0.46594343", "0.4652928", "0.46526107" ]
0.68619007
0
Whether the community licence is active
public function isActive() { return ($this->getStatus()->getId() === self::STATUS_ACTIVE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_active(): bool;", "public function is_active();", "public function isAcitve()\n\t{\n\t\treturn $this->status == AdFox::OBJECT_STATUS_ACTIVE;\n\t}", "public function shouldAcceptLicense()\n {\n return !Config::get('licenseAccepted');\n }", "public function companyIsActive()\n {\n return true ;\n }", "public function isActive (){\n if($this->is_active == 1) {\n return true;\n }else{\n return false;\n }\n }", "public function activate()\n {\n $license = Licenses::find($this->key);\n $license->school_id = $this->auth_school_id;\n $license->activated_at = Carbon::now();\n $license->used=LICENCE_KEY_USED;\n if($license->save()){\n return $this->duration($license->duration);\n }\n return FALSE;\n }", "public function isActive() \n {\t\n \t// if PIWIK tracking is activated return TRUE\n \tif (Mage::getStoreConfig('piwik/piwik/active')) {\n \t\treturn true;\n \t}\n \t// return FALSE otherwise\n \treturn false;\n }", "public function isActive()\n {\n return ($this->slug == \"actief\");\n }", "public function isValid()\n {\n return $this->getStatus() != 'unlicensed';\n }", "public function IsActive()\n {\n return true;\n }", "function checkLicence() {\n\n $isValid = true;\n \n return $isValid;\n}", "function isActive(){\n\t\treturn $this->getSessionID() == $this->getUser()->getShift() && $this->getStatus() == '1' ? true : false;\n\t}", "public function isEnabled()\n {\n return Mage::getStoreConfig('refersion/refersion_settings/refersion_active');\n }", "public function isActive(): bool\n {\n return self::ISO_STATUS_ACTIVE === $this->isoStatus;\n }", "public function getIsActive()\r\n {\r\n return ($this->isActive=='1');\r\n }", "public function isActive() {\n $isActive = Mage::getStoreConfig('santander/general/active');\n if($isActive) {\n return true;\n } else {\n return false;\n }\n }", "public function isActive() {\n $isActive = Mage::getStoreConfig('santander/general/active');\n if($isActive) {\n return true;\n } else {\n return false;\n }\n }", "public function IsActive ();", "public function isActive()\n\t{\n\t\treturn $this->isActivated() && !$this->isBanned();\n\t}", "public function contactIsActive()\n {\n return true ;\n }", "public function isActive() : bool\n {\n if (!isset($this->data['active'])) {\n return false;\n }\n return ($this->data['active'] === true || $this->data['active'] === 'Y');\n }", "public function isAvailable()\n\t{\n\t\tif ($this->isLocked())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tif (BE_USER_LOGGED_IN !== true && !$this->isPublished())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Show to guests only\n\t\tif ($this->arrData['guests'] && FE_USER_LOGGED_IN === true && BE_USER_LOGGED_IN !== true && !$this->arrData['protected'])\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Protected product\n\t\tif (BE_USER_LOGGED_IN !== true && $this->arrData['protected'])\n\t\t{\n\t\t\tif (FE_USER_LOGGED_IN !== true)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$groups = deserialize($this->arrData['groups']);\n\n\t\t\tif (!is_array($groups) || empty($groups) || !count(array_intersect($groups, $this->User->groups)))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if \"advanced price\" is available\n\t\tif ($this->arrData['price'] === null && (in_array('price', $this->arrAttributes) || in_array('price', $this->arrVariantAttributes)))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isEnabled()\n {\n\t\tif($this->actif == 1) return true;\n \telse return false;\n }", "function isActive() {\n\t\treturn ($this->getActive() == self::PROFILE_ACTIVE);\n\t}", "public function isActive();", "public function isActive();", "public function isActive();", "public function isActive();", "public function get_license_status() {\n\n\t\t$status = get_option( $this->product_slug . '-license-status' );\n\n\t\tif ( ! $status ) {\n\t\t\t// User hasn't saved the license to settings yet. No use making the call.\n\t\t\treturn false;\n\t\t}\n\n\t\treturn trim( $status );\n\t}", "public function isActive() : bool\n {\n return $this->id !== 0 && $this->activated;\n }", "public function hasActiveSubscription()\n {\n return $this->user->hasActiveSubscription();\n }", "public function isEnabled()\n {\n return Mage::getStoreConfig(self::GENE_BRAINTREE_APPLEPAY_ACTIVE)\n && Mage::getStoreConfig(self::GENE_BRAINTREE_APPLEPAY_EXPRESS_ACTIVE);\n }", "protected static function isCreditMode(): bool\n {\n return self::$isCredit;\n }", "public function can_activate(): bool;", "public function isActive()\n\t\t{\n\t\t\treturn $this->_state === 1;\n\t\t}", "public static function isActivated ()\r\n {\r\n return Session::exists('acl');\r\n }", "public function isActive()\n {\n if ($this->status == 1) {\n return true;\n } else {\n return false;\n }\n }", "public function isActive()\n {\n return $this->status == 'active';\n }", "public function canBeActivated()\n {\n return !$this->getIsActive();\n }", "public function isCredit()\r\n\t{\r\n\t\treturn $this->root->getAttribute('credit') == 'oui';\r\n\t}", "public function isOpen()\n\t{\n\t\tif ($this->isNew())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($this->get('private') != self::PRIVACY_OPEN)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isActive(): bool;", "public function isActive(): bool;", "public function canBeFree()\n {\n return count($this->getCurrentStudentCareerSchoolYear()) > 0;\n\n }", "public function getIsActive(): bool;", "public function getIsActive(): bool;", "public function getIsActive(): bool;", "public static function is_pro() \n {\n if($_SESSION['_version'] == '')\n { \n $conf = new Ossim_conf();\n $version = $conf->get_conf('ossim_server_version');\n $_SESSION['_version'] = (preg_match('/pro|demo/i',$version)) ? 'pro' : 'opensource';\n }\n \n return ($_SESSION['_version'] == 'pro') ? TRUE : FALSE; \n }", "public function isActive()\n {\n return $this->getStatus() == self::STATUS_ACTIVE;\n }", "public function isEnabled()\n\t{\n\t\t// note: don't use $this->_main->.. as it might not exist when this func is called.\n\t\treturn Mage::helper('shoptimally_upsalecoupons/main')->isEnabled();\n\t}", "public function getAgreement(): bool\n {\n return $this->agreement;\n }", "public static function isFeatureActive()\n {\n }", "function getIsActive() ;", "public function isEnabled()\n {\n return Mage::getStoreConfigFlag('training_layred/catalog/enabled');\n }", "public function authorize()\n {\n $user = Auth::user();\n $vendor = $user->vendor->first();\n $isOwner = AvailableFacility::where(array(\n 'id' => $this->id,\n 'vendor_id' => $vendor->id\n ))->count();\n if ($isOwner) {\n return true;\n } else {\n return false;\n }\n }", "public function isActive()\n {\n return ($this->isDraft() || $this->isExpired()) ? false : true;\n }", "public function isActive()\n\t{\n\t\treturn $this->Status === 'active';\n\t}", "public function isEnabled(){\n return $this->activo;\n }", "function is_active()\n {\n return $this->userData[$this->user_active];\n }", "public function authorize()\n {\n $internship = Internship::findOrFail($this->route('id'));\n $student = $internship->student;\n\n return $internship->state_id == State::CANCELED && $student->internship == null;\n }", "public function isModuleActive()\n {\n return Mage::getConfig()\n ->getModuleConfig(self::MODULE_NAME)\n ->is('active', 'true');\n }", "public function checkGlobalActive() {\r\n\t\tif (Mage::getStoreConfig('b2bprofessional/generalsettings/active') == 1) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "static function activePayment()\n\t{\n global $configClass;\n if($configClass['active_payment'] == 1 || $configClass['integrate_membership'] == 1)\n\t\t{\n return true;\n }\n\t\telse\n\t\t{\n return false;\n }\n }", "public function isAvailable()\n\t{\n\t\treturn parent::isAvailable() && ( $this->values['languageid'] === null\n\t\t\t|| $this->getLanguageId() === null\n\t\t\t|| $this->getLanguageId() === $this->values['languageid'] );\n\t}", "public function is_needed() {\n\t\treturn $this->context->site_represents === 'company';\n\t}", "function can_use_premium_code__premium_only() {\n\t\t\treturn $this->is_premium() && $this->can_use_premium_code();\n\t\t}", "public function isActive()\n {\n return (bool)$this->getValue(self::KEY_ACTIVE);\n }", "function power_seo_active() {\n\treturn ! power_seo_disabled();\n}", "private function isOpcModuleActive()\n {\n // fallback for mobile-enabled theme\n if (Configuration::get('OPC_MOBILE_FALLBACK') && $this->context->getMobileDevice())\n return false;\n\n // fallback for paypal express checkout\n if (isset($this->context->cookie->express_checkout) && Configuration::get('OPC_PAYPAL_EXPRESS_FALLBACK'))\n return false;\n\n if ($this->opcModuleActive > -1)\n return $this->opcModuleActive;\n\n $opc_mod_script = _PS_MODULE_DIR_ . 'onepagecheckout/onepagecheckout.php';\n if (file_exists($opc_mod_script)) {\n require_once($opc_mod_script);\n $opc_mod = new OnePageCheckout();\n $this->opcModuleActive = (Tools::getValue('opc-debug') == 1900)?true:((Tools::getValue('opc-debug') == 1901)?false:$opc_mod->active);\n } else {\n $this->opcModuleActive = 0;\n }\n return $this->opcModuleActive;\n }", "public function use_for_claims() {\n\t\treturn $this->get_product_meta( 'use_for_claims' ) === 'yes';\n\t}", "function shoestrap_theme_license_status() {\n\n global $wp_version;\n\n $license = shoestrap_getVariable( 'shoestrap_license_key' );\n\n // Copy the licence to a separate option\n update_option( 'shoestrap_license_key', $licence );\n\n $api_params = array(\n 'edd_action' => 'check_license',\n 'license' => $license,\n 'item_name' => urlencode( SHOESTRAP_THEME_NAME )\n );\n\n $response = wp_remote_get( add_query_arg( $api_params, SHOESTRAP_STORE_URL ) );\n\n if ( is_wp_error( $response ) )\n return false;\n\n $license_data = json_decode( wp_remote_retrieve_body( $response ) );\n\n return $license_data->license;\n}", "public function ticketIsActive()\n {\n return true ;\n }", "public function getIsActive();", "public function isReviewActive()\n {\n return $this->getConfig()->getConfigParam('bl_perfLoadReviews');\n }", "public function isActive(): bool\n {\n return $this->active;\n }", "function isActive()\n {\n if ( $this->getVar( 'level' ) == 0 ) {\n return false;\n }\n return true;\n }", "public function isActive() {\n\n\t\treturn ($this->getConfigValue('account_status') == \"active\");\n\t}", "public function isCatalogAvailabilityVisible()\n {\n return (\n $this->isCatalogInformationVisible() && Mage::getStoreConfigFlag(self::XML_PATH_CATALOG_DISPLAY_AVAILABILITY)\n ) ? true : false;\n }", "public function isOnline()\n {\n $query = 'SELECT courses.course_id FROM '. rex::getTablePrefix() .'d2u_courses_2_target_groups AS c2t '\n .'LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_courses AS courses ON c2t.course_id = courses.course_id'\n .'WHERE c2t.target_group_id = '. $this->target_group_id .' '\n .\"AND online_status = 'online' \"\n .'AND ('. d2u_courses_frontend_helper::getShowTimeWhere() .') ';\n $result = rex_sql::factory();\n $result->setQuery($query);\n\n return $result->getRows() > 0 ? true : false;\n }", "public function isActive()\n {\n return $this->isPublished();\n }", "private function isPayflowProVaultEnable()\r\n {\r\n return (bool)$this->scopeConfig->getValue(self::XML_PATH_PAYMENT_PAYFLOWPRO_CC_VAULT_ACTIVE);\r\n }", "function check_software_license()\n {\n $q = $this->db->where('license', $this->input->post('license_num'))->where('action_type', 'install')->where('company_id', $this->session->userdata('company_id'))->limit(1)->get('software');\n\n if ($q->num_rows == 1)\n {\n return true;\n\n } else {\n\n return false;\n }\n }", "public function is_available() {\n\t\tif ( 'yes' === $this->enabled ) {\n\t\t\tif ( ! $this->testmode && is_checkout() ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif ( ! $this->secret_key || ! $this->publishable_key ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected function _isEnabled()\n {\n return $this->currentCustomer->getCustomerId() && $this->_rewardData->isEnabledOnFront()\n && $this->_rewardData->getGeneralConfig('publish_history');\n }", "public function isActive() {}", "public function isActive() {}", "public function isActive() {}", "public function isActive() {}", "public function isOnline()\n {\n return !$this->getVersion() ? false : true;\n }", "public function isActive() {}", "public function isActive() {}", "function is_active()\n {\n }", "public function isActive(){\n return (bool)$this->active;\n }", "public function isViewable()\n {\n return ($this->isPublished() && $this->isActive());\n }", "public function isActive()\n {\n return ($this->getIsActive() == self::STATUS_ENABLED);\n }", "public function isActive()\n\t{\n\t\tif (($record=$this->getActiveRecord())===null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool)$record->esta_activo;\n\t}", "public function isActive()\n {\n return (bool) ($this->_state == 'active');\n }", "function isActive() ;", "public function isActive() {\n\t\treturn $this->active;\n\t}" ]
[ "0.69791526", "0.69126236", "0.68129534", "0.68055683", "0.6805216", "0.66799355", "0.66756076", "0.66098106", "0.65974", "0.6592432", "0.6591022", "0.65462303", "0.65343404", "0.65316767", "0.6521798", "0.65187967", "0.6512801", "0.6512801", "0.65121967", "0.65092564", "0.65013313", "0.6500156", "0.647447", "0.6449606", "0.64318603", "0.6418708", "0.6418708", "0.6418708", "0.6418708", "0.64174503", "0.6412251", "0.6406729", "0.6400283", "0.6397346", "0.63918984", "0.63902897", "0.639019", "0.6390147", "0.6389112", "0.63871133", "0.63852143", "0.6360853", "0.63589954", "0.63589954", "0.63481253", "0.6346869", "0.6346869", "0.6346869", "0.63404167", "0.6336276", "0.6323894", "0.63144714", "0.6313919", "0.6293584", "0.62918276", "0.6289275", "0.62838954", "0.62807757", "0.6267499", "0.6263399", "0.6260743", "0.62605524", "0.62599987", "0.6252811", "0.6251408", "0.624971", "0.6240819", "0.6235974", "0.6235224", "0.62331057", "0.6233017", "0.6232856", "0.6232693", "0.62314916", "0.62303203", "0.62283945", "0.62249404", "0.6222721", "0.621819", "0.6213256", "0.6212694", "0.6207176", "0.6204298", "0.62034994", "0.62031215", "0.62019277", "0.62019277", "0.62019277", "0.62019277", "0.6200665", "0.61994433", "0.61994433", "0.61976564", "0.6194356", "0.61855674", "0.6173549", "0.61707604", "0.61704683", "0.61611116", "0.6152086" ]
0.61672485
98
Make a REST request to shopify's api resource
public function execute(ActionInterface $action, ShopifyConfigContextInterface $configContext, ShopifyApp $app);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function request()\n {\n $request = new GuzzleHttp\\Psr7\\Request('GET', 'ProductsSimple');\n\n return $request->withUri($request->getUri()->withQuery(http_build_query([\n 'startRow' => $this->skip ? $this->skip + 1 : null,\n 'pageRows' => $this->take,\n 'updatedAfter' => $this->updatedAfter ? $this->updatedAfter->format('Y-m-d\\TH:i:s') : null\n ])));\n }", "public function index()\n {\n $api_key = config('shopify-app.api_key');\n $shared_secret = config('shopify-app.api_secret');\n $params = $_GET; // Retrieve all request parameters\n $hmac = $_GET['hmac']; // Retrieve HMAC request parameter\n\n $params = array_diff_key($params, array('hmac' => '')); // Remove hmac from params\n ksort($params); // Sort params lexographically\n\n $computed_hmac = hash_hmac('sha256', http_build_query($params), $shared_secret);\n\n $access_token = \"\";\n // Use hmac data to check that the response is from Shopify or not\n if (hash_equals($hmac, $computed_hmac)) {\n\n // Set variables for our request\n $query = array(\n \"client_id\" => $api_key, // Your API key\n \"client_secret\" => $shared_secret, // Your app credentials (secret key)\n \"code\" => $params['code'] // Grab the access key from the URL\n );\n\n // Generate access token URL\n $access_token_url = \"https://\" . $params['shop'] . \"/admin/oauth/access_token\";\n\n // Configure curl client and execute request\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, $access_token_url);\n curl_setopt($ch, CURLOPT_POST, count($query));\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($query));\n $result = curl_exec($ch);\n curl_close($ch);\n\n // Store the access token\n $result = json_decode($result, true);\n $access_token = $result['access_token'];\n\n // Show the access token (don't do this in production!)\n // echo $access_token;\n } else {\n // Someone is trying to be shady!\n die('This request is NOT from Shopify!');\n }\n\n // 获取shop信息\n }", "public function products()\n {\n // api call to shopify\n// try {\n// $request = $this->client->get($this->url);\n// $response = $request->getBody();\n\n $response = array(\n 0 =>\n array(\n 'id' => 799,\n 'name' => 'Ship Your Idea',\n 'slug' => 'ship-your-idea-22',\n 'permalink' => 'https://example.com/product/ship-your-idea-22/',\n 'date_created' => '2017-03-23T17:03:12',\n 'date_created_gmt' => '2017-03-23T20:03:12',\n 'date_modified' => '2017-03-23T17:03:12',\n 'date_modified_gmt' => '2017-03-23T20:03:12',\n 'type' => 'variable',\n 'status' => 'publish',\n 'featured' => false,\n 'catalog_visibility' => 'visible',\n 'description' => '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\n',\n 'short_description' => '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>\n',\n 'sku' => '',\n 'price' => '',\n 'regular_price' => '',\n 'sale_price' => '',\n 'date_on_sale_from' => NULL,\n 'date_on_sale_from_gmt' => NULL,\n 'date_on_sale_to' => NULL,\n 'date_on_sale_to_gmt' => NULL,\n 'price_html' => '',\n 'on_sale' => false,\n 'purchasable' => false,\n 'total_sales' => 0,\n 'virtual' => false,\n 'downloadable' => false,\n 'downloads' =>\n array(),\n 'download_limit' => -1,\n 'download_expiry' => -1,\n 'external_url' => '',\n 'button_text' => '',\n 'tax_status' => 'taxable',\n 'tax_class' => '',\n 'manage_stock' => false,\n 'stock_quantity' => NULL,\n 'stock_status' => 'instock',\n 'backorders' => 'no',\n 'backorders_allowed' => false,\n 'backordered' => false,\n 'sold_individually' => false,\n 'weight' => '',\n 'dimensions' =>\n array(\n 'length' => '',\n 'width' => '',\n 'height' => '',\n ),\n 'shipping_required' => true,\n 'shipping_taxable' => true,\n 'shipping_class' => '',\n 'shipping_class_id' => 0,\n 'reviews_allowed' => true,\n 'average_rating' => '0.00',\n 'rating_count' => 0,\n 'related_ids' =>\n array(\n 0 => 31,\n 1 => 22,\n 2 => 369,\n 3 => 414,\n 4 => 56,\n ),\n 'upsell_ids' =>\n array(),\n 'cross_sell_ids' =>\n array(),\n 'parent_id' => 0,\n 'purchase_note' => '',\n 'categories' =>\n array(\n 0 =>\n array(\n 'id' => 9,\n 'name' => 'Clothing',\n 'slug' => 'clothing',\n ),\n 1 =>\n array(\n 'id' => 14,\n 'name' => 'T-shirts',\n 'slug' => 't-shirts',\n ),\n ),\n 'tags' =>\n array(),\n 'images' =>\n array(\n 0 =>\n array(\n 'id' => 795,\n 'date_created' => '2017-03-23T14:03:08',\n 'date_created_gmt' => '2017-03-23T20:03:08',\n 'date_modified' => '2017-03-23T14:03:08',\n 'date_modified_gmt' => '2017-03-23T20:03:08',\n 'src' => 'https://example.com/wp-content/uploads/2017/03/T_4_front-11.jpg',\n 'name' => '',\n 'alt' => '',\n ),\n 1 =>\n array(\n 'id' => 796,\n 'date_created' => '2017-03-23T14:03:09',\n 'date_created_gmt' => '2017-03-23T20:03:09',\n 'date_modified' => '2017-03-23T14:03:09',\n 'date_modified_gmt' => '2017-03-23T20:03:09',\n 'src' => 'https://example.com/wp-content/uploads/2017/03/T_4_back-10.jpg',\n 'name' => '',\n 'alt' => '',\n ),\n 2 =>\n array(\n 'id' => 797,\n 'date_created' => '2017-03-23T14:03:10',\n 'date_created_gmt' => '2017-03-23T20:03:10',\n 'date_modified' => '2017-03-23T14:03:10',\n 'date_modified_gmt' => '2017-03-23T20:03:10',\n 'src' => 'https://example.com/wp-content/uploads/2017/03/T_3_front-10.jpg',\n 'name' => '',\n 'alt' => '',\n ),\n 3 =>\n array(\n 'id' => 798,\n 'date_created' => '2017-03-23T14:03:11',\n 'date_created_gmt' => '2017-03-23T20:03:11',\n 'date_modified' => '2017-03-23T14:03:11',\n 'date_modified_gmt' => '2017-03-23T20:03:11',\n 'src' => 'https://example.com/wp-content/uploads/2017/03/T_3_back-10.jpg',\n 'name' => '',\n 'alt' => '',\n ),\n ),\n 'attributes' =>\n array(\n 0 =>\n array(\n 'id' => 6,\n 'name' => 'Color',\n 'position' => 0,\n 'visible' => false,\n 'variation' => true,\n 'options' =>\n array(\n 0 => 'Black',\n 1 => 'Green',\n ),\n ),\n 1 =>\n array(\n 'id' => 0,\n 'name' => 'Size',\n 'position' => 0,\n 'visible' => true,\n 'variation' => true,\n 'options' =>\n array(\n 0 => 'S',\n 1 => 'M',\n ),\n ),\n ),\n 'default_attributes' =>\n array(),\n 'variations' =>\n array(),\n 'grouped_products' =>\n array(),\n 'menu_order' => 0,\n 'meta_data' =>\n array(),\n '_links' =>\n array(\n 'self' =>\n array(\n 0 =>\n array(\n 'href' => 'https://example.com/wp-json/wc/v3/products/799',\n ),\n ),\n 'collection' =>\n array(\n 0 =>\n array(\n 'href' => 'https://example.com/wp-json/wc/v3/products',\n ),\n ),\n ),\n ),\n 1 =>\n array(\n 'id' => 794,\n 'name' => 'Premium Quality',\n 'slug' => 'premium-quality-19',\n 'permalink' => 'https://example.com/product/premium-quality-19/',\n 'date_created' => '2017-03-23T17:01:14',\n 'date_created_gmt' => '2017-03-23T20:01:14',\n 'date_modified' => '2017-03-23T17:01:14',\n 'date_modified_gmt' => '2017-03-23T20:01:14',\n 'type' => 'simple',\n 'status' => 'publish',\n 'featured' => false,\n 'catalog_visibility' => 'visible',\n 'description' => '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\n',\n 'short_description' => '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>\n',\n 'sku' => '',\n 'price' => '21.99',\n 'regular_price' => '21.99',\n 'sale_price' => '',\n 'date_on_sale_from' => NULL,\n 'date_on_sale_from_gmt' => NULL,\n 'date_on_sale_to' => NULL,\n 'date_on_sale_to_gmt' => NULL,\n 'price_html' => '<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#36;</span>21.99</span>',\n 'on_sale' => false,\n 'purchasable' => true,\n 'total_sales' => 0,\n 'virtual' => false,\n 'downloadable' => false,\n 'downloads' =>\n array(),\n 'download_limit' => -1,\n 'download_expiry' => -1,\n 'external_url' => '',\n 'button_text' => '',\n 'tax_status' => 'taxable',\n 'tax_class' => '',\n 'manage_stock' => false,\n 'stock_quantity' => NULL,\n 'stock_status' => 'instock',\n 'backorders' => 'no',\n 'backorders_allowed' => false,\n 'backordered' => false,\n 'sold_individually' => false,\n 'weight' => '',\n 'dimensions' =>\n array(\n 'length' => '',\n 'width' => '',\n 'height' => '',\n ),\n 'shipping_required' => true,\n 'shipping_taxable' => true,\n 'shipping_class' => '',\n 'shipping_class_id' => 0,\n 'reviews_allowed' => true,\n 'average_rating' => '0.00',\n 'rating_count' => 0,\n 'related_ids' =>\n array(\n 0 => 463,\n 1 => 47,\n 2 => 31,\n 3 => 387,\n 4 => 458,\n ),\n 'upsell_ids' =>\n array(),\n 'cross_sell_ids' =>\n array(),\n 'parent_id' => 0,\n 'purchase_note' => '',\n 'categories' =>\n array(\n 0 =>\n array(\n 'id' => 9,\n 'name' => 'Clothing',\n 'slug' => 'clothing',\n ),\n 1 =>\n array(\n 'id' => 14,\n 'name' => 'T-shirts',\n 'slug' => 't-shirts',\n ),\n ),\n 'tags' =>\n array(),\n 'images' =>\n array(\n 0 =>\n array(\n 'id' => 792,\n 'date_created' => '2017-03-23T14:01:13',\n 'date_created_gmt' => '2017-03-23T20:01:13',\n 'date_modified' => '2017-03-23T14:01:13',\n 'date_modified_gmt' => '2017-03-23T20:01:13',\n 'src' => 'https://example.com/wp-content/uploads/2017/03/T_2_front-4.jpg',\n 'name' => '',\n 'alt' => '',\n ),\n 1 =>\n array(\n 'id' => 793,\n 'date_created' => '2017-03-23T14:01:14',\n 'date_created_gmt' => '2017-03-23T20:01:14',\n 'date_modified' => '2017-03-23T14:01:14',\n 'date_modified_gmt' => '2017-03-23T20:01:14',\n 'src' => 'https://example.com/wp-content/uploads/2017/03/T_2_back-2.jpg',\n 'name' => '',\n 'alt' => '',\n ),\n ),\n 'attributes' =>\n array(),\n 'default_attributes' =>\n array(\n 0 =>\n array(\n 'id' => 6,\n 'name' => 'Color',\n 'option' => 'black',\n ),\n 1 =>\n array(\n 'id' => 0,\n 'name' => 'Size',\n 'option' => 'S',\n ),\n ),\n 'variations' =>\n array(),\n 'grouped_products' =>\n array(),\n 'menu_order' => 0,\n 'meta_data' =>\n array(),\n '_links' =>\n array(\n 'self' =>\n array(\n 0 =>\n array(\n 'href' => 'https://example.com/wp-json/wc/v3/products/794',\n ),\n ),\n 'collection' =>\n array(\n 0 =>\n array(\n 'href' => 'https://example.com/wp-json/wc/v3/products',\n ),\n ),\n ),\n ),\n );\n\n $products = $this->transformData($response);\n\n return response()->json($products);\n// }catch (\\Exception $exception){\n// Log::error($exception->getMessage(), ['_trace' => $exception->getTraceAsString()]);\n//\n// throw new \\Exception('Whoops! something went wrong with WooCommerce product listings.', 500);\n// }\n }", "protected function getShopRequest()\n {\n $resourcePath = '/shop';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // body params\n $_tempBody = null;\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n \n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n \n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "function getProducts() {\n\techo \"Getting Products </br>\";\n\t$response = getRequest('/api/product');\n\tprintInfo($response);\n}", "public function getShopifyApi() {\n return $this->parent->getShopifyApi();\n }", "protected function shopGetRequest($data)\n {\n // verify the required parameter 'data' is set\n if ($data === null || (is_array($data) && count($data) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $data when calling shopGet'\n );\n }\n\n $resourcePath = '/shop/get';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\n }\n\n if (in_array('multipart/form-data', ['application/json', 'application/xml'])) {\n $multipart = true;\n }\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json', 'application/xml']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('access_token');\n if ($apiKey !== null) {\n $queryParams['access_token'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('nonce');\n if ($apiKey !== null) {\n $queryParams['nonce'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('timestamp');\n if ($apiKey !== null) {\n $queryParams['timestamp'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function show(Request $request)\n {\n $customer_id = Constants::SALES_TYPE_API . \"-\" . $request->input('api_id') . \"-\";\n $shopping = Shopping::where([\n 'id' => $request->input('id'),\n ])->where('customer_id', 'like', \"%{$customer_id}%\")->first();\n if (!$shopping)\n throw new ApiException(\n ApiException::EXCEPTION_NOT_FOUND_404,\n 'کاربر گرامی شما دسترسی به این قسمت ندارید.'\n );\n $shopping->date_persian = CalendarUtils::strftime('Y-m-d', strtotime($shopping->date));\n $shopping->created_at_persian = CalendarUtils::strftime('Y-m-d', strtotime($shopping->created_at));\n return $this->respond($shopping);\n }", "public function call($url, $body = [] , $method = \"GET\")\n {\n $shop = User::first();\n return $shop->api()->rest($method, $url, $body);\n }", "function getProducts() {\n\n try {\n $client = HttpClient::create();\n $response = $client->request('GET', shopifyApiurl . 'products.json');\n } catch (\\Exception $e) {\n var_dump($e);\n }\n\n return new JsonResponse($response->getContent());\n }", "function spf_get_shop_products(){\nwp_send_json([\n 'message' => 'thank you the endpoint is fine'\n], 200);\n}", "public function getShopById(Request $request){\n // check params \n if(!$this->requiredParams($request, ['key', 'shop_id'])){\n return response()->json(['status' => 'error' , 'message' => 'missing params' ] , 400);\n }\n\n $key = $this->checkParam($request->key);\n if ($key !== self::KEY) {\n return response()->json(['status' => 'error' , 'message' => 'invalid request' ] , 400);\n }\n\n\n $shop_id = $this->checkParam($request->shop_id);\n \n $shopInfo = Shop::where('id',$shop_id)->get();\n \n return response()->json(['status' => 'success' , 'message' => 'OK', 'data' => $shopInfo] , 200); \n }", "public function createShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathMultipleResource(),\n 'METHOD' => 'POST',\n 'DATA' => [\n /*\n * Using static:: instead of self:: because static:: binds at runtime\n * If we use self this would not work because it would\n * always call ShopifyResource::getResourceSingularName()\n */\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function getAPI(Request $request)\n {\n }", "abstract function do_api_request();", "public function testProductGet()\r\n {\r\n\t\t$this->json('get', '/api/products/1')->assertStatus(200);\r\n\t}", "function getSkus() {\n\techo \"Getting Skus </br>\";\n\t$response = getRequest('/api/sku');\n\tprintInfo($response);\n}", "public function getShops(Request $request){\n\n // check params \n if(!$this->requiredParams($request, ['key'])){\n return response()->json(['status' => 'error' , 'message' => 'missing params' ] , 400);\n }\n\n $key = $this->checkParam($request->key);\n if ($key !== self::KEY) {\n return response()->json(['status' => 'error' , 'message' => 'invalid request' ] , 400);\n }\n\n $shop = Shop::all();\n\n if($shop == NULL)\n {\n return response()->json(['status' => 'error' , 'message' => 'shop is not exist' ] , 400);\n }\n\n return response()->json(['status' => 'success' , 'message' => 'OK', 'data' => $shop] , 200); \n }", "public function accessAction()\n\t{\n\t\t\n\t\t$shopifyapi = new \\Shopifyapi\\Resources();\n\t\t$shop_info = $this->getShopTable()->fetchAll();\n\t\tforeach($shop_info as $shop) {\n\t\t\t$paymentinfo = $this->getAppPaymentTable()->getPayment($shop['shop_id']);\n\t\t\t\n\t\t\tif($paymentinfo['trial_time']) {\n\t\t\t\t$left_seconds_trial = $paymentinfo['trial_time'] - 1447567518; //time();\n\t\t\t\t$left_days_trial = $left_seconds_trial/60/60/24;\n\t\t\t\tif(ceil($left_days_trial) <= 0) {\n\t\t\t\t\t$discount_option = $this->getDiscountOptionTable()->getOptionByShopId($shop['shop_id']);\n\t\t\t\t\t$this->getAppPaymentTable()->updateTrialTime($shop['shop_id'], 'no_trial');\n\t\t\t\t\t$this->getAppPaymentTable()->updateAllowed($shop['shop_id'], false);\n\t\t\t\t\t$shopifyapi->shopify_call($shop['access_token'], $shop['shopify_domain'], \"/admin/script_tags/\".$discount_option['shopify_script_id'].\".json\", array(), 'DELETE');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} elseif($paymentinfo['trial_time'] == false) {\n\t\t\t\t\n\t\t\t\t$left_seconds_subscription = $paymentinfo['payment_day'] - time();\n\t\t\t\t$left_days_subscription = $left_seconds_subscription/60/60/24;\n\t\t\t\t\n\t\t\t\tif(ceil($left_days_subscription) <= 5 && ceil($left_days_subscription) > 0) {\n\t\t\t\t\t$this->getAppPaymentTable()->updatePaymentStatus($shop['shop_id'], false);\n\t\t\t\t} elseif (ceil($left_days_subscription) <= 0) {\n\t\t\t\t\t$discount_option = $this->getDiscountOptionTable()->getOptionByShopId($shop['shop_id']);\n\t\t\t\t\t$this->getAppPaymentTable()->updateAllowed($shop['shop_id'], false);\n\t\t\t\t\t$this->getAppPaymentTable()->updateStartPaymentDay($shop['shop_id'], \"\");\n\t\t\t\t\t$shopifyapi->shopify_call($shop['access_token'], $shop['shopify_domain'], \"/admin/script_tags/\".$discount_option['shopify_script_id'].\".json\", array(), 'DELETE');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->response;\n\t}", "function products_get() {\n\n $products = $this->api_model->get_products();\n\n if(isset($products))\n {\n $this->response(array('status' => 'success', 'message' => $products));\n }\n else\n {\n $this->response(array('status' => 'failure', 'message' => 'The specified product could not be found'), REST_CONTROLLER::HTTP_NOT_FOUND);\n }\n\n\t}", "public function index()\n {\n $client = new Client(['base_uri' => 'http://127.0.0.1:8000/api/skorpoint']);\n $request = $client->request('GET');\n // $response = json_decode($request->getBody());\n // echo $response[0]->id;\n $response = $request->getBody();\n return $response;\n }", "function apiResource(): string\n {\n return 'payments';\n }", "function getProductByTitle(Request $request) {\n\n $title = $request->get('title');\n try {\n $client = HttpClient::create();\n $response = $client->request('GET', shopifyApiurl . 'products.json?title='.$this->replaceSpecialCharacters(trim($title)));\n } catch (\\Exception $e) {\n var_dump($e);\n }\n\n return new JsonResponse($response->getContent());\n }", "function request($host_url, $id, $entity, $auth)\n {\n $url = \"$host_url/v1/checkouts/$id/payment?entityId=$entity\";\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Authorization:Bearer $auth\"));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // this should be set to true in production\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $responseData = curl_exec($ch);\n if (curl_errno($ch)) {\n return curl_error($ch);\n }\n curl_close($ch);\n return $responseData;\n }", "public function getShops(Request $request){\n\n // check params \n if(!$this->requiredParams($request, ['key'])){\n return response()->json(['status' => 'error' , 'message' => 'missing params' ] , 400);\n }\n\n $key = $this->checkParam($request->key);\n if ($key !== self::KEY) {\n return response()->json(['status' => 'error' , 'message' => 'invalid request' ] , 400);\n }\n\n $shop = Shop::with('mall.location.city')\n ->get();\n\n if($shop == NULL)\n {\n return response()->json(['status' => 'error' , 'message' => 'shop is not exist' ] , 400);\n }\n\n return response()->json(['status' => 'success' , 'message' => 'OK', 'data' => $shop] , 200); \n }", "public function getShop(Request $request){\n\n // check params \n if(!$this->requiredParams($request, ['key','id'])){\n return response()->json(['status' => 'error' , 'message' => 'missing params' ] , 400);\n }\n\n $key = $this->checkParam($request->key);\n if ($key !== self::KEY) {\n return response()->json(['status' => 'error' , 'message' => 'invalid request' ] , 400);\n }\n $id = $this->checkParam($request->id);\n $shop = Shop::with('mall.location.city')->with('owner')->where('id',$id)->first();\n\n if($shop == NULL)\n {\n return response()->json(['status' => 'error' , 'message' => 'shop is not exist' ] , 400);\n }\n\n return response()->json(['status' => 'success' , 'message' => 'OK', 'data' => $shop] , 200); \n }", "public function get_products_simple(WP_REST_Request $request){\n\t\t\t\n\t\t\t/*if(!$user_id){\n\t\t\t\treturn rest_ensure_response(array(\n\t\t\t\t\t\"errors\" => array(\n\t\t\t\t\t\t\"You have to be logged in to perform this action\"\n\t\t\t\t\t),\n\t\t\t\t\t\"products\" => null,\n\t\t\t\t\t\"success\" => false\n\t\t\t\t));\n\t\t\t}*/\n\t\t\t\n\t\t\t//wp_set_current_user($user_id);\n\t\t\t//$this->cache_product_json();\n\t\t\t\n\t\t\t$language = apply_filters( 'wpml_current_language', \"de\");\n\t\t\t\n\t\t\t$filename = \"products\";\n\t\t\t\n\t\t\tif($language !== \"de\"){\n\t\t\t\t$filename .= \"-\" . $language;\n\t\t\t}\n\t\t\t\n\t\t\t$json = json_decode(file_get_contents(get_template_directory() . \"/cache/\" . $filename . \".json\"));\n\t\t\t\n\t\t\tif(empty($json)){\n\t\t\t\treturn rest_ensure_response(array(\n\t\t\t\t\t\"errors\" => array(\n\t\t\t\t\t\t\"Data not cached! ($filename is missing)\"\n\t\t\t\t\t),\n\t\t\t\t\t\"products\" => null,\n\t\t\t\t\t\"success\" => false\n\t\t\t\t));\n\t\t\t}\n\t\t\t\n\t\t\t/*$reseller_discount = $hfag_discount->get_reseller_discount_by_user();\n\t\t\t\n\t\t\tforeach($json as $key => $product){\n\t\t\t\tif(!empty($reseller_discount[$product->id])){\n\t\t\t\t\t$json[$key]->discount->reseller = $reseller_discount[$product->id];\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t\n\t\t\treturn rest_ensure_response(\n\t\t\t\tarray(\n\t\t\t\t\t\"errors\" => array(),\n\t\t\t\t\t\"products\" => $json,\n\t\t\t\t\t\"success\" => true\n\t\t\t\t)\n\t\t\t);\n\t\t}", "function listshops(Request $req, $id=null){\n\n \t$uri= $req->path();\n $method=$req->method(); \t\n \t$result=$id?shops::find($id):shops::all();\n \tif($result){ \n\n\t \t$response=APIHelpers::createAPIResponse(1,200,$uri,$method,$result,null,(microtime(true) - LARAVEL_START)*1000);\n\t return response()->json($response, 200); \n\n }else{\n\n $result=(object) array();\n $error = [\n \"message\"=> \"The resource that matches the request ID does not found.\",\n \"code\"=> 404002\n ];\n $response=APIHelpers::createAPIResponse(0,404,$uri,$method,$result,$error,(microtime(true) - LARAVEL_START)*1000);\n return response()->json($response, 404); \n } \n\n }", "protected function _getApi()\n {\n return Mage::getSingleton('payments/api');\n }", "function product_get()\n {\n $product_id = $this->uri->segment(3);\n\n $product = $this->api_model->get_product($product_id);\n\n if(!empty($product))\n {\n $this->response(array('status' => 'success', 'message' => $product));\n }\n else\n {\n $this->response(array('status' => 'failure', 'message' => 'The specified product could not be found'), REST_CONTROLLER::HTTP_NOT_FOUND);\n }\n\n\t}", "protected function getPricelistsRequest()\n {\n $resourcePath = '/pricelists';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // body params\n $_tempBody = null;\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n \n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n \n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getShop(Request $request){\n\n // check params \n if(!$this->requiredParams($request, ['key', 'id'])){\n return response()->json(['status' => 'error' , 'message' => 'missing params' ] , 400);\n }\n\n $key = $this->checkParam($request->key);\n if ($key !== self::KEY) {\n return response()->json(['status' => 'error' , 'message' => 'invalid request' ] , 400);\n }\n\n \n //$shop = Shop::find($request->id);\n $shop = Shop::with('owner')\n ->with('shopStatus')\n ->with('mall')\n ->with('offers')\n ->whereHas('offers', function ($query) {\n $query->where('active','1');\n })\n ->with('orders')\n ->with('scategories')\n ->with('products')\n ->where('id' , $request->id)\n ->first();\n\n if($shop == NULL)\n {\n return response()->json(['status' => 'error' , 'message' => 'shop is not exist' ] , 400);\n }\n\n return response()->json(['status' => 'success' , 'message' => 'OK', 'data' => $shop] , 200); \n }", "function restAction()\n {\n $this->disableLayout();\n $this->_helper->viewRenderer->setNoRender();\n\n $request_data = $this->_getAllParams();\n\n $method_name = $this->_getParam('method');\n if(!isset($method_name))\n {\n echo \"Inconsistent request\";\n exit;\n }\n\n $request_data = $this->_getAllParams();\n // Handle XML-RPC request\n $this->kwWebApiCore = new KwWebApiRestCore($this->apiSetup, $this->apicallbacks, $request_data);\n }", "public function index()\n {\n return response()->json([\n 'status' => 200,\n 'data' => new ProductResourceCollection(Product::all())\n ]);\n }", "function getClientURL($id, $username, $businessSector, $name, $phone, $email, $fax, $search)\n{\n $url = getAPIBaseDomain().'/api/Client/'.$id.'?username='.$username.'&businessSector='.$businessSector.'&name='.$name.'&phone='.$phone.'&email='.$email.'&fax='.$fax.'&search='.$search;\n return $url;\n}", "public function __construct()\n\t{\n\t \t$this->ShopifyClient = new ShopifyClient();\n\t}", "public function index(Request $request)\n {\n $reqBody = $request->all();\n $valid = $this->service->validateData($reqBody);\n\n if ($valid->fails()) {\n return $this->respondWithValidationError($valid);\n }\n \n $data = $valid->validated();\n $item = $this->service->getItem($data);\n $item = ApiResource::make($item);\n\n return $this->respondWithSuccess($item);\n }", "public function get_shopify_merchant_info(){\n \n $code = $this->input->get('code');\n $hmac = $this->input->get('hmac');\n\n $api_key = $this->config->item('shopify_api_key');\n $api_secret = $this->config->item('shopify_api_secret');\n $shop = $this->input->get('shop');\n\n $this->session->set_userdata('shop', $shop);\n\n //check if store is already registered or not\n $store_exist = $this->store->check_store_exist_by_domain($shop);\n\n //save the shop info into the table\n ////Load shopify API related files \n ///// call shopify API to get access(offline) token /////\n $shopifyClient = new ShopifyClient($shop, \"\", $api_key, $api_secret);\n $access_data = $shopifyClient->getAccessToken($code);\n\n if ($store_exist > 0){\n //get the shop token access data\n $response = $this->store->get_store_info_by_domain($shop);\n\n //update the access token\n $dataArray = array('key' => $access_data['access_token'], 'app_status' => '1');\n $this->store->update_store_info($shop, $dataArray);\n\n //get the shop token access data\n $response = $this->store->get_store_info_by_domain($shop);\n $this->register_uninstall_webhook();\n\n if ($response['app_status'] == '0'){\n $this->register_uninstall_webhook();\n\n ///Redirect to the app dashboard for first time users/// \n $redirect_url = \"https://\".$shop.\"/admin/apps/shoptrade-app\";\n redirect($redirect_url, 'location');\n die();\n }\n\n }else{\n \n //Shopify client call to fetch merchant info\n $sc_shop = new ShopifyClient($shop, $access_data['access_token'], $api_key, $api_secret);\n\n // Get shop info \n $shop_info = $sc_shop->call('GET', '/admin/shop.json');\n $shop_info['tokens']= $access_data;\n \n //save shop info\n $result = $this->store->save_store_info($shop_info);\n \n $response = array(\n 'shop' => $shop_info['domain'],\n 'store_id' => $shop_info['id'],\n 'access_token' => $access_data['access_token'],\n 'email' => $shop_info['email'],\n 'shop_owner' => $shop_info['shop_owner']\n );\n\n $this->register_uninstall_webhook();\n \n $redirect_url = \"https://\".$shop.\"/admin/apps/shoptrade-app\";\n redirect($redirect_url, 'location');\n die();\n \n }\n\n //$this->user_activity();\n $this->dashboard();\n }", "public function apiResource() {\n\t\tif (!$this->CI->authex->validateUser()) {\n\t\t\t$this->CI->exitCode = 401;\n\t\t\treturn;\n\t\t}\n\t\t$params = func_get_args();\n\t\tif (!isset($params[0])) {\n\t\t\t$this->CI->exitCode = 400;\n\t\t\t$this->CI->apiResponse = ['message' => 'ResourceID is mandatory'];\n\t\t\treturn null;\n\t\t}\n\t\tswitch ($this->CI->input->method()) {\n\t\tcase 'get':\n\t\t\t$this->CI->apiResponse = $this->getTagsByResourceID($params[0], $this->CI->input->get());\n\t\t\tbreak;\n\t\tcase 'patch':\n\t\t\t$this->CI->apiResponse = $this->patchResourceTags($params[0], $this->CI->input->get());\n\t\t\tbreak;\n\t\tcase 'delete':\n\t\t\t$this->CI->apiResponse = $this->deleteResourceTags($params[0],$this->CI->input->get());\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$this->CI->exitCode = 405;\n\t\t\t$this->CI->apiResponse = ['error' => 'Request method is invalid'];\n\t\t\treturn;\n\t\t}\n\t}", "public function apiAction(Request $request)\n {\n // $em = $this->getDoctrine()->getManager();\n // $query = $request->query;\n // $uriParam = $query->get('uri', '');\n // if($uriParam!='')\n // {\n // $query->add(array( \"xproperty_value\" => $uriParam));\n // $query->remove(\"uri\");\n // }\n // $entities = $em->getRepository('IDCISimpleScheduleBundle:CalendarEntity')->extract($query->all());\n // $result = $this->get('idci_exporter.manager')->export($entities,\"jsonp\");\n // $response = new Response();\n // $response->setContent($result->getContent());\n // $response->headers->set('Content-Type', $result->getContentType());\n // return $response;\n }", "abstract protected function requestApi($action = '', $params = array(), $method = 'POST');", "public function index() // Secured Endpoint\n {\n $offers = Cache::rememberForever('offers', \n fn() => DB::table('offers')->get());\n \n return response()->json([\n 'success' => true,\n 'payload' => $offers\n ]);\n }", "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "function getshop($shopname) {\n\t\n\t$url = 'https://openapi.etsy.com/v2/shops/?shop_name='.$shopname .'&api_key=' . $apikey;\n\t\n\treturn execCurl ($url);\n\t//num_favorers\n\t\n}", "private function _call_api($url, $method, $data = array()) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_VERBOSE, 0);\n curl_setopt($curl, CURLOPT_HEADER, 0);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);\n\n if($method == 'POST')\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));\n\n //curl_setopt($curl, CURLOPT_POSTFIELDS, $product);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n $response = curl_exec($curl);\n curl_close ($curl);\n\n return $response;\n }", "function acapi_call($method, $resource, $args, $params = array(), $body = array(), $options = array()) {\n $default_options = array(\n 'display' => TRUE,\n );\n $options = array_merge($default_options, $options);\n\n $debug = drush_get_option('debug', FALSE);\n $verbose = drush_get_option('verbose', FALSE);\n $simulate = drush_get_option('simulate', FALSE);\n $format = acapi_get_option('format');\n\n // Build the API call URL.\n $url = acapi_get_option('endpoint');\n $url .= acapi_dt($resource, $args);\n $url .= '.json';\n\n foreach ($params as $k => $v) {\n if (is_array($v)) {\n unset($params[$k]);\n foreach ($v as $key => $val) {\n $params[\"$k-$key\"] = \"$k%5B%5D=\" . urlencode($val);\n }\n }\n else {\n $params[$k] = \"$k=\" . urlencode($v);\n }\n }\n\n $url .= '?' . implode('&', $params);\n\n $creds = acapi_get_creds();\n if (!$creds) {\n return FALSE;\n }\n\n // Build the body.\n $json_body = json_encode($body);\n\n $display = \"curl -X $method '$url'\";\n if ($debug) {\n $display .= \" ($creds)\";\n }\n if ($debug || $verbose || $simulate) {\n drush_print($display, 0, STDERR);\n if (!empty($body)) {\n drush_print(\" $json_body\", 0, STDERR);\n }\n }\n\n if ($simulate) {\n return;\n }\n\n $headers = array();\n $ch = curl_init($url);\n // Basic request settings\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\n curl_setopt($ch, CURLOPT_USERAGENT, basename(__FILE__));\n if (!empty($options['result_stream'])) {\n curl_setopt($ch, CURLOPT_FILE, $options['result_stream']);\n }\n else {\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n }\n // User authentication\n curl_setopt($ch, CURLOPT_HTTPAUTH, TRUE);\n curl_setopt($ch, CURLOPT_USERPWD, $creds);\n // SSL\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, preg_match('@^https:@', acapi_get_option('endpoint')));\n curl_setopt($ch, CURLOPT_CAINFO, acapi_get_option('cainfo'));\n // Redirects\n if (!empty($options['redirect'])) {\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_MAXREDIRS, $options['redirect']+1);\n }\n /* Body\n We need to set a Content-Length header even on empty POST requests, or the webserver\n will throw a 411 Length Required.\n */\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, $json_body);\n $headers[] = 'Content-Type: application/json;charset=utf-8';\n $headers[] = 'Content-Length: ' . strlen($json_body);\n // Headers\n if (!empty($headers)) {\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n }\n // Debugging\n curl_setopt($ch, CURLOPT_VERBOSE, $debug);\n // Go\n $content = curl_exec($ch);\n if (curl_errno($ch) > 0) {\n return drush_set_error('ACAPI_CURL_ERROR', dt('Error accessing @url: @err', array('@url' => $url, '@err' => curl_error($ch))));\n }\n\n $result = json_decode($content);\n $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n\n if (!empty($format)) {\n drush_print(drush_format($result, NULL, $format));\n }\n else if ($options['display']) {\n if (is_array($result)) {\n foreach ($result as $item) {\n if (! is_scalar($item)) {\n drush_print_table(drush_key_value_to_array_table(acapi_convert_values($item)));\n }\n else {\n drush_print($item);\n }\n }\n }\n else {\n if ($method == 'POST') {\n // All POST actions return a task. Display something helpful.\n drush_log(dt('Task @taskid started.', array('@taskid' => $result->id)), 'ok');\n }\n else {\n drush_print_table(drush_key_value_to_array_table(acapi_convert_values($result)));\n }\n }\n }\n\n if ($status != 200) {\n return drush_set_error('ACAPI_HTTP_STATUS_' . $status, dt('API status code @status', array('@status' => $status)));\n }\n\n return array($status, $result);\n}", "public function index()\n {\n /** @var User $user */\n $user = Auth::user();\n\n $client = new RestClient(env('ECONOMIC_SECRET_TOKEN'), $user->economic_token);\n\n $parms = ['pagesize' => 10];\n\n $response = $client->request->get('products', $parms);\n\n $status = $response->httpStatus();\n\n $data = [];\n\n if ($status == 200) {\n // Successful request\n $data = $response->asArray();\n $data['products'] = $data['collection'];\n }\n\n\n\n return view('home')->with($data);\n }", "function Redactedapi() {\n \n if(!empty($_POST['site_id']) && is_numeric($_POST['site_id']))\n {\n $this->site_id = $_POST['site_id']; \n } \n else\n {\n $this->site_id = 1;\n }\n \n if($_SERVER['SERVER_NAME'] == 'www.redacted.com'){\n $this->username = 'xxxx';\n $this->password = 'xxxx';\n $this->url \t\t= 'https://api-1.redacted.com/redactedapiservice.asmx';\n } else{\n $this->username = 'xxxxx';\n $this->password = 'xxxxx';\n $this->url \t = 'https://testapi-1.redacted.com/redactedAPIService.asmx?wsdl';\n } \n\t\t\t\n\t\t$this->CI =& get_instance();\n\t\t$this->CI->load->helper('cookie');\n\t}", "public function getShopResource()\n {\n return $this->shop_resource;\n }", "public function getStock(ApiRequest $request){\n $sifra = $request->sifra ? $request->sifra : $request->barkod;\n $barkod = $request->barkod ? $request->barkod : $request->sifra;\n\n $client = new Client();\n $data = $client->get('http://213.149.116.38/Donator/DonatorB2BJson.svc/getstock/'.$sifra.'/'.$barkod, ['auth' => ['SmartWeb', 'D0n@46!t0r2$73']]);\n\n $result = json_decode( $data->getBody() );\n return view('api.index', compact('result'));\n }", "public function testCreatingALinkViaAPI()\n {\n $user = User::all()->get(1);\n $product = Product::all()->get(0);\n \n $request = [\n 'token' => $user->token,\n ];\n\n $response = $this->json('POST', '/api/users/'.$user->id.'/own/'.$product->id, $request);\n $response->assertStatus(200);\n }", "public function getOfferByShop(Request $request){\n // check params \n if(!$this->requiredParams($request, ['key','shop_id'])){\n return response()->json(['status' => 'error' , 'message' => 'missing params' ] , 400);\n }\n\n $key = $this->checkParam($request->key);\n if ($key !== self::KEY) {\n return response()->json(['status' => 'error' , 'message' => 'invalid request' ] , 400);\n }\n\n $shop_id = $this->checkParam($request->shop_id);\n\n $offers = Offer::where('shop_id',$shop_id)->where('active','1')->orderBy('created_at', 'DESC')->get();\n\n return response()->json(['status' => 'success' , 'message' => 'OK', 'data' => $offers] , 200);\n\n }", "public function getShop() {\n return $this->request(\n \"GET\",\n \"/application/users/{$this->user_id}/shops\",\n \"Shop\"\n );\n }", "function json_api_request() {\n /** @var \\CloudCreativity\\LaravelJsonApi\\Services\\JsonApiService $service */\n $service = app('json-api');\n\n return $service->request();\n }", "public function requestFromApi() \n {\n $clientApi = new \\GuzzleHttp\\Client([\n \"base_uri\" => \"https://services.mysublime.net/st4ts/data/get/type/\",\n \"timeout\" => 4.0]);\n \n try { \n $response = $clientApi->request(\"GET\", $this->_urlEndPoint);\n if ($response->getStatusCode() == \"200\") {\n $body = $response->getBody();\n $this->_jsonRequestedArr = json_decode($body); \n }\n else { \n $this->_error .= \"Bad status code: . \" . $response->getStatusCode(); \n }\n }\n catch (Exception $exc) {\n $this->_error .= $exc->getMessage();\n }\n\n }", "public function todayAction(){\n\n $data = [ 'today' => 'today' ];\n $client = new Client();\n $ServerPort =\"\";\n if($_SERVER['SERVER_PORT']){\n $ServerPort = ':'.$_SERVER['SERVER_PORT'];\n }\n $client->setUri('http://'.$_SERVER['SERVER_NAME'].$ServerPort.'/order-rest');\n $client->setOptions(array(\n 'maxredirects' => 5,\n 'timeout' => 30\n ));\n $client->setParameterPost(\n $data\n );\n $client->setMethod( Request::METHOD_POST );\n $response = $client->send();\n if ($response->isSuccess()) {\n $result = json_decode( $response->getContent() , true);\n }\n return $this->redirect()->toRoute('ordermanagement', array('action' => 'index') );\n }", "public function index()\n {\n return PurchaseResource::collection(Purchase::with('user', 'product')->get());\n }", "protected function _getCheckoutApi()\n {\n return Mage::getSingleton('klarna_kco/api_rest_checkout')\n ->setConfig($this->getConfig())\n ->setStore($this->getStore());\n }", "public function getResourceEndpoint(): string\r\n {\r\n return \"/v1/user/\" . $this->userIdentifier . \"/monetary-account/\" . $this->monetaryAccountId . \"/request-inquiry\";\r\n }", "public function sendRequestToEndpoint(): Response;", "public function index()\n {\n return response()->json(['status' => 'success', 'data' => MerchantResource::collection($this->repository->all())], 20);\n }", "public function call($method, $url, $array = array())\n {\n Log::debug('ShopifyApi.call for ' . $url);\n $this->checkAuthorization('ShopifyApi.call');\n\n list($resultJson, $responseHeaders) = $this->shopifyClient->call($method, $url, $array);\n// Log::debug('ShopifyApi.call xx resultJson = ' . json_encode($resultJson));\n// Log::debug('ShopifyApi.call xx responseHeaders = ' . json_encode($responseHeaders));\n $result = json_decode($resultJson, true);\n\n // check errors\n if (isset($result['errors']) or ($responseHeaders['http_status_code'] >= 400)) {\n\n// Log::info(\"ShopifyApi.call for url=$url, responseHeaders=\" . print_r($responseHeaders, true));\n Log::info(\"ShopifyApi.call for url=$url, resultJson=$resultJson.\");\n\n Log::error(\"ShopifyApi.call: ERROR: \" . json_encode($result['errors']) . ', responseHeaders = ' . print_r($responseHeaders, true));\n\n if (isset($result['errors']) && '[API] Invalid API key or access token (unrecognized login or wrong password)' == $result['errors']) {\n Log::error('ShopifyApi.call: Invalid API key');\n\n if (Session::has('shop')) {\n $shop = Session::get('shop');\n $this->deleteShopInDB($shop);\n }\n\n throw new ShopifyAuthenticationException($result['errors']);\n }\n Log::info(\"ShopifyApi.call: throw ShopifyException\");\n throw new ShopifyException(json_encode($result['errors']));\n }\n\n // check call limits\n $this->limitCalls();\n\n $resultShift = (is_array($result) and (count($result) > 0)) ? array_shift($result) : $result;\n return $resultShift;\n }", "public function getSubscription(Request $request) {\n $data = json_decode($request->getContent(), TRUE);\n $result = $this->validateAuthenticator($data);\n if (empty($result['error'])) {\n $result['authenticator']['hash'] = CryptConnector::acquiaHash($result['secret']['key'], $result['authenticator']['time'] . ':' . $result['authenticator']['nonce']);\n unset($result['secret']);\n return new JsonResponse($result);\n }\n unset($result['secret']);\n return new JsonResponse($result, self::ACQTEST_SUBSCRIPTION_SERVICE_UNAVAILABLE);\n }", "public function testGetDetailActionWithToken()\n {\n // Get an authenticated client\n $client = $this->createAuthenticatedClient('sjouan', '1GreatP@ssword');\n // Test the route\n $client->request('GET', '/api/products/'.$this->product->getId());\n // Check the response\n $this->assertSame(Response::HTTP_OK, $client->getResponse()->getStatusCode());\n }", "public function index(Request $request)\n {\n $customer_id = Constants::SALES_TYPE_API . \"-\" . $request->input('api_id') . \"-\";\n $skip = 0;\n if ($request->input('page') != null)\n if ($request->input('page') != 0)\n $skip = 10 * $request->input('page');\n $shopping = Shopping::where('customer_id', 'like', \"%{$customer_id}%\");\n if ($request->input('search')) {\n $search = $request->input('search');\n $shopping = $shopping\n ->where('name', 'LIKE', \"%$search%\")\n ->orWhere('phone', 'LIKE', \"%$search%\");\n }\n $shopping = $shopping->take(10)->skip($skip)\n ->orderBy('created_at', 'desc')->get()->map(function ($value) {\n $value->date_persian = CalendarUtils::strftime('Y-m-d', strtotime($value->date));\n $value->created_at_persian = CalendarUtils::strftime('Y-m-d', strtotime($value->created_at));\n return $value;\n });\n return $this->respond($shopping);\n }", "function rest_do_request($request)\n {\n }", "public function getShopsByIdsAction(Request $request)\n {\n $shop = $request->get('shop');\n try {\n $encoders = array(\n new XmlEncoder(),\n new JsonEncoder()\n );\n $normalizers = array(\n new ObjectNormalizer()\n );\n $serializer = new Serializer($normalizers, $encoders);\n\n $em = $this->getDoctrine()->getManager();\n $qb = $em->createQueryBuilder()->select('s.name,s.logo,s.id')->from('AdBoxBundle:Shop', 's')->where('s.id = :id')->setParameter('id', $shop)->getQuery();\n $shops_res = $qb->getResult();\n $jsonContent = $serializer->serialize($shops_res, 'json');\n return new Response($jsonContent, Response::HTTP_OK);\n }\n catch (Exception $e) {\n return new Response(Response::HTTP_404);\n }\n }", "function creta_product_register_route() {\n register_rest_route( 'cr/v1', 'cr-woo', array(\n 'methods' => 'GET',\n 'callback' => 'get_all_products_external',\n // 'permission_callback' => function() {\n // return current_user_can( 'edit_posts' );\n // },\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'GET',\n 'callback' => 'get_product_by_sku_external',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'PUT',\n 'callback' => 'update_product_by_sku_external',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo', array(\n 'methods' => 'POST',\n 'callback' => 'create_new_product_external',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'DELETE',\n 'callback' => 'del_product_by_sku_external',\n ) \n );\n\n /*--------route internal woocommerce */\n register_rest_route( 'cr/v1', 'cr-woo-in', array(\n 'methods' => 'GET',\n 'callback' => 'get_all_products_internal',\n // 'permission_callback' => function() {\n // return current_user_can( 'edit_posts' );\n // },\n )\n ); \n\n \n register_rest_route( 'cr/v1', 'cr-woo-in/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'GET',\n 'callback' => 'get_product_by_sku_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'PUT',\n 'callback' => 'update_product_by_sku_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in', array(\n 'methods' => 'POST',\n 'callback' => 'create_new_product_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'DELETE',\n 'callback' => 'del_product_by_sku_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in/sku-list', array(\n 'methods' => 'GET',\n 'callback' => 'get_sku_list_internal',\n ) \n );\n }", "public function show(Request $request)\n {\n $id = $request->route('id');\n $client = new Client();\n $result = $client->request('GET', 'https://swapi.dev/api/planets/' . $id . '/');\n $result = $result->getBody();\n return $result;\n }", "function spf_register_route(){\n register_rest_route('wooapp/v1','/shop/products',Array(\n 'methods' => 'GET',\n 'callback' => 'spf_get_shop_products',\n ));\n\n register_rest_route('wooapp/v1', '/auth/register', [\n 'methods' => 'POST',\n 'callback' => 'spf_register_new_user',\n ]);\n\n register_rest_route('wooapp/v1', '/auth/login', [\n 'methods' => 'POST',\n 'callback' => 'spf_login_user',\n ]);\n}", "function activate_car($id)\n{\n $url = set_url('advert');\n $url .= '/' . $id . '/activate';\n $token = $_SESSION['token'];\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Authorization: Bearer ' . $token,]);\n curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, '{}');\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = json_decode(curl_exec($cURLConnection));\n curl_close($cURLConnection);\n return $apiResponse;\n}", "public function index()\n {\n if(Auth::user()->isSubContractorPrime()) {\n Request::merge(['for_sub_id' => Auth::id()]);\n }\n\n $input = Request::all();\n $products = $this->repo->getProducts($input);\n\n // // exclude srs products for mobile app\n // if (config('srs_disabled_for_mobile') && ($supplier = Supplier::srsSupplier())) {\n // \t$products = $products->where('supplier_id', '<>', $supplier->id);\n // }\n\n $limit = isset($input['limit']) ? $input['limit'] : config('jp.pagination_limit');\n\n if (!$limit) {\n return ApiResponse::success($this->response->collection($products->get(), new FinancialProductsTransformer));\n }\n\n $products = $products->paginate($limit);\n\n return ApiResponse::success($this->response->paginatedCollection($products, new FinancialProductsTransformer));\n }", "public function searchuserAction(){\n\n $data = [ 'search' => 'search' , 'id' => 1 ];\n $client = new Client();\n $ServerPort =\"\";\n if($_SERVER['SERVER_PORT']){\n $ServerPort = ':'.$_SERVER['SERVER_PORT'];\n }\n $client->setUri('http://'.$_SERVER['SERVER_NAME'].$ServerPort.'/order-rest');\n $client->setOptions(array(\n 'maxredirects' => 5,\n 'timeout' => 30\n ));\n $client->setParameterPost(\n $data\n );\n $client->setMethod( Request::METHOD_POST );\n $response = $client->send();\n if ($response->isSuccess()) {\n $result = json_decode( $response->getContent() , true);\n }\n return $this->redirect()->toRoute('ordermanagement', array('action' => 'index') );\n }", "public function local() {\n\t\tif (defined('IS_DEV_INSTANCE') && IS_DEV_INSTANCE === true) {\n\t\t\tCakeLog::write('api.offers.local', print_r($this->request->query, true));\n\t\t}\n\t\telse {\n\t\t\tCakeLog::write('api.offers.local', $this->request->query);\n\t\t}\n\t\tif (!$this->authedUser()) {\n\t\t\treturn new CakeResponse(array(\n\t\t\t\t'status' => 400,\n\t\t\t\t'type' => 'json',\n\t\t\t\t'body' => json_encode(array(\n\t\t\t\t\t'message' => 'Invalid token'\n\t\t\t\t))\n\t\t\t));\n\t\t}\n\n\t\tApp::uses('HttpSocket', 'Network/Http');\n\t\t$HttpSocket = new HttpSocket(array(\n\t\t\t'timeout' => 15,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\n\t\t$categories = array(\n\t\t\t'food-and-drink' => 'Restaurants & Bars',\n\t\t\t'events-and-activities' => 'Activities',\n\t\t\t'beauty-and-spas' => 'Beauty & Spa',\n\t\t\t'health-and-fitness' => 'Health & Fitness',\n\t\t\t'home-improvement' => 'Home Improvement',\n\t\t\t'local-services' => 'Local Services',\n\t\t\t'shopping' => 'Shopping',\n\t\t\t'automotive' => 'Automotive'\n\t\t);\n\n\t\t// string query\n\t\t$query_string = array(\n\t\t\t'country_code' => $this->authed_user['QueryProfile']['country'],\n\t\t\t'offset' => isset($this->request->query['offset']) ? $this->request->query['offset'] : '0',\n\t\t\t'limit' => isset($this->request->query['limit']) ? $this->request->query['limit'] : '10',\n\t\t\t'sid' => $this->authed_user['User']['id'],\n\t\t\t'tsToken' => 'US_AFF_0_200113_215093_0',\n\t\t\t'utm_campaign' => '200113',\n\t\t\t'utm_medium' => 'afl',\n\t\t\t'utm_source' => 'GPN',\n\t\t\t'filters' => isset($this->request->query['category']) ? 'category:'.$this->request->query['category']: ''\n\t\t);\n\n\t\tif ($this->authed_user['QueryProfile']['country'] == 'US') {\n\t\t\t$zip = $this->GeoZip->find('first', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'GeoZip.zipcode' => $this->authed_user['QueryProfile']['postal_code'],\n\t\t\t\t\t'GeoZip.country_code' => 'US'\n\t\t\t\t)\n\t\t\t));\n\t\t\tif ($zip && !empty($zip['GeoZip']['longitude']) && !empty($zip['GeoZip']['latitude'])) {\n\t\t\t\t$query_string['lat'] = $zip['GeoZip']['latitude'];\n\t\t\t\t$query_string['lng'] = $zip['GeoZip']['longitude'];\n\t\t\t}\n\t\t}\n\n\t\t$results = $HttpSocket->get('http://partner-api.groupon.com/deals.json', $query_string);\n\t\t$json = json_decode($results['body']);\n\n\t\t$deals = array();\n\t\tif (isset($json->deals)) {\n\t\t\tforeach ($json->deals as $deal) {\n\t\t\t\t$deals[] = array(\n\t\t\t\t\t'id' => $deal->id,\n\t\t\t\t\t'title' => $deal->title,\n\t\t\t\t\t'dealUrl' => $deal->dealUrl,\n\t\t\t\t\t'largeImageUrl' => $deal->largeImageUrl,\n\t\t\t\t\t'redemptionLocation' => $deal->redemptionLocation,\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'id' => $deal->options[0]->id,\n\t\t\t\t\t\t'price' => $deal->options[0]->price->amount,\n\t\t\t\t\t\t'value' => $deal->options[0]->value->amount\n\t\t\t\t\t),\n\t\t\t\t\t'merchant' => array(\n\t\t\t\t\t\t'name' => $deal->merchant->name\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$pagination = array();\n\t\tif (isset($json->pagination)) {\n\t\t\t$pagination = get_object_vars($json->pagination);\n\t\t}\n\n\t\treturn new CakeResponse(array(\n\t\t\t'status' => 200,\n\t\t\t'type' => 'json',\n\t\t\t'body' => json_encode(array(\n\t\t\t\t'deals' => $deals,\n\t\t\t\t'pagination' => $pagination\n\t\t\t))\n\t\t));\n\t}", "function item_get()\n {\n $key = $this->get('id');\n $result = $this->supplies->get($key);\n if ($result != null)\n $this->response($result, 200);\n else\n $this->response(array('error' => 'Supplies item not found!'), 404);\n }", "public function index()\n {\n try {\n $client = new Client;\n $request = $client->request('GET', env('API_URL') . '/api/shipments', [\n 'headers' => [\n 'Content-type' => 'application/json',\n 'Accept' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->token_f(),\n ],\n ]);\n // $response = $http->get(env('API_URL').'/api/getUsers');\n return $response = $request->getBody()->getContents();\n } catch (\\Exception $e) {\n\n \\Log::error($e->getMessage() . ' ' . $e->getLine() . ' ' . $e->getFile());\n return $e->getMessage() . ' ' . $e->getLine() . ' ' . $e->getFile();\n }\n }", "public function method()\n {\n return 'PUT'; // /sellerItems/{skuId}/stock\n }", "public function index()\n\t{\n\t\t$sale = Input::get('sale', 0);\n\t\t$manufacturer = Input::get('manufacturer', 0);\n\t\t$category = Input::get('category', 0);\n\t\t$is_wishlist = Input::get('is_wishlist', 0);\n\t\t$products = $this->repo\n\t\t\t\t\t\t\t->with('images')\n\t\t\t\t\t\t\t->whereActive(1);\n\n\t\tif ($sale !== 0) {\n\t\t\t$products = $products->where('sale_price', '!=', \"0.000000\");\n\t\t}\n\n\t\tif ($manufacturer !== 0) {\n\t\t\t$products = $products->where('manufacturer_id', $manufacturer);\n\t\t}\n\n\t\tif ($category !== 0) {\n\t\t\t$products = $products->whereHas('category', function ($query)\n\t\t\t{\n\t\t\t\t$query->where('id', Input::get('category'));\n\t\t\t});\n\t\t}\n\n\t\tif ($is_wishlist !== 0) {\n\t\t\t$user = API::user();\n\t\t\t$user->load('customer');\n\n\t\t\t$customer_id = $user->customer->id;\n\t\t\t$products = $products->whereHas('wishlist', function ($query) use ($customer_id)\n\t\t\t{\n\t\t\t\t$query->where('customer_id', $customer_id);\n\t\t\t});\n\t\t}\n\n\t\t$products = $products->orderBy('created_at', 'DESC')\n\t\t\t\t\t->paginate($limit = 10);\n\n\t\treturn $this->rest->response(200, $products, false);\n\t}", "public function get(Resource $resource);", "public function index()\n {\n $products = Product::with('store:id,name')->get();\n return response()->json([\n 'status' => 'ok',\n 'code' => 200,\n 'message' => 'Successfully get all products',\n 'data' => $products\n ], 200);\n }", "public function get()\n {\n #HTTP method in uppercase (ie: GET, POST, PATCH, DELETE)\n $sMethod = 'GET';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData('');\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'GET::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'GET::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'GET::RESPONSE', $sOutput);\n\n if ($iHTTPCode !== 200) {\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 200');\n }\n\n return $sOutput;\n }", "public function get() {\n // $this->isAdmin();\n\n $data = \"This is a test\";\n\n $this->sendHeaders();\n \n $resBody = (object) array();\n $resBody->status = \"200\";\n $resBody->message = \"valid request\";\n $resBody->data = \"This is the data\";\n echo json_encode($resBody);\n\n }", "public function index()\n {\n $product = Product::all();\n\n return (new ProductResourceCollection($product))->response();\n }", "private function makeRequest()\n {\n $credentials = $this->generateCredentials();\n\n return $this->engine->client->request('POST', $this->endpoint, [\n 'json' => $credentials,\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n ],\n ]);\n }", "function index_get()\n {\n $key = $this->get('id');\n if (!$key) {\n $this->response($this->supplies->all(), 200);\n } else {\n $result = $this->supplies->get($key);\n if ($result != null)\n $this->response($result, 200);\n else\n $this->response(array('error' => 'Supplies item not found!'), 404);\n }\n }", "public function getStoresRequest($options)\n {\n // unbox the parameters from the associative array\n $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null;\n $limit = array_key_exists('limit', $options) ? $options['limit'] : 100;\n\n\n $resourcePath = '/resources/stores/kv';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($cursor !== null) {\n if('form' === 'form' && is_array($cursor)) {\n foreach($cursor as $key => $value) {\n $queryParams[$key] = ObjectSerializer::toString($value);\n }\n }\n else {\n $queryParams['cursor'] = ObjectSerializer::toString($cursor);\n }\n }\n // query params\n if ($limit !== null) {\n if('form' === 'form' && is_array($limit)) {\n foreach($limit as $key => $value) {\n $queryParams[$key] = ObjectSerializer::toString($value);\n }\n }\n else {\n $queryParams['limit'] = ObjectSerializer::toString($limit);\n }\n }\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API token authentication\n $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key');\n if ($apiToken !== null) {\n $headers['Fastly-Key'] = $apiToken;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHosts = [\"https://api.fastly.com\"];\n if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) {\n throw new \\InvalidArgumentException(\"Invalid index {$this->hostIndex} when selecting the host. Must be less than \".sizeof($operationHosts));\n }\n $operationHost = $operationHosts[$this->hostIndex];\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getOfferUsingGET($sku) {\n \n // verify the required parameter 'sku' is set\n if ($sku === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $sku when calling getOfferUsingGET');\n }\n \n\n // parse inputs\n $resourcePath = \"/offers/{sku}\";\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n $method = \"GET\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());\n\n \n \n // path params\n if($sku !== null) {\n $resourcePath = str_replace(\"{\" . \"sku\" . \"}\",\n $this->apiClient->toPathValue($sku), $resourcePath);\n }\n \n \n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } else if (count($formParams) > 0) {\n // for HTTP post (form)\n $httpBody = $formParams;\n }\n\n // authentication setting, if any\n $authSettings = array('client_id', 'access_token');\n\n // make the API Call\n $response = $this->apiClient->callAPI($resourcePath, $method,\n $queryParams, $httpBody,\n $headerParams, $authSettings);\n\n if(! $response) {\n return null;\n }\n\n $responseObject = $this->apiClient->deserialize($response,'Offer');\n return $responseObject;\n }", "public function index(Request $request)\n {\n try {\n\n $limit = ($request->limit) ? $request->limit : 15;\n\n $data = shop::orderBy('id', 'DESC')\n ->paginate($limit);\n\n $response = array(\n 'status' => 'success',\n 'data' => $data,\n 'code' => 0\n );\n return response()->json($response);\n\n } catch (\\Exception $e) {\n\n $response = array(\n 'status' => 'fail',\n 'msg' => $e->getMessage(),\n 'code' => 1\n );\n\n return response()->json($response, 500);\n\n }\n }", "public function non_authenticated_users_cannot_access_the_following_endpoints_for_the_product_api()\n {\n $index = $this->json('GET', 'api/products');\n $index->assertStatus(401);\n\n $store = $this->json('POST', 'api/products');\n $store->assertStatus(401);\n\n $update = $this->json('PUT', 'api/products/-1');\n $update->assertStatus(401);\n\n $destroy = $this->json('DELETE', 'api/products/-1');\n $destroy->assertStatus(401);\n\n $show = $this->json('GET', 'api/products/-1');\n $show->assertStatus(401);\n }", "protected function _getApi()\n {\n if (!is_null($this->_api)) {\n return $this->_api;\n }\n $helper = Mage::helper('dpg');\n // Change to using the DataCash Direct Api\n $this->_api = Mage::getSingleton($this->_apiType);\n $config = $this->_getDpgConfig();\n $this->_api->setMerchantId($config->getApiMerchantId($this->getCode()));\n $this->_api->setMerchantPassword($config->getApiPassword($this->getCode()));\n // Set the sandboxed state\n $this->_api->setIsSandboxed($config->isMethodSandboxed($this->getCode()));\n \n $request = Mage::app()->getRequest();\n $this->_api->setBaseUrl(Mage::getBaseUrl())\n ->setPurchaseDescription('Purchase from ' . Mage::app()->getStore()->getGroup()->getName())\n ->setPurchaseDateTime(date('Y-m-d H:i:s'))\n ->setBrowserData(\n array(\n 'device_category' => $helper->getDeviceType($request->getHeader('USER_AGENT')),\n 'accept_headers' => $request->getHeader('ACCEPT'),\n 'user_agent' => $request->getHeader('USER_AGENT')\n )\n );\n\n $this->_api->setUseFraudScreening($this->getUseFraudScreening());\n $this->_api->setFraudScreeningPolicy($this->getFraudScreeningPolicy());\n\n return $this->_api;\n }", "public function retrieve(Resource $resource);", "public function getResource(Request $request, $resourceId);", "public function api()\n {\n $postData = $this->request->post;\n $getData = $this->request->get;\n\n $action = explode('/', $getData['route']);\n $action = array_pop($action);\n\n $data = [\n 'post' => $postData,\n 'get' => $getData\n ];\n\n $verb = strtolower($_SERVER['REQUEST_METHOD']);\n\n $api = new Api($data, $verb, $this);\n $result = $api->{$action}();\n\n $this->sendResponse($result);\n }", "public function test_show_single_product()\n {\n Product::factory()->create();\n $response = $this->getJson('/api/products/1');\n\n $response\n ->assertStatus(200);\n }", "public function get_all_items_by_api()\n {\n\n $data = array('token' =>'ayaolwan');//'type' => 'fees_category');\n $data_string = json_encode($data);\n $curl = curl_init(base_url() . 'webServices/Itemapi');\n\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"GET\");\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($data_string))\n );\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);\n\n $result = json_decode(curl_exec($curl), true);\n curl_close($curl);\n\n if ($result['status'])\n {\n echo json_encode($result['itemsList']);\n }\n\n\n }", "public function testRetrive()\n {\n $json = <<<JSON\n{\n \"order_id\": \"f3392f8b-6116-4073-ab96-e330819e2c07\",\n \"order_amount\": 50000,\n \"order_tax_amount\": 5000\n}\nJSON;\n\n $this->mock->append(\n new Response(\n 200,\n ['Content-Type' => 'application/json'],\n $json\n )\n );\n\n $order = new Orders($this->connector, 'auth-token-123456');\n $this->assertEquals('auth-token-123456', $order->getId());\n\n $order->retrieve();\n\n $this->assertEquals('f3392f8b-6116-4073-ab96-e330819e2c07', $order['order_id']);\n $this->assertEquals(50000, $order['order_amount']);\n\n $request = $this->mock->getLastRequest();\n $this->assertEquals(Method::GET, $request->getMethod());\n $this->assertEquals(\n '/instantshopping/v1/authorizations/auth-token-123456',\n $request->getUri()->getPath()\n );\n\n $this->assertAuthorization($request);\n }", "public function getProducts($params, $request);", "public function show(Request $request, $id)\n {\n if ($request->has('rel')) {\n $restock = Restock::with($rels)->where('uuid', $id)->get();\n } else {\n $restock = Restock::where('uuid', $id)->get();\n }\n\n return response()->json([\n 'status' => 200,\n 'data' => $restock,\n 'heading' => 'Restock',\n 'messages' => null\n ], 200);\n }", "function jsonAction()\n {\n $this->disableLayout();\n $this->_helper->viewRenderer->setNoRender();\n\n $request_data = $this->_getAllParams();\n\n $method_name = $this->_getParam('method');\n if(!isset($method_name))\n {\n echo \"Inconsistent request\";\n exit;\n }\n\n $request_data = $this->_getAllParams();\n // Handle XML-RPC request\n $this->kwWebApiCore = new KwWebApiRestCore($this->apiSetup, $this->apicallbacks, array_merge($request_data, array('format' => 'json')));\n }", "public function index()\n\t{\n\t\t\n\t\t$apis = Product::all();\n\n\t\treturn json_encode($apis);\n\t}", "public function actionGetpromotion()\n {\n $sku = false;\n $productdata = \"add sku on url like ?sku=product_sku\";\n if (isset($_GET['sku'])) {\n $sku = $_GET['sku'];\n }\n $merchant_id = '323';\n //$config = Data::getConfiguration($merchant_id);\n $walmartHelper = new Walmartapi('899c9675-6302-43f2-9420-e8f55b176671', 'MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJf0uSx+vD19j4ROQnXj+3nSnwIsSnoRB5VAhDuaiLLDWKQvFbwWB4cAaZNX9fgdyT5KEuiW5QpXNV6ui8B6Ex/lgdlaXaaANnEd8FPjcct4WuGM3JaurUyQj24b7S1eCAPwoJqPyJPjpCQ5OYGgGvi4mHFmawq4rOhgsVT9upIdAgMBAAECgYAxGWob7nd0hvWwknj3Dsta+atXUGhgONBycX5IpA43dNdXdb9YHuYfwQpcCbf4i+dSsSya6ubnCHa+OTf+4XL8A4DnQojj3sfXx6B/N8k4eNHZ8wpbDQAceA+gdw2n466iKfW76cdXiL+2DUhS6qNtvaQ72r5/2KBRgidr7NR7AQJBANdXMA7oOjZ0lOPJCQsSn9nzQqYJMSqN1EvpFMlNX63VnUDlj1kV1MbWbo+sN9AZylrtjcg0YcZenI3bHCvF1QkCQQC0pb5u81zqKOCV7leboWp1LUTmMYWJNeO26lT8knhGN42O2W/+qXI5cJbY3USN32xxX4gK/MtKUBuhZ7Ow+M11AkAUkoLH2c296BNVU55mjWfyFXhXjmdBDn2qpuDSfm7Wl6LHUWcJdrl2KYQ0e5p1ahFX8HvsFX0Fy4IfV0BwuhypAkBQbqvHwtvP9rtohmLDjK9V1P4kcFBAs5ncS6Hjg2PB/+IrhGz1OoT9RkAj9wEbGiuynxJ3se7h+6ER0JaVaXIxAkBNi7N5cfePcyPfXS89NpTtByi+Yg4QQthv9RvCM/TH6yLpMWBWprRq6ufAMl4NHrFXWZRsA7wUqMYHj8+vB18I', '7b2c8dab-c79c-4cee-97fb-0ac399e17ade');\n if ($sku) {\n $productdata = $walmartHelper->getRequest('v3/promo/sku/CE-0000-0149');\n }\n print_r($productdata);\n die;\n }" ]
[ "0.64448273", "0.6431264", "0.6355175", "0.634544", "0.63368964", "0.6191591", "0.61596626", "0.61118907", "0.601132", "0.58955747", "0.5889755", "0.5822651", "0.5822322", "0.5814237", "0.577241", "0.57613623", "0.575581", "0.57028836", "0.56668746", "0.5654189", "0.5634546", "0.5628118", "0.5624023", "0.5599734", "0.5562624", "0.5549919", "0.55424076", "0.5537596", "0.55228215", "0.5509363", "0.5505725", "0.5503438", "0.5502669", "0.5477873", "0.5432858", "0.5432841", "0.54309386", "0.54184586", "0.54136264", "0.54008967", "0.5397883", "0.539553", "0.5395249", "0.5390722", "0.5377255", "0.53681713", "0.53659165", "0.5365428", "0.5365048", "0.535784", "0.5357417", "0.5354233", "0.53480625", "0.53458196", "0.53447795", "0.53381157", "0.53297895", "0.53242314", "0.5318895", "0.5315289", "0.5306425", "0.5306273", "0.53037345", "0.52976656", "0.52953154", "0.5294867", "0.52897555", "0.5288153", "0.5286339", "0.52854854", "0.527995", "0.52739257", "0.52713734", "0.5270404", "0.5264904", "0.52622193", "0.52599025", "0.52584964", "0.52580947", "0.5254491", "0.5250427", "0.5250358", "0.5250148", "0.5249922", "0.5249337", "0.52485144", "0.5243596", "0.5242822", "0.52424914", "0.52293736", "0.5214226", "0.52122873", "0.5209771", "0.5209523", "0.5207043", "0.5204881", "0.5204823", "0.5204145", "0.519172", "0.51869386", "0.51758385" ]
0.0
-1
Attempt to obtain a server mutex for the given crontab.
public function attempt(Crontab $crontab): bool { if ($this->macAddress === null) { return false; } $redis = $this->redisFactory->get($crontab->getMutexPool()); $mutexName = $this->getMutexName($crontab); $result = $redis->set($mutexName, $this->macAddress, ['NX', 'EX' => $crontab->getMutexExpires()]); if ($result) { Coroutine::create(function () use ($crontab, $redis, $mutexName) { $exited = CoordinatorManager::until(Constants::WORKER_EXIT)->yield($crontab->getMutexExpires()); $exited && $redis->del($mutexName); }); return true; } return $redis->get($mutexName) === $this->macAddress; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _get_cron_lock()\n {\n }", "public function get(Crontab $crontab): string\n {\n return (string) $this->redisFactory->get($crontab->getMutexPool())->get(\n $this->getMutexName($crontab)\n );\n }", "public function getCronJobLock()\r\n {\r\n return $this->_loadClass('lockFile', true, array(GEMS_ROOT_DIR . '/var/settings/cron_lock.txt'));\r\n }", "public function getCronJobLock()\n {\n return $this->getLockFile('cron_lock.txt');\n }", "function _get_cron_lock() {\n\tglobal $wpdb;\n\n\t$value = 0;\n\tif ( wp_using_ext_object_cache() ) {\n\t\t/*\n\t\t * Skip local cache and force re-fetch of doing_cron transient\n\t\t * in case another process updated the cache.\n\t\t */\n\t\t$value = wp_cache_get( 'doing_cron', 'transient', true );\n\t} else {\n\t\t$row = $wpdb->get_row( $wpdb->prepare( \"SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1\", '_transient_doing_cron' ) );\n\t\tif ( is_object( $row ) )\n\t\t\t$value = $row->option_value;\n\t}\n\n\treturn $value;\n}", "protected function getMutex(Bucket $bucket)\n {\n $semName = $this->getMutexKey($bucket);\n return new SemaphoreMutex(sem_get(ftok(__FILE__, $semName)));\n }", "public function getCron() {\n\t\t$cron = [\"raw\" => \"\", \"active\" => false, \"mm\" => \"\", \"hh\" => \"\", \"dd\" => \"\", \"name\" => \"\"];\n\t\t$output = shell_exec('crontab -l');\n\t\t$lines = explode(\"\\n\", trim($output));\n\t\tif (count($lines) > 3) { // check cron is not empty - First 3 lines are not cron entry but used to reload crontrab at reboot\n\t\t\t$return['Status'] = \"OK\";\n\t\t\twhile ($lines[0] != \"#BEGIN\") { array_shift($lines); } //Remove non cron lines\n\t\t\tarray_shift($lines);\n\t\t\tforeach ($lines as $entry) {\n\t\t\t\t$str = explode(\"/usr\", $entry);\n\t\t\t\t$cron[\"raw\"] = rtrim($str[0]);\n\t\t\t\tif ($cron[\"raw\"][0] == \"#\") {\n\t\t\t\t\t$cron[\"active\"] = false;\n\t\t\t\t\t$sched = substr($cron[\"raw\"],1);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$cron[\"active\"] = true;\n\t\t\t\t\t$sched = $cron[\"raw\"];\n\t\t\t\t}\n\t\t\t\t$sched = explode(\" \",$sched);\n\t\t\t\t$cron[\"mm\"] = $sched[0];\n\t\t\t\t$cron[\"hh\"] = $sched[1];\n\t\t\t\t$cron[\"dd\"] = $sched[4];\n\t\t\t\t$cron[\"name\"] = explode(\"#\",$str[count($str)-1]);\n\t\t\t\t$cron[\"name\"] = $cron[\"name\"][1];\n\t\t\t\t$return['cron'][]=$cron;\n\t\t\t}\n\t\t}\n\t\telse $return['Status'] = \"KO\";\n\t\tif (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2)[1]['function'] == 'invokeMethod') Flight::json($return);\n\t\telse return $return;\n\t}", "public function addcron() {\r\n $os = php_uname('s');\r\n\r\n $file = APP_PATH . '/index.php?c=cron&a=apply';\r\n\r\n\r\n switch ($os) {\r\n case substr($os, 0, 7) == 'Windows':\r\n exec(\"schtasks /create /sc minute /mo 5 /tn 'update_quota' /tr . $file . /ru 'System'\");\r\n break;\r\n\r\n case substr($os, 0, 5) == 'Linux':\r\n switch ($_SERVER['SERVER_PORT']) {\r\n case 80:\r\n $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\r\n break;\r\n\r\n case 443:\r\n $url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\r\n break;\r\n\r\n default:\r\n $url = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];\r\n }\r\n\r\n $cmdline = '*/5 * * * * /usr/bin/curl' . $url;\r\n\r\n exec('crontab -e <' . $cmdline);\r\n break;\r\n }\r\n }", "function install_cron_scheduler() {\n\tglobal $amp_conf;\n\tglobal $nt;\n\n\t// crontab appears to return an error when no entries, os only fail if error returned AND a list of entries.\n\t// Don't know if this will ever happen, but a failure and a list could indicate something wrong.\n\t//\n\t$outlines = array();\n\texec(\"/usr/bin/crontab -l\", $outlines, $ret);\n\tif ($ret && count($outlines)) {\n\t\t$nt->add_error('retrieve_conf', 'CRONMGR', _(\"Failed to check crontab for cron manager\"), sprintf(_(\"crontab returned %s error code when checking for crontab entries to start freepbx-cron-scheduler.php crontab manager\"),$ret));\n\t} else {\n\t\t$nt->delete('retrieve_conf', 'CRONMGR');\n\t\t$outlines2 = preg_grep(\"/freepbx-cron-scheduler.php/\",$outlines);\n\t\t$cnt = count($outlines2);\n\t\tswitch ($cnt) {\n\t\t\tcase 0:\n\t\t\t\t/** grab any other cronjobs that are running as asterisk and NOT associated with backups\n \t\t\t\t* this code was taken from the backup module for the most part. But seems to work...\n \t\t\t\t*/\n\t\t\t\t$outlines = array();\n\t\t\t\texec(\"/usr/bin/crontab -l | grep -v ^#\\ DO\\ NOT | grep -v ^#\\ \\( | grep -v freepbx-cron-scheduler.php\", $outlines, $ret);\n\t\t\t\t$crontab_entry = \"\";\n\t\t\t\tforeach ($outlines as $line) {\n\t\t\t\t\t$crontab_entry .= $line.\"\\n\";\n\t\t\t\t}\n\t\t\t\t// schedule to run hourly, at a random time. The random time is explicit to accomodate things like module_admin online update checking\n\t\t\t\t// since we will want a random access to the server. In the case of module_admin, that will also be scheduled randomly within the hour\n\t\t\t\t// that it is to run\n\t\t\t\t//\n\t\t\t\t$crontab_entry .= rand(0,59).\" * * * * \".$amp_conf['AMPBIN'].\"/freepbx-cron-scheduler.php\";\n\t\t\t\tsystem(\"/bin/echo '$crontab_entry' | /usr/bin/crontab -\");\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t// already running, nothing to do\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// error, there should never be more than one running\n\t\t\t\techo \"TODO: deal with error here\\n\";\n\t\t\t\t$nt->add_error('retrieve_conf', 'CRONMGR', _(\"Multiple freepbx-cron-scheduler.php running\"), sprintf(_(\"There were %s freepbx-cron-scheduler.php instances running. There should be only 1.\"),$cnt));\n\t\t}\n\t}\n}", "public function set_cron_check() {\n\n\t\t/* Nonce check */\n\t\tcheck_ajax_referer( 'wpcd-admin', 'nonce' );\n\n\t\t/* Permision check - unsure that this is needed since the action is not destructive and might cause issues if the user sees the message and can't dismiss it because they're not an admin. */\n\t\tif ( ! wpcd_is_admin() ) {\n\t\t\twp_send_json_error( array( 'msg' => __( 'You are not authorized to perform this action - dismiss cron check.', 'wpcd' ) ) );\n\t\t}\n\n\t\t/* Permissions passed - set transient. */\n\t\tset_transient( 'wpcd_cron_check', 1, 12 * HOUR_IN_SECONDS );\n\t\twp_die();\n\n\t}", "function getCRON($cron_job) {\n\t$result_arr = array();\n\n\t// List all CRON?\n\tif(!$cron_job) {\n\t\t$available_files = scandir('./');\n\n\t\tforeach($available_files as $current_file) {\n\t\t\tif(preg_match('/^cron\\.(.+)\\.php$/', $current_file, $current_matches))\n\t\t\t\tarray_push($result_arr, $current_matches[1]);\n\t\t}\n\t} else {\n\t\tarray_push($result_arr, $cron_job);\n\t}\n\n\treturn $result_arr;\n}", "private function createJob (string $cronTab) : CronJobInterface\n {\n return new class ($cronTab) implements CronJobInterface\n {\n /** @var string */\n private $cronTab;\n\n\n /**\n */\n public function __construct (string $cronTab)\n {\n $this->cronTab = $cronTab;\n }\n\n\n /**\n */\n public function getCronTab () : string\n {\n return $this->cronTab;\n }\n\n\n /**\n */\n public function getName () : string\n {\n return \"My Job\";\n }\n\n\n /**\n */\n public function execute (BufferedSymfonyStyle $io) : CronStatus\n {\n return new CronStatus(true);\n }\n };\n }", "public function acquireSharedLock() {}", "public function getCronLock($name)\n {\n $query = \"SELECT * FROM \".$this->_name.\" WHERE cron_name = '\".$name.\"'\";\n if(($result = $this->getQuery($query,true)) != NULL)\n {\n return $result;\n }\n else\n return \"NO\";\n }", "protected function getCron_LockDbService()\n {\n return $this->services['cron.lock_db'] = new \\phpbb\\lock\\db('cron_lock', ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'});\n }", "public function trylock() {}", "public function getCronk($cronkid) {\n return $this->cronks[$cronkid];\n }", "private function mutex_acquire () {\n $pid = getmypid();\n if ($pid == $this->mutex_acquired)\n return true;\n\n if (sem_acquire($this->mutex))\n $this->daemon->log(\"Mutex Granted\");\n else\n $this->daemon->log(\"Mutex Grant Failed\");\n\n //throw new Exception(\"Cannot acquire mutex: Unknown Error.\");\n\n $this->mutex_acquired = $pid;\n return true;\n }", "public function execute()\n {\n $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);\n\n if (!$this->fetchConfiguration())\n return false;\n\n /** @var LockFactory $lockFactory */\n $lockFactory = GeneralUtility::makeInstance(LockFactory::class);\n $locker = $lockFactory->createLocker('dmail_bouncer', LockingStrategyInterface::LOCK_CAPABILITY_EXCLUSIVE | LockingStrategyInterface::LOCK_CAPABILITY_NOBLOCK);\n\n // Check if cronjob is already running:\n if (!$locker->acquire($locker::LOCK_CAPABILITY_EXCLUSIVE | $locker::LOCK_CAPABILITY_NOBLOCK)) {\n return false;\n }\n\n // create the connection string\n switch (strtoupper($this->type)) {\n case \"IMAP\":\n $this->port = $this->port ?: 143;\n\t\t\t\t// response: Zeichenkette '/novalidate-cert' ergänzt\n $suffix = \"\";\n if ($this->skipCertValidation)\n $suffix .= \"/novalidate-cert\";\n $mb = \"{\" . $this->host . \":\" . $this->port . $suffix . \"}\" . $this->inbox;\n break;\n case \"IMAPS\":\n $this->port = $this->port ?: 993;\n $mb = \"{\" . $this->host . \":\" . $this->port . \"/imap/ssl/novalidate-cert\" . \"}\" . $this->inbox;\n break;\n case \"POP\":\n case \"POP3\":\n $this->port = $this->port ?: 110;\n $mb = \"{\" . $this->host . \":\" . $this->port . \"/pop3\" . \"}\" . $this->inbox;\n break;\n default:\n $mb = $this->type;\n $this->outputLine('TYPO3 wp_directmailreturn Cron: WARNING: Unrecognized protocol type: ' . $this->type);\n break;\n }\n\n $mbox = imap_open($mb, $this->user, $this->password);\n if ($mbox === false) {\n $locker->release();\n $this->outputLine('TYPO3 wp_directmailreturn Cron: ERROR: Cannot open connection! (' . $mb . ' - ' . $this->user . ')');\n return false;\n }\n\n /** @var Readmail $readMail */\n $readMail = GeneralUtility::makeInstance(Readmail::class);\n $mails = imap_sort($mbox, SORTDATE, 0);\n $cnt = 0;\n /** @var DatabaseConnection $db */\n $db = $GLOBALS['TYPO3_DB'];\n foreach ($mails as $mail) {\n $content = imap_fetchheader($mbox, $mail) . imap_body($mbox, $mail);\n if (trim($content)) {\n // Split mail into head and content\n $mailParts = $readMail->extractMailHeader($content);\n // Find id\n $midArr = $readMail->find_XTypo3MID($content);\n if (!is_array($midArr)) {\n $midArr = $readMail->find_MIDfromReturnPath($mailParts['to']);\n }\n // Extract text content\n $c = trim($readMail->getMessage($mailParts));\n\n $cp = $readMail->analyseReturnError($c);\n $where = 'rid=' . (int)$midArr['rid'] . ' AND rtbl=' . $db->fullQuoteStr($midArr['rtbl'], 'sys_dmail_maillog') . ' AND mid=' . (int)$midArr['mid'] . ' AND response_type=0';\n $res = $db->exec_SELECTquery('uid,email', 'sys_dmail_maillog', $where);\n if (!$res || !$db->sql_num_rows($res)) {\n $midArr = array();\n $cp = $mailParts;\n if (!$db->sql_num_rows($res)) {\n $db->sql_free_result($res);\n }\n } else {\n $row = $db->sql_fetch_assoc($res);\n $midArr['email'] = $row['email'];\n $db->sql_free_result($res);\n }\n\n $insertFields = array(\n 'tstamp' => time(),\n 'response_type' => -127,\n 'mid' => intval($midArr['mid']),\n 'rid' => intval($midArr['rid']),\n 'email' => $midArr['email'],\n 'rtbl' => $midArr['rtbl'],\n 'return_content' => serialize($cp),\n 'return_code' => intval($cp['reason']),\n 'url' => ''\n );\n $insResult = $db->exec_INSERTquery('sys_dmail_maillog', $insertFields);\n if (!$insResult) {\n $this->outputLine('sys_dmail_maillog failed, reason: ' . $db->sql_error());\n }\n }\n\n imap_delete($mbox, $mail);\n $cnt++;\n if ($cnt >= $this->amount) {\n break;\n }\n }\n imap_close($mbox, CL_EXPUNGE);\n\n return true;\n }", "protected function _getCronHelper()\n {\n return $this->_cronHelper;\n }", "public function register_cron_worker() {\n\t\t$attempts = add_filter( 'wp_queue_cron_attempts', 3 );\n\t\t$cron = new Cron( $this->worker( $attempts ) );\n\n\t\t$cron->init();\n\t}", "function getMemcachedClient(): \\Memcached\n{\n static $client;\n if (!$client) {\n $client = new \\Memcached();\n $client->addServer('memcached', 11211);\n }\n\n return $client;\n}", "public function testCreateACrontabJobFromCrontabLine($crontabLine, $crontabJob)\n {\n $this->assertEquals($crontabJob, CrontabJob::createFromCrontabLine($crontabLine));\n }", "protected function getCron_ManagerService()\n {\n return $this->services['cron.manager'] = new \\phpbb\\cron\\manager(${($_ = isset($this->services['cron.task_collection']) ? $this->services['cron.task_collection'] : $this->getCron_TaskCollectionService()) && false ?: '_'}, ${($_ = isset($this->services['routing.helper']) ? $this->services['routing.helper'] : $this->getRouting_HelperService()) && false ?: '_'}, './../', 'php');\n }", "function do_cron() {\n global $config;\n ct_log(\"Cron-Job started.\", 2, -1, 'cron');\n \n $btns = churchcore_getModulesSorted(false, false);\n foreach ($btns as $key) {\n include_once (constant(strtoupper($key)) . \"/$key.php\");\n if (function_exists($key . \"_cron\") && getConf($key . \"_name\")) {\n $arr = call_user_func($key . \"_cron\");\n }\n }\n ct_sendPendingNotifications();\n ct_log(\"Cron-Job finished.\", 2, -1, 'cron');\n}", "static function schedule_cron() {\n\t\t$is_multisite = is_multisite();\n\t\tif ( $is_multisite ) {\n\t\t\t$primary_blog = get_current_site();\n\t\t\t$current_blog = get_current_blog_id();\n\t\t} else {\n\t\t\t$primary_blog = 1;\n\t\t\t$current_blog = 1;\n\t\t}\n\n\t\t/**\n\t\t * If we're on a multisite, only schedule the cron if we're on the primary blog\n\t\t */\n\t\tif (\n\t\t( ! $is_multisite || ( $is_multisite && $primary_blog->id === $current_blog ) )\n\t\t) {\n\t\t\t$cronsScheduled = false;\n\t\t\tif( ! wp_next_scheduled( 'wp_rest_cache_cron' ) ) {\n\t\t\t\twp_schedule_event( time(), '5_minutes', 'wp_rest_cache_cron' );\n\t\t\t\t$cronsScheduled = true;\n\t\t\t}\n\t\t\tif( ! wp_next_scheduled( 'wp_rest_cache_expired_cron' ) ) {\n\t\t\t\twp_schedule_event( time(), 'hourly', 'wp_rest_cache_expired_cron' );\n\t\t\t\t$cronsScheduled = true;\n\t\t\t}\n\t\t\tif( $cronsScheduled ) {\n\t\t\t\tdo_action( 'wrc_after_schedule_cron', $primary_blog, $current_blog );\n\t\t\t}\n\t\t}\n\t}", "public function getMaintenanceLock()\r\n {\r\n return $this->_loadClass('lockFile', true, array(GEMS_ROOT_DIR . '/var/settings/lock.txt'));\r\n }", "public function testBasics() {\n\t\t$redis = $this->getConnection();\n\t\t$mutex1 = new ARedisMutex(\"TestMutex2:\".uniqid(),$redis);\n\t\t$mutex2 = new ARedisMutex($mutex1->name,$redis);\n\t\t$mutex1->expiresAfter = 2;\n\t\t$mutex2->expiresAfter = 2;\n\t\t$this->assertTrue($mutex1->lock());\n\t\t$this->assertFalse($mutex2->lock());\n\t\t$this->assertFalse($mutex2->unlock());\n\t\t$this->assertTrue($mutex1->unlock());\n\t\t$this->assertTrue($mutex2->lock());\n\t\tsleep(3);\n\t\t$this->assertTrue($mutex1->lock());\n\t\t$this->assertTrue($mutex1->unlock());\n\t}", "public static function init_sync_cron_jobs() {\n\t\t_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\\Jetpack\\Sync\\Actions' );\n\n\t\treturn Actions::init_sync_cron_jobs();\n\t}", "public function acquireExclusiveLock() {}", "protected function update($crontab)\n\t{\n\t\t// Load existing\n\t\texec('crontab -l', $existing, $status);\n\n\t\t// If non-zero, we're making a fresh one\n\t\tif ($status) {\n\t\t\t$existing = [];\n\t\t}\n\n\t\t// Remove lines with\n\t\t$existing = $this->removeExisting($existing);\n\n\t\t// Flattern, and append ours\n\t\t$new = ltrim(rtrim(implode(\"\\n\", $existing)).\"\\n\".$crontab);\n\n\t\t// Write to the crontab\n\t\t$file = tempnam('/tmp', 'cronsync');\n\t\tFile::put($file, $new);\n\t\texec(\"crontab {$file}\", $output, $status);\n\t\tFile::delete($file);\n\n\t\treturn ($status == 0);\n\t}", "public function getCronCmd() {}", "function set_cron_lock($name, $until, $ignorecurrent=false) {\n if (empty($name)) {\n debugging(\"Tried to get a cron lock for a null fieldname\");\n return false;\n }\n\n // remove lock by force == remove from config table\n if (is_null($until)) {\n set_config($name, null);\n return true;\n }\n\n if (!$ignorecurrent) {\n // read value from db - other processes might have changed it\n $value = get_field('config', 'value', 'name', $name);\n\n if ($value and $value > time()) {\n //lock active\n return false;\n }\n }\n\n set_config($name, $until);\n return true;\n}", "function getLocks();", "static function jobs() {\n\t\tif(self::doCron()):\n\t\t\n\t\twhile(!Db::lock());\n\n\t\tReminder::cron();\n\t\t\n\t\t$ctrl = new Cronjob();\n\t\t$ctrl->checkBookings();\n\t\t$ctrl->cancelPending();\n\t\t$ctrl->unattended();\n\t\t\n\t\twhile(!Db::unlock());\n\t\t\n\t\tPreferences::set('lastCron', date(\"H:i:s\"));\n\t\t_debug(\"CRON JOBS DONE!\");\n\t\tendif;\n\t}", "function CheckCron()\n\t{\n\t\t$cronok = false;\n\t\t$query = \"SELECT * FROM \" . SENDSTUDIO_TABLEPREFIX . \"settings\";\n\t\t$result = $this->Db->Query($query);\n\t\t$row = $this->Db->Fetch($result);\n\t\tif ($row['cronok'] == 1) {\n\t\t\t$cronok = true;\n\t\t}\n\n\t\t$this->cronok = $cronok;\n\t\t$this->cronrun1 = (int)$row['cronrun1'];\n\t\t$this->cronrun2 = (int)$row['cronrun2'];\n\n\t\tif (isset($row['database_version'])) {\n\t\t\t$this->database_version = $row['database_version'];\n\t\t} else {\n\t\t\t$query = \"ALTER TABLE \" . SENDSTUDIO_TABLEPREFIX . \"settings ADD COLUMN database_version INT\";\n\t\t\t$result = $this->Db->Query($query);\n\t\t\tif ($result) {\n\t\t\t\t$query = \"UPDATE \" . SENDSTUDIO_TABLEPREFIX . \"settings SET database_version='0'\";\n\t\t\t\t$result = $this->Db->Query($query);\n\t\t\t}\n\t\t}\n\n\t\t$query = \"SELECT * FROM \" . SENDSTUDIO_TABLEPREFIX . \"settings_cron_schedule\";\n\t\t$result = $this->Db->Query($query);\n\t\twhile ($row = $this->Db->Fetch($result)) {\n\n\t\t\t/**\n\t\t\t * check if the item is in the schedule array.\n\t\t\t * If it's not, then it may be an addon has defined a cron schedule but not cleaned itself up when it has been uninstalled/disabled.\n\t\t\t */\n\t\t\t$schedule_name = $row['jobtype'];\n\t\t\tif (!isset($this->Schedule[$schedule_name])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$this->Schedule[$schedule_name] = array('lastrun' => $row['lastrun']);\n\t\t}\n\n\t\treturn $cronok;\n\t}", "public static function setup_sync_cronjob() {\n\t\tself::$timezone_string = get_option( 'timezone_string' );\n\t\tif ( ! wp_next_scheduled( self::SYNC_CRONJOB_NAME ) ) {\n\t\t\twp_schedule_event( Carbon::parse( '4am', self::$timezone_string )->getTimestamp(), 'daily', self::SYNC_CRONJOB_NAME );\n\t\t}\n\t}", "public function cron($date)\n\t{\n\t\t$ip = $_SERVER['SERVER_ADDR'];\n\n\t\t$name = $_SERVER['SERVER_NAME'];\n\n\t\t$server = Server::where('server_ip', '=', $ip)->first(array('server_id'));\n\n\t\tif (empty($server)) {\n\t\t\t$server = new Server;\n\t\t\t$server->server_name = $name;\n\t\t\t$server->server_ip = $ip;\n\t\t\t$server->server_date = $date;\n\t\t\t$server->save();\n\t\t} else {\n\t\t\t$server = $server->server_id;\n\t\t}\n\t\t\n\t\treturn $server;\n }", "public function get_lock($table_name, $record_id);", "private function instance()\n\t{\n\t\tif (!$this->instance) {\n\t\t\t$this->instance = new \\Memcache();\n\t\t\t\n\t\t\tforeach ($this->servers as $server) {\n\t\t\t\t$this->instance->addServer(\n\t\t\t\t\t$server->host(),\n\t\t\t\t\t$server->port(),\n\t\t\t\t\t$server->isPersistent(),\n\t\t\t\t\t$server->weight(),\n\t\t\t\t\t$server->timeout(),\n\t\t\t\t\t$server->retryInterval()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->instance;\n\t}", "protected static function connect(): Memcached\n {\n if (empty(self::$conn)\n and isset(self::$params[self::P_SERVERS])\n and self::$conn = new Memcached(__METHOD__ . self::$prefix)\n ) {\n // set options\n $options = self::$params[self::P_OPTIONS] ?? [];\n self::$conn->setOptions($options + [\n Memcached::OPT_PREFIX_KEY => self::$prefix . '.',\n ]);\n // login if needed\n if (isset(self::$params[self::P_LOGIN])) {\n self::$conn->setSaslAuthData(self::$params[self::P_LOGIN], self::$params[self::P_PASS]);\n }\n // connect to servers\n if (empty(self::$conn->getServerList())) {\n self::$conn->addServers(self::$params[self::P_SERVERS]);\n }\n }\n\n return self::$conn;\n }", "function cron()\n {\n global $CFG;\n require_once($CFG->dirroot.'/enrol/authorize/authorizenetlib.php');\n\n $oneday = 86400;\n $timenow = time();\n $settlementtime = authorize_getsettletime($timenow);\n $timediff30 = $settlementtime - (30 * $oneday);\n $mconfig = get_config('enrol/authorize');\n\n mtrace(\"Processing authorize cron...\");\n\n if (intval($mconfig->an_dailysettlement) < $settlementtime) {\n set_config('an_dailysettlement', $settlementtime, 'enrol/authorize');\n mtrace(\" daily cron; some cleanups and sending email to admins the count of pending orders expiring\", \": \");\n $this->cron_daily();\n mtrace(\"done\");\n }\n\n mtrace(\" scheduled capture\", \": \");\n if (empty($CFG->an_review) or (!empty($CFG->an_test)) or (intval($CFG->an_capture_day) < 1) or (!check_openssl_loaded())) {\n mtrace(\"disabled\");\n return; // order review disabled or test mode or manual capture or openssl wasn't loaded.\n }\n\n $timediffcnf = $settlementtime - (intval($CFG->an_capture_day) * $oneday);\n $sql = \"SELECT * FROM {$CFG->prefix}enrol_authorize\n WHERE (status = '\" .AN_STATUS_AUTH. \"')\n AND (timecreated < '$timediffcnf')\n AND (timecreated > '$timediff30')\n ORDER BY courseid\";\n\n if (!$orders = get_records_sql($sql)) {\n mtrace(\"no pending orders\");\n return;\n }\n\n $eachconn = intval($mconfig->an_eachconnsecs);\n if (empty($eachconn)) $eachconn = 3;\n elseif ($eachconn > 60) $eachconn = 60;\n\n $ordercount = count((array)$orders);\n if (($ordercount * $eachconn) + intval($mconfig->an_lastcron) > $timenow) {\n mtrace(\"blocked\");\n return;\n }\n set_config('an_lastcron', $timenow, 'enrol/authorize');\n\n mtrace(\" $ordercount orders are being processed now\", \": \");\n\n $faults = '';\n $sendem = array();\n $elapsed = time();\n @set_time_limit(0);\n $this->log = \"AUTHORIZE.NET AUTOCAPTURE CRON: \" . userdate($timenow) . \"\\n\";\n\n $lastcourseid = 0;\n foreach ($orders as $order) {\n $message = '';\n $extra = NULL;\n if (AN_APPROVED == authorize_action($order, $message, $extra, AN_ACTION_PRIOR_AUTH_CAPTURE)) {\n if ($lastcourseid != $order->courseid) {\n $lastcourseid = $order->courseid;\n $course = get_record('course', 'id', $lastcourseid);\n $role = get_default_course_role($course);\n $context = get_context_instance(CONTEXT_COURSE, $lastcourseid);\n }\n $timestart = $timeend = 0;\n if ($course->enrolperiod) {\n $timestart = $timenow;\n $timeend = $order->settletime + $course->enrolperiod;\n }\n $user = get_record('user', 'id', $order->userid);\n if (role_assign($role->id, $user->id, 0, $context->id, $timestart, $timeend, 0, 'authorize')) {\n $this->log .= \"User($user->id) has been enrolled to course($course->id).\\n\";\n if (!empty($CFG->enrol_mailstudents)) {\n $sendem[] = $order->id;\n }\n }\n else {\n $faults .= \"Error while trying to enrol \".fullname($user).\" in '$course->fullname' \\n\";\n foreach ($order as $okey => $ovalue) {\n $faults .= \" $okey = $ovalue\\n\";\n }\n }\n }\n else {\n $this->log .= \"Error, Order# $order->id: \" . $message . \"\\n\";\n }\n }\n\n mtrace(\"processed\");\n\n $timenow = time();\n $elapsed = $timenow - $elapsed;\n $eachconn = ceil($elapsed / $ordercount);\n set_config('an_eachconnsecs', $eachconn, 'enrol/authorize');\n\n $this->log .= \"AUTHORIZE.NET CRON FINISHED: \" . userdate($timenow);\n\n $adminuser = get_admin();\n if (!empty($faults)) {\n email_to_user($adminuser, $adminuser, \"AUTHORIZE.NET CRON FAULTS\", $faults);\n }\n if (!empty($CFG->enrol_mailadmins)) {\n email_to_user($adminuser, $adminuser, \"AUTHORIZE.NET CRON LOG\", $this->log);\n }\n\n // Send emails to students about which courses have enrolled.\n if (!empty($sendem)) {\n mtrace(\" sending welcome messages to students\", \": \");\n send_welcome_messages($sendem);\n mtrace(\"sent\");\n }\n }", "function cera_grimlock_single() {\n\t\tdo_action( 'grimlock_single' );\n\t}", "public function testBlock() {\n\t\t$redis = $this->getConnection();\n\t\t$mutex1 = new ARedisMutex(\"TestMutex2:\".uniqid(),$redis);\n\t\t$mutex2 = new ARedisMutex($mutex1->name,$redis);\n\t\t$mutex1->expiresAfter = 2;\n\t\t$mutex2->expiresAfter = 2;\n\t\t$this->assertTrue($mutex1->lock());\n\t\t$count = 0;\n\t\t$mutex2->onAfterLock = function(CEvent $event) use (&$count) {\n\t\t\t$count++;\n\t\t\t$event->sender->unlock();\n\t\t};\n\t\t$mutex2->block();\n\t\t$this->assertEquals(1, $count);\n\t}", "public function owner()\n {\n return $this->conn->get('lock:' . $this->name);\n }", "public function getCronDefinition()\n {\n return $this->cron_script; \n }", "function getRealm()\n\t\t{\n\t\t\tif (ini_get('safe_mode')) {\n\t\t\t\treturn $this->realm.'-'.getmyuid();\n\t\t\t} else {\n\t\t\t\treturn $this->realm;\n\t\t\t} \n\t\t}", "function ciniki_core_syncCronList($ciniki) {\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery'); \n $strsql = \"SELECT UNIX_TIMESTAMP(UTC_TIMESTAMP()) AS cur_time \";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.customers', 'sync');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $cur_time = $rc['sync']['cur_time'];\n\n //\n // Get the sync information required to send the request\n //\n $strsql = \"SELECT ciniki_tenant_syncs.id, ciniki_tenant_syncs.tnid, \"\n . \"ciniki_tenants.sitename, \"\n . \"(UNIX_TIMESTAMP(UTC_TIMESTAMP()) - UNIX_TIMESTAMP(ciniki_tenant_syncs.last_sync)) AS incremental_age, \"\n . \"(UNIX_TIMESTAMP(UTC_TIMESTAMP()) - UNIX_TIMESTAMP(ciniki_tenant_syncs.last_partial)) AS partial_age, \"\n . \"(UNIX_TIMESTAMP(UTC_TIMESTAMP()) - UNIX_TIMESTAMP(ciniki_tenant_syncs.last_full)) AS full_age \"\n . \"FROM ciniki_tenant_syncs, ciniki_tenants \"\n . \"WHERE ciniki_tenant_syncs.tnid = ciniki_tenants.id \"\n . \"AND ciniki_tenant_syncs.status = 10 \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashIDQuery');\n $rc = ciniki_core_dbHashIDQuery($ciniki, $strsql, 'ciniki.tenants', 'syncs', 'id');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['syncs']) ) {\n return array('stat'=>'ok', 'syncs'=>array(), 'cur_time'=>$cur_time);\n }\n\n return array('stat'=>'ok', 'syncs'=>$rc['syncs'], 'cur_time'=>$cur_time);\n}", "function build_cron() {\n $inc_job = new \\Cron\\Job\\ShellJob();\n $inc_job->setCommand('php inc.php');\n $inc_job->setSchedule(new \\Cron\\Schedule\\CrontabSchedule('*/2 * * * *'));\n\n $resolver = new \\Cron\\Resolver\\ArrayResolver();\n $resolver->addJob($inc_job);\n\n $cron = new \\Cron\\Cron();\n $cron->setExecutor(new \\Cron\\Executor\\Executor());\n $cron->setResolver($resolver);\n return $cron;\n }", "function return_oneClientByIdModif($mid)\n{\n return getOne($mid, \"bav_client\", \"cli_id_modif\");\n}", "public function getNextCronExecution() {}", "public function action() {\n $this->getSettings();\n if (!date_default_timezone_set($this->timezone)) {\n // invalid timezone\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__,\n sprintf(\"The timezone '%s' is invalid, please check the settings for kitCronjob!\", $this->timezone)));\n // set Europe/Berlin as timezone and continue the job.\n date_default_timezone_set('Europe/Berlin');\n }\n if (!$this->cronjob_active) {\n // the cronjob is not active, so terminate immediate!\n $this->log[self::LOG_STATUS] = self::STATUS_INACTIVE;\n $this->log[self::LOG_MESSAGE] = 'The cronjob is inactive and does not execute any job.';\n $this->writeLog();\n exit('OK');\n }\n if (!$this->checkCronjobKey()) {\n // the cronjob KEY is not set or invalid\n $this->log[self::LOG_STATUS] = self::STATUS_ERROR;\n $this->log[self::LOG_MESSAGE] = 'The cronjob.php was called without the parameter KEY or with a wrong passphrase for the KEY.';\n $this->writeLog();\n exit($this->getError());\n }\n // check the scheduled jobs\n $this->checkScheduledJobs();\n\n if (!$this->cronjob_executed) {\n // nothing to do - still quit\n $this->log[self::LOG_STATUS] = self::STATUS_OK;\n $this->log[self::LOG_MESSAGE] = 'Nothing to do.';\n $this->log[self::CRONJOB_ID] = -1;\n $this->log[self::CRONJOB_NAME] = '';\n $this->writeLog();\n }\n exit('OK');\n }", "protected function getCron_ControllerService()\n {\n return $this->services['cron.controller'] = new \\phpbb\\cron\\controller\\cron();\n }", "function contactmod_cron () {\n return true;\n}", "function start()\n {\n\n // initialize crontab as user www-data\n $crontab = new Engine\\Crontab('www-data');\n\n // show exists tasks as array\n print_r($crontab->crontabs);\n // add cron task\n// $crontab->addCron(0, \"*\", \"*\", \"*\", \"*\", \"ls -al\");\n// $crontab->writeCrontab();\n // delete cron task\n// $crontab->delEntry(0);\n// $crontab->writeCrontab();\n\n $this->tpl->setBlock(\"breadcrumb\",'<a href=\"/crontab\">Crontab example</a>');\n $this->tpl->setBlock('content','');\n }", "function createCrontab()\n\t{\n\t\t$crontabFilePath = '/tmp/crontab.txt';\n\t\t$file = fopen($crontabFilePath, \"w\") or die(\"Unable to open file!\");\n\t\tglobal $mongo,$python_script_path;\n\t\t$db = $mongo->logsearch;\n\t\t$collection = $db->service_config;\n\t\t$cursor = $collection->find();\n\t\tforeach ($cursor as $doc) {\n\t\t\tif( $doc['state'] == 'Running' && $doc['path'] != '' && $doc['crontab'] != ''){\n\t\t\t\t$txt = '# Index, service:\"'.$doc['service'].'\" system:\"'.$doc['system']\n\t\t\t\t\t\t.'\" node:\"'.$doc['node'].'\" process:\"'.$doc['process'].'\" path:\"'.$doc['path'].'\"'.PHP_EOL;\n\t\t\t\tfwrite($file, $txt); \n\t\t\t\t$txt = $doc['crontab'].' sudo -u logsearch python '\n\t\t\t\t\t\t\t.$python_script_path.'indexScript.py index '.$doc['_id'].PHP_EOL;\n\t\t\t\tfwrite($file, $txt); \n\t\t\t}\n\t\t}\n\t\t//purge data here\n\t\t$keepDataMonth = 3;\n\t\t$txt = '# Purge data at 04:00 everyday, keep data '.$keepDataMonth.' months'.PHP_EOL;\n\t\tfwrite($file, $txt);\n\t\t$txt = '0 4 * * *'.' sudo -u logsearch python '.$python_script_path.'purgeData.py '.$keepDataMonth.' '.PHP_EOL;\n\t\tfwrite($file, $txt); \n\t\tfclose($file);\n\t\t$cmd = \"sudo -u logsearch crontab \".$crontabFilePath;\n\t\texec($cmd);\n\t}", "function lock($db, $id, $table='activity') {\n if ($id<0) return -1; # ignore 'new' entries.\n $q='UPDATE '.$table.' set editlock=datetime(\\'now\\',\\'+5 minutes\\') WHERE editlock < datetime(\\'now\\') AND id='.$id.';';\n if ($db->exec($q) == 1) return -1;\n\n $q='SELECT editlock from '.$table.' WHERE id='.$id.';';\n $res=$db->query($q);\n if (!$res) return 0; # XXX error\n $r=$res->fetch(PDO::FETCH_ASSOC);\n return $r['editlock'];\n }", "public function getScheduledJob($params, $context) {\n\t\treturn \\OMV\\Rpc\\Rpc::call(\"cron\", \"get\", $params, $context);\n\t}", "private function getNextCron($c) {\n\t\t//$c = \"30 07 * * 0\";\n\t\t$c = 'cron '.$c;\n\t\t$c = explode(' ',$c);\n\t\t$d = explode(',',$c[5]);\n\t\tfor ($i=0 ; $i<count($d) ; $i++) { array_splice($d, $i, 1, $d[$i]+1); }\n\t\t$d = implode(',',$d);\n\t\t$c[5] = $d;\t\n\t\t$c = implode(' ',$c);\n\t\tFlight::nextcron()->AddSchedule($c);\n\t\tFlight::nextcron()->RebuildCalendar();\n\t\t$result = Flight::nextcron()->NextTrigger();\n\t\treturn $result[\"ts\"];\n\t}", "protected function getCron_Task_Core_TidyCacheService()\n {\n $this->services['cron.task.core.tidy_cache'] = $instance = new \\phpbb\\cron\\task\\core\\tidy_cache(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n\n $instance->set_name('cron.task.core.tidy_cache');\n\n return $instance;\n }", "function lockCacheObject ()\n {\n return copy($this->cacheObjectId, $this->cacheObjectId.'.lock');\n }", "public static function init()\n\t{\n\t\tCronJob::getInstance();\n\t}", "public function addCron() { // cron parameters passed via JSON query string\n\t\t$cron = json_decode(Flight::request()->query['cron'],true);\n\t\t$t = explode(\":\",$cron['t']); //time\n\t\t$i= 0;\n\t\t$str='';\n\t\tforeach ($cron['d'] as $d) { //compose day of Week\n\t\t\tif ($d) $str .= $i.',';\n\t\t\t$i++;\n\t\t};\n\t\t$str = rtrim($str,',');\n\t\t$cronLine = $t[1].' '.$t[0].' * * '.$str.' /usr/bin/curl localhost/radion >/dev/null 2>&1 #'.$cron['c'].PHP_EOL;\n\t\tfile_put_contents(Flight::get(\"pathCron\"), $cronLine, FILE_APPEND | LOCK_EX);\n\t\texec(\"cat \".Flight::get(\"pathCron\").\" | crontab -\");\n\t\tFlight::json(array('Status' => 'OK','Cron' => $t[1].' '.$t[0].' * * '.$str.' #'.$cron['c']));\n\t}", "public function stateCron($cron,$cronState) {\n\t\t$cronState = strtolower($cronState);\n\t\t$output = shell_exec('crontab -l');\n\t\t$lines = explode(\"\\n\", trim($output));\n\t\tif (count($lines) > 3+$cron) {\n\t\t\t$x='';\n\t\t\twhile ($lines[0] != \"#BEGIN\") {\n\t\t\t\t$x .=$lines[0].PHP_EOL; //copy first header lines of cron file\n\t\t\t\tarray_shift($lines);\n\t\t\t}\n\t\t\t$x .=$lines[0].PHP_EOL; //copy first header lines of cron file\n\t\t\tarray_shift($lines);\n\t\t\t$i=0;\n\t\t\tforeach ($lines as $line) {\n\t\t\t\tif ($i == $cron) {\n\t\t\t\t\tif ((substr($line,0,1) == '#' && $cronState == 'off') || (substr($line,0,1) != '#' && $cronState == 'on')) {} // do nothing, cron line is OK\n\t\t\t\t\telseif ((substr($line,0,1) == '#' && $cronState == 'on')) $x .=substr($line,1).PHP_EOL; // uncomment cron line\n\t\t\t\t\telseif ((substr($line,0,1) != '#' && $cronState == 'off')) $x .= '#'.$line.PHP_EOL; //comment cron line\n\t\t\t\t}\n\t\t\t\telse $x .=$line.PHP_EOL;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tfile_put_contents(Flight::get(\"pathCron\"), $x);\n\t\t\texec(\"cat \".Flight::get(\"pathCron\").\" | crontab -\");\n\t\t\tFlight::json(array('Status' => 'OK','Cron' => $cron,'State'=> $cronState));\n\t\t}\n\t\telse Flight::json(array('Status' => 'KO','Cron' => $cron . ' Not Found'));\n\t}", "public function getMaintenanceLock()\n {\n return $this->getLockFile('lock.txt');\n }", "public function wrapConnection()\n {\n return new MemcachedCachePool($this->getDb());\n }", "public function getLockToDomain() {}", "public function getLockToDomain() {}", "public function getLockToDomain() {}", "function schedule_backup_cron() {\n\n global $CFG;\n \n $status = true;\n\n $emailpending = false;\n\n //Check for required functions...\n if(!function_exists('utf8_encode')) {\n mtrace(\" ERROR: You need to add XML support to your PHP installation!\");\n return true;\n }\n\n //Get now\n $now = time();\n\n //First of all, we have to see if the scheduled is active and detect\n //that there isn't another cron running\n mtrace(\" Checking backup status\",'...');\n $backup_config = backup_get_config();\n if(!isset($backup_config->backup_sche_active) || !$backup_config->backup_sche_active) {\n mtrace(\"INACTIVE\");\n return true;\n } else if (isset($backup_config->backup_sche_running) && $backup_config->backup_sche_running) {\n mtrace(\"RUNNING\");\n //Now check if it's a really running task or something very old looking \n //for info in backup_logs to unlock status as necessary\n $timetosee = 1800; //Half an hour looking for activity\n $timeafter = time() - $timetosee;\n $numofrec = count_records_select (\"backup_log\",\"time > $timeafter\");\n if (!$numofrec) {\n $timetoseemin = $timetosee/60;\n mtrace(\" No activity in last \".$timetoseemin.\" minutes. Unlocking status\");\n } else {\n mtrace(\" Scheduled backup seems to be running. Execution delayed\");\n return true;\n }\n } else {\n mtrace(\"OK\");\n //Mark backup_sche_running\n backup_set_config(\"backup_sche_running\",\"1\");\n }\n\n //Now we get the main admin user (we'll use his timezone, mail...)\n mtrace(\" Getting admin info\");\n $admin = get_admin();\n if (!$admin) {\n $status = false;\n }\n\n //Delete old_entries from backup tables\n if ($status) {\n mtrace(\" Deleting old data\");\n $status = backup_delete_old_data();\n }\n\n //Now we get a list of courses in the server\n if ($status) {\n mtrace(\" Checking courses\");\n //First of all, we delete everything from backup tables related to deleted courses\n mtrace(\" Skipping deleted courses\");\n $skipped = 0;\n if ($bckcourses = get_records('backup_courses')) {\n foreach($bckcourses as $bckcourse) {\n //Search if it exists\n if (!$exists = get_record('course', 'id', \"$bckcourse->courseid\")) {\n //Doesn't exist, so delete from backup tables\n delete_records('backup_courses', 'courseid', \"$bckcourse->courseid\");\n delete_records('backup_log', 'courseid', \"$bckcourse->courseid\");\n $skipped++;\n }\n }\n }\n mtrace(\" $skipped courses\");\n //Now process existing courses\n $courses = get_records(\"course\");\n //For each course, we check (insert, update) the backup_course table\n //with needed data\n foreach ($courses as $course) {\n if ($status) {\n mtrace(\" $course->fullname\");\n //We check if the course exists in backup_course\n $backup_course = get_record(\"backup_courses\",\"courseid\",$course->id);\n //If it doesn't exist, create\n if (!$backup_course) {\n $temp_backup_course->courseid = $course->id;\n $newid = insert_record(\"backup_courses\",$temp_backup_course);\n //And get it from db\n $backup_course = get_record(\"backup_courses\",\"id\",$newid);\n }\n //If it doesn't exist now, error\n if (!$backup_course) {\n mtrace(\" ERROR (in backup_courses detection)\");\n $status = false;\n continue;\n }\n // Skip backup of unavailable courses that have remained unmodified in a month\n $skipped = false;\n if (!$course->visible && ($now - $course->timemodified) > 31*24*60*60) { //Hidden + unmodified last month\n mtrace(\" SKIPPING - hidden+unmodified\");\n set_field(\"backup_courses\",\"laststatus\",\"3\",\"courseid\",$backup_course->courseid);\n $skipped = true;\n } \n //Now we backup every non skipped course with nextstarttime < now\n if (!$skipped && $backup_course->nextstarttime > 0 && $backup_course->nextstarttime < $now) {\n //We have to send a email because we have included at least one backup\n $emailpending = true;\n //Only make the backup if laststatus isn't 2-UNFINISHED (uncontrolled error)\n if ($backup_course->laststatus != 2) {\n //Set laststarttime\n $starttime = time();\n set_field(\"backup_courses\",\"laststarttime\",$starttime,\"courseid\",$backup_course->courseid);\n //Set course status to unfinished, the process will reset it\n set_field(\"backup_courses\",\"laststatus\",\"2\",\"courseid\",$backup_course->courseid);\n //Launch backup\n $course_status = schedule_backup_launch_backup($course,$starttime);\n //Set lastendtime\n set_field(\"backup_courses\",\"lastendtime\",time(),\"courseid\",$backup_course->courseid);\n //Set laststatus\n if ($course_status) {\n set_field(\"backup_courses\",\"laststatus\",\"1\",\"courseid\",$backup_course->courseid);\n } else {\n set_field(\"backup_courses\",\"laststatus\",\"0\",\"courseid\",$backup_course->courseid);\n }\n }\n }\n\n //Now, calculate next execution of the course\n $nextstarttime = schedule_backup_next_execution ($backup_course,$backup_config,$now,$admin->timezone);\n //Save it to db\n set_field(\"backup_courses\",\"nextstarttime\",$nextstarttime,\"courseid\",$backup_course->courseid);\n //Print it to screen as necessary\n $showtime = \"undefined\";\n if ($nextstarttime > 0) {\n $showtime = userdate($nextstarttime,\"\",$admin->timezone);\n }\n mtrace(\" Next execution: $showtime\");\n }\n }\n }\n\n //Delete old logs\n if (!empty($CFG->loglifetime)) {\n mtrace(\" Deleting old logs\");\n $loglifetime = $now - ($CFG->loglifetime * 86400);\n delete_records_select(\"backup_log\", \"laststarttime < '$loglifetime'\");\n }\n\n //Send email to admin if necessary\n if ($emailpending) {\n mtrace(\" Sending email to admin\");\n $message = \"\";\n\n //Get info about the status of courses\n $count_all = count_records('backup_courses');\n $count_ok = count_records('backup_courses','laststatus','1');\n $count_error = count_records('backup_courses','laststatus','0');\n $count_unfinished = count_records('backup_courses','laststatus','2');\n $count_skipped = count_records('backup_courses','laststatus','3');\n\n //Build the message text\n //Summary\n $message .= get_string('summary').\"\\n\";\n $message .= \"==================================================\\n\";\n $message .= \" \".get_string('courses').\": \".$count_all.\"\\n\";\n $message .= \" \".get_string('ok').\": \".$count_ok.\"\\n\";\n $message .= \" \".get_string('skipped').\": \".$count_skipped.\"\\n\";\n $message .= \" \".get_string('error').\": \".$count_error.\"\\n\";\n $message .= \" \".get_string('unfinished').\": \".$count_unfinished.\"\\n\\n\";\n\n //Reference\n if ($count_error != 0 || $count_unfinished != 0) {\n $message .= \" \".get_string('backupfailed').\"\\n\\n\";\n $dest_url = \"$CFG->wwwroot/$CFG->admin/report/backups/index.php\";\n $message .= \" \".get_string('backuptakealook','',$dest_url).\"\\n\\n\";\n //Set message priority\n $admin->priority = 1;\n //Reset unfinished to error\n set_field('backup_courses','laststatus','0','laststatus','2');\n } else {\n $message .= \" \".get_string('backupfinished').\"\\n\";\n }\n\n //Build the message subject\n $site = get_site();\n $prefix = $site->shortname.\": \";\n if ($count_error != 0 || $count_unfinished != 0) {\n $prefix .= \"[\".strtoupper(get_string('error')).\"] \";\n }\n $subject = $prefix.get_string(\"scheduledbackupstatus\");\n\n //Send the message\n email_to_user($admin,$admin,$subject,$message);\n }\n \n\n //Everything is finished stop backup_sche_running\n backup_set_config(\"backup_sche_running\",\"0\");\n\n return $status;\n}", "public function setScheduledJob($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t// Validate the parameters of the RPC service method.\n\t\t$this->validateMethodParams($params, \"rpc.powermgmt.setscheduledjob\");\n\t\t// Set missing configuration object fields.\n\t\t$params['username'] = \"root\";\n\t\t$params['sendemail'] = FALSE;\n\t\tswitch ($params['type']) {\n\t\tcase \"reboot\":\n\t\t\t$params['command'] = \"systemctl reboot\";\n\t\t\tbreak;\n\t\tcase \"shutdown\":\n\t\t\t$params['command'] = \"systemctl poweroff\";\n\t\t\tbreak;\n\t\tcase \"standby\":\n\t\t $pm = new \\OMV\\System\\PowerManagement();\n\t\t if (TRUE === $pm->isStateSupported(\n\t\t \\OMV\\System\\PowerManagement::STATE_SUSPENDHYBRID))\n\t\t $params['command'] = \"systemctl hybrid-sleep\";\n else if (TRUE === $pm->isStateSupported(\n \\OMV\\System\\PowerManagement::STATE_HIBERNATE))\n $params['command'] = \"systemctl hibernate\";\n else if (TRUE === $pm->isStateSupported(\n \\OMV\\System\\PowerManagement::STATE_SUSPEND))\n $params['command'] = \"systemctl suspend\";\n else\n $params['command'] = \"systemctl poweroff\";\n\t\t\tbreak;\n\t\t}\n\t\treturn \\OMV\\Rpc\\Rpc::call(\"cron\", \"set\", $params, $context);\n\t}", "public static function entry(): ChronosInterface\n {\n $timestamp = defined('ENTRY_TIME') ? ENTRY_TIME : time();\n\n return new Chronos('@' . intval($timestamp));\n }", "function cron_import_project($params) {\n\n // Make sure that imports do not run in parallel,\n // so that the server is not overloaded.\n if (!lock_acquire('import_project', 3000)) {\n // If we cannot get the lock, just stop the execution, do not return,\n // because after the callback function returns, the cron_queue will\n // remove the item from the queue, no matter whether it is processed or not.\n exit();\n }\n\n // Allow the import script to run until completion.\n set_time_limit(0);\n\n // Get the parameters.\n $account = user_load($params->uid);\n $file = file_load($params->fid);\n $origin = $params->origin;\n $project = $params->project;\n\n // Check that the file exists.\n if (!file_exists($file->uri)) {\n lock_release('import_project');\n return;\n }\n\n // Create a temporary directory.\n $tmpdir = '/tmp/' . sha1_file($file->uri);\n mkdir($tmpdir, 0700);\n\n // Copy the file there and extract it.\n file_unmanaged_copy($file->uri, $tmpdir);\n exec(\"cd $tmpdir ; dtrx -q -n -f $file->filename 2>/dev/null\");\n\n // Create the project.\n btr::project_add($origin, $project, \"$tmpdir/pot/\", $account->uid);\n $output = btr::messages_cat(btr::messages());\n\n // Import the PO files for each language.\n $langs = btr::languages_get();\n $dir_list = glob(\"$tmpdir/*\", GLOB_ONLYDIR);\n foreach ($dir_list as $dir) {\n $lng = basename($dir);\n if ($lng == 'pot') continue;\n if (!in_array($lng, $langs)) continue;\n\n // Import PO file and translations.\n btr::project_import($origin, $project, $lng, \"$tmpdir/$lng/\", $account->uid);\n $output .= btr::messages_cat(btr::messages());\n }\n\n\n // Get the url of the client site.\n module_load_include('inc', 'btrCore', 'includes/sites');\n $client_url = btr::utils_get_client_url($lng);\n\n // Notify the user that the project import is done.\n $params = array(\n 'type' => 'notify-that-project-import-is-done',\n 'uid' => $account->uid,\n 'username' => $account->name,\n 'recipient' => $account->name .' <' . $account->mail . '>',\n 'project' => $origin . '/' . $project,\n 'url' => \"$client_url/btr/project/$origin/$project/$lng/dashboard\",\n 'output' => $output,\n );\n btr::queue('notifications', array($params));\n\n // Cleanup, remove the temp dir and delete the file.\n exec(\"rm -rf $tmpdir/\");\n file_delete($file, TRUE);\n\n // This import is done, allow any other imports to run.\n lock_release('import_project');\n}", "private function getCron(): CronExpression\n {\n return CronExpression::factory($this->expression);\n }", "function view_check_cron() {\n\t}", "public function createCronEntry($cron_comment, $cron_datetime, $cron_cmd)\r\n {\r\n exec('crontab -l', $cron_contents_raw);\r\n $cron_contents = implode(PHP_EOL, $cron_contents_raw);\r\n\r\n if (!empty($cron_contents))\r\n {\r\n file_put_contents('/tmp/crontab', $cron_contents.PHP_EOL.$cron_comment.PHP_EOL.$cron_datetime.\" \".$cron_cmd.PHP_EOL);\r\n exec('crontab /tmp/crontab', $o, $exit_code);\r\n\r\n return $exit_code;\r\n }\r\n else\r\n {\r\n file_put_contents('/tmp/crontab', $cron_comment.PHP_EOL.$cron_datetime.\" \".$cron_cmd.PHP_EOL);\r\n exec('crontab /tmp/crontab', $o, $exit_code);\r\n\r\n return $exit_code;\r\n }\r\n return $exit_code;\r\n }", "function spawn_cron($gmt_time = 0)\n {\n }", "public function getThreadId();", "public function getThreadId();", "public function lockJob() {\n \t\t//structure id,jobId,serverId (job id is unique entry)\n\n \t}", "public function lock() {}", "private static function create( $name, $expires_at ) {\n\t\tglobal $wpdb;\n\n\t\t$r = $wpdb->query( $wpdb->prepare(\n\t\t\t\"INSERT IGNORE INTO `{$wpdb->base_prefix}itsec_mutexes` (`mutex_name`, `mutex_expires`) VALUES (%s, %s) /* LOCK */\",\n\t\t\t$name,\n\t\t\t$expires_at\n\t\t) );\n\n\t\tif ( ! $r || ! $wpdb->insert_id ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn (int) $wpdb->insert_id;\n\t}", "public function wpda_add_cron_job() {\n\t\t\tif ( ! isset( $_REQUEST['backupid'] ) ) {\n\t\t\t\t$this->show_wp_cron();\n\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t[\n\t\t\t\t\t\t'message_text' => __( 'Mandatory item \"backupid\" not found', 'wp-data-access' ),\n\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t$msg->box();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$backupid = sanitize_text_field( wp_unslash( $_REQUEST['backupid'] ) ); // input var okay.\n\t\t\tif ( ! isset( $_REQUEST['interval'] ) ) {\n\t\t\t\t$this->show_wp_cron();\n\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t[\n\t\t\t\t\t\t'message_text' => __( 'Mandatory item \"interval\" not found', 'wp-data-access' ),\n\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t$msg->box();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$interval = sanitize_text_field( wp_unslash( $_REQUEST['interval'] ) ); // input var okay.\n\t\t\tif ( ! isset( $_REQUEST['keep'] ) ) {\n\t\t\t\t$this->show_wp_cron();\n\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t[\n\t\t\t\t\t\t'message_text' => __( 'Mandatory item \"keep\" not found', 'wp-data-access' ),\n\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t$msg->box();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$keep = sanitize_text_field( wp_unslash( $_REQUEST['keep'] ) ); // input var okay.\n\t\t\tif ( ! isset( $_REQUEST['device'] ) ) {\n\t\t\t\t$this->show_wp_cron();\n\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t[\n\t\t\t\t\t\t'message_text' => __( 'Mandatory item \"device\" not found', 'wp-data-access' ),\n\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t$msg->box();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$device = sanitize_text_field( wp_unslash( $_REQUEST['device'] ) ); // input var okay.\n\t\t\tif ( ! isset( $_REQUEST['wpda_table_name_export'] ) ) {\n\t\t\t\t$this->show_wp_cron();\n\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t[\n\t\t\t\t\t\t'message_text' => __( 'No tables defined to backup', 'wp-data-access' ),\n\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t$msg->box();\n\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t$request_tables = [];\n\t\t\t\tforeach ( $_REQUEST['wpda_table_name_export'] as $table ) {\n\t\t\t\t\tarray_push( $request_tables, $table );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( isset( $_REQUEST['schema_name'] ) ) {\n\t\t\t\t$schema_name = sanitize_text_field( wp_unslash( $_REQUEST['schema_name'] ) ); // input var okay.\n\t\t\t} else {\n\t\t\t\t$schema_name = '';\n\t\t\t}\n\t\t\tif ( 'runonce' === $interval ) {\n\t\t\t\t// Run data backup once. Do not create job.\n\t\t\t\t$data_backups = get_option( 'wpda_data_backup_option_runonce' );\n\t\t\t\tif ( ! $data_backups ) {\n\t\t\t\t\t$data_backups = [];\n\t\t\t\t}\n\t\t\t\t$data_backup = [\n\t\t\t\t\t'id' => self::PREFIX_RUNONCE . $backupid,\n\t\t\t\t\t'device' => $device,\n\t\t\t\t\t'keep' => $keep,\n\t\t\t\t\t'schema_name' => $schema_name,\n\t\t\t\t\t'tables' => $request_tables,\n\t\t\t\t];\n\t\t\t\tarray_push( $data_backups, $data_backup );\n\t\t\t\tif ( ! update_option( 'wpda_data_backup_option_runonce', $data_backups ) ) {\n\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'message_text' => __( 'Could not create data backup', 'wp-data-access' ),\n\t\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t\t]\n\t\t\t\t\t);\n\t\t\t\t\t$msg->box();\n\t\t\t\t} else {\n\t\t\t\t\tif ( ! wp_schedule_single_event(\n\t\t\t\t\t\tcurrent_time( 'timestamp' ),\n\t\t\t\t\t\t'wpda_data_backup',\n\t\t\t\t\t\t[ self::PREFIX_RUNONCE . $backupid ]\n\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'message_text' => __( 'Backup failed', 'wp-data-access' ),\n\t\t\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$msg->box();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<div class=\"wrap\">\n\t\t\t\t\t<h1 class=\"wp-heading-inline\">\n\t\t\t\t\t\t<span><?php echo __( 'Data Backup' ); ?></span>\n\t\t\t\t\t\t<a href=\"https://wpdataaccess.com/docs/documentation/data-explorer/data-backup/\" target=\"_blank\" title=\"Plugin Help - open a new tab or window\">\n\t\t\t\t\t\t\t<span class=\"dashicons dashicons-editor-help\"\n\t\t\t\t\t\t\t\t style=\"text-decoration:none;vertical-align:top;font-size:30px;\">\n\t\t\t\t\t\t\t</span></a>\n\t\t\t\t\t</h1>\n\t\t\t\t\t<p><?php echo __( 'Data backup started. Please check backup location.' ); ?></p>\n\t\t\t\t\t<p><a href=\"?page=wpda&page_action=wpda_backup\" class=\"button\"><?php echo __( 'Back to main page' ); ?></a></p>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t} else {\n\t\t\t\t// Create job for data backup.\n\t\t\t\t$data_backups = get_option( 'wpda_data_backup_option' );\n\t\t\t\tif ( ! $data_backups ) {\n\t\t\t\t\t$data_backups = [];\n\t\t\t\t} else {\n\t\t\t\t\tforeach ( $data_backups as $data_backup ) {\n\t\t\t\t\t\tif ( $data_backup['id'] === $backupid ) {\n\t\t\t\t\t\t\t$this->show_wp_cron();\n\t\t\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'message_text' => __( 'Backup id already exists', 'wp-data-access' ),\n\t\t\t\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t\t\t\t'message_is_dismissible' => false,\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$msg->box();\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$data_backup = [\n\t\t\t\t\t'id' => $backupid,\n\t\t\t\t\t'device' => $device,\n\t\t\t\t\t'keep' => $keep,\n\t\t\t\t\t'schema_name' => $schema_name,\n\t\t\t\t\t'tables' => $request_tables,\n\t\t\t\t];\n\t\t\t\tarray_push( $data_backups, $data_backup );\n\t\t\t\tif ( ! update_option( 'wpda_data_backup_option', $data_backups ) ) {\n\t\t\t\t\t$this->show_wp_cron();\n\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'message_text' => __( 'Could not save data backup options', 'wp-data-access' ),\n\t\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t\t]\n\t\t\t\t\t);\n\t\t\t\t\t$msg->box();\n\t\t\t\t} else {\n\t\t\t\t\t// Flush option to database???\n\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t$wpdb->flush();\n\t\t\t\t\twp_cache_flush();\n\t\t\t\t\tif ( ! wp_next_scheduled( 'wpda_data_backup', [ $backupid ] ) ) {\n\t\t\t\t\t\twp_schedule_event( current_time( 'timestamp' ), $interval, 'wpda_data_backup', [ $backupid ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->show_wp_cron();\n\t\t\t}\n\t\t}", "function simulateCron() {\n\t\tglobal $publishthis;\n\n\t\t// Return here is we want to pause polling.\n\t\tif ( $publishthis->get_option ( 'pause_polling' ) ) {\n\t\t\tif ( ! get_option ( 'publishthis_paused_on' ) ) {\n\t\t\t\tupdate_option ( 'publishthis_paused_on', time() );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tignore_user_abort( true );\n\n\t\t//modifying the logic here a bit and going with options, instead of\n\t\t//transients, because those were sometimes disappearing from\n\t\t//the wp cache. don't want to disrupt the clients site\n\n\t\t//basic algorithm\n\t\t/*\n 1 - see if we are doing the cron all ready, if so, don't do anything\n 2 - if not doing cron, get the last timestamp of when we did this cron\n -- we only want to check every XX minutes\n 3 - if no time is set yet, we do the check\n 4 - if the time is set, and we have not yet passed our XX minutes, we do not do anything\n 5 - if we are doing the check, update that we are doing the cron\n 6 - do the cron action\n 7 - once completed, set\n - the timestamp we completed at, for future checks\n - remove the doing cron value\n */\n\t\t$doingSimulatedCron = get_option ( 'pt_simulated_cron' );\n\n\t\t//create lock flag if not exists and set it to 0 (false)\n\t\tif ( false === $doingSimulatedCron ) {\n\t\t\tupdate_option( \"pt_simulated_cron\", 0 );\n\t\t}\n\t\t$doingSimulatedCron = intval($doingSimulatedCron);\n\t\t//cron is not running\n\t\tif ( 0 === $doingSimulatedCron ) {\n\t\t\t//check the time\n\t\t\t$secondsExpiration = 60 * 2; //roughly 2 minutes. should be based on publishing action set poll times, but that would be too much to query;\n\n\t\t\t$timestamp = get_option ( 'pt_simulated_cron_ts' );\n\n\t\t\t$currentTimestamp = ( time() ) * 1000;\n\n\t\t\tif ( !$timestamp ) {\n\t\t\t\t//this has never been set before, so, we can just assume we need to do the cron\n\t\t\t\t$timestamp = $currentTimestamp;\n\t\t\t\t\n\t\t\t\t//set the timestamp the first time\n\t\t\t\tupdate_option( \"pt_simulated_cron_ts\", $timestamp );\n\t\t\t}\n\t\t\t//see if we need to do the cron\n\t\t\t$diffTimestamp = $currentTimestamp - $timestamp;\n\t\t\t\n\t\t\t$diffTimeSeconds = ( $diffTimestamp / 1000 );\n\t\n\t\t\tif ( $diffTimeSeconds >= $secondsExpiration ) {\n\t\t\t\t//ok, we need to do the cron action\n\t\t\t\tupdate_option( \"pt_simulated_cron\", 1 );\n\n\t\t\t\ttry {\n\t\t\t\t\t//if we are here, that means we need to do the cron action\n\t\t\t\t\t//get only active Publishing Actions\n\t\t\t\t\t$actions = $publishthis->publish->get_publishing_actions();\n\n\t\t\t\t\t$publishthis->log->addWithLevel ( array(\n\t\t\t\t\t\t\t'message' => 'Checking on simulated cron events',\n\t\t\t\t\t\t\t'status' => 'info',\n\t\t\t\t\t\t\t'details' => \"Found \" . count( $actions ) . \" publishing events to check\" ), \"2\" );\n\t\t\t\t\t\n\t\t\t\t\t// do import\n\t\t\t\t\t$publishthis->publish->run_import();\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t//set simulate cron options on failure\n\t\t\t\t\t//leaving duplicated lines, because php4 doesn't have finally block\n\t\t\t\t\tupdate_option( \"pt_simulated_cron_ts\", $currentTimestamp );\n\t\t\t\t\tupdate_option( \"pt_simulated_cron\", 0 );\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//now that we are done, set the old timestamp\n\t\t\t\tupdate_option( \"pt_simulated_cron_ts\", $currentTimestamp );\n\t\t\t\tupdate_option( \"pt_simulated_cron\", 0 );\n\t\t\t}\t\n\t\t}\t\t\n\t}", "protected function cronjob_exists($command){\n $cronjob_exists=false;\n exec('crontab -l', $crontab,$result);\n if(isset($crontab)&&is_array($crontab)){\n $crontab = array_flip($crontab);\n if(isset($crontab[$command])){\n $cronjob_exists=true;\n }\n }\n return $cronjob_exists;\n }", "protected function _getCron()\n {\n return Mage::getModel('core/config_data')->load(self::CRON_STRING_PATH, 'path');\n }", "function dllc_cron () {\n return true;\n}", "private function get_server()\n {\n }", "private function _acquire_where(array $where = []): self {\n\t\t$update = $this->queryUpdate();\n\t\t$sql = $update->sql();\n\t\t$server = Server::singleton($this->application);\n\t\t$update->setValues([\n\t\t\t'pid' => $this->application->process->id(), 'server' => $server,\n\t\t\t'*locked' => $sql->now(), '*used' => $sql->now(),\n\t\t])->appendWhere([\n\t\t\t'id' => $this->id,\n\t\t] + $where)->execute();\n\t\tif ($this->fetch()->_isMine()) {\n\t\t\tself::$serverLocks = $server->id();\n\t\t\t$this->application->logger->debug(\"Acquired lock $this->code\");\n\t\t\treturn $this;\n\t\t}\n\n\t\tthrow new LockedException(\"Is locked $this->>code\");\n\t}", "function sp() {\n\tglobal $serverpilot_instance;\n\tif ( ! $serverpilot_instance ) {\n\t\ttry {\n\t\t\t$serverpilot_instance = new \\ServerPilot( settings( 'serverpilot' ) );\n\t\t} catch ( \\ServerPilotException $e ) {\n\t\t\tpush_error( new \\WP_error( $e->getCode(), $e->getMessage() ) );\n\t\t}\n\t}\n\treturn $serverpilot_instance;\n}", "protected function checkCronjobKey() {\n return (!isset($_REQUEST['key']) || ($_REQUEST['key'] != $this->cronjob_key)) ? false : true;\n }", "public function get_cron($job_id = false) {\n\t\n\t\t$cron = get_option('cron');\n\t\tif (!is_array($cron)) $cron = array();\n\t\tif (false === $job_id) return $cron;\n\n\t\tforeach ($cron as $time => $job) {\n\t\t\tif (!isset($job['updraft_backup_resume'])) continue;\n\t\t\tforeach ($job['updraft_backup_resume'] as $info) {\n\t\t\t\tif (isset($info['args'][1]) && $job_id == $info['args'][1]) {\n\t\t\t\t\tglobal $updraftplus;\n\t\t\t\t\t$jobdata = $updraftplus->jobdata_getarray($job_id);\n\t\t\t\t\treturn is_array($jobdata) ? array($time, $jobdata) : false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function __construct(SynchronizableInterface $object, $mutex)\n {\n $this->object = $object;\n $this->mutex = $mutex;\n }", "public function syncFromApi($cron) \n { \n \n $syncMode = (string)Mage::getStoreConfig('payment/sagepaysuite/sync_mode');\n \n if($syncMode === 'async') {\n $transactions = Mage::getModel('sagepaysuite2/sagepaysuite_transaction')\n ->getCollection()\n ->getApproved();\n \n $transactions->addFieldToFilter('created_at', array('neq' => '0000-00-00 00:00:00')); \n \n $ts = gmdate(\"Y-m-d H:i:s\");\n $transactions->addFieldToFilter('created_at', array(\"from\" => gmdate(\"Y-m-d H:i:s\", strtotime(\"-1 day\")), \"to\" => $ts));\n \n if($transactions->getSize()) {\n foreach($transactions as $trn) {\n $trn->updateFromApi();\n }\n }\n }\n \n return $this;\n }", "protected function getSemaphore() {}", "private function Get_Server() {\n\t\treturn $this->task->getServer();\n\t\t//return $GLOBALS['server'];\n\t}", "protected function getCron_Task_Core_TidySessionsService()\n {\n $this->services['cron.task.core.tidy_sessions'] = $instance = new \\phpbb\\cron\\task\\core\\tidy_sessions(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n\n $instance->set_name('cron.task.core.tidy_sessions');\n\n return $instance;\n }", "protected function ipLockClause() {}", "public function it_can_get_cron()\n {\n $cron = factory(Cron::class)->create();\n $found = Cron::find($cron->id);\n\n $this->assertInstanceOf(Cron::class, $found);\n $this->assertEquals($found->expression, $cron->expression);\n $this->assertEquals($found->description, $cron->description);\n }", "public static function instance() {\n if( is_null( SysMon::$instance )) SysMon::$instance =\n \tnew SysMon (\n \t\tSYSMON_DEFAULT_HOST,\n\t\t\t\tSYSMON_DEFAULT_USER,\n\t\t\t\tSYSMON_DEFAULT_PASSWORD,\n\t\t\t\tSYSMON_DEFAULT_DATABASE );\n return SysMon::$instance;\n }" ]
[ "0.6025565", "0.5669602", "0.5340621", "0.5103126", "0.49128926", "0.48395944", "0.480818", "0.4793075", "0.4564135", "0.45062625", "0.4466622", "0.44362897", "0.43957627", "0.43902296", "0.43040168", "0.4241874", "0.42184615", "0.41987565", "0.41840068", "0.41741046", "0.41621774", "0.41541737", "0.415099", "0.41202545", "0.4088928", "0.4087509", "0.4087175", "0.40700108", "0.40568078", "0.40537316", "0.4052487", "0.4048616", "0.40166456", "0.40107867", "0.3997695", "0.39976305", "0.39559045", "0.39504287", "0.39450133", "0.39447275", "0.394305", "0.39424694", "0.39311215", "0.39305377", "0.3926288", "0.39260694", "0.39253953", "0.39073122", "0.39014468", "0.3890935", "0.38907135", "0.38901863", "0.38803613", "0.38799253", "0.38722995", "0.38691044", "0.386895", "0.38664007", "0.3864379", "0.38593477", "0.38587087", "0.3855006", "0.3852407", "0.38430738", "0.38427648", "0.3840701", "0.38397548", "0.38397548", "0.38397548", "0.38330227", "0.38234377", "0.38229", "0.38087448", "0.38086817", "0.38057375", "0.3805042", "0.3804446", "0.37993038", "0.37993038", "0.3794015", "0.3793388", "0.37889817", "0.3788873", "0.3784693", "0.37764338", "0.37742946", "0.3754372", "0.37435362", "0.37261823", "0.37255636", "0.3716079", "0.37148738", "0.37056455", "0.37054074", "0.3703885", "0.37014705", "0.37007225", "0.37005192", "0.36993015", "0.3684553" ]
0.57418954
1
Get the server mutex for the given crontab.
public function get(Crontab $crontab): string { return (string) $this->redisFactory->get($crontab->getMutexPool())->get( $this->getMutexName($crontab) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCronJobLock()\n {\n return $this->getLockFile('cron_lock.txt');\n }", "public function getCronJobLock()\r\n {\r\n return $this->_loadClass('lockFile', true, array(GEMS_ROOT_DIR . '/var/settings/cron_lock.txt'));\r\n }", "function _get_cron_lock()\n {\n }", "function _get_cron_lock() {\n\tglobal $wpdb;\n\n\t$value = 0;\n\tif ( wp_using_ext_object_cache() ) {\n\t\t/*\n\t\t * Skip local cache and force re-fetch of doing_cron transient\n\t\t * in case another process updated the cache.\n\t\t */\n\t\t$value = wp_cache_get( 'doing_cron', 'transient', true );\n\t} else {\n\t\t$row = $wpdb->get_row( $wpdb->prepare( \"SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1\", '_transient_doing_cron' ) );\n\t\tif ( is_object( $row ) )\n\t\t\t$value = $row->option_value;\n\t}\n\n\treturn $value;\n}", "public function getCron() {\n\t\t$cron = [\"raw\" => \"\", \"active\" => false, \"mm\" => \"\", \"hh\" => \"\", \"dd\" => \"\", \"name\" => \"\"];\n\t\t$output = shell_exec('crontab -l');\n\t\t$lines = explode(\"\\n\", trim($output));\n\t\tif (count($lines) > 3) { // check cron is not empty - First 3 lines are not cron entry but used to reload crontrab at reboot\n\t\t\t$return['Status'] = \"OK\";\n\t\t\twhile ($lines[0] != \"#BEGIN\") { array_shift($lines); } //Remove non cron lines\n\t\t\tarray_shift($lines);\n\t\t\tforeach ($lines as $entry) {\n\t\t\t\t$str = explode(\"/usr\", $entry);\n\t\t\t\t$cron[\"raw\"] = rtrim($str[0]);\n\t\t\t\tif ($cron[\"raw\"][0] == \"#\") {\n\t\t\t\t\t$cron[\"active\"] = false;\n\t\t\t\t\t$sched = substr($cron[\"raw\"],1);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$cron[\"active\"] = true;\n\t\t\t\t\t$sched = $cron[\"raw\"];\n\t\t\t\t}\n\t\t\t\t$sched = explode(\" \",$sched);\n\t\t\t\t$cron[\"mm\"] = $sched[0];\n\t\t\t\t$cron[\"hh\"] = $sched[1];\n\t\t\t\t$cron[\"dd\"] = $sched[4];\n\t\t\t\t$cron[\"name\"] = explode(\"#\",$str[count($str)-1]);\n\t\t\t\t$cron[\"name\"] = $cron[\"name\"][1];\n\t\t\t\t$return['cron'][]=$cron;\n\t\t\t}\n\t\t}\n\t\telse $return['Status'] = \"KO\";\n\t\tif (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2)[1]['function'] == 'invokeMethod') Flight::json($return);\n\t\telse return $return;\n\t}", "protected function getMutex(Bucket $bucket)\n {\n $semName = $this->getMutexKey($bucket);\n return new SemaphoreMutex(sem_get(ftok(__FILE__, $semName)));\n }", "function getCRON($cron_job) {\n\t$result_arr = array();\n\n\t// List all CRON?\n\tif(!$cron_job) {\n\t\t$available_files = scandir('./');\n\n\t\tforeach($available_files as $current_file) {\n\t\t\tif(preg_match('/^cron\\.(.+)\\.php$/', $current_file, $current_matches))\n\t\t\t\tarray_push($result_arr, $current_matches[1]);\n\t\t}\n\t} else {\n\t\tarray_push($result_arr, $cron_job);\n\t}\n\n\treturn $result_arr;\n}", "public function getCronk($cronkid) {\n return $this->cronks[$cronkid];\n }", "public function owner()\n {\n return $this->conn->get('lock:' . $this->name);\n }", "public function getCronLock($name)\n {\n $query = \"SELECT * FROM \".$this->_name.\" WHERE cron_name = '\".$name.\"'\";\n if(($result = $this->getQuery($query,true)) != NULL)\n {\n return $result;\n }\n else\n return \"NO\";\n }", "public function getCronDefinition()\n {\n return $this->cron_script; \n }", "public function attempt(Crontab $crontab): bool\n {\n if ($this->macAddress === null) {\n return false;\n }\n\n $redis = $this->redisFactory->get($crontab->getMutexPool());\n $mutexName = $this->getMutexName($crontab);\n\n $result = $redis->set($mutexName, $this->macAddress, ['NX', 'EX' => $crontab->getMutexExpires()]);\n\n if ($result) {\n Coroutine::create(function () use ($crontab, $redis, $mutexName) {\n $exited = CoordinatorManager::until(Constants::WORKER_EXIT)->yield($crontab->getMutexExpires());\n $exited && $redis->del($mutexName);\n });\n return true;\n }\n\n return $redis->get($mutexName) === $this->macAddress;\n }", "protected function _getCronHelper()\n {\n return $this->_cronHelper;\n }", "protected function getCron_LockDbService()\n {\n return $this->services['cron.lock_db'] = new \\phpbb\\lock\\db('cron_lock', ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'});\n }", "public function Get() {\n\t\treturn $this->CronJobs;\n\t}", "function getRealm()\n\t\t{\n\t\t\tif (ini_get('safe_mode')) {\n\t\t\t\treturn $this->realm.'-'.getmyuid();\n\t\t\t} else {\n\t\t\t\treturn $this->realm;\n\t\t\t} \n\t\t}", "public function getMaintenanceLock()\r\n {\r\n return $this->_loadClass('lockFile', true, array(GEMS_ROOT_DIR . '/var/settings/lock.txt'));\r\n }", "public function getMaintenanceLock()\n {\n return $this->getLockFile('lock.txt');\n }", "public function getCronCmd() {}", "private function createJob (string $cronTab) : CronJobInterface\n {\n return new class ($cronTab) implements CronJobInterface\n {\n /** @var string */\n private $cronTab;\n\n\n /**\n */\n public function __construct (string $cronTab)\n {\n $this->cronTab = $cronTab;\n }\n\n\n /**\n */\n public function getCronTab () : string\n {\n return $this->cronTab;\n }\n\n\n /**\n */\n public function getName () : string\n {\n return \"My Job\";\n }\n\n\n /**\n */\n public function execute (BufferedSymfonyStyle $io) : CronStatus\n {\n return new CronStatus(true);\n }\n };\n }", "public function getJob()\n {\n return $this->get(self::_JOB);\n }", "public function getJob()\n {\n return $this->get(self::_JOB);\n }", "protected function _getCron()\n {\n return Mage::getModel('core/config_data')->load(self::CRON_STRING_PATH, 'path');\n }", "public function getThreadId();", "public function getThreadId();", "public function getScheduledJob($params, $context) {\n\t\treturn \\OMV\\Rpc\\Rpc::call(\"cron\", \"get\", $params, $context);\n\t}", "protected function getCron_ManagerService()\n {\n return $this->services['cron.manager'] = new \\phpbb\\cron\\manager(${($_ = isset($this->services['cron.task_collection']) ? $this->services['cron.task_collection'] : $this->getCron_TaskCollectionService()) && false ?: '_'}, ${($_ = isset($this->services['routing.helper']) ? $this->services['routing.helper'] : $this->getRouting_HelperService()) && false ?: '_'}, './../', 'php');\n }", "protected function getCronPageId()\n {\n $cronPage = $this->getOption('cronpage');\n\n if (!$cronPage) {\n $cronPage = tx_rnbase_configurations::getExtensionCfgValue('mkmailer', 'cronpage');\n }\n\n return $cronPage;\n }", "public function addcron() {\r\n $os = php_uname('s');\r\n\r\n $file = APP_PATH . '/index.php?c=cron&a=apply';\r\n\r\n\r\n switch ($os) {\r\n case substr($os, 0, 7) == 'Windows':\r\n exec(\"schtasks /create /sc minute /mo 5 /tn 'update_quota' /tr . $file . /ru 'System'\");\r\n break;\r\n\r\n case substr($os, 0, 5) == 'Linux':\r\n switch ($_SERVER['SERVER_PORT']) {\r\n case 80:\r\n $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\r\n break;\r\n\r\n case 443:\r\n $url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\r\n break;\r\n\r\n default:\r\n $url = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];\r\n }\r\n\r\n $cmdline = '*/5 * * * * /usr/bin/curl' . $url;\r\n\r\n exec('crontab -e <' . $cmdline);\r\n break;\r\n }\r\n }", "protected function getMutexKey(Bucket $bucket)\n {\n $semName = $this->sharedMutex ? 'seq' : $bucket->key();\n return $semName;\n }", "public function getRemoteScheduler()\n {\n return $this->remoteScheduler;\n }", "public function getRemoteScheduler()\n {\n return $this->remoteScheduler;\n }", "public function get_cron($job_id = false) {\n\t\n\t\t$cron = get_option('cron');\n\t\tif (!is_array($cron)) $cron = array();\n\t\tif (false === $job_id) return $cron;\n\n\t\tforeach ($cron as $time => $job) {\n\t\t\tif (!isset($job['updraft_backup_resume'])) continue;\n\t\t\tforeach ($job['updraft_backup_resume'] as $info) {\n\t\t\t\tif (isset($info['args'][1]) && $job_id == $info['args'][1]) {\n\t\t\t\t\tglobal $updraftplus;\n\t\t\t\t\t$jobdata = $updraftplus->jobdata_getarray($job_id);\n\t\t\t\t\treturn is_array($jobdata) ? array($time, $jobdata) : false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function get_server()\n\t{\n\t\treturn $this->m_server;\n\t}", "private function getCron(): CronExpression\n {\n return CronExpression::factory($this->expression);\n }", "public function getLockToDomain() {}", "public function getLockToDomain() {}", "public function getLockToDomain() {}", "protected function getCron_ControllerService()\n {\n return $this->services['cron.controller'] = new \\phpbb\\cron\\controller\\cron();\n }", "public function getJobScheduler()\n {\n return $this->jobScheduler;\n }", "private function Get_Server() {\n\t\treturn $this->task->getServer();\n\t\t//return $GLOBALS['server'];\n\t}", "public function getSynchronized()\n {\n\n return $this->synchronized;\n\n }", "public function getSetJob()\n {\n return $this->get(self::_SET_JOB);\n }", "public static function entry(): ChronosInterface\n {\n $timestamp = defined('ENTRY_TIME') ? ENTRY_TIME : time();\n\n return new Chronos('@' . intval($timestamp));\n }", "public function getCronJobs($logId)\n {\n $query = \"select log_id, timestamp, ui_id, project_id, message, log_type, etl_server, config, cron_log_id\";\n $query .= \" where (log_type = '\" . self::ETL_CRON_JOB . \"'\"\n . \" or log_type = '\" . self::WORKFLOW_CRON_JOB . \"')\"\n . \" and cron_log_id = '\" . Filter::escapeForMysql($logId) . \"'\";\n $args = array();\n $cronJob = $this->module->queryLogs($query, $args);\n return $cronJob;\n }", "private function instance()\n\t{\n\t\tif (!$this->instance) {\n\t\t\t$this->instance = new \\Memcache();\n\t\t\t\n\t\t\tforeach ($this->servers as $server) {\n\t\t\t\t$this->instance->addServer(\n\t\t\t\t\t$server->host(),\n\t\t\t\t\t$server->port(),\n\t\t\t\t\t$server->isPersistent(),\n\t\t\t\t\t$server->weight(),\n\t\t\t\t\t$server->timeout(),\n\t\t\t\t\t$server->retryInterval()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->instance;\n\t}", "public function getLockId();", "public function getJob()\n\t{\n\t\treturn $this->compose('Job', 'Jobs');\n\t}", "function getLocks();", "public function getMasterConnection()\n {\n return $this->getConnection(self::DEFAULT_MASTER_NODE_ID);\n }", "public function getRealm()\n {\n return $this->realm;\n }", "public function getOneThread()\n\t{\t\n\t\tglobal $ilDB;\n\t\t\t\n\t\t$data_type = array();\n\t\t$data_value = array();\n\t\t\n\t\t$query = 'SELECT * FROM frm_threads WHERE ';\n\t\t\n\t\tif($this->getMDB2Query() != '' && $this->getMDB2DataType() != '' && $this->getMDB2DataValue() != '')\n\t\t{\n\t\t\t$query .= $this->getMDB2Query();\n\t\t\t$data_type = $data_type + $this->getMDB2DataType();\n\t\t\t$data_value = $data_value + $this->getMDB2DataValue();\n\t\t\t\n\t\t\t$sql_res = $ilDB->queryf($query, $data_type, $data_value);\n\t\t\t$result = $sql_res->fetchRow(DB_FETCHMODE_ASSOC);\n\t\t\t$result[\"thr_subject\"] = trim($result[\"thr_subject\"]);\n\t\t}\n\n\t\treturn $result;\n\t}", "function return_oneClientByIdModif($mid)\n{\n return getOne($mid, \"bav_client\", \"cli_id_modif\");\n}", "public function getSlaveByIdLock($uid)\n {\n $sql = 'SELECT * FROM slave_user WHERE uid=:uid FOR UPDATE';\n return $this->_rdb->fetchRow($sql, array('uid' => $uid));\n }", "public function getInstance()\n {\n if( !isset( $this->memcached ) )\n {\n $this->memcached = new Memcache();\n $this->memcached->connect( Config::read( 'memcached.host' ), Config::read( 'memcached.port' ) );\n }\n\n return $this->memcached;\n }", "public function getControlador()\n {\n return $this->controlador;\n }", "function getMemcachedClient(): \\Memcached\n{\n static $client;\n if (!$client) {\n $client = new \\Memcached();\n $client->addServer('memcached', 11211);\n }\n\n return $client;\n}", "public function get_lock($table_name, $record_id);", "public function getJobs() \n {\n $output = shell_exec('crontab -l');\n\n if(gettype($output) !== 'string')\n {\n self::$registry->error->reportError('Something does not work properly while working with crontab command!', __LINE__, __METHOD__, true);\n return 0;\n }\n \n return $this->stringToArray($output);\n }", "function lockCacheObject ()\n {\n return copy($this->cacheObjectId, $this->cacheObjectId.'.lock');\n }", "protected function getCron_Task_Core_QueueService()\n {\n $this->services['cron.task.core.queue'] = $instance = new \\phpbb\\cron\\task\\core\\queue('./../', 'php', ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, './../cache/production/');\n\n $instance->set_name('cron.task.core.queue');\n\n return $instance;\n }", "protected function getCron_Task_Core_TidyCacheService()\n {\n $this->services['cron.task.core.tidy_cache'] = $instance = new \\phpbb\\cron\\task\\core\\tidy_cache(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n\n $instance->set_name('cron.task.core.tidy_cache');\n\n return $instance;\n }", "private function eventMutex(): EventMutex\n {\n if (app()->bound(EventMutex::class)) {\n return app()->make(EventMutex::class);\n }\n\n return app()->make(CacheEventMutex::class);\n }", "public function wrapConnection()\n {\n return new MemcachedCachePool($this->getDb());\n }", "function ciniki_core_syncCronList($ciniki) {\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery'); \n $strsql = \"SELECT UNIX_TIMESTAMP(UTC_TIMESTAMP()) AS cur_time \";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.customers', 'sync');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $cur_time = $rc['sync']['cur_time'];\n\n //\n // Get the sync information required to send the request\n //\n $strsql = \"SELECT ciniki_tenant_syncs.id, ciniki_tenant_syncs.tnid, \"\n . \"ciniki_tenants.sitename, \"\n . \"(UNIX_TIMESTAMP(UTC_TIMESTAMP()) - UNIX_TIMESTAMP(ciniki_tenant_syncs.last_sync)) AS incremental_age, \"\n . \"(UNIX_TIMESTAMP(UTC_TIMESTAMP()) - UNIX_TIMESTAMP(ciniki_tenant_syncs.last_partial)) AS partial_age, \"\n . \"(UNIX_TIMESTAMP(UTC_TIMESTAMP()) - UNIX_TIMESTAMP(ciniki_tenant_syncs.last_full)) AS full_age \"\n . \"FROM ciniki_tenant_syncs, ciniki_tenants \"\n . \"WHERE ciniki_tenant_syncs.tnid = ciniki_tenants.id \"\n . \"AND ciniki_tenant_syncs.status = 10 \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashIDQuery');\n $rc = ciniki_core_dbHashIDQuery($ciniki, $strsql, 'ciniki.tenants', 'syncs', 'id');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['syncs']) ) {\n return array('stat'=>'ok', 'syncs'=>array(), 'cur_time'=>$cur_time);\n }\n\n return array('stat'=>'ok', 'syncs'=>$rc['syncs'], 'cur_time'=>$cur_time);\n}", "public function getControlador()\n\t\t{\n\t\t\treturn $this->controlador;\n\t\t}", "function crontab($jobs = null)\n\t{\n\t\tif (is_array($jobs)) {\n\t\t\t$this->cronEntries = $jobs;\n\t\t}\n\t\telse if (is_null($jobs)) {\n\t\t\treturn $this->cronEntries;\n\t\t}\n\t\treturn $this;\n\t}", "protected function getCron_Task_Core_TidySessionsService()\n {\n $this->services['cron.task.core.tidy_sessions'] = $instance = new \\phpbb\\cron\\task\\core\\tidy_sessions(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n\n $instance->set_name('cron.task.core.tidy_sessions');\n\n return $instance;\n }", "public static function getCurrentJob()\n {\n return (string) Configuration::getGlobalValue(self::CURRENT_TASK_CLI);\n }", "public static function getServer()\n : \\stdClass\n {\n return static::$_server;\n }", "function build_cron() {\n $inc_job = new \\Cron\\Job\\ShellJob();\n $inc_job->setCommand('php inc.php');\n $inc_job->setSchedule(new \\Cron\\Schedule\\CrontabSchedule('*/2 * * * *'));\n\n $resolver = new \\Cron\\Resolver\\ArrayResolver();\n $resolver->addJob($inc_job);\n\n $cron = new \\Cron\\Cron();\n $cron->setExecutor(new \\Cron\\Executor\\Executor());\n $cron->setResolver($resolver);\n return $cron;\n }", "public function getReplicationSchedule()\n {\n return $this->replication_schedule;\n }", "public static function instance() {\n if( is_null( SysMon::$instance )) SysMon::$instance =\n \tnew SysMon (\n \t\tSYSMON_DEFAULT_HOST,\n\t\t\t\tSYSMON_DEFAULT_USER,\n\t\t\t\tSYSMON_DEFAULT_PASSWORD,\n\t\t\t\tSYSMON_DEFAULT_DATABASE );\n return SysMon::$instance;\n }", "public function memcached()\n {\n return $this->memcached;\n }", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function cron($date)\n\t{\n\t\t$ip = $_SERVER['SERVER_ADDR'];\n\n\t\t$name = $_SERVER['SERVER_NAME'];\n\n\t\t$server = Server::where('server_ip', '=', $ip)->first(array('server_id'));\n\n\t\tif (empty($server)) {\n\t\t\t$server = new Server;\n\t\t\t$server->server_name = $name;\n\t\t\t$server->server_ip = $ip;\n\t\t\t$server->server_date = $date;\n\t\t\t$server->save();\n\t\t} else {\n\t\t\t$server = $server->server_id;\n\t\t}\n\t\t\n\t\treturn $server;\n }", "protected function getConsole_Command_Cron_RunService()\n {\n return $this->services['console.command.cron.run'] = new \\phpbb\\console\\command\\cron\\run(${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'});\n }", "public static function get_jobs()\n\t{\n\t\t$output = shell_exec('crontab -l');\n\t\treturn self::string_to_array($output);\n\t}", "public function get_threading() {\n\n return $this->threading;\n }", "public function getCronStatus()\n {\n // get the last job with status pending or running\n $lastJob = Mage::getModel('cron/schedule')->getCollection()\n ->addFieldToFilter('status', array(\n 'in' => array(\n Mage_Cron_Model_Schedule::STATUS_PENDING,\n Mage_Cron_Model_Schedule::STATUS_RUNNING,\n )\n )\n )\n ->setOrder('scheduled_at', Varien_Data_Collection_Db::SORT_ORDER_DESC)\n ->setPageSize(1)\n ->getFirstItem();\n\n // check if last job has been scheduled within allowed interval\n $ok = true;\n if ($lastJob && $lastJob->getId()) {\n $locale = Mage::app()->getLocale();\n\n $scheduledAt = $locale->date($lastJob->getScheduledAt(), Varien_Date::DATETIME_INTERNAL_FORMAT);\n $scheduledAt = $locale->utcDate(null, $scheduledAt);\n\n // now\n $now = $locale->date(null, Varien_Date::DATETIME_INTERNAL_FORMAT);\n $now = $locale->utcDate(null, $now);\n\n // if last job was scheduled before the current time\n if ($now->isLater($scheduledAt)) {\n $allowedTime = $now->subHour($this->_allowedTimeDiffJob);\n if ($allowedTime->isLater($scheduledAt)) {\n $ok = false;\n }\n }\n } else {\n $ok = false;\n }\n\n $message = '';\n if ($ok) {\n $image = $this->_getTickImageLink();\n $message = Mage::helper('emvcore')->__(\n '<span class=\"icon-status\">%s</span> Magento Cron Process has been correctly configured!',\n $image\n );\n } else {\n $image = $this->_getUnTickImageLink();\n $message = Mage::helper('emvcore')->__(\n '<span class=\"icon-status\">%s</span> Magento Cron Process has not been correctly activated!',\n $image\n );\n }\n\n return $message;\n }", "public function GetServer()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_my_server;\n }", "public function getConnection(){\r\n return $this->memcache;\r\n }", "function getRealm();", "public function getListCronJobsCreation() {\n\t\treturn $this->_getConfigValueArray('cronJobs');\n\t}", "public function server()\r\n {\r\n return $this->server;\r\n }", "public function lockedBy()\n {\n return $this->_provider->lockedBy($this->_mutexKey);\n }", "protected function getQueueMonitor(): ?MonitorContract\n {\n if ( ! property_exists($this, 'job')) {\n return null;\n }\n\n if ( ! $this->job) {\n return null;\n }\n\n if ( ! $jobId = QueueMonitor::getJobId($this->job)) {\n return null;\n }\n\n $model = QueueMonitor::getModel();\n\n return $model::whereJob($jobId)\n ->orderBy('started_at', 'desc')\n ->first();\n }", "public function getMasterRabbit()\n {\n return $this->rabbitConn;\n }", "public function obtenerControlador()\n\t\t{\n\t\t\treturn $this->_controlador;\n\t\t}", "public function getLockHash() {}", "public function stateCron($cron,$cronState) {\n\t\t$cronState = strtolower($cronState);\n\t\t$output = shell_exec('crontab -l');\n\t\t$lines = explode(\"\\n\", trim($output));\n\t\tif (count($lines) > 3+$cron) {\n\t\t\t$x='';\n\t\t\twhile ($lines[0] != \"#BEGIN\") {\n\t\t\t\t$x .=$lines[0].PHP_EOL; //copy first header lines of cron file\n\t\t\t\tarray_shift($lines);\n\t\t\t}\n\t\t\t$x .=$lines[0].PHP_EOL; //copy first header lines of cron file\n\t\t\tarray_shift($lines);\n\t\t\t$i=0;\n\t\t\tforeach ($lines as $line) {\n\t\t\t\tif ($i == $cron) {\n\t\t\t\t\tif ((substr($line,0,1) == '#' && $cronState == 'off') || (substr($line,0,1) != '#' && $cronState == 'on')) {} // do nothing, cron line is OK\n\t\t\t\t\telseif ((substr($line,0,1) == '#' && $cronState == 'on')) $x .=substr($line,1).PHP_EOL; // uncomment cron line\n\t\t\t\t\telseif ((substr($line,0,1) != '#' && $cronState == 'off')) $x .= '#'.$line.PHP_EOL; //comment cron line\n\t\t\t\t}\n\t\t\t\telse $x .=$line.PHP_EOL;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tfile_put_contents(Flight::get(\"pathCron\"), $x);\n\t\t\texec(\"cat \".Flight::get(\"pathCron\").\" | crontab -\");\n\t\t\tFlight::json(array('Status' => 'OK','Cron' => $cron,'State'=> $cronState));\n\t\t}\n\t\telse Flight::json(array('Status' => 'KO','Cron' => $cron . ' Not Found'));\n\t}", "public function getCredential ()\n\t{\n\t\t$retVal = null;\n\t\tif ($this->isConsole()) {\n\t\t\t$retVal = MO_CONSOLE_CREDENTIAL;\n\t\t} elseif(!defined('MO_IS_CONSOLE')) {\n\t\t\t$retVal = parent::getCredential();\n\t\t}\n\t\treturn $retVal;\n\t}", "protected function getConsole_Command_Cron_ListService()\n {\n return $this->services['console.command.cron.list'] = new \\phpbb\\console\\command\\cron\\cron_list(${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'});\n }", "function lock($db, $id, $table='activity') {\n if ($id<0) return -1; # ignore 'new' entries.\n $q='UPDATE '.$table.' set editlock=datetime(\\'now\\',\\'+5 minutes\\') WHERE editlock < datetime(\\'now\\') AND id='.$id.';';\n if ($db->exec($q) == 1) return -1;\n\n $q='SELECT editlock from '.$table.' WHERE id='.$id.';';\n $res=$db->query($q);\n if (!$res) return 0; # XXX error\n $r=$res->fetch(PDO::FETCH_ASSOC);\n return $r['editlock'];\n }", "public function GetRedisConn() {\n\t\treturn $this->redis_conn;\n\t}", "public function filterByCron($cron = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($cron)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $cron)) {\n $cron = str_replace('*', '%', $cron);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(RemoteAppPeer::CRON, $cron, $comparison);\n }", "public function getHost() {\n return new Client($this->memcache, $this->shareData[\"host\"]);\n }", "function getMaster() {\n\t\tif (null !== $this->_current && $this->_isMaster)\n\t\t\treturn $this->_current;\n\n\t\tif (!empty($this->_masters)) {\n\t\t\t$dsn = reset($this->_masters);\n\t\t\t$db = DatabaseManager::getConnection($dsn);\n\t\t\t\n\t\t\tif ($db->isNull()) {\n\t\t\t\t$this->_setFailed($dsn);\n\t\t\t\treturn $this->getMaster();\n\t\t\t}\n\t\t\t\n\t\t\t$this->_current = $db;\n\t\t\t$this->_isMaster = true;\n\t\t\treturn $this->_current;\n\t\t}\n\n\t\treturn DatabaseManager::getConnection('null://null');\n\t}", "private function getNextCron($c) {\n\t\t//$c = \"30 07 * * 0\";\n\t\t$c = 'cron '.$c;\n\t\t$c = explode(' ',$c);\n\t\t$d = explode(',',$c[5]);\n\t\tfor ($i=0 ; $i<count($d) ; $i++) { array_splice($d, $i, 1, $d[$i]+1); }\n\t\t$d = implode(',',$d);\n\t\t$c[5] = $d;\t\n\t\t$c = implode(' ',$c);\n\t\tFlight::nextcron()->AddSchedule($c);\n\t\tFlight::nextcron()->RebuildCalendar();\n\t\t$result = Flight::nextcron()->NextTrigger();\n\t\treturn $result[\"ts\"];\n\t}", "function install_cron_scheduler() {\n\tglobal $amp_conf;\n\tglobal $nt;\n\n\t// crontab appears to return an error when no entries, os only fail if error returned AND a list of entries.\n\t// Don't know if this will ever happen, but a failure and a list could indicate something wrong.\n\t//\n\t$outlines = array();\n\texec(\"/usr/bin/crontab -l\", $outlines, $ret);\n\tif ($ret && count($outlines)) {\n\t\t$nt->add_error('retrieve_conf', 'CRONMGR', _(\"Failed to check crontab for cron manager\"), sprintf(_(\"crontab returned %s error code when checking for crontab entries to start freepbx-cron-scheduler.php crontab manager\"),$ret));\n\t} else {\n\t\t$nt->delete('retrieve_conf', 'CRONMGR');\n\t\t$outlines2 = preg_grep(\"/freepbx-cron-scheduler.php/\",$outlines);\n\t\t$cnt = count($outlines2);\n\t\tswitch ($cnt) {\n\t\t\tcase 0:\n\t\t\t\t/** grab any other cronjobs that are running as asterisk and NOT associated with backups\n \t\t\t\t* this code was taken from the backup module for the most part. But seems to work...\n \t\t\t\t*/\n\t\t\t\t$outlines = array();\n\t\t\t\texec(\"/usr/bin/crontab -l | grep -v ^#\\ DO\\ NOT | grep -v ^#\\ \\( | grep -v freepbx-cron-scheduler.php\", $outlines, $ret);\n\t\t\t\t$crontab_entry = \"\";\n\t\t\t\tforeach ($outlines as $line) {\n\t\t\t\t\t$crontab_entry .= $line.\"\\n\";\n\t\t\t\t}\n\t\t\t\t// schedule to run hourly, at a random time. The random time is explicit to accomodate things like module_admin online update checking\n\t\t\t\t// since we will want a random access to the server. In the case of module_admin, that will also be scheduled randomly within the hour\n\t\t\t\t// that it is to run\n\t\t\t\t//\n\t\t\t\t$crontab_entry .= rand(0,59).\" * * * * \".$amp_conf['AMPBIN'].\"/freepbx-cron-scheduler.php\";\n\t\t\t\tsystem(\"/bin/echo '$crontab_entry' | /usr/bin/crontab -\");\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t// already running, nothing to do\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// error, there should never be more than one running\n\t\t\t\techo \"TODO: deal with error here\\n\";\n\t\t\t\t$nt->add_error('retrieve_conf', 'CRONMGR', _(\"Multiple freepbx-cron-scheduler.php running\"), sprintf(_(\"There were %s freepbx-cron-scheduler.php instances running. There should be only 1.\"),$cnt));\n\t\t}\n\t}\n}" ]
[ "0.60651153", "0.6044281", "0.58918184", "0.5433517", "0.53443277", "0.526969", "0.5103709", "0.5052494", "0.49629247", "0.49295446", "0.4886977", "0.47900045", "0.47465575", "0.47197393", "0.46448895", "0.46263844", "0.46260148", "0.46110958", "0.45655927", "0.45570228", "0.4536115", "0.45351183", "0.4514574", "0.44778383", "0.44778383", "0.44760862", "0.44616485", "0.44106075", "0.44063926", "0.43978235", "0.4370036", "0.4370036", "0.4341826", "0.43402976", "0.4340028", "0.43094927", "0.43094927", "0.43094927", "0.43016002", "0.4295243", "0.4288699", "0.4279452", "0.42708862", "0.42622513", "0.4255334", "0.42463887", "0.42334068", "0.42231694", "0.42198405", "0.42130178", "0.41850647", "0.41765445", "0.41743222", "0.41719642", "0.41637874", "0.41556695", "0.41489336", "0.41471395", "0.4137972", "0.41163573", "0.41095403", "0.41089767", "0.4106823", "0.40971097", "0.40928325", "0.40890867", "0.4079781", "0.40786886", "0.4075155", "0.4074961", "0.4072834", "0.40642655", "0.40635994", "0.40540662", "0.40502506", "0.4049841", "0.40322223", "0.40302318", "0.40189105", "0.4006055", "0.39988893", "0.39962503", "0.3995573", "0.39783236", "0.3977805", "0.39563188", "0.39518398", "0.39479616", "0.39461997", "0.3940924", "0.39306664", "0.39298895", "0.39293393", "0.3924468", "0.3919144", "0.39156345", "0.3909656", "0.39083597", "0.3897317", "0.38965416" ]
0.65814793
0
Create a new message instance.
public function __construct($agency, $property, $subject, $message) { $this->agency = $agency; $this->subject = $subject; $this->message = $message; $this->property = $property; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We will just go ahead and push the address.\n if (isset($this->from['address'])) {\n $message->from($this->from['address'], $this->from['name']);\n }\n\n return $message;\n }", "protected function createMessage() {\n $config = $this->messageConfig;\n if (!array_key_exists('class', $config)) {\n $config['class'] = $this->messageClass;\n }\n $config['smser'] = $this;\n return Yii::createObject($config);\n }", "protected static function newMessage()\n {\n self::$message = \\Swift_Message::newInstance();\n }", "public function create()\n {\n //\n $this->message->sendMessage();\n }", "private function newMessage()\n {\n /* @var $config ModuleOptions */\n $config = $this->serviceLocator->get('EscoMail\\Options');\n\n $this->message = new Message();\n $this->message->setFrom($config->getMailSendFrom(), $config->getMailSendFromName());\n\n return $this->message;\n }", "protected function createMessage()\n\t{\n\t\t$config = $this->messageConfig;\n\t\tif (!array_key_exists('class', $config)) {\n\t\t\t$config['class'] = $this->messageClass;\n\t\t}\n\t\t$config['mailer'] = $this;\n\n\t\treturn Yii::createObject($config);\n\t}", "public function createMessage(): MessageInterface;", "public function create(string $message = ''): BusMessageInterface;", "public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }", "public static function createInstance()\n {\n return new MailMessage('serializable@serializable.com');\n }", "public static function init( $_id )\n {\n $message = new Message();\n $message->get( $_id );\n return $message;\n }", "public function createMessage(string $typeName): MessageInterface;", "public function createMailMessage();", "static public function factory($messageType = 3) {\n\t\treturn new self($messageType);\n\t}", "public function createMessage(array $parameters = []);", "public function user_message_create() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\tif ($this->valide_userid () == false) {\n\t\t\treturn $this;\n\t\t}\n\t\t$message_created = $this->getObjetO365Wsclient ()\n\t\t\t->jsonPostMethod ( '/users/' . $this->getUserId () . '/messages', $this->getEmailContent () );\n\t\t$this->onDebug ( $message_created, 2 );\n\t\tif (isset ( $message_created->id ) && ! empty ( $message_created->id )) {\n\t\t\treturn $this->setO356MessageRef ( $message_created )\n\t\t\t\t->setMessageId ( $message_created->id );\n\t\t}\n\t\treturn $this->onError ( 'Pas d\\'ID durant la creation du message de O365', $message_created, 1 );\n\t}", "private function newMessage(array $data)\n {\n\n $message = Message::create([\n 'channel_id' => $data['channel_id'],\n 'user_id' => Auth::guard()->user()->id,\n 'message' => $data['message']\n ]);\n if ($message) {\n $this->notifyChannelUsers($data['channel_id']);\n }\n return $message;\n }", "public function initMessage() {}", "public function __construct(Message $message)\n {\n $this->message = $message;\n }", "public function __construct(Message $message)\n {\n $this->message = $message;\n }", "public function __construct(Message $message)\n {\n $this->message = $message;\n }", "public function __construct(Message $message)\n {\n $this->message = $message;\n }", "public function __construct(Message $message)\n {\n $this->message = $message;\n }", "private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }", "protected static function newFactory()\n {\n return MessageFactory::new();\n }", "public function message(mixed $data = null)\n {\n $message = new Message((string) $data);\n\n return $message;\n }", "public static function createFromString($raw)\n {\n $message = new self(array('raw' => $raw));\n return $message;\n }", "public static function create(string $text = null): GoogleChatMessage\n {\n $message = new static;\n\n if ($text) {\n $message->text($text);\n }\n\n return $message;\n }", "public function create() {\n\t\t$user = $this->current_user();\n\t\t$message = $this->discussion->create_message($this->message_data() + ['creator' => ['id' => $user->_id, 'name' => $user->name]]);\n\n\t\tif ($this->discussion->push_message($message)) {\n\t\t\treturn $this->redirect(['Discussions::show', 'id' => $this->discussion->_id, 'project_id' => $this->discussion->project_id]);\n\t\t}\n\n\t\treturn compact('message');\n\t}", "public static function createFromArray($fields) \n\t{\n\t\t$message = new Message();\n\t\tself::populate($message,$fields);\n\t\treturn $message;\n\t}", "public function addMessage()\n {\n if(null === $this->obj_message) {\n $this->obj_message = new Message();\n }\n return $this->obj_message;\n }", "public function createMimeMessage();", "public function testCreateMethodReturnsNewInstance(): void\n {\n $message = DiscordMessage::create();\n $this->assertInstanceOf(DiscordMessage::class, $message);\n }", "function createMessage($email) {\n $message = new Google_Service_Gmail_Message();\n $message->setRaw(base64_encode($email));\n return $message;\n}", "protected function createMessage(Swift_Message $message)\n {\n $mimeEntity = new Swift_Message('', $message->getBody(), $message->getContentType(), $message->getCharset());\n $mimeEntity->setChildren($message->getChildren());\n\n $messageHeaders = $mimeEntity->getHeaders();\n $messageHeaders->remove('Message-ID');\n $messageHeaders->remove('Date');\n $messageHeaders->remove('Subject');\n $messageHeaders->remove('MIME-Version');\n $messageHeaders->remove('To');\n $messageHeaders->remove('From');\n\n return $mimeEntity;\n }", "public function __construct($message)\n {\n // $this->message = $message;\n }", "function createMessage($object) {\n\tglobal $USER;\n\t\n\t$message = new \\core\\message\\message();\n\t$message->component = 'local_littlehelpers';\n\t$message->name = 'paragraph52notification';\n\t$message->userfrom = $USER;\n\t\n\t// Get user\n\t$message->userto = core_user::get_user($object->useridto);\n\t\n\t// force email sending\n\t$message->userto->emailstop = 0;\n\t\n\t$message->subject = $object->subject;\n\t$message->fullmessage = $object->fullmessage;\n\t$message->fullmessageformat = FORMAT_MARKDOWN;\n\t$message->fullmessagehtml = $object->fullmessagehtml;\n\t$message->smallmessage = $object->smallmessage;\n\t$message->notification = '0';\n\t\n\t$message->contexturl = 'https://moodle.tu-darmstadt.de/local/littlehelpers/paragraph52';\n\t$message->contexturlname = 'Paragraph52';\n\t$message->replyto = \"moodle@tu-darmstadt.de\";\n\n\treturn $message;\n}", "public function __construct($message)\r\n {\r\n $this->message = $message;\r\n\r\n }", "public function createMessage($content, $options = array('content_type' => 'application/json', 'delivery_mode' => 2))\n {\n if (!empty($options['content_type']) && $options['content_type'] == 'application/json')\n $content = json_encode($content);\n return new AMQPMessage($content, $options);\n }", "public function __construct($message) {\n $this->message= $message;\n }", "public function __construct($msg)\n {\n $this->message = $msg;\n }", "public function __construct(Message $message)\n {\n parent::__construct($message);\n }", "public function __construct($messageDefinition)\n {\n $this->messageDefintion = $messageDefinition;\n }", "public function testCreateMessage()\n {\n $config = new Configuration();\n// $config->setHost(\"http://127.0.0.1:8080\");\n $apiInstance = new DaDaPushMessageApi(\n // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n // This is optional, `GuzzleHttp\\Client` will be used as default.\n new \\GuzzleHttp\\Client(),\n $config\n );\n\n $actions = [\n new Action($data = array(\"name\" => \"view\", \"url\" => \"https://www.dadapush.com/\", \"type\" => \"link\"))\n ];\n\n $body = new MessagePushRequest($data = array(\"title\" => \"Good News!\",\n \"content\" => \"Good News! DaDaPush releasing new version\",\n \"need_push\" => true,\n \"actions\" => $actions\n ));\n\n $channel_token = 'ctb3lwO6AeiZOwqZgp8BE8980FdNgp0cp6MCf';\n\n $result = $apiInstance->createMessage($body, $channel_token);\n print_r($result);\n self::assertTrue($result->getCode()==0);\n }", "public static function create( $msg, $code = null, array $data = null ) {\n\t\tif ( $msg instanceof IApiMessage ) {\n\t\t\treturn $msg;\n\t\t} elseif ( $msg instanceof RawMessage ) {\n\t\t\treturn new ApiRawMessage( $msg, $code, $data );\n\t\t} else {\n\t\t\treturn new ApiMessage( $msg, $code, $data );\n\t\t}\n\t}", "public static function create($message, $type = '', $title = '', $icon = '')\n {\n return new self($message, $type, $title, $icon);\n }", "public function newEntity(array $attributes = [])\n {\n return new MessageContent($attributes);\n }", "public function create()\n {\n return view('materialadmin::message.create');\n }", "public static function factory($raw_message = null, $class_name = null) {}", "public function __construct($message = null) {}", "public function __construct($message)\n {\n $this->message = $message;\n }", "public function __construct($message)\n {\n $this->message = $message;\n }", "public function __construct($message)\n {\n $this->message = $message;\n }", "public function __construct($message)\n {\n $this->message = $message;\n }", "public function __construct($message)\n {\n $this->message = $message;\n }", "public function __construct($message)\n {\n $this->message = $message;\n }", "public static function createFromFile($filename)\n {\n $message = new self(array('file' => $filename));\n\n return $message;\n }", "public function create()\n\t{\n\t\treturn View::make('messages.create');\n\t}", "public function actionCreate()\n {\n $model = new Message();\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 }", "private function createMessage(InputInterface $input)\n {\n $message = new \\Swift_Message(\n $input->getOption('subject'),\n $input->getOption('body'),\n $input->getOption('content-type'),\n $input->getOption('charset')\n );\n $message->setFrom($input->getOption('from'));\n $message->setTo($input->getOption('to'));\n\n return $message;\n }", "public function test_message_can_be_created() {\n\n $this->assertInstanceOf(Message::class, $this->message);\n $this->assertDatabaseHasMessageWithPublicId($this->message->getPublicId());\n\n }", "protected function getMessage()\n {\n //return new \\Swift_Message('Test subject', 'Test body.');\n }", "public function testConstructorAndGetters() \r\n \t{\r\n \t\t// create a message with complete constructor args\r\n \t\t$message = new Message( Message::NORMAL, \r\n \t\t\t\t\t\t\t\t(object)array( 'testProp' => 'testval' ),\r\n \t\t\t\t\t\t\t\tsimplexml_load_string('<testMessage testAtt=\"Hello\" testAtt2=\"world\"/>'),\r\n \t\t\t\t\t\t\t\tMessage::PRIORITY_HIGH);\r\n \t\t\r\n \t\t// test assertions\r\n \t\t$this->assertTrue( $message instanceof Message, \"Expecting \\$message is Message\" );\r\n \t\t$this->assertTrue( $message->getType() == Message::NORMAL, \"Expecting \\$message->getType() == Message::NORMAL\" );\r\n \t\t$this->assertTrue( $message->getHeader()->testProp == 'testval', \"Expecting \\$message->getHeader()->testProp == 'testval'\" );\r\n \t\t$this->assertTrue( $message->getBody()->attributes()->testAtt == 'Hello', \"Expecting \\$message->getBody()->attributes()->testAtt == 'Hello'\" );\r\n \t\t$this->assertTrue( $message->getPriority() == Message::PRIORITY_HIGH, \"Expecting \\$message->getPriority() == Message::PRIORITY_HIGH\" );\r\n \t\t\r\n \t}", "public function __construct($data)\n {\n $this->message = $data;\n }", "public function __construct($data)\n {\n $this->message = $data;\n }", "public static function getInstance($messageClass = '\\PEIP\\Message\\GenericMessage')\n {\n return new self($messageClass);\n }", "public function __construct(NewMessageEvent $event)\n {\n $this->event = $event;\n }", "public static function createFromFile(string $path) : CommitMessage\n {\n if (!file_exists($path)) {\n throw new \\RuntimeException('Commit message file not found');\n }\n return new CommitMessage(file_get_contents($path));\n }", "public function testCreateWithoutId()\n {\n $faker = Factory::create();\n $messageAttributes = [\n 'body' => $faker->sentence(15),\n 'subject' => $faker->sentence(5),\n 'name' => $faker->name(),\n 'email' => $faker->email(),\n 'custom_info' => $faker->sentence(3)\n\n ];\n $response = $this->client->messages()->create($messageAttributes);\n $this->assertEquals($messageAttributes['body'], $response['message']['body']);\n $this->assertEquals($messageAttributes['subject'], $response['message']['subject']);\n\n return $response;\n }", "public function create(Message $message): void\n {\n $this->items[$message->getEventName()][$message->getId()] = $message;\n }", "public function __construct($message, $type)\n\t{\n\t\t$this->message = $message;\n\t\t$this->type = $type;\n\t}", "public function __construct(MimeMessage $message = null) {\n $this->htmlBody = new MimePart();\n $this->htmlBody->type = Mime::TYPE_HTML;\n $this->htmlBody->charset = 'utf-8';\n $this->htmlBody->encoding = Mime::ENCODING_QUOTEDPRINTABLE;\n\n $this->textBody = new MimePart();\n $this->textBody->type = Mime::TYPE_TEXT;\n $this->textBody->charset = 'utf-8';\n $this->textBody->encoding = Mime::ENCODING_QUOTEDPRINTABLE;\n }", "public function create(){}", "public function actionCreate() {\n if (isset($_POST['Message'])) {\n $resp = array(\n 'color' => '#FF6600',\n 'background_color' => '#FFFFCC',\n 'position' => 'top',\n 'removebutton' => 0,\n 'translation' => $_POST['Message']['translation']\n );\n $model = new Message();\n $model->setAttributes($_POST['Message']);\n if ($model->save()) {\n $resp['message'] = Yii::t('translate', 'Message successfully saved');\n $resp['id'] = $model->id;\n } else {\n $errors = $this->errors($model);\n $resp['message'] = Yii::t('translate', '<p>Unable to save the message. Something went wrong!<p/>' . implode('<br/>', $errors));\n }\n echo $this->je($resp);\n Yii::app()->end();\n }\n $id = (int)Yii::app()->request->getParam('id');\n $lang = Yii::app()->request->getParam('lang');\n if ($id && $lang) {\n $model = MessageSource::model()->findByPk($id);\n if ($model) {\n $message = $model->loadMessage();\n $message->id = $model->id;\n $message->language = $lang;\n $this->renderPartial('form', array(\n 'model' => $message\n ));\n } else throw new CHttpException(400);\n } else throw new CHttpException(404, 'The requested page does not exist.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "protected static function newFactory(): Factory\n {\n return MessageFactory::new();\n }", "public function __construct(string $message)\n {\n $this->message = $message;\n }", "public function create()\n {\n return view('message');\n }", "public function newAction()\n {\n $entity = new Message();\n $form = $this->createForm(new MessageType(), $entity);\n\n return $this->render('CoreMarketingBundle:Message:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "protected function createDocument(\\TYPO3\\Jobqueue\\Common\\Queue\\Message $message) {\n\t\t$properties = ObjectAccess::getGettableProperties($message);\n\t\t$messageDocument = new Message($message->getPayload(), $message->getIdentifier());\n\n\t\tforeach ($properties as $propertyName => $propertyValue) {\n\t\t\tObjectAccess::setProperty($messageDocument, $propertyName, $propertyValue);\n\t\t}\n\n\t\treturn $messageDocument;\n\t}", "public function __construct($message = '', $type = 'info') {\n $this->message = $message;\n }", "protected function render(): Message\n {\n $headers = '';\n foreach ($this->buildHeaders() as $header => $value) {\n $headers .= \"{$header}: {$value}\" . self::CRLF;\n }\n $message = implode(self::CRLF, $this->buildMessage());\n\n return new Message($headers, $message);\n }", "public function create()\n\t{\n\t\t$form = \\View::make('message.form');\n\t\t$form->project_id = \\Session::get('active_project');\n\t\t$form->action = array('action' => 'Toomdrix\\Pm\\MessageController@store', 'class'=>'form-signup');\n\t\treturn $form;\n\t}", "public static function getInstance($context=null) {\n return new Messages($context);\n }", "public function create_post() {\n\t\t$data['uid'] = $this->input->get('uid');\n\t\t$data['to'] = $this->input->get('to');\n\t\t$data['text'] = $this->input->get('text');\n\t\t$data['ts'] = now();\n\n\t\t$this->Messages_model->create($data);\n\t}", "public function getGeneratedMessage()\n {\n # Force the template to render\n (string) $this->prepareTemplate();\n\n $m = $this->template->__message;\n\n if (!$m->getFrom()) {\n trigger_error(\"You should add 'from' information.\", E_USER_WARNING);\n }\n\n if (!$m->getSubject()) {\n trigger_error(\"You should add 'subject'.\", E_USER_WARNING);\n }\n\n if (!$m->getHeader('To')) {\n trigger_error(\"You should add recipients.\", E_USER_WARNING);\n }\n\n foreach ($this->attachments as $attachment) {\n list($filename, $content, $type) = $attachment;\n $m->addAttachment($filename, $content, $type);\n }\n\n return $m;\n }", "public function __construct($message='1111222333',$type='2222')\n {\n $this->type = $type;\n $this->message = $message;\n }", "public static function new()\n {\n if ( ! empty($_REQUEST['mgb_rating_message']) ) Database::insert([\n 'message' => $_REQUEST['mgb_rating_message'],\n 'author' => self::author(),\n 'state' => (!json_decode($_REQUEST['mgb_rating_moderation'])) ? true : false\n ]);\n }", "public function create() {}", "public function compose() {\n return $this->createMessage();\n }", "public function create()\n {\n // die('here');\n return view('message.create');\n }", "public function create()\n {\n return view('messages.create');\n }", "public function create()\n {\n return view('messages.create');\n }", "public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save())\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model\n ]);\n }\n }", "public static function getInstanceFromMessage(\\PEIP\\INF\\Message\\Message $message)\n {\n return new self(get_class($message));\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'body' => 'required|max:5000',\n 'user_id' => ['required', new NotSelfId(), 'exists:users,id'],\n ]);\n\n $message = Auth::user()->messages()->create([\n 'data' => [\n 'text' => request('body'),\n ],\n ]);\n\n Auth::user()->conversations()->attach($message, [\n 'contact_id' => $request->user_id,\n ]);\n\n if (!$this->isAuthUserBlockedToContact($request->user_id, Auth::user()->id)) {\n User::find($request->user_id)->conversations()->attach($message, [\n 'contact_id' => Auth::id(),\n ]);\n\n // broadcast the message to the other person\n event(new MessageCreated($message, $request->user_id, Auth::user()->id));\n }\n\n $message->owner = Auth::user();\n\n return new MessageResource($message);\n }", "public function create()\n {\n return view('admin.messages.create');\n }", "public function __construct($message) {\r\n parent::__construct($message);\r\n }", "public function __construct($messageData)\n {\n $this->messageData = $messageData;\n }" ]
[ "0.81376195", "0.7959614", "0.77619994", "0.7713793", "0.76559645", "0.7553059", "0.7458076", "0.71510184", "0.6852663", "0.68347865", "0.67154217", "0.6689976", "0.6683088", "0.6644564", "0.6628052", "0.6549025", "0.6514292", "0.6501647", "0.645071", "0.645071", "0.645071", "0.645071", "0.645071", "0.64457685", "0.63510966", "0.6340597", "0.633213", "0.6326836", "0.6310014", "0.6258695", "0.6234698", "0.62195796", "0.62077796", "0.620518", "0.6204953", "0.6198459", "0.6177945", "0.61717975", "0.617064", "0.6150332", "0.61301666", "0.6109668", "0.61057645", "0.60924155", "0.6081678", "0.60787344", "0.60670817", "0.6049224", "0.60457045", "0.60438704", "0.6036989", "0.6036989", "0.6036989", "0.6036989", "0.6036989", "0.6036989", "0.6026595", "0.6025895", "0.6022185", "0.6005734", "0.6002389", "0.6000802", "0.59941816", "0.59808266", "0.59808266", "0.59678143", "0.5966462", "0.59593695", "0.594777", "0.5938714", "0.5910345", "0.5893692", "0.5880708", "0.5878038", "0.58748907", "0.58748907", "0.58748907", "0.5873998", "0.5869665", "0.5864223", "0.5860705", "0.5858159", "0.5854505", "0.5845474", "0.5842933", "0.58327615", "0.58256036", "0.58199257", "0.58134514", "0.57909477", "0.5787155", "0.57835746", "0.5783115", "0.57801926", "0.57801926", "0.5779767", "0.57784975", "0.57596684", "0.5748547", "0.5746673", "0.57461363" ]
0.0
-1
foo extra whitespaces are intentional between the block and the function
function foo2($bar1, $bar2, $bar3) { $bar2-> }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fooFunc()\n {\n }", "function foo() {\n\n function bar() {\n echo 'Hola ya existo';\n }\n\n}", "function non_functional()\n{\n $lots = of_code();\n //goes here\n\n /**\n * this is an example doc block that should be detected. It sits above an action inside a function.\n */\n $defaults = do_action('single_quote_name_no_spaces', $first = array('fake', array(1,2,3)), $second, $last);\n}", "function f()\n\t{\n\t\t// Comment in an empty function 1\n\t\t// Comment in an empty function 2\n\t}", "function a(){\r\n\techo 'aaaaaaaaa';\r\n}", "function test9($foo) {\n\n}", "function clean_extraneous_inline() {\r\n\t}", "public function baz()\n {\n \techo 'baz'; \n }", "function foo() \n{\n function bar() \n {\n echo \"I don't exist until foo() is called.\\n\";\n }\n}", "function test10($foo) {\n\n}", "function space() {\n echo \"<br><br><br>\";\n}", "private function aFunc()\n {\n }", "function well()\n{\n return \"foxphp\";\n}", "public function bar()\n {\n }", "function scm_should_this_get_sidebar() {\n echo \" \";\n}", "public function testWhiteSpaceScopeIndent(): void\n {\n // NOT use tabs for indenting.\n\n $foo = 'bar';\n }", "protected function linear_whitespace()\n {\n }", "function test(){\n echo 'sadasdasd';\n}", "function yy_r75(){ $this->prefix_number++; $this->compiler->prefix_code[] = '<?php ob_start();?>'.$this->yystack[$this->yyidx + 0]->minor.'<?php $_tmp'.$this->prefix_number.'=ob_get_clean();?>'; $this->_retvalue = '$_tmp'.$this->prefix_number; }", "function f($p1, // NOK {{Either split this list into multiple lines, aligned at column \"4\" or put all arguments on line \"51\".}}\n $p2\n) {\n}", "function yy_r12()\n {\n if ($this->strip) {\n $this->compiler->template_code->php('echo ')->string(preg_replace('![\\t ]*[\\r\\n]+[\\t ]*!', '', $this->yystack[$this->yyidx + 0]->minor))->raw(\";\\n\");\n } else {\n $this->compiler->template_code->php('echo ')->string($this->yystack[$this->yyidx + 0]->minor)->raw(\";\\n\");\n }\n }", "function myfunction()\n{\n\techo 'hello world' . '<br/>';\n}", "protected function before_foo($params)\n {\n }", "public function foo() {\n echo \"FOO\";\n }", "public function myfoo( $text ) {\n\t\t$text .= ' bar!';\n\t\treturn $text;\n\t}", "public function miniStatement() {\n ... function body ...\n }", "public function testTestWhitespaceBeforeOpentag()\n {\n copy(__DIR__ . '/functional_dirty/Test_whitespace_before_opentag.php', $this->folder_final . '/Test.php'); // make file dirty\n $res = $this->callFormatter('check-git');\n $this->assertEquals(1, $res['code']); // has errors\n $this->assertStringMatchesFormat(\"Test.php issues:%a\", $res['out']);\n $res = $this->callFormatter(\"apply-git\");\n $this->assertEquals(0, $res['code']);\n $this->assertStringMatchesFormat(\"Test.php formatted successfully%a\", $res['out']);\n $res = $this->callFormatter(\"check-git\");\n $this->assertEquals(0, $res['code']); // all right\n }", "function yy_r153(){ return; }", "function yy_r32()\n {\n $this->_retvalue = 'ob_start(); ' . $this->compiler->compileTag($this->yystack[$this->yyidx + - 4]->minor, $this->yystack[$this->yyidx + 0]->minor, array('object_method' => $this->yystack[$this->yyidx + - 2]->minor)) . ' echo ';\n $this->_retvalue .= $this->compiler->compileTag('Internal_Modifier', array(), array('modifier_list' => $this->yystack[$this->yyidx + - 1]->minor, 'value' => 'ob_get_clean()')) . ';';\n }", "public function f01()\n {\n }", "function opa(){\n echo \"opa<br>\";\n}", "static function h($stuff=''){\r\n self::ps();\r\n self::p($stuff);\r\n self::ps();\r\n }", "protected function after_foo()\n {\n }", "public function ok($foo) {\n\t}", "function seminarcallback($things)\n{\n\t$thing = $things[1];\n\n\n\tstatic $oldIndentLevel = 0;\n\tstatic $indentClosers = array();\n\tstatic $br = 1;\n\n\tglobal $wakka;\n\n\t// convert HTML thingies\n\tif ($thing == \"<\")\n\t\treturn \"&lt;\";\n\telse if ($thing == \">\")\n\t\treturn \"&gt;\";\n\t// bold\n\telse if ($thing == \"**\")\n\t{\n\t\tstatic $bold = 0;\n\t\treturn (++$bold % 2 ? \"<strong>\" : \"</strong>\");\n\t}\n\t// italic\n\telse if ($thing == \"//\")\n\t{\n\t\tstatic $italic = 0;\n\t\treturn (++$italic % 2 ? \"<em>\" : \"</em>\");\n\t}\n\t// underlinue\n\telse if ($thing == \"__\")\n\t{\n\t\tstatic $underline = 0;\n\t\treturn (++$underline % 2 ? \"<u>\" : \"</u>\");\n\t}\n\t// monospace\n\telse if ($thing == \"##\")\n\t{\n\t\tstatic $monospace = 0;\n\t\treturn (++$monospace % 2 ? \"<tt>\" : \"</tt>\");\n\t}\n\t// notes\n\telse if ($thing == \"''\")\n\t{\n\t\tstatic $notes = 0;\n\t\treturn (++$notes % 2 ? \"<span class=\\\"notes\\\">\" : \"</span>\");\n\t}\n\t// urls\n\telse if (preg_match(\"/^([a-z]+:\\/\\/\\S+?)([^[:alnum:]^\\/])?$/\", $thing, $matches)) {\n\t\t$url = $matches[1];\n\t\t\n\t\treturn \"<a href=\\\"$url\\\">$url</a>\".$matches[2];\n\t}\n\t// headers\n\telse if (preg_match(\"/^======(.*)======$/s\", $thing, $matches))\n\t{\n\t\t$br = 0;\n\t\treturn \"<h1>\".$matches[1].\"</h1>\";\n\t}\n\telse if (preg_match(\"/^=====(.*)=====$/s\", $thing, $matches))\n\t{\n\t\t$br = 0;\n\t\treturn \"<h2>\".$matches[1].\"</h2>\";\n\t}\n\telse if (preg_match(\"/^====(.*)====$/s\", $thing, $matches))\n\t{\n\t\t$br = 0;\n\t\treturn \"<h3>\".$matches[1].\"</h3>\";\n\t}\n\telse if (preg_match(\"/^===(.*)===$/s\", $thing, $matches))\n\t{\n\t\t$br = 0;\n\t\treturn \"<h4>\".$matches[1].\"</h4>\";\n\t}\n\telse if (preg_match(\"/^==(.*)==$/s\", $thing, $matches))\n\t{\n\t\t$br = 0;\n\t\treturn \"<h5>\".$matches[1].\"</h5>\";\n\t}\n\t// separators\n\telse if ($thing == \"----\")\n\t{\n\t\t// TODO: This could probably be improved for situations where someone puts text on the same line as a separator.\n\t\t// Which is a stupid thing to do anyway! HAW HAW! Ahem.\n\t\t$br = 0;\n\t\treturn \"<hr noshade=\\\"noshade\\\" size=\\\"1\\\" />\";\n\t}\n\t// forced line breaks\n\telse if ($thing == \"---\")\n\t{\n\t\treturn \"<br />\";\n\t}\n\t// escaped text\n\telse if (preg_match(\"/^\\\"\\\"(.*)\\\"\\\"$/s\", $thing, $matches))\n\t{\n\t\treturn $matches[1];\n\t}\n\t// code text\n\telse if (preg_match(\"/^\\%\\%(.*)\\%\\%$/s\", $thing, $matches))\n\t{\n\t\t// check if a language has been specified\n\t\t$code = $matches[1];\n\t\tif (preg_match(\"/^\\((.+?)\\)(.*)$/s\", $code, $matches))\n\t\t{\n\t\t\tlist(, $language, $code) = $matches;\n\t\t}\n\t\tswitch ($language)\n\t\t{\n\t\tcase \"php\":\n\t\t\t$formatter = \"php\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$formatter = \"code\";\n\t\t}\n\n\t\t$output = \"<div class=\\\"code\\\">\";\n\t\t$output .= $wakka->Format(trim($code), $formatter);\n\t\t$output .= \"</div>\";\n\n\t\treturn $output;\n\t}\n\t// forced links\n\telse if (preg_match(\"/^\\[\\[(\\S*)(\\s+(.+))?\\]\\]$/\", $thing, $matches))\n\t{\n\t\tlist (, $url, , $text) = $matches;\n\t\tif ($url)\n\t\t{\n\t\t\tif (!$text) $text = $url;\n\t\t\treturn $wakka->Link($url, \"\", $text);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t}\n\t// indented text\n\telse if (preg_match(\"/\\n(\\t+)(-|([0-9,a-z,A-Z]+)\\))?(\\n|$)/s\", $thing, $matches))\n\t{\n\t\t// new line\n\t\t$result .= ($br ? \"<br />\\n\" : \"\\n\");\n\n\t\t// we definitely want no line break in this one.\n\t\t$br = 0;\n\n\t\t// find out which indent type we want\n\t\t$newIndentType = $matches[2];\n\t\tif (!$newIndentType) { $opener = \"<div class=\\\"indent\\\">\"; $closer = \"</div>\"; $br = 1; }\n\t\telse if ($newIndentType == \"-\") { $opener = \"<ul><li>\"; $closer = \"</li></ul>\"; $li = 1; }\n\t\telse { $opener = \"<ol type=\\\"\".$newIndentType.\"\\\"><li>\"; $closer = \"</li></ol>\"; $li = 1; }\n\n\t\t// get new indent level\n\t\t$newIndentLevel = strlen($matches[1]);\n\t\tif ($newIndentLevel > $oldIndentLevel)\n\t\t{\n\t\t\tfor ($i = 0; $i < $newIndentLevel - $oldIndentLevel; $i++)\n\t\t\t{\n\t\t\t\t$result .= $opener;\n\t\t\t\tarray_push($indentClosers, $closer);\n\t\t\t}\n\t\t}\n\t\telse if ($newIndentLevel < $oldIndentLevel)\n\t\t{\n\t\t\tfor ($i = 0; $i < $oldIndentLevel - $newIndentLevel; $i++)\n\t\t\t{\n\t\t\t\t$result .= array_pop($indentClosers);\n\t\t\t}\n\t\t}\n\n\t\t$oldIndentLevel = $newIndentLevel;\n\n\t\tif ($li && !preg_match(\"/\".str_replace(\")\", \"\\)\", $opener).\"$/\", $result))\n\t\t{\n\t\t\t$result .= \"</li><li>\";\n\t\t}\n\n\t\treturn $result;\n\t}\n\t// new lines\n\telse if ($thing == \"\\n\")\n\t{\n\t\t// if we got here, there was no tab in the next line; this means that we can close all open indents.\n\t\t$c = count($indentClosers);\n\t\tfor ($i = 0; $i < $c; $i++)\n\t\t{\n\t\t\t$result .= array_pop($indentClosers);\n\t\t\t$br = 0;\n\t\t}\n\t\t$oldIndentLevel = 0;\n\n\t\t$result .= ($br ? \"<br />\\n\" : \"\\n\");\n\t\t$br = 1;\n\t\treturn $result;\n\t}\n\t// events\n\telse if (preg_match(\"/^\\{\\{(.*?)\\}\\}$/s\", $thing, $matches))\n\t{\n\t\tif ($matches[1])\n\t\t\treturn $wakka->Action($matches[1]);\n\t\telse\n\t\t\treturn \"{{}}\";\n\t}\n\t// interwiki links!\n\telse if (preg_match(\"/^[A-Z][A-Z,a-z]+[:]([A-Z,a-z,0-9]*)$/s\", $thing))\n\t{\n\t\t//TODO 링크도 처리하다.\n//\t\treturn $wakka->Link($thing);\n\t}\n\t// wakka links!\n\telse if (preg_match(\"/^[A-Z][a-z]+[A-Z,0-9][A-Z,a-z,0-9]*$/s\", $thing))\n\t{\n//\t\treturn $wakka->Link($thing);\n\t}\n\t// if we reach this point, it must have been an accident.\n\treturn $thing;\n}", "function abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmn() {\n echo 'abc';\n}", "function section_null () {echo \"top\"; asdf();}", "function yy_r205(){ $this->_retvalue = trim($this->yystack[$this->yyidx + 0]->minor, \"` \\r\\n\\t\"); }", "public function f02()\n {\n }", "function ab(){\r\n\techo \"php\".\"<br>\";\r\n}", "function yy_r163(){ $this->prefix_number++; $this->compiler->prefix_code[] = '<?php ob_start();?>'.$this->yystack[$this->yyidx + 0]->minor.'<?php $_tmp'.$this->prefix_number.'=ob_get_clean();?>'; $this->_retvalue = '\".$_tmp'.$this->prefix_number.'.\"'; $this->compiler->has_variable_string = true; }", "function yy_r83(){return; }", "function test2(){\n echo \"giedra\";\n}", "function bar () {\r\n A::foo();\r\n }", "function testando($x):void{\n echo $x;\n return;\n}", "public function aaa() {\n\t}", "public function foo()\n {\n $this->wasCalled = true;\n return 'bar';\n }", "function testf1($aa)\n{\n return \"ee\";\n}", "function bar($one, $more, $time){\n\t\treturn true;\n\t}", "function test()\n{\n echo FOO;\n\n // however, if you want to access $bar, you have to use\n // the 'global' keyword.\n global $bar;\n echo $bar;\n}", "public function f()\n {\n }", "function ob_tidyhandler($input, $mode = null) {}", "function foo($a) {\n return $a + 2;\n}", "function Name()\n\n{\n echo \"<br>Lester\";\n}", "public function test_freeSpacing() : void\n {\n $subject = <<<'EOT'\n{\n code\n \n : \n \n \"ApacheVelocity\"\n \n }\nSome content here.\n{\n\n code\n \n }\nEOT;\n\n $expected = <<<'EOT'\n{code: 1 \"ApacheVelocity\"}\nEOT;\n\n $parser = $this->preParseString($subject);\n\n $this->assertPreParserValid($parser);\n $this->assertSame(1, $parser->countCommands());\n $this->assertSame($expected, $parser->getString());\n }", "function &refPrac(string $status): string {\n global $n;\n $cep = \"[ bar_$status ]\";\n echo \"$n refPrac() cep = $cep $n\";\n return $cep;\n}", "function specialop() {\n\n\n\t}", "function yy_r167()\n {\n if (empty($this->db_quote_code_buffer)) {\n $this->_retvalue = '(string)' . $this->yystack[$this->yyidx + - 1]->minor;\n } else {\n $this->db_quote_code_buffer .= 'echo (string)' . $this->yystack[$this->yyidx + - 1]->minor . ';';\n $this->_retvalue = false;\n }\n }", "function indentation() {\n echo '<br><br>';\n}", "function hello (){\n echo 'hello, I am Jakodera'.'<br>';\n}", "function t ()\n{\n echo TPL;\n}", "function single_inline_codeblock($content) {\n $content = preg_replace(\"/(`[^`]*`)/\", \"<span class='code-inline'>$0</span>\", $content);\n $content = str_replace('`', '', $content);\n return $content;\n}", "function before_last_bar($text)\n {\n }", "function yy_r111(){ return; }", "function yy_r137(){$this->prefix_number++; $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'='.$this->yystack[$this->yyidx + 0]->minor.';?>'; $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.'$_tmp'.$this->prefix_number; }", "function testBug13600() \n {\n //$this->oBeaut->startLog();\n $this->oBeaut->addFilter('Pear');\n $sText = <<<SCRIPT\n<?php\nfunction example(){\n}\n?>\nSCRIPT;\n $this->setText($sText);\n $sExpected = <<<SCRIPT\n<?php\nfunction example()\n{\n}\n?>\nSCRIPT;\n $this->assertEquals($sExpected, $this->oBeaut->get());\n }", "function yy_r31()\n {\n $this->_retvalue = 'ob_start(); ' . $this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor, $this->yystack[$this->yyidx + 0]->minor) . ' echo ';\n $this->_retvalue .= $this->compiler->compileTag('Internal_Modifier', array(), array('modifier_list' => $this->yystack[$this->yyidx + - 1]->minor, 'value' => 'ob_get_clean()')) . ';';\n }", "function yy_r113()\n {\n return;\n }", "function test_compact_dyncall() {\n $var1 = 100;\n $var2 = 200;\n $f = 'compact';\n var_dump($f(['var1', 'var2']));\n}", "function foo()\n{\n\t// returns an array of all passed arguments\n\t$args = func_get_args();\n\t \n\tforeach ($args as $k => $v)\n\t{\n\t\techo \"arg\".($k+1).\": $v\\n\";\n\t}\n}", "function foo() {\n\t\t$num_args = func_num_args();\n\t\techo \"Número de argumentos: $num_args<br />\\n\";\n\t\tif ($num_args >= 2) {\n\t\techo \"El segundo argumento es: \" . func_get_arg(1) . \"<br />\\n\";\n\t\t}\n\t}", "function yy_r172()\n {\n if (empty($this->db_quote_code_buffer)) {\n $this->db_quote_code_buffer = \"ob_start();\\n\";\n }\n $this->db_quote_code_buffer .= $this->yystack[$this->yyidx + - 1]->minor->buffer;\n if ($this->block_nesting_level == count($this->compiler->_tag_stack)) {\n $this->prefix_number ++;\n $code = new Smarty_Compiler_Code();\n $code->iniTagCode($this->compiler);\n $code->formatPHP($this->db_quote_code_buffer . ' $_tmp' . $this->prefix_number . '=ob_get_clean();')->newline();\n $this->compiler->prefix_code[] = $code;\n $this->db_quote_code_buffer = '';\n $this->_retvalue = '$_tmp' . $this->prefix_number;\n } else {\n $this->_retvalue = false;\n }\n\n }", "function bar()\n{\n $demo = new Demonstration();\n $demo->executePrimeDirective();\n}", "function yy_r15()\n {\n $this->strip = true;\n }", "private function _spaceRemover($args)\r\n {\r\n if (isset($args[1]) && $args[1] != '') { // 0.func\r\n return $args[1].' .'.$args[2];\r\n } elseif (isset($args[4])){\r\n return ' ';\r\n } else return '';\r\n }", "function testBugInternal1() \n {\n $sText = <<<SCRIPT\n<?php\n\\$a = <<<HEREDOC\nsdsdsds\nHEREDOC;\n?>\nSCRIPT;\n $this->setText($sText);\n $sActual = $this->oBeaut->get();\n $this->assertTrue(preg_match(\"/HEREDOC;\\n\\s*?\\?>/ms\", $sActual));\n }", "abstract public function otherfoo();", "public function testExtraGap1($param)\n {\n //Test Right PHPDoc\n }", "function innerFunction() {\n }", "function _doLiteralBlock($value,$indent) {\n\t$exploded = explode(\"\\n\",$value);\n\t$newValue = '|';\n\t$indent += $this->_dumpIndent;\n\t$spaces = str_repeat(' ',$indent);\n\tforeach ($exploded as $line) {\n\t\t$newValue .= \"\\n\" . $spaces . trim($line);\n\t}\n\treturn $newValue;\n\t}", "function simpleFunction(){\r\n echo 'Hello World'.'<br>';\r\n }", "function inner()\n {\n echo \"Hey i am \".__FUNCTION__.\" inside the outer function \".\"\\n\";\n\n }", "function yy_r146(){$this->_retvalue = '%'; }", "function caldol_before_member_header_meta(){\n\techo \"<h1>got here with myBogusFunction</h1>\";\n}", "function testFuncton($first, $second) {\n //echo \"hello\". $first . $second;\n return $first;\n}", "function print_late_styles()\n {\n }", "function yy_r72()\n {\n $this->_retvalue = '!(' . $this->yystack[$this->yyidx + - 2]->minor . ' % ' . $this->yystack[$this->yyidx + 0]->minor . ')';\n }", "public function testExtraGap2($param)\n {\n //Test wrong PHPDoc\n }", "function debug_echo($line)\n{\n}", "function yy_r148(){$this->_retvalue = '||'; }", "function shortCodeMagic($att, $content = NULL)\n {\n\n }", "private function closureFeeding( Line$line )\n\t{\n\t\t$this->checkIndentAndProcess(...[\n\t\t\t$line,\n\t\t\tfunction( Line$line ){\n\t\t\t\tswitch( $line->getChar(0) )\n\t\t\t\t{\n\t\t\t\t\tcase ' ':{\n\t\t\t\t\t\t$this->currentClosure->feed($line->subIndentLine);\n\t\t\t\t\t}break;\n\t\t\t\t\tcase '}':{\n\t\t\t\t\t\tif( $line->content==='}' ){\n\t\t\t\t\t\t\t$this->closeClosure();\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tthrow new Exception('Syntax error');\n\t\t\t\t\t\t}\n\t\t\t\t\t}break;\n\t\t\t\t\tdefault:{\n\t\t\t\t\t\tdd($line->content);\n\t\t\t\t\t\tthrow new Exception('Syntax error');\n\t\t\t\t\t}break;\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( Line$line ){\n\t\t\t\t$this->parseLine($line);\n\t\t\t},\n\t\t\tfunction( Line$line ){\n\t\t\t\tthrow new Exception('Indent error');\n\t\t\t},\n\t\t]);\n\t}", "function WrightText() {\n echo \"Hello world!\".\"<br>\";\n}", "public function testBadlyClosedDocblock() {\n\t\t$info = Inspector::info(__METHOD__ . '()');\n\t\t$description = 'This docblock has an extra * in the closing element.';\n\t\t$this->assertEqual($description, $info['description']);\n\t\t$this->assertEqual('', $info['text']);\n\t}", "function test () {}", "function fix() ;", "function yy_r168()\n {\n if (empty($this->db_quote_code_buffer)) {\n $this->_retvalue = '(string)(' . $this->yystack[$this->yyidx + - 1]->minor . ')';\n } else {\n $this->db_quote_code_buffer .= 'echo (string)(' . $this->yystack[$this->yyidx + - 1]->minor . ');';\n $this->_retvalue = false;\n }\n }", "public function testCorrectTabSpacing() {\n\t\t$code = <<<EOD\narray(\n\t'foobar' => 'bar',\n\t'foo'\t => 'bar',\n);\nEOD;\n\t\t$this->assertRulePass($code, $this->rule);\n\t}", "function yy_r74(){ $this->_retvalue = 'OUTER'; }", "public function provideSafeStrings() {\n yield ['MarkSafe() > value', 'value'];\n yield [\"MarkSafe() >\\n value\", 'value'];\n yield [\"MarkSafe() >\\nline1\\nline2\", \"line1\\nline2\"];\n }" ]
[ "0.65057886", "0.63496614", "0.63397264", "0.5933249", "0.59028345", "0.57150495", "0.5711942", "0.5666884", "0.56366926", "0.5530456", "0.55207205", "0.54865634", "0.5470296", "0.5469068", "0.5452198", "0.5427644", "0.542373", "0.5418106", "0.5415212", "0.5408153", "0.540312", "0.53961945", "0.5366322", "0.534403", "0.5339566", "0.53161424", "0.5288192", "0.5267283", "0.52664596", "0.5265358", "0.52539766", "0.52442664", "0.5241908", "0.5230082", "0.5219363", "0.521174", "0.5206802", "0.5198109", "0.5189876", "0.51835066", "0.51684844", "0.51678467", "0.5151686", "0.514108", "0.5130421", "0.5119556", "0.51143306", "0.51108634", "0.51070726", "0.51070505", "0.5103144", "0.5085966", "0.50805044", "0.5062917", "0.50627595", "0.50483954", "0.50362986", "0.5029361", "0.50281566", "0.50169337", "0.50144345", "0.5000036", "0.4999331", "0.4973692", "0.49640024", "0.49613214", "0.49561247", "0.49497142", "0.49477264", "0.49370813", "0.4926473", "0.49227074", "0.49060094", "0.49037373", "0.4897547", "0.48962912", "0.4892623", "0.48924172", "0.48825747", "0.4880829", "0.4866994", "0.4852035", "0.48513642", "0.4845367", "0.48401514", "0.4838073", "0.48300773", "0.48225114", "0.4820348", "0.48197165", "0.48156828", "0.48147124", "0.48117363", "0.48114705", "0.4808094", "0.48012877", "0.4793831", "0.4792331", "0.47888878", "0.47874448" ]
0.52558476
30
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Display a listing of the resource.
public function index() { try{ $results = array(); $url = env('API_URL')."privileges"; $result = $this->httpGet($url); //echo '<pre>'; print_r($result);exit; $results = json_decode($result,false); $privileges = $results->data; return view('privileges.list')->with('privileges',$privileges); }catch(Exception $e){ echo $e->getMessage(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('privileges.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $privileges = new Privileges; $privileges->privilege_action = $request->input('privilege_action'); $privileges->privilege_desc = $request->input('privilege_desc'); $privileges->created_by = $request->input('created_by'); $privileges->updated_by = $request->input('updated_by'); $res = $privileges->save(); $request->session()->flash('alert-success', 'Privilege successfully Added!'); return redirect('privileges'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $url = env('API_URL')."privileges/show/$id"; $result = $this->httpGet($url); $results = json_decode($result,false); $privileges = $results->data[0]; return view('privileges.show')->with('privileges', $privileges); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $url = env('API_URL')."privileges/edit/$id"; $result = $this->httpGet($url); $results = json_decode($result,false); $privileges = $results->data[0]; return view('privileges.edit')->with('privileges', $privileges); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $privileges = Privileges::find($id); $privileges->privilege_action = $request->input('privilege_action'); $privileges->privilege_desc = $request->input('privilege_desc'); $privileges->created_by = $request->input('created_by'); $privileges->updated_by = $request->input('updated_by'); $res = $privileges->save(); $request->session()->flash('alert-success', 'Privileges successfully Updated!'); return redirect('privileges'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $pvroles = Privileges::where('privilege_id', $id); $pvroles->delete(); \Session::flash('alert-danger','Successfully deleted.'); return redirect('privileges'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Check if we're dealing with a logged in user
public function is_logged_in() { return is_a($this->user, 'WP_User'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isUserLoggedIn() {}", "protected function isUserLoggedIn() {}", "public function isUserLoggedIn()\n {\n return (isset($this->session->sUserId) && !empty($this->session->sUserId));\n }", "private function checkUserLoggedIn(): bool\n {\n $user = JFactory::getUser();\n if ($user->id > 0) {\n return true;\n } else {\n return false;\n }\n }", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function isUserLogged() {\r\n return isset($_SESSION['user']);\r\n }", "public function isLoggedIn()\n {\n return isset($_SESSION['user']);\n }", "public function is_user_logged_in(){\n\t\treturn $this->session->userdata('current_user_id') != FALSE;\n\t}", "public function loggedIn()\n {\n if ($this->userId) {\n return true;\n } else {\n return false;\n }\n }", "private function checkCurrentUser(){\n return isset($_SESSION['user']);\n }", "public function isLoggedIn()\n {\n return ($this->userInfo->userid ? true : false);\n }", "function is_logged_in() \n {\n return (empty($this->userID) || $this->userID == \"\") ? false : true;\n }", "public function isUserLoggedIn() \n {\n if (!isset($_SESSION['user_id']) || !isset($_SESSION['is_logged_in'])) {\n return false;\n } else {\n return true;\n }\n }", "public function loggedIn()\n {\n return $this->user() != null;\n }", "public function isUserLoggedIn() {\r\n\t\treturn ($this->coreAuthenticationFactory->isUserLoggedIn ());\r\n\t}", "static function isLoggedIn() {\n $user = self::currentUser();\n return isset($user) && $user != null;\n }", "protected function isAuthenticatedUser() {\n\t\treturn !$this->getUser()->isAnon();\n\t}", "public function isUserLoggedIn()\n {\n return $this->container->get('security.authorization_checker')\n ->isGranted('IS_AUTHENTICATED_FULLY');\n }", "public function loggedIn()\n {\n if($this->di->session->get('user'))\n {\n return true;\n }\n return false;\n }", "function isUserLoggedIn()\r\n\t{\r\n\t\t\tglobal $con;\r\n\t\t\t$return = false;\r\n\t\t\tif (isset($_SESSION['USER_ID']) && ($_SESSION['USER_ID'] > 0) && ($_SESSION['USER_ID'] != ''))\r\n\t\t\t{\r\n\t\t\t\t$id = $_SESSION['USER_ID'];\r\n\t\t\t\tif ($this->chkValidUser($id))\r\n\t\t\t\t{\r\n\t\t\t\t\t$return = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $return;\r\n\t}", "public function isLoggedIn()\n {\n return $this->session->has('user');\n }", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "function getUserIsLoggedIn() {\r\n\r\n // For now, just return false\r\n return false;\r\n}", "public static function check()\n {\n if (!empty($_SESSION['LOGGED_IN_USER'])){\n return true;\n } else{\n return false;\n }\n }", "public function isUserLoggedIn()\n {\n return $this->user_is_logged_in;\n }", "private function if_user_logged_in()\n {\n\n session_start();\n\n if(!empty($_SESSION)){\n\n if(isset($_SESSION[\"user_id\"]) && isset($_SESSION[\"user_type\"])){\n \n return true;\n\n }else{\n\n return false;\n }\n\n }else{\n\n return false;\n }\n }", "function is_logged_in()\n {\n //check session\n //return logged in user_id or false\n }", "static public function isUser(){\n if ( isset($_SESSION['id']) && $_SESSION['id'] != 0 ) {\n return true;\n } else {\n return false;\n }\n }", "function user_AuthIsUser() {\n\tglobal $AUTH;\n\t\n\treturn isset($AUTH['user']) && ($AUTH['user'] !== 0);\n}", "function isLoggedIn() {\n\t\t\tif(!$this->params['requested']) $this->cakeError('error404');\n\t\t\treturn $this->User->isLoggedIn();\n\t\t}", "public function isLoggedUser()\n {\n return $this->container->get('user')->isLogged();\n }", "public function logged_in()\n\t{\n\t\treturn $this->_me != NULL;\n\t}", "public function check_logged() {\n\t\tif ( property_exists( $this->current_user->data, 'ID' ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function wv_is_user_loggedin() {\n $output = 0;\n if (is_user_logged_in()) {\n $output = 1;\n } else {\n $output = 0;\n }\n return $output;\n }", "function isLoggedIn() {\n\treturn isset($_SESSION['user_id']);\n}", "public static function is_user_logged_in() {\r\n if (isset($_SESSION['user_id'])) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "function isLoggedIn() {\n\treturn isset($_SESSION['user']);\n}", "public function isLoggedIn()\n {\n // check session for user id\n if(isset($_SESSION['user']['id'])) {\n // return true;\n return $_SESSION['user']['id'];\n }\n else {\n return false;\n }\n }", "public function loggedIn($user) {\n if ($user != null) \n return true;\n return false;\n\n }", "public function isUserLogged(){\r\n return isset($_SESSION[$this->userSessionKey]);\r\n }", "public function is_logged_in()\n {\n return isset($this->user);\n }", "function is_user_logged_in()\n{\n global $current_user;\n return ($current_user != NULL);\n}", "public function isUserLoggedIn() {\n\n $this->restartSession();\n\n if ($this->checkLogin() == false) {\n return false;\n } else {\n return true;\n }\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function loggedIn()\n {\n if(isset($_SESSION['user']) && !empty($_SESSION['user'])) {\n return true;\n }\n\n return false;\n }", "public function logged_in()\n\t{\n\t\t$status = FALSE;\n\n\t\t// Get the user from the session\n\t\t$user = $this->_session->get($this->_config['session_key']);\n\n\t\tif ( ! is_object($user))\n\t\t{\n\t\t\t// Attempt auto login\n\t\t\tif ($this->auto_login())\n\t\t\t{\n\t\t\t\t// Success, get the user back out of the session\n\t\t\t\t$user = $this->_session->get($this->_config['session_key']);\n\t\t\t}\n\t\t}\n\n\t\t// check from DB if set in config\n\t\tif ($this->_config['strong_check'])\n\t\t{\n\t\t\t$user = $this->_get_object($user, TRUE);\n\t\t}\n\n\t\tif (is_object($user)\n\t\t\tAND is_subclass_of($user, 'Model_MangoRauth_User')\n\t\t\tAND $user->loaded()\n\t\t\tAND $user->is_active\n\t\t)\n\t\t{\n\t\t\t// Everything is okay so far\n\t\t\t$status = TRUE;\n\t\t}\n\n\t\treturn $status;\n\t}", "public function checkUser()\n {\n $response = $this->di->get(\"response\");\n $user = $this->di->get(\"user\");\n\n if (!$user->isLoggedIn()) {\n $response->redirect(\"login\");\n }\n }", "public function isLogged(){\n return isset($_SESSION[\"user\"]);\n }", "abstract protected function isUserLoggedIn() ;", "protected function isLoggedIn()\n\t{\n\t\treturn is_user_logged_in();\n\t}", "public function isLoggedIn()\n {\n if(Session::get('user_id') != '') {\n $this->user_id=Session::get('user_id');\n $this->role_id=Session::get('role_id');\n return true;\n }else {\n return false;\n }\n }", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function is_logged_in()\n\t{\n\t\treturn ($this->session->userdata('iduser') != FALSE);\n\t}", "function isLoggedIn(){\r\n APP::import('Component','Auth');\r\n $auth = new AuthComponent;\r\n $auth ->Session = $this->Session;\r\n $user = $auth->user();\r\n return !empty($user);\r\n \r\n }", "public function isLogged()\n {\n return $this->getID() && $this->getID() == get_current_user_id();\n }", "function is_user_logged_in() {\n\t$user = wp_get_current_user();\n\n\tif ( empty( $user->ID ) )\n\t\treturn false;\n\n\treturn true;\n}", "function is_logged_in()\n\t{\n\t\treturn require_login();\n\t}", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "public function isLoggedIn() {\n\t\treturn (bool) $this->getLoggedInUser();\n\t}", "function is_user_logged_in()\n{\n global $current_user;\n\n // if $current_user is not NULL, then a user is logged in!\n return ($current_user != NULL);\n}", "protected function isCurrentUser()\n {\n return ($this->credentials->check() && $this->credentials->getUser()->id == $this->wrappedObject->revisionable_id);\n }", "public static function isUserLoggedIn(): bool\n {\n if (isset($_SESSION['user_id'])) return true;\n return false;\n }", "private function _logged_in()\n {\n /*if(someone is logged in)\n RETURN TRUE;*/\n }", "public function isUserLoggedIn()\n {\n return $this->_customerSession->isLoggedIn();\n }", "public function logged_in()\n {\n if (isset($_SESSION['user_data'])) {\n return true;\n } else {\n return false;\n }\n }", "function IsLoggedIn() {\t\tif( Member::currentUserID() ) {\r\n\t\t return true;\r\n\t\t}\r\n }", "function loggedIn() {\n\t\treturn isset($_SESSION['username']);\n\t}", "public function isUserLoggedIn()\n {\n if (isset($_SESSION['user_login_status']) AND $_SESSION['user_login_status'] == 1) {\n return true;\n }\n // default return\n return false;\n }", "public function isLoggedIn()\n {\n $loggedIn = $this->di->get(\"session\")->has(\"user\");\n if (!$loggedIn) {\n $this->di->get(\"response\")->redirect(\"user/login\");\n return false;\n }\n return true;\n }", "public static function isLoggedIn()\n {\n return (bool)Users::getCurrentUser();\n }", "private function checkUser()\n {\n $session = $this->di->get(\"session\");\n\n if (!$session->get(\"activeUser\") && !$session->get(\"username\")) {\n return $this->di->response->redirect(\"user/login\");\n }\n }", "public function is_google_user_logged_in(){\n\t\treturn $this->session->userdata('current_google_user_id') != FALSE;\n\t}", "function getUserIsLoggedIn() {\r\n // Check session variable\r\n if (isset($_SESSION[\"currentUser\"]))\r\n return true;\r\n\r\n // else\r\n return false;\r\n}", "public function isUserAuthenticated () : bool {\n return $this->mainController->isUserAuthenticated();\n }", "function logged_in(){\n\t\tif((isset($_SESSION['user_id']) || isset($_SESSION['username'])) && (!empty($_SESSION['user_id']) || !empty($_SESSION['username']))){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function isLoggedIn() {\n if (isset($_SESSION[\"username\"])) {\n if (getUser($_SESSION[\"username\"]) != null) {\n return true;\n }\n }\n return false;\n}", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "function is_user_logged_in() {\n global $current_user;\n\n return ($current_user != NULL); // if $current_user is not NULL, return true, else false\n}", "public function is_facebook_user_logged_in(){\n\t\treturn $this->session->userdata('current_fb_user_id') != FALSE;\n\t}", "function logged_in() {\n\t\treturn isset($_SESSION['USERID']);\n \n\t}", "public function isLoggedIn() {\n if(isset($this->username)){\n return true;\n }\n return false;\n}", "protected function _logged_in()\n\t{\n\t\t$authentic = Auth::instance();\n\t\t\n\t\tif ($authentic->logged_in())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\t\n\t\t}\n\t}", "public function is_user_logged_in()\n {\n $result = (boolean)self::getUser();\n return $result;\n }", "public function logged_in() {\n return !empty($this->session->userdata('user_id'));\n }", "public function is_user_logged_in() {\n if ( $session_id = in('session_id') ) {\n return user()->check_session_id( $session_id );\n }\n else if ( is_user_logged_in() ) return wp_get_current_user()->ID;\n else return false;\n }", "public function ownerLoggedIn()\n {\n // For now just check session for an email and owner type\n if ( empty($_SESSION['email']) || $_SESSION['type'] != 'owner')\n return false;\n else\n return true;\n\n }", "function is_user()\n\t{\n\n\tif ($this->session->userdata('user') == false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\telse\n\t\t{\n\t\t\treturn true;\n\n\t\t}\n\n\t}", "public function is_loggedin()\n {\n if (isset($_SESSION['user_session'])) {\n return true;\n }\n }", "public function is_user_auth(){\n if($this->user_id==auth()->user()->id){\n return true;\n }else{\n return false;\n }\n }", "public static function isAuthenticated() {\n\n return isset($_SESSION[Security::SESSION_USER]) && $_SESSION[Security::SESSION_USER]->id > 0;\n\n }", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "function is_logged_in()\n{\n return isset($_SESSION['user']);\n}", "public function is_loggedin(){\n if(isset($_SESSION['user_session'])){\n return true;\n }\n return false;\n }", "function isUserLoggedIn()\n\t{\n\t\tglobal $loggedInUser,$db,$db_table_prefix;\n\t\t\n\t\t$sql = \"SELECT User_ID,\n\t\t\t\tPassword\n\t\t\t\tFROM \".$db_table_prefix.\"Users\n\t\t\t\tWHERE\n\t\t\t\tUser_ID = '\".$db->sql_escape($loggedInUser->user_id).\"'\n\t\t\t\tAND \n\t\t\t\tPassword = '\".$db->sql_escape($loggedInUser->hash_pw).\"' \n\t\t\t\tAND\n\t\t\t\tActive = 1\n\t\t\t\tLIMIT 1\";\n\t\t\n\t\tif($loggedInUser == NULL)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Query the database to ensure they haven't been removed or disabled\n\t\t\tif(returns_result($sql) > 0)\n\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// No result returned kill the user session, user removed or disabled\n\t\t\t\t$loggedInUser->userLogOut();\n\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function isLoggedIn() {\n\t\t\treturn $this->bLoggedInUser;\n\t\t}", "public function loggedIn(){\r\n if (isset($_SESSION['user_session']))\r\n return true;\r\n else\r\n return false;\r\n }", "public function userIsLoggedIn() {\n return auth()->check() ;\n }", "public static function check()\n {\n if(isset($_SESSION['auth_user'])) {\n return true;\n }\n\n return false;\n }", "public function is_logged_in() {\n\n\t}" ]
[ "0.8417591", "0.8417591", "0.8078399", "0.8063809", "0.80620295", "0.80546767", "0.80135024", "0.80120534", "0.80069834", "0.7974533", "0.79348576", "0.7929981", "0.79097885", "0.79000324", "0.7890783", "0.78847486", "0.78786665", "0.78457975", "0.7845419", "0.7840547", "0.78209984", "0.78195983", "0.78195983", "0.780554", "0.78000784", "0.77969086", "0.77967423", "0.7795268", "0.7791323", "0.77874595", "0.77799374", "0.7766734", "0.7746401", "0.77426684", "0.7728104", "0.7722664", "0.77193046", "0.7714117", "0.7711221", "0.77022487", "0.76925117", "0.769169", "0.7689529", "0.76889384", "0.7683335", "0.7682953", "0.76820636", "0.76810986", "0.76779896", "0.7665097", "0.766146", "0.7657208", "0.7656775", "0.7650633", "0.76480895", "0.76474774", "0.76418316", "0.7639834", "0.76343876", "0.76340073", "0.762495", "0.76149195", "0.7611262", "0.76106036", "0.7608957", "0.76054144", "0.7602345", "0.7596279", "0.75918496", "0.75880164", "0.7581535", "0.7569083", "0.7563743", "0.7562192", "0.7562158", "0.7552068", "0.7551575", "0.75446886", "0.75425094", "0.7539566", "0.75394607", "0.7533153", "0.75299686", "0.752342", "0.7522116", "0.75130934", "0.7512055", "0.7511782", "0.75116783", "0.75073606", "0.75069106", "0.75060123", "0.75012136", "0.7496482", "0.74903756", "0.74852484", "0.74837744", "0.7476977", "0.7472935", "0.7466184" ]
0.7598768
67
Check if current user is logged in and is a developer
public function is_developer() { return $this->user->exists() && in_array(self::DEVELOPER_ROLE_NAME, $this->user->roles); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasdeveloper()\n {\n return $this->hasuser() && $this->user()->isdeveloper();\n }", "public function isLoggedIn()\n {\n return ($this->userInfo->userid ? true : false);\n }", "protected function isUserLoggedIn() {}", "protected function isUserLoggedIn() {}", "public function isDeveloper()\r\n\t{\r\n\t\t\treturn count($this->getDeveloperProfiles()) > 0;\r\n\t}", "protected function isCurrentUser()\n {\n return ($this->credentials->check() && $this->credentials->getUser()->id == $this->wrappedObject->revisionable_id);\n }", "public function isLoggedIn()\n {\n return isset($_SESSION['user']);\n }", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "private function checkCurrentUser(){\n return isset($_SESSION['user']);\n }", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "protected function isCurrentUserAdmin() {}", "protected function isCurrentUserAdmin() {}", "public function isAuth() {\n $connector = Mage::getSingleton('vidtest/connector')->getApiModel($this->getApiModelCode());\n return $connector->isLoggedIn();\n }", "static function isLoggedIn() {\n $user = self::currentUser();\n return isset($user) && $user != null;\n }", "public function loggedIn()\n {\n if ($this->userId) {\n return true;\n } else {\n return false;\n }\n }", "public function isLoggedUser()\n {\n return $this->container->get('user')->isLogged();\n }", "public function loggedIn()\n {\n return $this->user() != null;\n }", "public function is_user_logged_in(){\n\t\treturn $this->session->userdata('current_user_id') != FALSE;\n\t}", "private function checkUserLoggedIn(): bool\n {\n $user = JFactory::getUser();\n if ($user->id > 0) {\n return true;\n } else {\n return false;\n }\n }", "public function isUserLoggedIn()\n {\n return $this->container->get('security.authorization_checker')\n ->isGranted('IS_AUTHENTICATED_FULLY');\n }", "function wv_is_user_loggedin() {\n $output = 0;\n if (is_user_logged_in()) {\n $output = 1;\n } else {\n $output = 0;\n }\n return $output;\n }", "public function isUserLoggedIn()\n {\n return $this->_customerSession->isLoggedIn();\n }", "public static function isLoggedIn()\n {\n return (bool)Users::getCurrentUser();\n }", "function isUserLogged() {\r\n return isset($_SESSION['user']);\r\n }", "private function isUser() : bool\n {\n return $this->role('user');\n }", "public function isBackendUserLoggedIn() {}", "public function isLoggedIn()\n {\n return $this->session->has('user');\n }", "public function currentUserHasManagerAccess()\n {\n $user = Service::getCurrentUser();\n \n if (!$user) {\n return false;\n }\n \n if ($this->userManagesSite($user)) {\n return true;\n }\n \n if ($user->isAdmin()) {\n return true;\n }\n \n return false;\n }", "function is_user_logged_in()\n{\n global $current_user;\n return ($current_user != NULL);\n}", "function is_admin()\n {\n //is a user logged in?\n\n //if so, check admin status\n\n //returns true/false\n\n }", "public function is_google_user_logged_in(){\n\t\treturn $this->session->userdata('current_google_user_id') != FALSE;\n\t}", "public function ownerLoggedIn()\n {\n // For now just check session for an email and owner type\n if ( empty($_SESSION['email']) || $_SESSION['type'] != 'owner')\n return false;\n else\n return true;\n\n }", "abstract function is_developer();", "function customerIsLogedIn() {\n\t\treturn isset($_SESSION) && isset($_SESSION[\"webuser\"]) && isset($_SESSION[\"webuser\"][\"ID\"]);\n\t}", "function user_AuthIsUser() {\n\tglobal $AUTH;\n\t\n\treturn isset($AUTH['user']) && ($AUTH['user'] !== 0);\n}", "function logged_in() {\r\n\t\treturn isset($_SESSION[\"admin_id\"]);\r\n\t}", "public function logged_in()\n\t{\n\t\treturn $this->_me != NULL;\n\t}", "public function isUserLoggedIn()\n {\n return $this->user_is_logged_in;\n }", "function isAppLoggedIn(){\n\treturn isset($_SESSION['uid']) && isset($_SESSION['username']) && isset($_SESSION['loggedIn']) && ($_SESSION['loggedIn']===true);\n}", "static public function isUser(){\n if ( isset($_SESSION['id']) && $_SESSION['id'] != 0 ) {\n return true;\n } else {\n return false;\n }\n }", "public function isLoggedIn()\n {\n return true;\n }", "function isLoggedIn(){\n return $this->auth->isLoggedIn();\n }", "public function is_logged_in()\n {\n return isset($this->user);\n }", "public function is_logged_in() {\n\n\t}", "public function is_logged_in() {\n return isset($this->admin_id) && $this->last_login_is_recent();\n \n }", "function isLoggedIn() {\n\t\t\tif(!$this->params['requested']) $this->cakeError('error404');\n\t\t\treturn $this->User->isLoggedIn();\n\t\t}", "public function isUserLoggedIn()\n {\n return (isset($this->session->sUserId) && !empty($this->session->sUserId));\n }", "public function isCurrentlyLoggedIn() {}", "function isLoggedIn() {\n\treturn isset($_SESSION['user']);\n}", "public function userIsLoggedIn() {\n return auth()->check() ;\n }", "public static function currentUserHasAccess() {\n return current_user_can('admin_access');\n }", "public function isUserLoggedIn() {\r\n\t\treturn ($this->coreAuthenticationFactory->isUserLoggedIn ());\r\n\t}", "public function isLogged(){\n return isset($_SESSION[\"user\"]);\n }", "function isLoggedIn() {\n\treturn isset($_SESSION['user_id']);\n}", "public function getIsUserLoggedIn()\n {\n if (!isset($this->isUserLoggedIn)) {\n $userId = $this->getFamilyGraph()->getUserId();\n $this->isUserLoggedIn = (!empty($userId));\n }\n \n return $this->isUserLoggedIn;\n }", "function isLoggedIn(){\r\n APP::import('Component','Auth');\r\n $auth = new AuthComponent;\r\n $auth ->Session = $this->Session;\r\n $user = $auth->user();\r\n return !empty($user);\r\n \r\n }", "public function is_facebook_user_logged_in(){\n\t\treturn $this->session->userdata('current_fb_user_id') != FALSE;\n\t}", "function IsLoggedIn() {\t\tif( Member::currentUserID() ) {\r\n\t\t return true;\r\n\t\t}\r\n }", "public function is_user_auth(){\n if($this->user_id==auth()->user()->id){\n return true;\n }else{\n return false;\n }\n }", "public static function check()\n {\n if (!empty($_SESSION['LOGGED_IN_USER'])){\n return true;\n } else{\n return false;\n }\n }", "function is_user_logged_in()\n{\n global $current_user;\n\n // if $current_user is not NULL, then a user is logged in!\n return ($current_user != NULL);\n}", "static public function isLoggedIn(){\n \treturn (self::getInstance()->getId()>1);\n }", "function is_admin_logged_in()\n{\n global $current_user;\n return ($current_user != NULL && $current_user['un'] == 'admin');\n}", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function isLoggedIn()\n {\n if($this->session->has('admin') && $this->session->has('token')){\n $admin = $this->session->get('admin');\n $token = $this->session->get('token');\n\n $admin = $this->adminRepo->findOneBy(array('login'=>$admin, 'token'=>$token));\n\n if(!empty($admin)){\n return true;\n }else{\n return false;\n }\n }\n return false; \n }", "public function isLoggedIn();", "public function isLoggedIn();", "public function isLoggedIn(): bool\n {\n return $this->getRights() > self::GUEST;\n }", "abstract protected function isUserLoggedIn() ;", "function is_logged_in() \n {\n return (empty($this->userID) || $this->userID == \"\") ? false : true;\n }", "function is() {\n global $_SESSION;\n if (! empty($_SESSION['payback']['user'])) return true;\n else return false;\n }", "function logged_in() {\n\treturn isset($_SESSION['admin_id']);\n}", "public function isLoggedIn() {\n\t\treturn (bool) $this->getLoggedInUser();\n\t}", "function getUserIsLoggedIn() {\r\n\r\n // For now, just return false\r\n return false;\r\n}", "function isUser(){\n\t\tif(isset($_SESSION['type']) && $_SESSION['type']=='user')\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public static function am_i_admin() \n {\n return ($_SESSION['_user'] == AV_DEFAULT_ADMIN || $_SESSION['_is_admin']);\n }", "public function loggedIn()\n {\n if($this->di->session->get('user'))\n {\n return true;\n }\n return false;\n }", "public function isLoggedIn()\n {\n $database = new Database();\n $loggedIn = $database->getAdminByUsername($_SESSION['user']);\n $admin = new Admin($loggedIn['adminId'], $loggedIn['username'], $loggedIn['adminLevel'], $loggedIn['active']);\n if(isset($_SESSION['user']) === true && strpos($admin->getAdminLevel(), Partner) !== false && $admin->getActive() == 1) {\n $testLogin = true;\n } else {\n $this->_f3->reroute('/Login');\n }\n $this->_f3->set('login', $testLogin);\n $this->_f3->set('admin', $admin);\n }", "function is_user_logged_in() {\n global $current_user;\n\n return ($current_user != NULL); // if $current_user is not NULL, return true, else false\n}", "function isLoggedIn()\n\t{\n\t\tif ( $this->_isAuthorized() ){\t\n\t\t\treturn true;\n\t\t} else return false;\n\t\n\t}", "public function memberIsLoggedIn()\n {\n return $_SESSION['__COMMENTIA__']['member_is_logged_in'];\n }", "public function isCurrentUser()\n {\n return $this->_vars instanceof \\Zend_Session_Namespace;\n }", "private function if_user_logged_in()\n {\n\n session_start();\n\n if(!empty($_SESSION)){\n\n if(isset($_SESSION[\"user_id\"]) && isset($_SESSION[\"user_type\"])){\n \n return true;\n\n }else{\n\n return false;\n }\n\n }else{\n\n return false;\n }\n }", "public function isLoggedIn()\n {\n $database = new Database();\n $loggedIn = $database->getAdminByUsername($_SESSION['user']);\n $admin = new Admin($loggedIn['adminId'], $loggedIn['username'], $loggedIn['adminLevel'], $loggedIn['active']);\n if(isset($_SESSION['user']) === true && strpos($admin->getAdminLevel(), Resources) !== false && $admin->getActive() == 1) {\n $testLogin = true;\n } else {\n $this->_f3->reroute('/Login');\n }\n $this->_f3->set('login', $testLogin);\n $this->_f3->set('admin', $admin);\n }", "public function isUserLogged(){\r\n return isset($_SESSION[$this->userSessionKey]);\r\n }", "public function isLoggedInCustomer(){\n return $this->customerSession->isLoggedIn();\n }", "public function customerIsAlreadyLoggedIn()\n {\n return (bool)$this->httpContext->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_AUTH);\n }", "function getUserIsLoggedIn() {\r\n // Check session variable\r\n if (isset($_SESSION[\"currentUser\"]))\r\n return true;\r\n\r\n // else\r\n return false;\r\n}", "public function getIsLoggedIn()\n {\n return !$this->getIsGuest();\n }", "public function accessibleByCurrentUser(){\n // return true if AYC user\n if(\\Auth::isSuperAdmin()) return true;\n\n // otherwise check if personally added to this\n $allowedPages = \\Auth::getAllowedPages();\n if(in_array($this->id, $allowedPages)) return true;\n\n // if not specifically added personally to this page\n // check the user group can access this page\n if($this->groupHasPermission(\\Auth::getUserLevel())) return true;\n\n // otherwise return false\n return false;\n\n }", "public function loggedIn($user) {\n if ($user != null) \n return true;\n return false;\n\n }", "public function isCustomerLoggedIn()\n {\n $isLoggedIn = $this->customerContext->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_AUTH);\n return (bool) $isLoggedIn ? 1 : 0;\n }", "public function isLogged()\n {\n return $this->getID() && $this->getID() == get_current_user_id();\n }", "public function isLoggedIn()\n {\n // check session for user id\n if(isset($_SESSION['user']['id'])) {\n // return true;\n return $_SESSION['user']['id'];\n }\n else {\n return false;\n }\n }", "public function isLoggedIn() {\n\t\t\treturn $this->bLoggedInUser;\n\t\t}", "public static function isAuth() {\r\n if (isset($_SESSION['username']) && (($_SESSION['authorized'] == 'ADMIN')\r\n OR ($_SESSION['authorized'] == 'SUPERUSER')\r\n OR ($_SESSION['authorized'] == 'MEMBER')))\r\n return true;\r\n }", "public function isLoggedIn()\r\n {\r\n if ($this->session->has('AUTH_NAME') AND $this->session->has('AUTH_EMAIL') AND $this->session->has('AUTH_CREATED') AND $this->session->has('AUTH_UPDATED')) {\r\n return true;\r\n }\r\n return false;\r\n }", "function logged_in() {\n\t\treturn isset($_SESSION['USERID']);\n \n\t}", "function is_user()\n\t{\n\n\tif ($this->session->userdata('user') == false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\telse\n\t\t{\n\t\t\treturn true;\n\n\t\t}\n\n\t}" ]
[ "0.7871706", "0.7240106", "0.7231728", "0.7231728", "0.7224461", "0.7183379", "0.705646", "0.7028898", "0.7016617", "0.7004694", "0.693935", "0.69392395", "0.69323033", "0.69044566", "0.6876084", "0.6863968", "0.68616444", "0.6858684", "0.6853325", "0.68518513", "0.6847285", "0.68403214", "0.683617", "0.6835762", "0.6828818", "0.6825634", "0.68216217", "0.68093246", "0.6809253", "0.6788654", "0.67784774", "0.67667496", "0.6763952", "0.67588305", "0.6750667", "0.6746041", "0.6743577", "0.67408276", "0.67400295", "0.67388654", "0.6737718", "0.67323995", "0.67306817", "0.6720599", "0.6707374", "0.6704248", "0.6703127", "0.66966647", "0.66936225", "0.6693611", "0.6690286", "0.6677816", "0.6671683", "0.66691715", "0.6653916", "0.6647403", "0.6646548", "0.6643831", "0.663594", "0.66339093", "0.6632857", "0.66317123", "0.66269577", "0.66237247", "0.66237247", "0.6623646", "0.661779", "0.661779", "0.6610484", "0.6607969", "0.66050065", "0.660491", "0.6603672", "0.66013473", "0.65807396", "0.65743345", "0.65711695", "0.6568203", "0.65653414", "0.6564836", "0.6561777", "0.6556095", "0.65513426", "0.6549031", "0.65485144", "0.6542979", "0.65377945", "0.65374935", "0.65367323", "0.6534427", "0.6531183", "0.6527814", "0.65258425", "0.6522981", "0.6520844", "0.65184605", "0.65139395", "0.6510003", "0.65081704", "0.65055954" ]
0.8209033
0
Save a tyk access token Note that the actual tokens are not stored, just the name and id so we can manage them
public function save_access_token($api_id, $token_name, $hash) { $data = array( 'api_id' => sanitize_text_field($api_id), 'token_name' => sanitize_text_field($token_name), 'hash' => sanitize_text_field($hash), ); // check if token already exists $tokens = $this->get_access_tokens(); $key = false; if (count($tokens)) { $ids = wp_list_pluck($tokens, 'hash'); $key = array_search($hash, $ids); } // this is a new token if ($key === false) { $tokens[] = $data; } // this is an existing token else { $tokens[$key] = $data; } // re-index array and update key in user meta storage update_user_meta($this->user->ID, self::META_TYK_ACCESS_TOKENS_KEY, array_values($tokens)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveAccessToken($accessToken);", "public function saveAccessTokenToDB($accessToken);", "public function saveAccessToken($accessToken)\n {\n session()->put('drive-access-token', $accessToken);\n }", "public function saveAccessToken($accessToken)\n {\n file_put_contents($_SERVER['DOCUMENT_ROOT'].$this->tokenFile, serialize($accessToken));\n }", "public function storeAccessToken(AccessToken $token):static;", "private function save_refresh_token() {\n global $DB, $USER;\n\n $newdata = new stdClass();\n $newdata->refreshtokenid = $this->client->getRefreshToken();\n $newdata->gmail = $this->get_user_info()->email;\n\n if (!is_null($newdata->refreshtokenid) && !is_null($newdata->gmail)) {\n $rectoken = $DB->get_record('repository_gdrive_tokens', array ('userid' => $USER->id));\n if ($rectoken) {\n $newdata->id = $rectoken->id;\n if ($newdata->gmail === $rectoken->gmail) {\n unset($newdata->gmail);\n }\n $DB->update_record('repository_gdrive_tokens', $newdata);\n } else {\n $newdata->userid = $USER->id;\n $newdata->gmail_active = 1;\n $DB->insert_record('repository_gdrive_tokens', $newdata);\n }\n }\n\n $event = \\repository_googledrive\\event\\repository_gdrive_tokens_created::create_from_userid($USER->id);\n $event->trigger();\n }", "public function setaccess_token($value);", "private function StoreAccessToken($access_token)\n\t{\n\t\t$_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url] = $access_token;\n\t}", "function saveToken (string $token = '', string $id = 'default') : void {\n\t$user = getUserObject($id);\n\tif(!$user){\n\t\treturn;\n\t}\n\t$tokenProvided = true;\n\tif($token === ''){\n\t\t$token = md5(uniqid());\n\t\tfor($i = 0; $i < getConfig(\"LOGIN_TOKEN_32_CHAR_CHUNKS\") - 1; $i++){\n\t\t\t$token .= md5($token.uniqid());\n\t\t}\n\t\t$token .= md5($token);\n\t\t$tokenProvided = false;\n\t}\n\t$expiration = new DateTime('now');\n\t$expiration = $expiration->add(new DateInterval(\"PT\".getConfig(\"LOGIN_TOKEN_EXPIRATION_HOURS\").\"H\"));\n\tif($tokenProvided){\n\t\texecuteQuery(\n\t\t\t_BASE_DB_HOOK,\n\t\t\t'UPDATE user_token SET expiration = DATE_ADD(CURDATE(), INTERVAL '.getConfig(\"LOGIN_TOKEN_EXPIRATION_HOURS\").' HOUR) WHERE token = ?;',\n\t\t\t[['s' => $token]]\n\t\t);\n\t}else{\n\t\texecuteQuery(\n\t\t\t_BASE_DB_HOOK,\n\t\t\t'INSERT INTO user_token VALUES (NULL, ?, ?, ?)',\n\t\t\t[\n\t\t\t\t['i' => $user['id']],\n\t\t\t\t['s' => $token],\n\t\t\t\t['s' => $expiration->format('Y-m-d')]\n\t\t\t]\n\t\t);\n\t}\n\n\tsetcookie(getConfig(\"SITE_TITLE\").'-logintoken', $token, time() + (3600 * getConfig(\"LOGIN_TOKEN_EXPIRATION_HOURS\")), '/');\n}", "protected function store_access_token($token) {\n global $SESSION;\n $SESSION->{self::SESSIONKEY} = $token;\n }", "protected function access_token() {\r\n\r\n\t\t$this->tmhOAuth->config['user_token'] = $_SESSION['oauth']['oauth_token'];\r\n\t\t$this->tmhOAuth->config['user_secret'] = $_SESSION['oauth']['oauth_token_secret'];\r\n\r\n\t\t$code = $this->tmhOAuth->request(\r\n\t\t\t'POST',\r\n\t\t\t$this->tmhOAuth->url('oauth/access_token', ''),\r\n\t\t\tarray(\r\n\t\t\t\t'oauth_verifier' => $_REQUEST['oauth_verifier']\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tif ($code == 200) {\r\n\t\t\t$token = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\r\n\t\t\t$this->conf->TwitterOAuthToken = $token['oauth_token'];\r\n\t\t\t$this->conf->TwitterOAuthSecret = $token['oauth_token_secret'];\r\n\t\t\t$this->conf->TwitterUsername = $token['screen_name'];\r\n\t\t\t$this->conf->write();\r\n\t\t\tunset($_SESSION['oauth']);\r\n\t\t\theader('Location: ' . SocialHelper::php_self());\r\n\t\t} else {\r\n\t\t\t$this->addError();\r\n\t\t}\r\n\t}", "public function setToken()\n {\n if (session()->has('drive-access-token')) {\n $accessToken = session()->get('drive-access-token');\n $this->setAccessToken($accessToken);\n if ($this->isAccessTokenExpired()) {\n $accessToken = $this->fetchAccessTokenWithRefreshToken($this->getRefreshToken());\n session()->put('drive-access-token', $accessToken);\n }\n }\n }", "protected function saveAccessToken(OAuthToken $token)\n\t{\n\t\treturn $this->setState('token', $token);\n\t}", "public function access_token() {\n\t\ttry {\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t$this->OAuth2Lib->grantAccessToken();\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->fail($e);\n\t\t}\n\t}", "function saveToken($token) {\r\n\t\t$_SESSION['token'] = $token;\r\n\t}", "public static function set_token_access() {\n if (SesLibrary::_get('_uuid') || SesLibrary::_get('_uuid') == null) {\n $param = [\n 'uri' => config('app.base_api_uri') . '/generate-token-access?deviceid=' . SesLibrary::_get('_uuid'),\n 'method' => 'GET'\n ];\n $this->__init_request_api($param);\n }\n }", "function fbComments_storeAccessToken() {\n\tfbComments_log('In ' . __FUNCTION__ . '()');\n\tglobal $fbc_options;\n\n\tif (!$fbc_options['accessToken']) {\n\t\t$accessToken = fbComments_getUrl(\"https://graph.facebook.com/oauth/access_token?type=client_cred&client_id={$fbc_options['appId']}&client_secret={$fbc_options['appSecret']}\");\n\t\tfbComments_log(\" got an access token of [$accessToken]\");\n\t\tif (strpos($accessToken,'<div class=\"error\">') == 0) { $accessToken = substr($accessToken, 13); }\n\t\telse { echo '<hr />didnt find accesstoken line 161 comments-core<hr />'; $accessToken = ''; }\n\t\tif ($accessToken != '') {\n\t\t\tfbComments_log(\" Storing an access token of $accessToken\");\n\t\t\t$fbc_options['accessToken'] = $accessToken;\n\t\t\tupdate_option('fbComments', $fbc_options);\n\t\t} else {\n\t\t\tfbComments_log(' FAILED to obtain an access token');\n\t\t}\n\t}\n}", "private function saveData() {\n // Create a new object with relevant information\n $data = new stdClass();\n $data->accessToken = $this->accessToken;\n $data->expirationDate = $this->expirationDate;\n $data->refreshToken = $this->refreshToken;\n\n // And save it to disk (will automatically create the file for us)\n file_put_contents(DATA_FILE, json_encode($data));\n }", "public function saveAccessToken($accessToken)\n {\n // This should write more than one byte as such any falsey value is a problem\n if (file_put_contents('./wpOauthToken', serialize($accessToken))) {\n return true;\n }else{\n return false;\n }\n }", "public function facebookStoreToken() {\n if ( ! empty( $_GET['access_token'] ) ) {\n $this->instagramCode = $_GET['access_token'];\n update_option( self::FACEBOOK_TOKEN, $_GET['access_token'] );\n }\n }", "abstract public function persistSessionToken() ;", "public function setTokens($data)\n {\n $data = json_decode($data);\n\n $data->access_token_expires_at = Carbon::now()\n ->addSeconds($data->access_token_expires_in)\n ->format('Y-m-d H:i:s');\n\n $data->refresh_token_expires_at = Carbon::now()\n ->addSeconds($data->refresh_token_expires_in)\n ->format('Y-m-d H:i:s');\n\n $this->preferences->hue_access_token = $data->access_token;\n $this->preferences->hue_access_token_expires_in = $data->access_token_expires_in;\n $this->preferences->hue_access_token_expires_at = $data->access_token_expires_at;\n\n $this->preferences->hue_refresh_token = $data->refresh_token;\n $this->preferences->hue_refresh_token_expires_in = $data->refresh_token_expires_in;\n $this->preferences->hue_refresh_token_expires_at = $data->refresh_token_expires_at;\n $this->preferences->update();\n }", "private function saveAccessTokenDataToSession($accessTokenData){\n\t\t$tokenDataForSession = array(\n\t\t\t\"twitter_oauth_access_token\"\t=>\t$accessTokenData[\"oauth_token\"],\n\t\t\t\"twitter_oauth_access_token_secret\"\t=>\t$accessTokenData[\"oauth_token_secret\"]\n\t\t);\n\n\t\t$this->CI->session->set_userdata($tokenDataForSession);\n\t}", "public function postToken()\n {\n // include our OAuth2 Server object\n require_once __DIR__.'/server.php';\n\n $request = OAuth2\\Request::createFromGlobals();\n\n // Handle a request for an OAuth2.0 Access Token and send the response to the client\n $server->handleTokenRequest(OAuth2\\Request::createFromGlobals())->send();\n \n }", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function createToken();", "private static function storeAccessToken(array $accessToken, string $credentialsPath): void\n {\n // Store the credentials to disk.\n if (!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, json_encode($accessToken));\n }", "public function save()\n {\n if ($this->loaded === false) {\n // Set the created time, token, and hash of the user agent\n $this->created = $this->now;\n $this->user_agent = sha1(Kohana::$user_agent);\n }\n\n // Create a new token each time the token is saved\n $this->token = $this->create_token();\n\n return parent::save();\n }", "public function token() {\r\n\t\t\r\n\t\t$response = $this->OAuth2->getAccessTokenData();\r\n\t\t\r\n\t\tif (empty($response)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->set($response);\r\n\t\t\r\n\t}", "public function generateAccessToken()\n {\n $this->access_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth('api')->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n\n\n }", "abstract public function url_access_token();", "function token_set($name) {\r\n\t$session=Zend_Auth::getInstance()->getStorage();\r\n\t$token=auth();\r\n\t$session->set($name,$token);\r\n\r\n\treturn $token;\r\n}", "public function save($token = null) {\n\n // Verify if the code exists\n if ($this->CI->input->get('code', TRUE)) {\n\n // Set params\n $params = array(\n 'grant_type' => 'authorization_code',\n 'code' => $this->CI->input->get('code', TRUE),\n 'redirect_uri' => $this->redirect_uri,\n 'client_id' => $this->client_id,\n 'client_secret' => $this->client_secret\n );\n\n // Get access token\n $response = json_decode(post($this->endpoint . '/accessToken', $params), true);\n\n // Verify if token exists\n if ( isset($response['access_token']) ) {\n\n // Get exiration time\n $expires = date('Y-m-d H:i:s', time() + $response['expires_in']);\n\n // Get linkedin profile\n $profile = json_decode(get('https://api.linkedin.com/v2/me?oauth2_access_token=' . $response['access_token']), true);\n\n if ($profile) {\n\n // Get linkedin organizations\n $organizations = json_decode(get('https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&state=APPROVED&projection=(*,elements*(*,organizationalTarget~(*)))&oauth2_access_token=' . $response['access_token']), true);\n\n if ( isset($organizations['elements']) ) {\n\n // Verify if must be refreshed a token\n if ( isset( $_SESSION['account'] ) ) {\n\n $acc = 0;\n $act = $_SESSION['account'];\n unset($_SESSION['account']);\n\n if (!is_numeric($act)) {\n\n exit();\n\n } else {\n\n // Get user social account\n $gat = $this->CI->networks->get_account($act);\n\n if ($gat) {\n $acc = $gat[0]->net_id;\n }\n\n }\n\n // Connect pages or refresh tokens\n $j = 0;\n $b1 = 0;\n foreach ($organizations['elements'] as $element) {\n\n if (\"urn:li:organization:\" . $element['organizationalTarget~']['id'] == $acc) {\n $j++;\n }\n\n $acci = 0;\n $gat = $this->CI->networks->get_account_field($this->CI->user_id, \"urn:li:organization:\" . $element['organizationalTarget~']['id'], 'network_id');\n\n if ($gat) {\n\n $acci = $gat;\n }\n\n if ($acci) {\n\n if ($this->CI->networks->update_network($acci, $this->CI->user_id, date('Y-m-d H:i:s', strtotime('+60 days')), $response['access_token'])) {\n\n $b1++;\n }\n\n } else {\n\n if ($this->CI->networks->add_network('linkedin_companies', \"urn:li:organization:\" . $element['organizationalTarget~']['id'], $response['access_token'], $this->CI->user_id, $expires, $element['organizationalTarget~']['localizedName'], '', '')) {\n\n $b1++;\n }\n\n }\n\n }\n\n if ($j > 0) {\n\n if ($b1 > 0) {\n\n // Display the success message\n echo $this->CI->ecl('Social_login_connect')->view($this->CI->lang->line('social_connector'), '<p class=\"alert alert-success\">' . $this->CI->lang->line('networks_access_token_was_renewed') . '</p>', true);\n exit();\n\n } else {\n\n // Display the error message\n echo $this->CI->ecl('Social_login_connect')->view($this->CI->lang->line('social_connector'), '<p class=\"alert alert-error\">' . $this->CI->lang->line('networks_access_token_was_not_renewed') . '</p>', false);\n exit();\n }\n } else {\n\n // Display the error message\n echo $this->CI->ecl('Social_login_connect')->view($this->CI->lang->line('social_connector'), '<p class=\"alert alert-error\">' . $this->CI->lang->line('networks_seams_you_are_logged_different_account') . '</p>', false);\n exit();\n\n }\n\n }\n\n foreach ($organizations['elements'] as $element) {\n\n $this->CI->networks->add_network('linkedin_companies', \"urn:li:organization:\" . $element['organizationalTarget~']['id'], $response['access_token'], $this->CI->user_id, $expires, $element['organizationalTarget~']['localizedName'], '', '');\n\n }\n\n // Display the success message\n echo $this->CI->ecl('Social_login_connect')->view($this->CI->lang->line('social_connector'), '<p class=\"alert alert-success\">' . $this->CI->lang->line('networks_all_linkedin_companies_connected') . '</p>', true);\n exit();\n\n }\n\n } else {\n\n // Display the error message\n echo $this->CI->ecl('Social_login_connect')->view($this->CI->lang->line('social_connector'), '<p class=\"alert alert-error\">' . $this->CI->lang->line('networks_you_have_no_companies') . '</p>', false);\n exit();\n\n }\n\n }\n\n }\n \n // Display the error message\n echo $this->CI->ecl('Social_login_connect')->view($this->CI->lang->line('social_connector'), '<p class=\"alert alert-error\">' . $this->CI->lang->line('networks_an_error_occurred') . '</p>', false); \n \n }", "private function setToken() {\n\n /* valid register */\n $request = $this->post('/v1/register', [\n 'firstname' => 'John',\n 'lastname' => 'Doe',\n 'email' => 'john.doe@email.com',\n 'password' => 'secret',\n ]);\n\n /* valid login */\n $this->post('/v1/login', [\n 'email' => 'john.doe@email.com',\n 'password' => 'secret',\n ]);\n\n }", "public function store(array $data){\n $token = new Token();\n $token\n ->setUserId($data['userId'])\n ->setEmail($data['email'])\n ->setKey($data['key'])\n ->setCreatedAt()\n ;\n\n $this->dm->persist($token);\n $this->dm->flush();\n // dd($token);\n return $token;\n }", "public static function createAccessToken(){\r\n\t\t$token = new AccessToken(substr(sha1(microtime()), 0, 30));\r\n\t\treturn $token;\r\n\t}", "protected function _setOauthToken()\n {\n $this->_initHttpClient($this->_endpointUrls['access_token'], CurlHttpClient::POST);\n $this->_httpClient->setPostParam('client_id', $this->_config['client_id']);\n $this->_httpClient->setPostParam('client_secret', $this->_config['client_secret']);\n $this->_httpClient->setPostParam('grant_type', $this->_config['grant_type']);\n $this->_httpClient->setPostParam('redirect_uri', $this->_config['redirect_uri']);\n $this->_httpClient->setPostParam('code', $this->getAccessCode());\n $this->_oauthToken = $this->_getHttpClientResponse();\n }", "public function setAccessToken($access_token, $token_type=\"bearer\"){\n /* Access Check */ \n if (!$this->validCredentials()){\n return;\n }\n /* Access Check */ \n variable_set(EBConsts::EBS_CONFIG_AUTHTOKEN, $access_token);\n variable_set(EBConsts::EBS_CONFIG_AUTHTOKEN_TYPE, $token_type);\n }", "public function post(array $body) {\n $this->permission('Garden.Tokens.Add');\n\n $in = $this->schema([\n 'name:s' => 'A name indicating what the access token will be used for.',\n 'transientKey:s' => 'A valid CSRF token for the current user.'\n ], 'in')->setDescription('Issue a new access token for the current user.');\n $out = $this->schema($this->sensitiveSchema(), 'out');\n\n $body = $in->validate($body);\n $this->validateTransientKey($body['transientKey']);\n\n // Issue the new token.\n $accessToken = $this->accessTokenModel->issue(\n $this->getSession()->UserID,\n self::DEFAULT_EXPIRY,\n self::TOKEN_TYPE\n );\n $this->validateModel($this->accessTokenModel);\n $token = $this->accessTokenModel->trim($accessToken);\n $row = $this->accessTokenModel->getToken($token);\n $accessTokenID = $row['AccessTokenID'];\n $row = $this->accessTokenModel->setAttribute($accessTokenID, 'name', $body['name']);\n\n // Serve up the result.\n $row = $this->normalizeOutput($row);\n $result = $out->validate($row);\n return $result;\n }", "public function setAccessToken($access_token, $client_id, $user_id, $expires, $scope = null)\n {\n $expires = date('Y-m-d H:i:s', $expires);\n\t\t\n\t\t// garbage collector. Remove expired tokens\n\t\tDoctrine_Query::create()->delete($this->config['access_token_table'])->where (\"expires < ?\", date('Y-m-d H:i:s'))->execute();\n\t\t\n // if it exists, update it.\n if ( $this->getAccessToken($access_token) ) {\n \treturn Doctrine_Query::create()->update($this->config['access_token_table'])->set('client_id', $client_id)->set('expires', $expires)->set('user_id',$user_id)->set('scope',$scope)->where (\"access_token = ?\", $access_token)->execute(); \n } else {\n \t$DB = new $this->config['access_token_table'];\n\t\t\t$DB->access_token = $access_token;\n\t\t\t$DB->client_id = $client_id;\n\t\t\t$DB->expires = $expires;\n\t\t\t$DB->user_id = $user_id;\n\t\t\t$DB->scope = $scope;\n\t\t\treturn $DB->save();\n }\n }", "public function token()\n {\n // echo 'pk';\n try {\n $this->heimdall->createToken();\n } catch (Exception $exception) {\n $this->heimdall->handleException($exception);\n }\n }", "public function generateAccessToken()\n\t{\n\t\t$this->access_token = Yii::$app->security->generateRandomString();\n\t}", "public function setAccessToken($token);", "public function createNewToken()\n {\n return $this->getBandrek()->generateToken();\n }", "public function store(string $key, Token $token): void;", "public function set_access_token($value, $expiration = 0) {\r\n $this->access_token = $value;\r\n $this->expiration = isset($value) ? strtotime(sprintf(\"+%d secs\", $expiration)) : 0;\r\n }", "function setOauthAccessToken($code) {\n $token = $this->instagram->getOAuthToken($code, true);\n\n // Exchange this token for a long lived token (valid for 60 days)\n $token = $this->instagram->getLongLivedToken($token);\n\n // Set user access token\n $this->instagram->setAccessToken($token);\n\n //save into DB\n return $this->saveAccessToken($token->access_token, $token->expires_in);\n }", "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth()->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n }", "public function storeUser($name, $email, $access,$refresh,$time) {\r\n \r\n \r\n $this->access_token=$access;\r\n if($name!=''){\r\n $result = mysqli_query($this->con,\"INSERT INTO users(id, name, email, ACCESS_TOKEN, REFRESH_TOKEN,TIME) VALUES(NUll, '$name', '$email', '$access', '$refresh','$time')\");\r\n // check for successful store\r\n if ($result) {\r\n return true;\r\n } else {\r\n return false;\r\n } \r\n }\r\n \r\n }", "function WriteTokenFile()\n {\n if ($this->getTokenUsePickupFile()) {\n $fname = $this->getTokenPickupFile();\n $fh = fopen($fname, \"w+\");\n fwrite($fh, $this->_props['RequestToken']);\n fclose($fh);\n }\n }", "public function actionToken()\n {\n\n $access_token = null;\n\n $message = array();\n\n if (\\Yii::$app->request->post()) {\n\n if (!\\Yii::$app->user->identity || !\\Yii::$app->user->identity || \\Yii::$app->user->isGuest) {\n\n $username = isset(\\Yii::$app->request->post()['username']) && \\Yii::$app->request->post()['username'] ? \\Yii::$app->request->post()['username'] : null;\n\n $password = isset(\\Yii::$app->request->post()['password']) && \\Yii::$app->request->post()['password'] ? \\Yii::$app->request->post()['password'] : null;\n\n if ($username && $password) {\n $user = User::findOne(['username' => $username, 'password_hash' => $password]);\n\n if ($user->validate()) {\n //log this user in if the identity is verified\n \\Yii::$app->user->login($user);\n\n $user->access_token = \\Yii::$app->security->generateRandomString();\n\n $user->auth_key = \"_8jwIF7Os8s_lLXNxYFW24fgfCg1x-2E\";\n\n $user->save();\n\n $message[] = $user;\n\n } else {\n //add error message\n $message[] = \"Wrong login credentials\";\n }\n\n } else {\n $message[] = \"Must provide username and password\";\n }\n } else {\n $message[] = \"you are already logged in\";\n }\n }\n\n\n return $message;\n\n }", "public function saveRefreshToken($refreshToken);", "public static function accessToken(){\n $appInfo = WxAppInfo::get(1);\n if($appInfo->is_over_time){\n // 过期重新获取access token\n $appid = $appInfo->appid;\n $appsecret = $appInfo->appsecret;\n $grantType = 'client_credential';\n $url = 'https://api.weixin.qq.com/cgi-bin/token?appid=' . $appid . '&secret=' . $appsecret . '&grant_type=' . $grantType;\n $api = curl_init();\n curl_setopt($api, CURLOPT_URL, $url);\n curl_setopt($api, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($api, CURLOPT_HEADER, false);\n $tokenObj = curl_exec($api);\n curl_close($api);\n $tokenObj = json_decode($tokenObj);\n $appInfo->access_token = $tokenObj->access_token;\n $appInfo->expires_in = $tokenObj->expires_in;\n $appInfo->isUpdate(true)->save();\n $token = $tokenObj->access_token;\n }else{\n // 未过期\n $token = $appInfo->access_token;\n }\n\n return $token;\n }", "private function saveCredentials($credentials)\n {\n $ttl = (int) $credentials->expires_in - 120;\n\n $this->engine->cache->put(static::AC_TOKEN, $credentials->access_token, $ttl);\n }", "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth('api')->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n }", "public function setAccessToken(TokenInterface $accessToken);", "private function getAccessToken() {\n\n // set the request token and secret we have stored\n $this->tmhOAuth->config['user_token'] = $_SESSION['authtoken'];\n $this->tmhOAuth->config['user_secret'] = $_SESSION['authsecret'];\n\n\n // send request for an access token\n $this->tmhOAuth->request('POST', $this->tmhOAuth->url('oauth/access_token', ''), array(\n\n // pass the oauth_verifier received from Twitter\n 'oauth_verifier' => $_GET['oauth_verifier']\n ));\n\n\n\n if($this->tmhOAuth->response['code'] == 200) {\n\n // get the access token and store it in a cookie\n $response = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\n setcookie('access_token', $response['oauth_token'], time()+3600*24*30);\n setcookie('access_token_secret', $response['oauth_token_secret'], time()+3600*24*30);\n\n // state is now 2\n $_SESSION['authstate'] = 2;\n\n // redirect user to clear leftover GET variables\n header('Location: ' . $this->tmhOAuth->php_self());\n\n exit;\n }\n\n return false;\n }", "public function token() {\n\t\t$this->autoRender = false;\n\t\t$this->OAuth->setVariable('access_token_lifetime', 60);\n\t\ttry {\n\t\t\t$this->OAuth->grantAccessToken();\n\t\t} catch (OAuth2ServerException $e) {\n\t\t\t$e->sendHttpResponse();\n\t\t}\n\t}", "public function setToken($config)\n {\n $this->_token = Yii::createObject($config);\n }", "public function persistNewAccessToken(AccessTokenEntityInterface $accessTokenEntity)\n {\n }", "function new_access_token($token, $consumer) {\n // for the user associated with this token if the request token \n // is authorized \n // should also invalidate the request token \n }", "protected function store_token($token) {\n global $SESSION;\n\n $this->accesstoken = $token;\n $name = $this->get_tokenname();\n\n if ($token !== null) {\n $SESSION->{$name} = $token;\n } else {\n unset($SESSION->{$name});\n }\n }", "public function save_tokens_user($data)\n {\n $this->db->insert('social_media', $data);\n }", "private function __get_access_token() {\r\n // Access token exists in a cookie\r\n if($_COOKIE[ACCESS_TOKEN_COOKIE_NAME]) {\r\n parse_str($_COOKIE[ACCESS_TOKEN_COOKIE_NAME], $tok); \r\n return $tok;\r\n }\r\n\r\n // Handling a redirect back from login\r\n else if($_COOKIE[REQUEST_TOKEN_COOKIE_NAME] && $_REQUEST['oauth_verifier'] && $_REQUEST['oauth_token']) {\r\n $tok = YMClient::oauth_token_from_query_string($_COOKIE[REQUEST_TOKEN_COOKIE_NAME]);\r\n\r\n if($tok['oauth_token'] != $_REQUEST['oauth_token']) {\r\n throw new Exception(\"Cookie and URL disagree about request token value\");\r\n }\r\n\r\n $tok['oauth_verifier'] = $_REQUEST['oauth_verifier']; \r\n $newtok = $this->ymc->oauth_get_access_token($tok);\r\n\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, \"\", time()-3600);\r\n setcookie(ACCESS_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($newtok));\r\n return $newtok;\r\n }\r\n\r\n // Sending the user to login to grant access to this app\r\n else {\r\n list ($tok, $url) = $this->ymc->oauth_get_request_token($this->callbackURL);\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($tok));\r\n header(\"Location: $url\");\r\n }\r\n }", "public function storeSessionTokenInRegistry() {}", "private function getToken() {\n\t // CHECK API and get token\n\t\t$post = [\n\t\t\t'grant_type' => 'password',\n\t\t\t'scope' => 'ost_editor',\n\t\t\t'username' => 'webmapp',\n\t\t\t'password' => 'webmapp',\n\t\t\t'client_id' => 'f49353d7-6c84-41e7-afeb-4ddbd16e8cdf',\n\t\t\t'client_secret' => '123'\n\t\t];\n\n\t\t$ch = curl_init('https://api-intense.stage.sardegnaturismocloud.it/oauth/token');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\t$j=json_decode($response,TRUE);\n\t\t$this->token=$j['access_token'];\n\t}", "public function getIdToken()\n {\n $clientId = $this->scopeConfig->getValue('transiteo_activation/general/client_id', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n $refreshToken = $this->scopeConfig->getValue('transiteo_activation/general/refresh_token', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n\n $response = $this->doRequest(\n self::API_AUTH_REQUEST_URI . \"oauth2/token\",\n [\n 'headers' => [\n 'Content-type' => 'application/x-www-form-urlencoded',\n ],\n 'form_params' => [\n 'grant_type' => 'refresh_token',\n 'client_id' => $clientId,\n 'refresh_token' => $refreshToken\n ],\n 'http_errors' => false\n ],\n Request::HTTP_METHOD_POST\n );\n\n $status = $response->getStatusCode(); // 200 status code\n $responseBody = $response->getBody();\n $responseContent = $responseBody->getContents(); // here you will have the API response in JSON format\n\n if ($status == 200) {\n $responseArray = $this->serializer->unserialize($responseContent);\n\n $this->idToken = $responseArray['id_token'];\n //$this->cookie->set(self::COOKIE_NAME, $this->idToken, 3500);\n $this->flagManager->saveFlag(self::ID_TOKEN_FLAG_NAME, $this->idToken);\n $accessToken = $responseArray['access_token'];\n $this->flagManager->saveFlag(self::ACCESS_TOKEN_FLAG_NAME, $accessToken);\n $expires_in = $responseArray['expires_in'];\n $this->flagManager->saveFlag(self::TOKEN_EXPIRES_IN_FLAG_NAME, $expires_in);\n $token_type = $responseArray['token_type'];\n $this->flagManager->saveFlag(self::TOKEN_TYPE_FLAG_NAME, $token_type);\n $date = new \\DateTime();\n $this->flagManager->saveFlag(self::TOKEN_RECEIVED_TIMESTAMP, $date->getTimestamp());\n }\n\n return $responseContent;\n }", "public function createToken(\\Navis\\UserBundle\\Entity\\User $user)\n {\n $token = sha1(time().$user->getSecretToken());\n\n $user->setAccessToken($token);\n $user->setExpiresAt(time()+300);//añado 5 minutos al tiempo de expiracion del token\n\n $this->getEntityManager()->persist($user);\n $this->getEntityManager()->flush();\n\n \n\n return $token;\n }", "public function regenerateToken();", "public function setAccessToken($value)\n {\n return $this->set(self::_ACCESS_TOKEN, $value);\n }", "public function save()\n\t{\n\t\tvalidateToken('admin-ssc');\n\n\t\t$this->adapter->save();\n\t}", "public function create($token, $expireTime, $accessToken)\n {\n $this->getDbConnection()->insert('oauth_refresh_token', [\n 'refresh_token' => $token,\n 'access_token' => $accessToken,\n 'expire_time' => $expireTime\n ]);\n }", "public function saveOAuthSession($session);", "public function requestToken() {\n \n $result = $this->doRequest('v1.0/token?grant_type=1', 'GET');\n\n $this->_setToken($result->result->access_token);\n $this->_setRefreshToken($result->result->refresh_token);\n $this->_setExpireTime($result->result->expire_time);\n $this->_setUid($result->result->uid);\n\n }", "public function putSessionToken($token)\n\t{\n\t\t\\Session::put('google.access_token', $token);\n\t}", "public function setRememberToken($value)\n {\n $this->persist_code = $value;\n\n $this->save();\n }", "public function token_exchange()\n {\n $token = request()->code;\n\n $data = App::make('App\\Strava')->post('/oauth/token', ['code' => $token]);\n\n //Retrieve the current user's STRAVA ID\n $userStravaId = $data->athlete->id;\n\n // Look for user in database and either update user or make new user\n $user = App\\User::firstOrNew(['strava_id' => $userStravaId]);\n\n $user->strava_id = $userStravaId;\n $user->firstname = $data->athlete->firstname;\n $user->lastname = $data->athlete->lastname;\n $user->sex = $data->athlete->sex;\n $user->profile = $data->athlete->profile;\n $user->token = $data->access_token;\n $user->save();\n auth()->login($user);\n\n return view('home', ['firstname' => $user->firstname, 'profile' => $user->profile]);\n\n \n }", "public function createAdminToken();", "public static function set_tokens($tokens)\n\t{\n $tokens_to_pass = array();\n \n foreach( $tokens AS $token_key => $token_value ){\n switch( $token_key ){\n case 'oauth_token':\n case 'token':\n $tokens_to_pass['oauth_token'] = $token_value;\n break;\n case 'oauth_token_secret':\n case 'oauth_secret':\n case 'secret':\n $tokens_to_pass['oauth_token_secret'] = $token_value;\n break;\n default:\n continue;\n break;\n } \n } \n\t\treturn static::$client->set_access_tokens( $tokens_to_pass );\n\t}", "public function setToken()\n\t{\n\t\t $args = phpSmug::processArgs( func_get_args() );\n\t\t $this->oauth_token = $args['id'];\n\t\t $this->oauth_token_secret = $args['Secret'];\n\t}", "function new_access_token($token, $consumer, $verifier = null) {\n // for the user associated with this token if the request token\n // is authorized\n // should also invalidate the request token\n }", "function assignToken($domain,$accesslevel) {\n\n}", "protected function saveAccessTokens($gplus_user_id, $gplus_username, $access_token, $refresh_token) {\n $instance_dao = DAOFactory::getDAO('InstanceDAO');\n $owner_instance_dao = DAOFactory::getDAO('OwnerInstanceDAO');\n $user_dao = DAOFactory::getDAO('UserDAO');\n\n $instance = $instance_dao->getByUserIdOnNetwork($gplus_user_id, 'google+');\n if (isset($instance)) {\n $owner_instance = $owner_instance_dao->get($this->owner->id, $instance->id);\n if ($owner_instance == null) { //Instance already exists, owner instance doesn't\n //Add owner instance with session key\n $owner_instance_dao->insert($this->owner->id, $instance->id, $access_token, $refresh_token);\n $this->addSuccessMessage(\"Success! Your Google+ account has been added to ThinkUp.\", 'user_add');\n } else {\n $owner_instance_dao->updateTokens($this->owner->id, $instance->id, $access_token, $refresh_token);\n $this->addSuccessMessage(\"Success! You've reconnected your Google+ account. To connect a different \".\n \"account, log out of Google in a different browser tab and try again.\", 'user_add');\n }\n } else { //Instance does not exist\n $instance_dao->insert($gplus_user_id, $gplus_username, 'google+');\n $instance = $instance_dao->getByUserIdOnNetwork($gplus_user_id, 'google+');\n $owner_instance_dao->insert(\n $this->owner->id,\n $instance->id, $access_token, $refresh_token);\n $this->addSuccessMessage(\"Success! Your Google+ account has been added to ThinkUp.\", 'user_add');\n }\n\n if (!$user_dao->isUserInDB($gplus_user_id, 'google+')) {\n $r = array('user_id'=>$gplus_user_id, 'user_name'=>$gplus_username,'full_name'=>$gplus_username,\n 'avatar'=>'', 'location'=>'', 'description'=>'', 'url'=>'', 'is_verified'=>'', 'is_protected'=>'',\n 'follower_count'=>0, 'friend_count'=>0, 'post_count'=>0, 'last_updated'=>'', 'last_post'=>'',\n 'joined'=>'0000-00-00 00:00:00', 'last_post_id'=>'', 'network'=>'google+' );\n $u = new User($r, 'Owner info');\n $user_dao->updateUser($u);\n }\n $this->view_mgr->clear_all_cache();\n }", "private static function set_token() {\n\t\t\t// Bring in the $session variable\n\t\t\tglobal $session;\n\t\t\t// Generate a random token of 64 length\n\t\t\t$token = self::generate_token(64);\n\t\t\t// Store it in the $_SESSION\n\t\t\t$session->set('csrf_token', $token);\n\t\t}", "protected function createNewToken($token){\n $user = auth()->user();\n $captain = false;\n $team = Team::find($user->team_id);\n if($team){\n if($team->user_id == $user->id) {\n $captain = true;\n }else{\n $captain = false;\n }\n \n $teamId = $team->id;\n }else{\n $teamId = null;\n }\n \n return response()->json([\n 'access_token' => $token,\n 'user_id' => $user->id,\n 'username' => $user->name,\n 'captain' => $captain,\n 'team_id' => $teamId,\n ]);\n }", "public function save(\\Laravel\\Passport\\Contracts\\RefreshTokenContract $token)\n {\n $token->save();\n }", "function getToken(): string {\n //return $this->_c['inseeToken'];\n if ($this->inseeToken)\n return $this->inseeToken;\n if (($contents = @file_get_contents(__DIR__.'/inseetoken.json')) === false) {\n $this->inseeToken = $this->generateToken(); // génération d'un nouveau token\n return $this->inseeToken;\n }\n $contents = json_decode($contents, true);\n \n $mtime = filemtime(__DIR__.'/inseetoken.json');\n //echo \"fichier modifié le \",date(DATE_ATOM, $mtime),\"<br>\\n\";\n //echo \"fichier modififié il y a \",time()-$mtime,\" secondes<br>\\n\";\n if (time() - $mtime < $contents['expires_in'] - 3600) { // vérification que le token est encore valide\n if (!isset($contents['access_token']))\n throw new Exception(\"Erreur access_token absent du fichier inseetoken.json\");\n $this->inseeToken = $contents['access_token'];\n }\n else {\n $this->inseeToken = $this->generateToken(); // génération d'un nouveau token\n }\n return $this->inseeToken;\n }", "public function store(Request $request, Token $token, User $user);", "public function _getAccessToken()\n {\n $this->setAccessToken($this->_getStoreConfig($this->path_access_token));\n }", "public function storeToken($requestResult)\n {\n parse_str($requestResult, $params);\n\n $this->oauthToken->setToken($params['oauth_token']);\n $this->oauthToken->setTokenSecret($params['oauth_token_secret']);\n\n return $this->oauthToken;\n }", "public function setRememberToken($value)\n {\n $_token = $value;\n }", "public function setAccessToken($oauth_token, $client_id, $user_id, $expires, $scope = null, $auth_id = null);", "protected function newToken(): string\n {\n $new = $this->fetchNewToken();\n\n $this->cache->put(\n $this->key,\n encrypt($new['access_token']),\n $new['expires_in'] / 60 - 1\n );\n\n return $new['access_token'];\n }", "function write_new_token($tokenId)\n{\n global $tokenFile;\n global $tokenFilePath;\n\n // write new tokenId to tokens file\n $tokenFile->tokenId = $tokenId;\n\n //Format XML to save indented tree rather than one line\n $dom = new DOMDocument('1.0');\n $dom->preserveWhiteSpace = false;\n $dom->formatOutput = true;\n $dom->loadXML($tokenFile->asXML());\n $dom->save($tokenFilePath);\n}", "public function actionAccesstoken()\n {\n $authParam = Yii::$app->getRequest()->getBodyParam('auth');\n \n if (!$authParam) {\n throw new NotFoundHttpException(\"There's no authorization code provided.\");\n }\n \n $model = Customer::find()->where(['auth_code' => $authParam])->andWhere(['>', 'auth_expired', time()])->one();\n \n if ($model === null) {\n throw new NotFoundHttpException(\"Invalid authorization code.\");\n }\n \n $model->token_code = md5(uniqid());\n $model->token_expired = time() + (60 * 60 * 24 * 60); // 60 days\n $model->save(false);\n \n $data = [\n 'access_token' => $model->token_code,\n 'expired_at' => $model->tokenExpired\n ];\n \n return $data;\n }", "public function exchangeAccessToken()\n {\n // 2legged OAuth\n $this->authenticate();\n\n // Check parameter\n $this->getRequest()->checkParameters(self::$_3l_access_params);\n\n // load token\n $store = $this->getStore();\n $type = $store->loadToken($this);\n if ($type!='authorize') {\n throw new HTTP_OAuthProvider_Exception('404 Not found authorized request token in store', 404);\n }\n\n // delete authorized request token\n $ok = $store->remove();\n if (!$ok) {\n throw new HTTP_OAuthProvider_Exception('500 Store error', 500);\n }\n\n // change from authorized request token to access token\n $store->exchangeAccessToken();\n $ok = $store->save();\n if (!$ok) {\n throw new HTTP_OAuthProvider_Exception('500 Store error', 500);\n }\n\n // response\n $resp = array(\n 'oauth_token' => $store->getToken(),\n 'oauth_token_secret' => $store->getSecret()\n );\n return http_build_query($resp);\n }" ]
[ "0.74633175", "0.6873041", "0.679616", "0.6666791", "0.6631833", "0.6541316", "0.6391958", "0.6282999", "0.62527597", "0.6244847", "0.62015927", "0.6176179", "0.61506575", "0.6091601", "0.60901713", "0.6081698", "0.6060724", "0.60552484", "0.59722906", "0.59038806", "0.5877515", "0.58539563", "0.5831868", "0.5829057", "0.5808168", "0.5808168", "0.5808168", "0.5808168", "0.57956195", "0.57913727", "0.5756437", "0.57543886", "0.5747397", "0.570328", "0.5682571", "0.5674318", "0.5662577", "0.56566787", "0.56426823", "0.5635671", "0.56138235", "0.5610149", "0.5609193", "0.5608531", "0.5606705", "0.5591597", "0.5583215", "0.55709106", "0.55649847", "0.55566007", "0.55434364", "0.5516373", "0.5505128", "0.55024844", "0.5500591", "0.5488018", "0.54867435", "0.54772973", "0.5472449", "0.5467011", "0.5461799", "0.5454113", "0.545141", "0.5449768", "0.54417473", "0.54412967", "0.5425829", "0.5422913", "0.5415364", "0.5406052", "0.5385008", "0.5377983", "0.5376803", "0.53719306", "0.53673047", "0.5362141", "0.53438073", "0.5333871", "0.5327539", "0.5324238", "0.5319582", "0.53101516", "0.5309492", "0.5309393", "0.5308121", "0.530697", "0.53046596", "0.53019714", "0.52997404", "0.52966875", "0.52894926", "0.5288667", "0.528858", "0.5288564", "0.52881044", "0.5285306", "0.52847546", "0.52813196", "0.5273802", "0.5265691" ]
0.6845688
2
Get a single access token
public function get_access_token($hash) { $tokens = $this->get_access_tokens(); foreach ($tokens as $token) { if ($token['hash'] == $hash) { return Tyk_Token::init($token, $this); } } // if we get here, we didn't find the token throw new OutOfBoundsException('Invalid token id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken($access_token);", "public function getAccessToken()\n {\n return $this->get(self::_ACCESS_TOKEN);\n }", "public function getAccessToken()\n\t{\n\t\tif ($this->makeRequest())\n\t\t{\n\t\t\tif ($token = isset($this->getJson()->access_token) ? $this->getJson()->access_token : null) {\n\t\t\t\treturn $token;\n\t\t\t}\n\t\t}\n\t}", "protected function getAccessToken()\n {\n return $this->access_token->getToken();\n }", "public function getAccessToken()\n {\n // maybe the token will expire in next 10 seconds\n $expiryCutoff = new \\DateTime('+10 seconds');\n\n // if the token expires try to reauthenticate\n if (!$this->accessToken or $this->getExpires() < $expiryCutoff->getTimestamp()) {\n $this->authenticate();\n }\n\n return $this->accessToken->getToken();\n }", "public static function acquire_token() {\n\n\t\t\n\n\t\t$response = skydrive_tokenstore::get_tokens_from_store();\n\n\t\tif (empty($response['access_token'])) {\t// No token at all, needs to go through login flow. Return false to indicate this.\n\n\t\t\treturn false;\n\n\t\t\texit;\n\n\t\t} else {\n\n\t\t\tif (time() > (int)$response['access_token_expires']) { // Token needs refreshing. Refresh it and then return the new one.\n\n\t\t\t\t$refreshed = skydrive_auth::refresh_oauth_token($response['refresh_token']);\n\n\t\t\t\tif (skydrive_tokenstore::save_tokens_to_store($refreshed)) {\n\n\t\t\t\t\t$newtokens = skydrive_tokenstore::get_tokens_from_store();\n\n\t\t\t\t\treturn $newtokens['access_token'];\n\n\t\t\t\t}\n\n\t\t\t\texit;\n\n\t\t\t} else {\n\n\t\t\t\treturn $response['access_token']; // Token currently valid. Return it.\n\n\t\t\t\texit;\n\n\t\t\t}\n\n\t\t}\n\n\t}", "public function getToken()\n {\n return $this->accessToken;\n }", "public function getToken() {\n return $this->accessToken;\n }", "public function getToken()\n {\n $params = array(\n 'client_id' => $this->client_id,\n 'client_secret' => $this->client_secret,\n 'code' => $this->code,\n 'redirect_uri' => $this->redirect_uri\n );\n $res = $this->getRequest('oauth/access_token',$params);\n //$token = $res['access_token'];\n return $this->res = $res;\n\n\n }", "protected function get_access_token() {\n global $SESSION;\n if (isset($SESSION->{self::SESSIONKEY})) {\n return $SESSION->{self::SESSIONKEY};\n }\n return null;\n }", "public function getAccessToken()\n\t{\n\t\treturn $this->client->getAccessToken();\n\t}", "function GetAccessToken()\r\n {\r\n return $this->Rest->GetAccessToken();\r\n }", "public function getAccessToken()\n {\n return $this->access_token;\n }", "private function _get_access_token() {\n return $this->_http->request( \n 'POST', 'https://oauth.api.189.cn/emp/oauth2/v3/access_token',\n http_build_query( array(\n 'grant_type' => 'client_credentials',\n 'app_id' => C( 'SMS_189_KEY' ),\n 'app_secret' => C( 'SMS_189_SECRET' )\n ) ) );\n\n }", "public function getAccessToken(): string {\n\t\tif(!$this->_accessToken || $this->isAccessTokenExpired()) {\n\t\t\t$json = $this->request->authorize($this->getClientId(), $this->getClientSecret());\n\n\t\t\t$data = $json['data'];\n\n\t\t\t$expireDateTime = new DateTime($data['expireDateTime']);\n\n\t\t\t$this->setAccessToken($data['accessToken'], $data['accessTokenType'], $expireDateTime);\n\t\t}\n\n\t\treturn $this->_accessToken;\n\t}", "public function getAccessToken()\n {\n return $this->client->getAccessToken();\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->_access_token;\n }", "public function getAccessToken()\n {\n return $this->getQuery('accesstoken');\n }", "public function token()\n {\n if ($this->accessToken === null) {\n $this->initToken();\n }\n return $this->accessToken;\n }", "protected function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken() {\n return $this->accessToken;\n }", "public function get_access_token() {\r\n\t\t$session = $_SESSION['auth_baidu']['last_key'];;\r\n\t\tif (isset ( $session ['access_token'] )) {\r\n\t\t\treturn $session ['access_token'];\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private function getAccessToken(): string\n {\n try {\n $token = Storage::disk('local')->get(self::ALIGO_ACCESS_TOKEN_FILE);\n } catch (\\Exception $exception) {\n $token = null;\n }\n\n if (empty($token)) {\n try {\n $response = $this->call('/akv10/token/create/10/y');\n $data = json_decode((string) $response->getBody(), false);\n } catch (\\Throwable $exception) {\n throw CouldNotSendNotification::serviceRespondedWithAnError($exception);\n }\n Storage::disk('local')->put(self::ALIGO_ACCESS_TOKEN_FILE, $data->token);\n\n return $data->token;\n }\n\n return $token;\n }", "public function getAccessToken()\n {\n return $this->_accessToken;\n }", "public function getAccessToken()\n\t{\n\t\tif(!$this->hasAccessToken()){\n\t\t\t//reset all the parameters\n\t\t\t$this->resetParams();\n\t\t\t\n\t\t\t//set the returned token\n\t\t\t$this->setParam('token', $this->getRequestToken()->getToken());\n\t\t\t\n\t\t\t//build the signiture\n\t\t\t$this->setSecret($this->getRequestToken()->getTokenSecret());\n\t\t\t$this->setRequestUrl($this->_accessTokenUrl);\n\t\t\t$this->_buildSignature();\n\t\t\t\n\t\t\t//get the response\n\t\t\t$response = $this->_send($this->_accessTokenUrl)->getBody();\n\t\t\t\n\t\t\t//format the response\n\t\t\t$responseVars = array();\n\t\t\tparse_str($response, $responseVars);\n\t\t\t$response = new BaseOAuthResponse($responseVars);\n\t\t\t$this->setAccessToken($response);\n\t\t}\n\t\treturn $this->getData('access_token');\n\t}", "public function fetchAccessToken() {\n if (!isset($_SESSION['ACCESS_TOKEN'])) {\n if (!empty($_GET) && isset($_SESSION['REQUEST_TOKEN'])) {\n return parent::getAccessToken(\n $_GET, unserialize($_SESSION['REQUEST_TOKEN']));\n }\n }\n return null;\n }", "public function getAccessToken(): string\n {\n return $this->accessToken;\n }", "private function GetAccessToken()\n\t{\n\t\tif(IsSet($_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url]))\n\t\t{\n\t\t\t$access_token = $_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$access_token = array();\n\t\t}\n\t\treturn($access_token);\n\t}", "public function getAccessToken() {\n return $this->authenticate();\n }", "public function getAccessToken()\n {\n if ($this->_accessToken == null) {\n\n if ($this->_oauthToken == null) {\n $this->_setOauthToken();\n }\n\n $this->_accessToken = json_decode($this->_oauthToken)->access_token;\n }\n\n return $this->_accessToken;\n }", "public function getToken()\n\t{\n\t\treturn $this->getOption('accesstoken');\n\t}", "public function getAccessToken()\n {\n $token = \\Yii::$app->user->identity->token;\n if (!empty(($token = \\Yii::$app->user->identity->token))) {\n $this->_client->setDefaultAccessToken($token->token);\n }\n if (!empty(($access_token = $this->_client->getRedirectLoginHelper()->getAccessToken()))) {\n return $access_token;\n } elseif (!empty($token->token)) {\n $newToken = $this->getExtendedAccessToken($token->token);\n $token->token = $newToken;\n if ($token->save()) {\n $this->_client->setDefaultAccessToken(new AccessToken(['access_token' => $token->token]));\n return $newToken;\n }\n }\n return null;\n }", "public function getAccessToken()\n {\n return $this->request->getAccessToken();\n }", "abstract public function url_access_token();", "public static function getAccessToken()\n {\n $authorization = request()->header('Authorization');\n // $authorization = @getallheaders()['Authorization'];\n // before running unit tests...\n //$authorization = '$2y$10$tSM.PiN9BnMfyonqjHlwTONa1DPHbyQSAMOtmt4chJYXenGeYySHC';\n return (isset($authorization))?$authorization:null;\n }", "public function getAccessTokenFromClientCredentials(): AccessToken;", "public function getBaseAccessToken() {\n\t\t\n// \t\tif ($result == null) {\n\t\t\treturn $token = $this->get_access_token ();\n// \t\t} else {\n// \t\t\treturn $result;\n// \t\t}\n\t}", "public function retrieveAccessToken() {\n\n $helper = Api::getInstance();\n $helper->retrieveAccessToken();\n\n $this->output()->writeln('Done');\n }", "public function getSessionToken()\n\t{\n\t\treturn \\Session::get('google.access_token');\n\t}", "public function get_access_token()\n\t\t{\n\t\t\tif(isset($_COOKIE['bing_access_token']))\n\t\t\t\treturn $_COOKIE['bing_access_token'];\n\t\t\n\t\t\t// Get a 10-minute access token for Microsoft Translator API.\n\t\t\t$url = 'https://datamarket.accesscontrol.windows.net/v2/OAuth2-13';\n\t\t\t$postParams = 'grant_type=client_credentials&client_id='.urlencode($this->clientID).\n\t\t\t'&client_secret='.urlencode($this->clientSecret).'&scope=http://api.microsofttranslator.com';\n\t\t\t\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url); \n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postParams);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); \n\t\t\t$rsp = curl_exec($ch); \n\t\t\t$rsp = json_decode($rsp);\n\t\t\t$access_token = $rsp->access_token;\n\t\t\t\n\t\t\tsetcookie('bing_access_token', $access_token, $rsp->expires_in);\n\t\t\t\n\t\t\treturn $access_token;\n\t\t}", "public function getAccessToken()\n {\n return trim($this->scopeConfig->getValue(self::XML_PATH_GENERAL_API_CREDENTIALS_ACCESS_TOKEN));\n }", "public function getAccessToken() {\n return $this->credential->getAccessToken();\n }", "public function getAccessToken(): ?string;", "public function getAccessToken(): ?string;", "public function accessToken()\n {\n return $this->accessToken;\n }", "public static function createAccessToken(){\r\n\t\t$token = new AccessToken(substr(sha1(microtime()), 0, 30));\r\n\t\treturn $token;\r\n\t}", "private static function generate_access_token()\n {\n $url = 'https://' . env('MPESA_SUBDOMAIN') . '.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n $credentials = base64_encode(env('MPESA_CONSUMER_KEY') . ':' . env('MPESA_CONSUMER_SECRET'));\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Basic ' . $credentials)); //setting a custom header\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n $curl_response = curl_exec($curl);\n\n return json_decode($curl_response)->access_token;\n }", "private function __get_access_token() {\r\n // Access token exists in a cookie\r\n if($_COOKIE[ACCESS_TOKEN_COOKIE_NAME]) {\r\n parse_str($_COOKIE[ACCESS_TOKEN_COOKIE_NAME], $tok); \r\n return $tok;\r\n }\r\n\r\n // Handling a redirect back from login\r\n else if($_COOKIE[REQUEST_TOKEN_COOKIE_NAME] && $_REQUEST['oauth_verifier'] && $_REQUEST['oauth_token']) {\r\n $tok = YMClient::oauth_token_from_query_string($_COOKIE[REQUEST_TOKEN_COOKIE_NAME]);\r\n\r\n if($tok['oauth_token'] != $_REQUEST['oauth_token']) {\r\n throw new Exception(\"Cookie and URL disagree about request token value\");\r\n }\r\n\r\n $tok['oauth_verifier'] = $_REQUEST['oauth_verifier']; \r\n $newtok = $this->ymc->oauth_get_access_token($tok);\r\n\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, \"\", time()-3600);\r\n setcookie(ACCESS_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($newtok));\r\n return $newtok;\r\n }\r\n\r\n // Sending the user to login to grant access to this app\r\n else {\r\n list ($tok, $url) = $this->ymc->oauth_get_request_token($this->callbackURL);\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($tok));\r\n header(\"Location: $url\");\r\n }\r\n }", "public static function accessToken(){\n $appInfo = WxAppInfo::get(1);\n if($appInfo->is_over_time){\n // 过期重新获取access token\n $appid = $appInfo->appid;\n $appsecret = $appInfo->appsecret;\n $grantType = 'client_credential';\n $url = 'https://api.weixin.qq.com/cgi-bin/token?appid=' . $appid . '&secret=' . $appsecret . '&grant_type=' . $grantType;\n $api = curl_init();\n curl_setopt($api, CURLOPT_URL, $url);\n curl_setopt($api, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($api, CURLOPT_HEADER, false);\n $tokenObj = curl_exec($api);\n curl_close($api);\n $tokenObj = json_decode($tokenObj);\n $appInfo->access_token = $tokenObj->access_token;\n $appInfo->expires_in = $tokenObj->expires_in;\n $appInfo->isUpdate(true)->save();\n $token = $tokenObj->access_token;\n }else{\n // 未过期\n $token = $appInfo->access_token;\n }\n\n return $token;\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }", "public function getNewAccessToken()\n {\n return $this->get('NewAccessToken');\n }" ]
[ "0.7933617", "0.7933617", "0.7933617", "0.7933617", "0.7933617", "0.7875469", "0.77651983", "0.76925856", "0.7645317", "0.7602927", "0.7422308", "0.7417525", "0.74064976", "0.7393485", "0.7366781", "0.7351951", "0.7337557", "0.7312688", "0.7306144", "0.728459", "0.7272787", "0.72708726", "0.72708726", "0.72708726", "0.72708726", "0.72705996", "0.72705996", "0.72705996", "0.72705996", "0.72705996", "0.72705996", "0.7250238", "0.7246305", "0.7241608", "0.7241066", "0.7240502", "0.7240502", "0.7240502", "0.7240502", "0.7240502", "0.7240502", "0.7240502", "0.7240502", "0.7238721", "0.7201952", "0.71923447", "0.7186058", "0.7152707", "0.7141748", "0.71280134", "0.7123361", "0.7098123", "0.7091473", "0.7082816", "0.7081931", "0.7058985", "0.705149", "0.70345306", "0.7032036", "0.7025914", "0.70149624", "0.70111996", "0.70102715", "0.7000605", "0.69964814", "0.6983242", "0.6983242", "0.69645095", "0.6962332", "0.69555223", "0.69445837", "0.69279444", "0.69146657", "0.69146657", "0.69146657", "0.69146657", "0.69146657", "0.69146657", "0.69146657", "0.69146657", "0.69146657", "0.69144654", "0.69144654", "0.69144654", "0.69144654", "0.69144654", "0.69144654", "0.69144654", "0.69144654", "0.6914055", "0.6914055", "0.6914055", "0.6914055", "0.6914055", "0.6914055", "0.6914055", "0.6914055", "0.6914055", "0.6914055", "0.6914055", "0.6914055" ]
0.0
-1
Get user's access tokens
public function get_access_tokens() { $tokens = get_user_meta($this->user->ID, self::META_TYK_ACCESS_TOKENS_KEY, true); if (!is_array($tokens)) { return array(); } // lambda to add an 'is_valid' attribute to each token $map_is_valid = function ($token) { return array_merge($token, array( 'is_valid' => $this->has_token($token['hash']), )); }; return array_map($map_is_valid, $tokens); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken($access_token);", "function retrieveUserByAccessToken($accessToken);", "public function getAccessToken()\n {\n return $this->get(self::_ACCESS_TOKEN);\n }", "protected function getAccessToken()\n {\n return $this->access_token->getToken();\n }", "public function getAccessToken() {\n return $this->authenticate();\n }", "public function getAccessToken()\n {\n return $this->getQuery('accesstoken');\n }", "public function getUserTokens();", "public static function get_tokens()\n\t{\n\t\treturn static::$client->get_tokens();\n\t}", "public function getAccessToken()\n {\n return $this->access_token;\n }", "protected function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken() {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->client->getAccessToken();\n }", "public function getAccessToken()\n\t{\n\t\treturn $this->client->getAccessToken();\n\t}", "public function getAccessToken()\n {\n return $this->_access_token;\n }", "function getAccessToken($userID);", "public function getAccessToken()\n {\n return $this->_accessToken;\n }", "private function getAccessToken($user) {\n return $user->createToken('Token')->accessToken;\n }", "private function GetAccessToken()\n\t{\n\t\tif(IsSet($_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url]))\n\t\t{\n\t\t\t$access_token = $_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$access_token = array();\n\t\t}\n\t\treturn($access_token);\n\t}", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->request->getAccessToken();\n }", "function GetAccessToken()\r\n {\r\n return $this->Rest->GetAccessToken();\r\n }", "public function getAccessToken()\n {\n // maybe the token will expire in next 10 seconds\n $expiryCutoff = new \\DateTime('+10 seconds');\n\n // if the token expires try to reauthenticate\n if (!$this->accessToken or $this->getExpires() < $expiryCutoff->getTimestamp()) {\n $this->authenticate();\n }\n\n return $this->accessToken->getToken();\n }", "public function getAccessTokenFromClientCredentials(): AccessToken;", "private function getUsersAccessToken(){\n $result = $this->facebookModel->project(array(\"AccessToken\" => true, \"Current_city\" => true, \"_id\" => false))->get();\n return $result;\n }", "private function _get_access_token() {\n return $this->_http->request( \n 'POST', 'https://oauth.api.189.cn/emp/oauth2/v3/access_token',\n http_build_query( array(\n 'grant_type' => 'client_credentials',\n 'app_id' => C( 'SMS_189_KEY' ),\n 'app_secret' => C( 'SMS_189_SECRET' )\n ) ) );\n\n }", "public function getToken() {\n return $this->accessToken;\n }", "public function getToken()\n {\n return $this->accessToken;\n }", "public function accessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken() {\n return $this->credential->getAccessToken();\n }", "public function getUserInfo($access_token);", "public function get_user_info($access_token, $access_token_secret = '');", "protected function get_access_token()\n\t{\n $result = array();\n\n try\n {\n $oauth_verifier = \\Session::get('evernote_oauthVerifier');\n\n $oauth = new \\OAuth( $this->tokens['consumer_key'], $this->tokens['consumer_secret'] );\n\n $request_token = $this->get_request_token();\n $request_token_secret = $this->get_request_secret();\n\n $oauth->setToken($request_token, $request_token_secret);\n $access_token_info = $oauth->getAccessToken($this->access_token_url, null, $oauth_verifier);\n\n echo '$access_token_info<pre>'.print_r($access_token_info, 1).'</pre>';\n\n if ( $access_token_info ){\n $this->set_access_key( $access_token_info['oauth_token'] );\n $this->set_access_secret( $access_token_info['oauth_token_secret'] );\n\n $this->tokens['oauth_token'] = $access_token_info['oauth_token'];\n $this->tokens['oauth_token_secret'] = $access_token_info['oauth_token_secret'];\n $this->tokens['shard_id'] = $access_token_info['edam_shard'];\n $this->tokens['evernote_user_id'] = $access_token_info['edam_userId'];\n $this->tokens['expires'] = $access_token_info['edam_expires'];\n\n return $this->tokens;\n }\n return false;\n }catch ( \\Exception $e ){\n return false;\n }\n\n\t}", "public function getAccessToken()\n\t{\n\t\tif(!$this->hasAccessToken()){\n\t\t\t//reset all the parameters\n\t\t\t$this->resetParams();\n\t\t\t\n\t\t\t//set the returned token\n\t\t\t$this->setParam('token', $this->getRequestToken()->getToken());\n\t\t\t\n\t\t\t//build the signiture\n\t\t\t$this->setSecret($this->getRequestToken()->getTokenSecret());\n\t\t\t$this->setRequestUrl($this->_accessTokenUrl);\n\t\t\t$this->_buildSignature();\n\t\t\t\n\t\t\t//get the response\n\t\t\t$response = $this->_send($this->_accessTokenUrl)->getBody();\n\t\t\t\n\t\t\t//format the response\n\t\t\t$responseVars = array();\n\t\t\tparse_str($response, $responseVars);\n\t\t\t$response = new BaseOAuthResponse($responseVars);\n\t\t\t$this->setAccessToken($response);\n\t\t}\n\t\treturn $this->getData('access_token');\n\t}", "public function getAccessTokenByCredentials()\n {\n $data = [\n 'client_id' => $this->oauth_client_id,\n 'client_secret' => $this->oauth_client_secret,\n 'grant_type' => 'client_credentials',\n ];\n return $this->sendRequest($this->oauth_access_token_url, $data);\n }", "public function getSessionToken()\n {\n return $this->provider->accessToken;\n }", "public function access_token() {\n\t\ttry {\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t$this->OAuth2Lib->grantAccessToken();\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->fail($e);\n\t\t}\n\t}", "abstract public function url_access_token();", "private function getAccessToken() {\n\n // set the request token and secret we have stored\n $this->tmhOAuth->config['user_token'] = $_SESSION['authtoken'];\n $this->tmhOAuth->config['user_secret'] = $_SESSION['authsecret'];\n\n\n // send request for an access token\n $this->tmhOAuth->request('POST', $this->tmhOAuth->url('oauth/access_token', ''), array(\n\n // pass the oauth_verifier received from Twitter\n 'oauth_verifier' => $_GET['oauth_verifier']\n ));\n\n\n\n if($this->tmhOAuth->response['code'] == 200) {\n\n // get the access token and store it in a cookie\n $response = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\n setcookie('access_token', $response['oauth_token'], time()+3600*24*30);\n setcookie('access_token_secret', $response['oauth_token_secret'], time()+3600*24*30);\n\n // state is now 2\n $_SESSION['authstate'] = 2;\n\n // redirect user to clear leftover GET variables\n header('Location: ' . $this->tmhOAuth->php_self());\n\n exit;\n }\n\n return false;\n }", "public function getAccessToken()\n {\n if ($this->_accessToken == null) {\n\n if ($this->_oauthToken == null) {\n $this->_setOauthToken();\n }\n\n $this->_accessToken = json_decode($this->_oauthToken)->access_token;\n }\n\n return $this->_accessToken;\n }", "public function getAccessToken()\n\t{\n\t\tif ($this->makeRequest())\n\t\t{\n\t\t\tif ($token = isset($this->getJson()->access_token) ? $this->getJson()->access_token : null) {\n\t\t\t\treturn $token;\n\t\t\t}\n\t\t}\n\t}", "public function index()\n {\n $user = Auth::user();\n $tokens = $user->token();\n return response()->json(['success' => ['user' => $user, 'tokens' => $tokens]], 200);\n }", "public function byUser( User $user )\n {\n return $user->google_access_token;\n }", "public function actionToken()\n {\n\n $access_token = null;\n\n $message = array();\n\n if (\\Yii::$app->request->post()) {\n\n if (!\\Yii::$app->user->identity || !\\Yii::$app->user->identity || \\Yii::$app->user->isGuest) {\n\n $username = isset(\\Yii::$app->request->post()['username']) && \\Yii::$app->request->post()['username'] ? \\Yii::$app->request->post()['username'] : null;\n\n $password = isset(\\Yii::$app->request->post()['password']) && \\Yii::$app->request->post()['password'] ? \\Yii::$app->request->post()['password'] : null;\n\n if ($username && $password) {\n $user = User::findOne(['username' => $username, 'password_hash' => $password]);\n\n if ($user->validate()) {\n //log this user in if the identity is verified\n \\Yii::$app->user->login($user);\n\n $user->access_token = \\Yii::$app->security->generateRandomString();\n\n $user->auth_key = \"_8jwIF7Os8s_lLXNxYFW24fgfCg1x-2E\";\n\n $user->save();\n\n $message[] = $user;\n\n } else {\n //add error message\n $message[] = \"Wrong login credentials\";\n }\n\n } else {\n $message[] = \"Must provide username and password\";\n }\n } else {\n $message[] = \"you are already logged in\";\n }\n }\n\n\n return $message;\n\n }", "public function get_access_token() {\r\n\t\t$session = $_SESSION['auth_baidu']['last_key'];;\r\n\t\tif (isset ( $session ['access_token'] )) {\r\n\t\t\treturn $session ['access_token'];\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function fetchAccessToken() {\n if (!isset($_SESSION['ACCESS_TOKEN'])) {\n if (!empty($_GET) && isset($_SESSION['REQUEST_TOKEN'])) {\n return parent::getAccessToken(\n $_GET, unserialize($_SESSION['REQUEST_TOKEN']));\n }\n }\n return null;\n }", "public function getSessionToken()\n\t{\n\t\treturn \\Session::get('google.access_token');\n\t}", "private function getTokens()\n {\n\n // Post data\n $data = [\n 'grant_type' => 'password',\n 'username' => $this->gebruikersnaam,\n 'password' => $this->wachtwoord,\n 'client_id' => $this->CLIENT_ID,\n 'client_secret' => $this->CLIENT_SECRET,\n 'scope' => 'openid',\n ];\n $url = \"https://login.ov-chipkaart.nl/oauth2/token\";\n\n $tokenResponse = (self::Execute($url, $data));\n\n $this->tokenExpire = (new DateTime())->add((new DateInterval('PT' . $tokenResponse['expires_in'] . 'S')));\n $this->refreshToken = $tokenResponse['refresh_token'];\n $this->idToken = $tokenResponse['id_token'];\n $this->accessToken = $tokenResponse['access_token'];\n\n $this->getAuthorization();\n }", "public function retrieveAccessToken() {\n\n $helper = Api::getInstance();\n $helper->retrieveAccessToken();\n\n $this->output()->writeln('Done');\n }", "public function listServerTokens( $user_id) {\n\t\t$consumers = get_option('oauth_consumers');\n\t\t$tokens = get_option('oauth_consumer_tokens');\n\t\t$user_tokens = array();\n\n\t\tforeach ($tokens as $token) {\n\t\t\tif ($token['type'] == 'access') {\n\t\t\t\tif ($token['user'] == $user_id) {\n\t\t\t\t\t$user_tokens[] = array_merge($consumers[$token['consumer_key']], $token);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $user_tokens;\n\t}", "public function getToken()\n {\n $params = array(\n 'client_id' => $this->client_id,\n 'client_secret' => $this->client_secret,\n 'code' => $this->code,\n 'redirect_uri' => $this->redirect_uri\n );\n $res = $this->getRequest('oauth/access_token',$params);\n //$token = $res['access_token'];\n return $this->res = $res;\n\n\n }", "public function getTokenInfo() {\n\t\t\t$error = [\"error\" => \"invalid_token\"];\n\t\t\tif( !isset($_GET[\"access_token\"]) ) return $error;\n\t\t\t$token = $this->getAccessToken($_GET[\"access_token\"]);\n\t\t\tif( $token === NULL ) return $error;\n\t\t\t$client = $this->getClient($token[\"client_id\"]);\n\t\t\tif( $client === FALSE ) return $error;\n\t\t\treturn [\n\t\t\t\t\"audience\"\t=> $client[\"client_id\"],\n\t\t\t\t\"userid\"\t=> $client[\"user_id\"],\n\t\t\t\t\"scope\"\t\t=> $token[\"scope\"],\n\t\t\t\t\"expires\"\t=> $token[\"expires\"] - time()\n\t\t\t\t\n\t\t\t];\n\t\t}", "public function getAccessToken(): string\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return json_encode($this->accessToken);\n }", "private function __get_access_token() {\r\n // Access token exists in a cookie\r\n if($_COOKIE[ACCESS_TOKEN_COOKIE_NAME]) {\r\n parse_str($_COOKIE[ACCESS_TOKEN_COOKIE_NAME], $tok); \r\n return $tok;\r\n }\r\n\r\n // Handling a redirect back from login\r\n else if($_COOKIE[REQUEST_TOKEN_COOKIE_NAME] && $_REQUEST['oauth_verifier'] && $_REQUEST['oauth_token']) {\r\n $tok = YMClient::oauth_token_from_query_string($_COOKIE[REQUEST_TOKEN_COOKIE_NAME]);\r\n\r\n if($tok['oauth_token'] != $_REQUEST['oauth_token']) {\r\n throw new Exception(\"Cookie and URL disagree about request token value\");\r\n }\r\n\r\n $tok['oauth_verifier'] = $_REQUEST['oauth_verifier']; \r\n $newtok = $this->ymc->oauth_get_access_token($tok);\r\n\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, \"\", time()-3600);\r\n setcookie(ACCESS_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($newtok));\r\n return $newtok;\r\n }\r\n\r\n // Sending the user to login to grant access to this app\r\n else {\r\n list ($tok, $url) = $this->ymc->oauth_get_request_token($this->callbackURL);\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($tok));\r\n header(\"Location: $url\");\r\n }\r\n }", "public function getAccessToken(array $params)\n\t{\n\t\treturn $this->post('access/getAccessToken', $params);\n\t}", "public function getSessionAccessToken()\n {\n return $this->getPersistentData('access_token');\n }", "public function accessTokenDataProvider()\r\n {\r\n return array(\r\n // Valid access token\r\n array(\r\n 'isSuccessful' => true,\r\n ),\r\n // Invalid access token\r\n array(\r\n 'isSuccessful' => false,\r\n ),\r\n );\r\n }", "private static function generate_access_token()\n {\n $url = 'https://' . env('MPESA_SUBDOMAIN') . '.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n $credentials = base64_encode(env('MPESA_CONSUMER_KEY') . ':' . env('MPESA_CONSUMER_SECRET'));\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Basic ' . $credentials)); //setting a custom header\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n $curl_response = curl_exec($curl);\n\n return json_decode($curl_response)->access_token;\n }", "public function getAccessToken()\n {\n if (! $this->accessToken) {\n $this->exchange();\n }\n\n return $this->accessToken;\n }", "public function getAccessToken() {\n\n $data = $this->redis->get('pa_access_token');\n if (!$data) {\n $data['expire_time'] = 0;\n $data['access_token'] = \"0\";\n $this->redis->set('pa_access_token', $data, 7200);\n }\n if ($data['expire_time'] < time()) {\n $url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.$this->config['appId'].'&secret='.$this->config['appSecret'];\n $res = json_decode($this->httpGet($url));\n $access_token = $res->access_token;\n if ($access_token) {\n $data['expire_time'] = time() + 7000;\n $data['access_token'] = $access_token;\n }\n }\n //debug_info(\"getaccesstoken,b4 storage:\".json_encode($data));\n $this->redis->set('pa_access_token', $data, 7200);\n return $data;\n }", "private function user($access_token)\n {\n $options = array();\n $options['http']['header'] = \"Authorization: Bearer {$access_token}\";\n\n $user = $this->serverGet(\n 'https://www.yammer.com/api/v1/users/current.json',\n array('access_token' => $access_token),\n $options,\n $headers\n );\n\n if (!empty($user)) {\n return $this->recursiveGetObjectVars(json_decode($user));\n } else {\n $error = array(\n 'code' => 'users_current',\n 'message' => 'Failed when attempting to query Yammer API for user information',\n 'raw' => array(\n 'response' => $user,\n 'headers' => $headers\n )\n );\n\n $this->errorCallback($error);\n }\n }", "public function index() {\n $this->permission('Garden.Tokens.Add');\n\n $in = $this->schema([], 'in')->setDescription('Get a list of access token IDs for the current user.');\n // Full access token details are not available in the index. Use GET on a single ID for sensitive information.\n $out = $this->schema([\n ':a' => $this->schema([\n 'accessTokenID',\n 'name',\n 'dateInserted'\n ])->add($this->fullSchema())\n ], 'out');\n\n $rows = $this->accessTokenModel->getWhere([\n 'UserID' => $this->getSession()->UserID,\n 'Type' => self::TOKEN_TYPE\n ], 'DateInserted', 'desc', self::RESPONSE_LIMIT)->resultArray();\n $activeTokens = [];\n foreach ($rows as $token) {\n if ($this->isActiveToken($token) === false) {\n continue;\n }\n $activeTokens[] = $token;\n }\n unset($token);\n $activeTokens = array_map([$this, 'normalizeOutput'], $activeTokens);\n\n $result = $out->validate($activeTokens);\n return $result;\n }", "protected function get_access_token() {\n global $SESSION;\n if (isset($SESSION->{self::SESSIONKEY})) {\n return $SESSION->{self::SESSIONKEY};\n }\n return null;\n }", "public function getByAccessToken($accessToken);", "public function getAccessToken(): string {\n\t\tif(!$this->_accessToken || $this->isAccessTokenExpired()) {\n\t\t\t$json = $this->request->authorize($this->getClientId(), $this->getClientSecret());\n\n\t\t\t$data = $json['data'];\n\n\t\t\t$expireDateTime = new DateTime($data['expireDateTime']);\n\n\t\t\t$this->setAccessToken($data['accessToken'], $data['accessTokenType'], $expireDateTime);\n\t\t}\n\n\t\treturn $this->_accessToken;\n\t}", "function accessToken() {\n $twilioAccountSid = Configure::read('Twilio.accountSid');\n $authToken = Configure::read('Twilio.authToken');\n $twilioApiKey = Configure::read('Twilio.apiKey');\n $twilioApiSecret = Configure::read('Twilio.secret');\n $ipmServiceSid = Configure::read('Twilio.chatSid');\n\n // An identifier for your app - can be anything you'd like\n $appName = 'TwilioChatDemo';\n // choose a random username for the connecting user\n $identity = \"john_doe\";\n // A device ID should be passed as a query string parameter to this script\n $deviceId = 'somedevice';\n $endpointId = $appName . ':' . $identity . ':' . $deviceId;\n\n // Create access token, which we will serialize and send to the client\n $token = new AccessToken(\n $twilioAccountSid,\n $twilioApiKey,\n $twilioApiSecret,\n 3600,\n $identity\n );\n\n // Create IP Messaging grant\n $ipmGrant = new IpMessagingGrant();\n $ipmGrant->setServiceSid($ipmServiceSid);\n $ipmGrant->setEndpointId($endpointId);\n\n // Add grant to token\n $token->addGrant($ipmGrant);\n\n // return serialized token and the user's randomly generated ID\n\n return [\n 'identity' => $identity,\n 'token' => $token->toJWT(),\n ];\n }", "public static function accessToken(){\n $appInfo = WxAppInfo::get(1);\n if($appInfo->is_over_time){\n // 过期重新获取access token\n $appid = $appInfo->appid;\n $appsecret = $appInfo->appsecret;\n $grantType = 'client_credential';\n $url = 'https://api.weixin.qq.com/cgi-bin/token?appid=' . $appid . '&secret=' . $appsecret . '&grant_type=' . $grantType;\n $api = curl_init();\n curl_setopt($api, CURLOPT_URL, $url);\n curl_setopt($api, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($api, CURLOPT_HEADER, false);\n $tokenObj = curl_exec($api);\n curl_close($api);\n $tokenObj = json_decode($tokenObj);\n $appInfo->access_token = $tokenObj->access_token;\n $appInfo->expires_in = $tokenObj->expires_in;\n $appInfo->isUpdate(true)->save();\n $token = $tokenObj->access_token;\n }else{\n // 未过期\n $token = $appInfo->access_token;\n }\n\n return $token;\n }", "protected function getAccessTokenValues()\n {\n return $this->access_token->getValues();\n }", "public function getUser()\n {\n return $this->accessToken->getUser();\n }", "function getAppAccesToken($app_id, $app_secret){\n $token_url = \"https://graph.facebook.com/oauth/access_token?\" . \n \"client_id=\" . $app_id . \n \"&client_secret=\" . $app_secret . \n \"&grant_type=client_credentials\"; \n $reponse = file_get_contents($token_url);\n \n $param = null;\n parse_str($reponse,$param);\n \n return $param['access_token'];\n }", "public function getAccessToken()\n {\n return trim($this->scopeConfig->getValue(self::XML_PATH_GENERAL_API_CREDENTIALS_ACCESS_TOKEN));\n }", "protected function getAccessTokenClient()\n {\n $grantType = \"client_credentials\";\n return $this->getAccessToken($grantType);\n }", "public function get_access_token()\n\t\t{\n\t\t\tif(isset($_COOKIE['bing_access_token']))\n\t\t\t\treturn $_COOKIE['bing_access_token'];\n\t\t\n\t\t\t// Get a 10-minute access token for Microsoft Translator API.\n\t\t\t$url = 'https://datamarket.accesscontrol.windows.net/v2/OAuth2-13';\n\t\t\t$postParams = 'grant_type=client_credentials&client_id='.urlencode($this->clientID).\n\t\t\t'&client_secret='.urlencode($this->clientSecret).'&scope=http://api.microsofttranslator.com';\n\t\t\t\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url); \n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postParams);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); \n\t\t\t$rsp = curl_exec($ch); \n\t\t\t$rsp = json_decode($rsp);\n\t\t\t$access_token = $rsp->access_token;\n\t\t\t\n\t\t\tsetcookie('bing_access_token', $access_token, $rsp->expires_in);\n\t\t\t\n\t\t\treturn $access_token;\n\t\t}", "protected function getToken()\n {\n // We have a stateless app without sessions, so we use the cache to\n // retrieve the temp credentials for man in the middle attack\n // protection\n $key = 'oauth_temp_'.$this->request->input('oauth_token');\n $temp = $this->cache->get($key, '');\n\n return $this->server->getTokenCredentials(\n $temp,\n $this->request->input('oauth_token'),\n $this->request->input('oauth_verifier')\n );\n }", "protected function getAccessToken()\n {\n $accessToken = parent::getAccessToken();\n Yii::app()->session['tumblr_token'] = $accessToken;\n return $accessToken;\n }", "public static function acquire_token() {\n\n\t\t\n\n\t\t$response = skydrive_tokenstore::get_tokens_from_store();\n\n\t\tif (empty($response['access_token'])) {\t// No token at all, needs to go through login flow. Return false to indicate this.\n\n\t\t\treturn false;\n\n\t\t\texit;\n\n\t\t} else {\n\n\t\t\tif (time() > (int)$response['access_token_expires']) { // Token needs refreshing. Refresh it and then return the new one.\n\n\t\t\t\t$refreshed = skydrive_auth::refresh_oauth_token($response['refresh_token']);\n\n\t\t\t\tif (skydrive_tokenstore::save_tokens_to_store($refreshed)) {\n\n\t\t\t\t\t$newtokens = skydrive_tokenstore::get_tokens_from_store();\n\n\t\t\t\t\treturn $newtokens['access_token'];\n\n\t\t\t\t}\n\n\t\t\t\texit;\n\n\t\t\t} else {\n\n\t\t\t\treturn $response['access_token']; // Token currently valid. Return it.\n\n\t\t\t\texit;\n\n\t\t\t}\n\n\t\t}\n\n\t}", "public function get_access_token($oauth_token, $oauth_addon);", "public function getBaseAccessToken() {\n\t\t\n// \t\tif ($result == null) {\n\t\t\treturn $token = $this->get_access_token ();\n// \t\t} else {\n// \t\t\treturn $result;\n// \t\t}\n\t}" ]
[ "0.7577686", "0.7577686", "0.7577686", "0.7577686", "0.7577686", "0.7375216", "0.7244601", "0.723933", "0.7196035", "0.70145506", "0.69816303", "0.69801086", "0.6978727", "0.697113", "0.69592756", "0.695279", "0.695279", "0.695279", "0.695279", "0.695279", "0.695279", "0.695279", "0.695279", "0.6950245", "0.6942372", "0.69055235", "0.6899152", "0.68885756", "0.6885753", "0.68681324", "0.68649536", "0.686318", "0.686318", "0.686318", "0.686318", "0.6862458", "0.6862458", "0.6862458", "0.6862458", "0.6862458", "0.6862458", "0.68560845", "0.6814554", "0.6813207", "0.67927796", "0.6778293", "0.6757766", "0.67557496", "0.6748441", "0.6656031", "0.6620309", "0.6616617", "0.66080356", "0.6603957", "0.6549898", "0.6540093", "0.6536466", "0.6518728", "0.65162295", "0.6507305", "0.6500386", "0.6480326", "0.6475458", "0.64692783", "0.6458867", "0.64574534", "0.6441161", "0.64390725", "0.6428257", "0.6427855", "0.6415136", "0.6413099", "0.6406765", "0.63923573", "0.6383176", "0.6383039", "0.63712317", "0.6348951", "0.63392794", "0.6327752", "0.6314952", "0.6307312", "0.62998915", "0.6296101", "0.6294157", "0.6290187", "0.6284773", "0.62833124", "0.62757105", "0.6258141", "0.6257351", "0.6250877", "0.6250185", "0.62368476", "0.62313443", "0.62289697", "0.62204885", "0.6202967", "0.6201665", "0.62014014" ]
0.7194228
9
Delete an access token by it's ID
public function delete_access_token($hash) { $tokens = $this->get_access_tokens(); $found = false; foreach ($tokens as $i => $token) { if ($token['hash'] == $hash) { $found = true; break; } } if ($found === true) { unset($tokens[$i]); // re-index array update the dataset update_user_meta($this->user->ID, self::META_TYK_ACCESS_TOKENS_KEY, array_values($tokens)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($id) {\n $this->idParamSchema()->setDescription('Revoke an access token.');\n $out = $this->schema([], 'out');\n\n $row = $this->token($id);\n if ($row['UserID'] != $this->getSession()->UserID) {\n $this->permission('Garden.Settings.Manage');\n }\n\n $this->accessTokenModel->revoke($id);\n }", "public function removeAccessToken();", "public static function deleteToken($user_id)\n {\n $delete = Oauth_access_token::where(array('user_id' => $user_id))->delete();\n return $delete;\n }", "public function revokeAccessToken($tokenId)\n {\n }", "public function deleteToken($id)\n {\n return $this->query(\"UPDATE {$this->table} SET token = '' WHERE id = ?\", [$id]);\n }", "public function delete( $id ){\n \t\t$response = $this->curl->delete( $this->api_url . '/' . $id, [ \n\t\t\t'access_token' \t=> $this->token\n\t\t]);\n\t\t\n\t\treturn $response;\n \t}", "public function destroy($id){\n\t\t$token = Token::findOrFail($id);\n\t\t$token->delete();\n\t\treturn response()->json(['status' => 'SUCCESS','message' => 'Token Deleted Successfully']);\n\t\n\t}", "public function delete_facebook_tokens($id)\n {\n $this->db->update('social_media', array('tokenFacebook'=>''), array('socialUsuarioId'=>$id));\n }", "public function revokeAccessToken($user_id, $access_token)\n {\n \t$stmt = $this->db->prepare(sprintf(\"DELETE FROM %s WHERE access_token = :access_token AND user_id = :user_id\", $this->config['access_token_table']));\n \t$stmt->execute(compact('access_token', 'user_id'));\n \treturn $stmt->rowCount() > 0;\n }", "public function delete(AccessTokenEntity $token)\n {\n $deleted = $this->getDatabase()\n ->selectCollection('oauth_access_tokens')\n ->remove([\n '_id' => $token->getId()\n ]);\n }", "private function delete_refresh_token() {\n global $DB, $USER;\n $grt = $DB->get_record('repository_gdrive_tokens', array('userid' => $USER->id));\n $event = \\repository_googledrive\\event\\repository_gdrive_tokens_deleted::create_from_userid($USER->id);\n $event->add_record_snapshot('repository_gdrive_tokens', $grt);\n $event->trigger();\n $DB->delete_records('repository_gdrive_tokens', array ('userid' => $USER->id));\n }", "function RevokeAccessToken()\r\n {\r\n $this->Rest->RevokeAccessToken();\r\n }", "public function deleteToken($dev_id) {\n \t$result = mysql_query(\"DELETE FROM $this->tokenTable WHERE token='$dev_id'\");\n \treturn TRUE;\n \t\n }", "public function delete_twitter_tokens($id)\n {\n $this->db->update('social_media', array('twitter_oauth'=>'', 'twitter_oauth_secret'=>''), array('socialUsuarioId'=>$id));\n }", "public static function revokeAccessToken($token_id)\n {\n return AccessTokenService::revokeTokenByMS($token_id);\n }", "abstract public function removeAuthToken();", "public function delete(AccessTokenEntity $token)\n {\n $this->getConnection()->table('oauth_access_tokens')\n ->where('oauth_access_tokens.access_token', $token->getId())\n ->delete();\n }", "public function revokeAccessToken(AccessTokenInterface $token);", "public function deleteConsumerAccessToken( $token, $user_id, $user_is_admin = false ) {\n\t\t$tokens = get_option('oauth_consumer_tokens');\n\t\tif (array_key_exists($token, $tokens)) {\n\t\t\tunset($tokens[$token]);\n\t\t\tupdate_option('oauth_consumer_tokens', $tokens);\n\t\t}\n\t}", "public function destroy($id)\n {\n $token = $this->tokenRepository->findWithoutFail($id);\n\n if (empty($token)) {\n Flash::error('Token not found');\n\n return redirect(route('admin.tokens.index'));\n }\n\n $this->tokenRepository->delete($id);\n\n Flash::success('Token deleted successfully.');\n\n return redirect(route('admin.tokens.index'));\n }", "public function revokeAccessToken($tokenId)\r\n {\r\n $this->update(['access_token' => $tokenId], ['revoked' => 1]);\r\n }", "private function revoke_token() {\n $this->delete_refresh_token();\n $this->client->revokeToken();\n $this->store_access_token(null);\n }", "public function destroy($id)\n {\n Apilogins::where('id',$id)->delete();\n return redirect()->route('apiaccount.index');\n }", "public function deleteRememberToken($identifier, $token);", "function token_delete( $p_token_id ) {\r\n\t\t$c_token_id = db_prepare_int( $p_token_id );\r\n\r\n\t\t$t_tokens_table\t= config_get( 'mantis_tokens_table' );\r\n\t\t# Remove\r\n\t\t$query = \"DELETE FROM $t_tokens_table\r\n\t\t \tWHERE id='$c_token_id'\";\r\n\t\tdb_query( $query, 1 );\r\n\t\treturn true;\r\n\t}", "function delete($id) {\n Ad::deleteAd($id);\n unset($_GET['delete']);\n }", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function revokeAccessToken($tokenId) {\n $accessToken = $this->model->find($tokenId);\n\n if (null == $accessToken) {\n return;\n }\n\n $accessToken['revoked'] = 1;\n $this->model->update($accessToken['identifier'], $accessToken);\n }", "public function destroy($id)\n {\n $annonce = Annonce::findOrFail($id);\n $annonce->delete($id);\n\n return redirect('annonce')->with('success', 'Annonce has been deleted');\n }", "public function delete( $id );", "public function delete(int $id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteMembershipEntry($token, $id)\n {\n $this->deleteQuery($this->getFullUrl('/group_memberships/' . $id), $token);\n }", "public function revokeAccessToken($tokenId)\n {\n // TODO: Implement revokeAccessToken() method.\n }", "public function deleteWebAuthnCredential($id)\n {\n return $this->start()->uri(\"/api/webauthn\")\n ->urlSegment($id)\n ->delete()\n ->go();\n }", "public function destroy($id)\n {\n Port_Org_auth::where('id', $id)->delete();\n return redirect()->back();\n }", "public function delete_token($id)\n {\n $record = LanguageToken::where('id', $id)->get()->first();\n /**\n * Check if the record is set to current default language\n * If so do not delete the record and send the appropriate message\n */\n\n /*if($record->is_default)\n {\n //Topics exists with the selected, so done delete the subject\n $response['status'] = 0;\n $response['message'] = getPhrase('it_is_set_to_default_language');\n return json_encode($response);\n }\n else*/ {\n if(!env('DEMO_MODE')) {\n $record->delete();\n }\n $response['status'] = 1;\n $response['message'] = LanguageHelper::getPhrase('record_deleted_successfully');\n return json_encode($response);\n }\n }", "public function del($id)\n {\n }", "public function destroy($id)\n {\n //$test = DB::table('permissions')->get()->first();\n //$test = Permission::get();\n $client = Client::find($id);\n //$client = DB::table('clients')->where('id_client', '=', $id);\n $this->authorize('delete', $client);\n $client->delete();\n return redirect('/clients');\n }", "#[\n OpenApi\\Operation(\n tags: ['Auth/Tokens'],\n security: 'AccessTokenSecurityScheme'\n )\n ]\n #[OpenApi\\Parameters(factory: ShowAuthTokensParameters::class)]\n #[OpenApi\\Response(factory: NoContentResponse::class, statusCode: 204)]\n #[OpenApi\\Response(factory: UnauthorizedResponse::class, statusCode: 401)]\n #[OpenApi\\Response(factory: NotFoundResponse::class, statusCode: 404)]\n #[\n OpenApi\\Response(\n factory: TooManyRequestsResponse::class,\n statusCode: 429\n )\n ]\n public function destroy(AuthToken $authToken) {\n $this->verifyNoDemo();\n\n $this->authorizeAnonymously('delete', $authToken);\n\n if ($authToken->getGroupId() === null) {\n $authToken->delete();\n } else {\n AuthToken::deleteTokensFromGroup($authToken->getGroupId());\n }\n\n return response()->noContent();\n }", "public function removeRefreshToken();", "public function destroy($id)\n\t{\n\t\t$customparam = \\App\\Customparam::query()\n\t\t\t->findOrFail($id);\n\n\t\t$this->authorize('delete', $customparam);\n\n\t\t$customparam->delete();\n\t}", "public function delete_secret( $id ) {\n\n\t\t$this->method = 'DELETE';\n\n\t\t$this->path = '/secret/' . (int) $id;\n\t}", "public function delete($id)\n {\n $query=\"DELETE FROM permission WHERE permissionId=\".$id;\n\n $this->executeQuery($query);\n }", "public function delete($id)\n {\n return $this->user->find($id)->delete();\n }", "public function destroy($id) {\n \n if(session(\"token\")==\"Unauthorized\"){\n return view(\"connexion.login\");\n }\n $response = $this->client->request('PUT', \"http://127.0.0.1/api-meetdoc/public/api/examens/$id?token=$this->token\", [\"form_params\" => ['actif' => 'false']]);\n return $this->index();\n }", "public function destroy($id)\n {\n Gate::authorize('haveaccess');\n }", "public function deleteAuth($id)\n\t{\n\t\t$auth = $this->find($id);\n\n\t\treturn $auth->delete();\n\t}", "private static function delete_by_id( $id ) {\n\t\tglobal $wpdb;\n\n\t\t$wpdb->delete( $wpdb->base_prefix . 'itsec_mutexes', [\n\t\t\t'mutex_id' => $id,\n\t\t] );\n\t}", "public function delete($id)\n\t{\n\t\tC::forget(Cookie::payload);\n\t}", "public function destroy($id)\n {\n if($user= JWTAuth::parseToken()->authenticate()){\n return 'destroying..';\n }\n }", "public function delete($id)\n\t{\n\t\t\\Core\\Cookie::delete(static::PAYLOAD);\n\t}", "public function deleteRevokedTokens(): void\n {\n $this->model->newQuery()\n ->where('revoked', '=', true)\n ->delete();\n }", "public function destroy($id)\n {\n $data = rekening::where('id',$id)->first();\n $data->delete();\n }", "public function delete($id) {\r\n\r\n }", "public function logoutDevice(Request $request, $id)\n {\n try {\n if($request->user()->tokens()->where('id', $id)->first()->delete()) {\n return response()->json(['message' => 'Вы вышли']);\n }\n } catch (\\Exception $e) {\n return response()->json(['status' => 'error', 'message' => $e->getMessage()], $e->getCode());\n }\n }", "public function delete($id)\n {\n // ..\n }", "public function destroy($id)\n {\n Gate::authorize('haveaccess'); \n }", "public function deleteApiToken($token)\n\t{\n\t\treturn $this->checkApiToken($token, true);\n\t}", "public function delete($id)\n {\n //\n }", "public function delete($id)\n {\n //\n }", "public function destroy($id)\n {\n // delete user\n }", "public function delete($id)\r\n {\r\n $user_bank_account = UserBankAccount::find($id);\r\n if (!Sentinel::getUser()->id != $user_bank_account->user_id) {\r\n Flash::warning(\"Permission Denied\");\r\n return redirect('/');\r\n }\r\n UserBankAccount::destroy($id);\r\n Flash::success(trans('general.successfully_deleted'));\r\n return redirect('setting/data');\r\n }", "public function delete($id)\r\n {\r\n }" ]
[ "0.7932635", "0.77209085", "0.70563513", "0.7008762", "0.7006579", "0.69556224", "0.6774224", "0.6687199", "0.6636718", "0.66084886", "0.6529398", "0.6509894", "0.6501872", "0.6501032", "0.6470172", "0.64478076", "0.64276123", "0.64220375", "0.6394715", "0.63607514", "0.6354153", "0.63266575", "0.62812686", "0.6275834", "0.6261607", "0.6241507", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62291914", "0.62200856", "0.6218432", "0.6218202", "0.621634", "0.6214978", "0.6214978", "0.6214978", "0.6214978", "0.6214978", "0.6214978", "0.6206163", "0.62041545", "0.6194033", "0.61766917", "0.61683613", "0.6142748", "0.6122596", "0.61195594", "0.61193293", "0.6114253", "0.6102257", "0.6099832", "0.6080659", "0.6053082", "0.6038239", "0.6036943", "0.6034803", "0.6023318", "0.6016074", "0.600921", "0.60080236", "0.59951866", "0.5991022", "0.59905285", "0.5989175", "0.59889686", "0.5984201", "0.59793353", "0.59793353", "0.5969486", "0.5962648", "0.59616005" ]
0.66002554
10
Check if we already stored a tyk id for this developer
public function has_tyk_id() { $tyk_user_id = get_user_meta($this->user->ID, self::META_TYK_USER_ID_KEY, true); return !empty($tyk_user_id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function isIdGeneratedByStorage(): bool;", "public function hasId(){\n return $this->_has(17);\n }", "public function hasUid(){\n return $this->_has(2);\n }", "public function hasMaconomyId(): bool\n {\n return !empty($this->data['instancekeyField']);\n }", "private function _checkPk() {\n\t\t$result = false;\n\t\t$private_key = Mage::helper ( 'masterpass' )->checkPrivateKey ();\n\t\tif (! $private_key) {\n\t\t\tMage::getSingleton ( 'core/session' )->addError ( Mage::getStoreConfig ( 'masterpass/config/checkouterrormessage' ) );\n\t\t\t// save long access token\n\t\t\t$customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n\t\t\t$customerData = Mage::getModel ( 'customer/customer' )->load ( $customer->getId () );\n\t\t\t$longAccessToken = null;\n\t\t\t$customerData->setData ( 'longtoken', $longAccessToken );\n\t\t\t\n\t\t\t$customerData->save ();\n\t\t\t// $this->_redirect('checkout/cart');\n\t\t\t// $this->getResponse()->setRedirect(Mage::helper('customer')->getLoginUrl());\n\t\t\t$result = true;\n\t\t}\n\t\treturn $result;\n\t}", "function is_previously_used_txn_id ($txn_id) {\r\n\t\tglobal $db;\r\n\t\tif (!$result = $db->query(\"SELECT id FROM registrations WHERE pp_txn_id = '$txn_id'\")) {\r\n\t\t\tif (DEBUG == true) { error_log(($msg = \"Error running query: $sql\") . PHP_EOL, 3, LOG_FILE); }\r\n\t\t\tdie($msg);\r\n\t\t}\r\n\t\treturn $result->num_rows;\r\n\t}", "function chk_teach_id(){\n\n\t\t$Q = $this->teach_lgn->chk_teach_id();\n\n\t\tif ($Q) {\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\n\t\t\treturn TRUE;\n\t\t}\n\n\t}", "public function hasDceId() {\n return $this->_has(6);\n }", "public function isxSet($k)\n {\n return isset($_SESSION[CCID][$k]);\n }", "protected function _exists($key,$typ,$uname){\r\n if($this->bag[0]->count($this->bag[1],array('key'=>$key,'type'=>$typ,'uname'=>$uname))!=1) return FALSE;\r\n return $this->bag[0]->load_field($this->bag[1],'id',array('key'=>$key,'type'=>$typ,'uname'=>$uname));\r\n }", "public function hasId() : bool;", "public function isRegistered(){\n return isset($this->data['id']);\n }", "public function hasAppid()\n {\n return $this->appid !== null;\n }", "public function hasAppid()\n {\n return $this->appid !== null;\n }", "public function hasAppid()\n {\n return $this->appid !== null;\n }", "public static function exists()\n {\n return Session::get('UserID') != null;\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "function merchantExists()\n {\n\n $this->getById();\n if ($this->auth_id != null) return true;\n else {\n return false;\n }\n }", "public function exists() {\n\t\treturn !isset($userData);\n\t}", "private function checkIsExists(): bool\n {\n $where = [\n $this->table. '.vendorId' => $this->vendorId,\n $this->table. '.campaign' => $this->campaign,\n ];\n\n if (!is_null($this->id)) {\n $where[$this->table. '.id !='] = $this->id;\n }\n\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => $where\n ]);\n\n return !is_null($id);\n }", "public function needKuserFromPuser ( )\r\n\t{\r\n\t\treturn self::KUSER_DATA_KUSER_ID_ONLY;\r\n\t}", "public function needKuserFromPuser ( )\r\n\t{\r\n\t\treturn self::KUSER_DATA_KUSER_ID_ONLY;\r\n\t}", "public function hasId(){\r\n return $this->_has(5);\r\n }", "public function hasSignupId(){\n return $this->_has(4);\n }", "function isUniqueKey(): bool;", "public function hasdeveloper()\n {\n return $this->hasuser() && $this->user()->isdeveloper();\n }", "public function hasFortId()\n {\n return $this->FortId !== null;\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasId() {\n return $this->_has(1);\n }", "public function hasGuid(){\n return $this->_has(1);\n }", "public function isStored($hintId)\n\t{\n\t\tif( $_SESSION[__CLASS__][$this->questionId] === $hintId )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function hasBuildId(){\n return $this->_has(2);\n }", "function is_id_free($pr_id) {\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"select pr_id from \".$this->_db_table.\" where pr_id=$pr_id\");\n\t\tif (!$rs)\n\t\t\t$this->_event->log(\"is_id_free\", $_SERVER['REQUEST_TIME'], 2, \"cloudprofile.class.php\", $db->ErrorMsg(), \"\", \"\", 0, 0, 0);\n\t\telse\n\t\tif ($rs->EOF) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function hasIdentity()\n {\n return !empty($this->storage[$this->storageKey]);\n }", "public function hasSkillid(){\n return $this->_has(14);\n }", "private function getUidZerroIsPresent() {\n $count = db_query(\"SELECT uid FROM {users} WHERE uid = 0\")->fetchAll();\n return (boolean) $count;\n }", "function checkUserIdBL() {\n\t $isExisting = false;\n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t\t $isExisting = true;\n\t }\n\t return $isExisting;\n }", "private function check_kaitou_id($kaitou_id) {\n $sql = 'SELECT count(id) as cnt FROM kaitou WHERE id = ?';\n $res = $this->db->select($sql, array('id' => (int)$kaitou_id));\n return $res[0]['cnt']>0?true:0;\n }", "public function hasShopid(){\n return $this->_has(11);\n }", "function tflash_id_exits($id) {\n return TFLASH::id_exists($id);\n}", "public function hasStored()\n\t{\n\t\tif( $_SESSION[__CLASS__][$this->questionId] !== null )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function exists()\n {\n return ($this->id) ? true : false;\n }", "private function checkIsExists(): bool\n {\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => [\n $this->table. '.listId' => $this->listId,\n $this->table. '.campaignId' => $this->campaignId,\n ]\n ]);\n\n return !is_null($id);\n }", "public function storageIdExists($uid)\n {\n $this->_cache->load($this->_cache_key, $this->_data_version);\n\n return array_key_exists($uid, $this->_cache->uids);\n }", "public function has() {\n\t\t$userid = $this->get();\n\t\treturn ! empty( $userid );\n\t}", "public function getIsUniqueIdentifier()\n {\n return $this->getIsUniqueIdentifer();\n }", "private function usr(){\r\n\r\n if(defined(\"USER_ID\")){ return true;}else{return false;}\r\n\r\n }", "public function isDeveloper()\r\n\t{\r\n\t\t\treturn count($this->getDeveloperProfiles()) > 0;\r\n\t}", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "private function is_duplicate () {\n $email = $this->payload['email'];\n $facebook_id = '0';\n if (!empty($this->payload['facebook_id'])) {\n $facebook_id = $this->payload['facebook_id'];\n }\n $sql = \"SELECT id FROM users WHERE email='$email' OR facebook_id='$facebook_id'\";\n $sql = $this->conn->query($sql);\n\n return $sql->num_rows > 0;\n }", "private function _checkIdent()\n {\n $auth = Zend_Auth::getInstance();\n $auth->setStorage(new Zend_Auth_Storage_Session('hl_connect'));\n \n if ($auth->hasIdentity())\n $this->_agentSchemeNumber = $auth->getStorage()->read()->agentschemeno;\n \n return $auth->hasIdentity();\n }", "public function hasId(): bool\n {\n return $this->id !== null;\n }", "function exists($item_kit_id)\n\t{\n\t\t// echo $item_kit_id;\n\t\t$query = $this->db->where(\"category\", \"tickets\")\n\t\t\t\t->where('item_kit_id',$item_kit_id)\n\t\t\t\t->get(\"item_kits\");\n\n\t\treturn ($query->num_rows() == 1);\n\t}", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasNextgoodsid(){\n return $this->_has(36);\n }", "function exists() {\n\t return !empty($this->id);\n\t}", "function hasValidUid()\n{\n return isset($_SESSION[\"state\"]) && isUid($_SESSION[\"state\"]);\n}", "public function getIsUniqueIdentifer()\n {\n return $this->isUniqueIdentifer;\n }", "public static function isExistInTemp($key) {\n return isset($_SESSION[self::$appSessionName][self::$storageName][$key]);\n }", "public function hasTraceId(){\n return $this->_has(1);\n }", "public function hasTraceId(){\n return $this->_has(1);\n }", "public function issetSupplierID(): bool\n {\n return isset($this->supplierID);\n }", "public function hasId()\n {\n return $this->id !== null;\n }", "protected function needsIdRegen() {\n return (\n (\n $this->config->regenIdInterval > 0 &&\n time() >= $this->metadata->regenerateIdAt\n ) ||\n (\n $this->config->regenIdCount > 0 &&\n $this->metadata->sessionStartCount >= $this->config->regenIdCount\n )\n );\n }", "function isLTIUser() {\n \n if ( isset( $_SESSION['lti'] ) ) {\n \n $lti = unserialize( $_SESSION['lti'] );\n \n if ( isset( $lti['user_id'] ) ) {\n \n return true;\n \n }\n \n }\n \n return false;\n \n }", "public static function mustInit($userId = null)\n\t{\n\t\tif (empty($userId)) {\n\t\t\t$userId = \\App\\User::getCurrentUserRealId();\n\t\t}\n\t\treturn empty(\\App\\User::getUserModel($userId)->getDetail('authy_secret_totp'));\n\t}", "public function hasUseradditem(){\n return $this->_has(24);\n }", "protected static function isInstallToolSession() {}" ]
[ "0.6188733", "0.61576307", "0.61493653", "0.61422837", "0.6118056", "0.60898644", "0.6057596", "0.60329396", "0.5936649", "0.5932672", "0.58735806", "0.58721614", "0.5799596", "0.5799596", "0.5799596", "0.57994324", "0.5794312", "0.5794312", "0.5794312", "0.5794312", "0.5794312", "0.5794312", "0.5794312", "0.5794312", "0.5794312", "0.5794312", "0.5778184", "0.5770083", "0.5756712", "0.5732011", "0.5732011", "0.5725596", "0.57231957", "0.5723048", "0.5709781", "0.56934106", "0.5677663", "0.5677663", "0.5677663", "0.5677663", "0.5677663", "0.5677663", "0.5677663", "0.5677663", "0.5677663", "0.5677663", "0.5677663", "0.5677663", "0.5677663", "0.56747836", "0.5631948", "0.5624306", "0.5621404", "0.5613886", "0.5594177", "0.55758053", "0.55714744", "0.5562627", "0.55599487", "0.5551156", "0.5548971", "0.5545949", "0.5527803", "0.5511439", "0.5511159", "0.5508709", "0.54873866", "0.54791456", "0.54660803", "0.54660803", "0.54660803", "0.54660803", "0.54660803", "0.54585344", "0.54525065", "0.54492676", "0.54483575", "0.54401267", "0.54401267", "0.54401267", "0.54401267", "0.54401267", "0.54401267", "0.54401267", "0.54401267", "0.54401267", "0.5437371", "0.5435652", "0.54308146", "0.5430674", "0.5424858", "0.54245913", "0.54245913", "0.53946537", "0.5392847", "0.5386699", "0.53821427", "0.5381835", "0.53783095", "0.5376951" ]
0.71587473
0
Set the user's tyk user id
public function set_tyk_id($id) { update_user_meta($this->user->ID, self::META_TYK_USER_ID_KEY, $id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setIduser($value)\n {\n $this->iduser = $value;\n }", "public function setUserId() {\n $this->user_id = $user_id;\n }", "public function SetIdUser($id_user)\n {\n $this->id_user = $id_user;\n return;\n\n }", "public function set_user_id( $value ) {\n\t\t$this->set_prop( 'user_id', absint( $value ) ) ;\n\t}", "public function set_id_user($value = \"\")\n {\n $this->_id_user = \\helpers\\Validator::valInt('f_id_user', $value, TRUE);\n }", "public function setUserID($value) {\n\t\t$this->_user_id = $value;\n\t}", "public function setId_user($id_user)\n {\n $id_user = (int) $id_user;\n $this->_id_user = $id_user;\n }", "public function setId_user($id_user)\n {\n $id_user = (int) $id_user;\n $this->_id_user = $id_user;\n }", "public function set_user_id($userid) {\n $this->userid = (int)$userid;\n }", "public function setUserid($value) {\n\t\tif(!check($value)) throw new Exception(lang('error_90'));\n\t\tif(!Validator::AccountId($value)) throw new Exception(lang('error_90'));\n\t\t\n\t\t$this->_userid = $value;\n\t}", "public function setUserID($user_id){\n\t\t$this->user_id = $user_id;\n\t}", "public function setId_user($id_user)\n {\n $id_user = (int) $id_user;\n if (is_int($id_user) && $id_user > 0) {\n $this->id_user = $id_user;\n }\n }", "public function set_user($var_user) {\r\n\t\t$this->id = $var_user;\r\n\t}", "public function setUserId($id)\n {\n $this->userId = $id;\n }", "public function setUserId($user_id)\n {\n $this->user_id = $user_id;\n }", "public function setUserid($value)\n {\n return $this->set(self::_USERID, $value);\n }", "public function setUserid($value)\n {\n return $this->set(self::_USERID, $value);\n }", "public function setUserid($value)\n {\n return $this->set(self::_USERID, $value);\n }", "public function set_user($id_user){\n if ( is_int($id_user) ){\n $this->id_user = $id_user;\n }\n return $this;\n }", "public function set_user_id( $user_id ) {\r\n\t\t$this->user_id = $user_id;\r\n\t\t$this->store->set_id( $user_id );\r\n\t}", "public function set_users_id($value) {\r\n $this->users_id = $value;\r\n data::add(\"users_id\", $this->users_id == \"\" ? session::get(CURRENT_USER_SESSION_NAME) : $this->users_id, $this->table_fields);\r\n }", "function set_login_user_id( $user_id )\n\t{\n\t\t$this->login_user_id = $user_id;\n\t}", "public function setUserId()\n {\n if(isset($_GET['userId']))\n {\n echo 'const userId = '.$_GET['userId'].';';\n }\n else\n {\n $config = new Config;\n echo 'const userId = '.$config->defaultUser.';';\n }\n }", "public function get_tyk_id() {\n\t\treturn get_user_meta($this->user->ID, self::META_TYK_USER_ID_KEY, true);\n\t}", "private function set_userId(int $userId)\n {\n $this->_id = $userId;\n }", "public function set_user_id($userid, $ornone = true) {\n $this->userids = array($userid);\n $this->allownouser = $ornone;\n }", "public function setIdUser($idUser) \n\t{\n\t\t$this->idUser = $idUser;\n\t\treturn $this;\n\t}", "function get_id($user_id){\n\t\t$this->id = $user_id;\n\t}", "public function setId_user($id_user){\n $this->id_user = $id_user;\n return $this;\n }", "function setUser( $user )\r\n {\r\n if ( is_a( $user, \"eZUser\" ) )\r\n {\r\n $userID = $user->id();\r\n\r\n $this->UserID = $userID;\r\n }\r\n }", "public function setId($id) {\n $this->set('id', $id, 'user');\n }", "public function set_user_id($user_id) {\n\n $this -> user_id = $user_id;\n\n }", "public function setUser()\n\t{\n\t\t$user = User::getInstance();\n\t\t\n\t\tif ( $this->session->get( 'user_id' ) ) {\n\t\t\t$user->set( 'id', $this->session->get( 'user_id' ) );\n\t\t\t$user->read();\n\t\t}\n\t}", "public function setUserId(?string $value): void {\n $this->getBackingStore()->set('userId', $value);\n }", "public function setUserId(?string $value): void {\n $this->getBackingStore()->set('userId', $value);\n }", "public function setUserId(?string $value): void {\n $this->getBackingStore()->set('userId', $value);\n }", "private function setUserID($iUser) {\n\t\t\t$this->user($iUser); \n//\t\t\t$this->iUser = $iUser; \n\t\t\tglobal $oPage; \n\t\t\t$oPage->iUser = $iUser; \n\t\t}", "public function set_current_user_id($id)\n {\n $this->current_user_id = $id;\n }", "function setUserId($userId)\n {\n $this->userId = $userId;\n }", "public function setUserIdUser(int $user_id_user): void\n {\n $this->User_id_user = $user_id_user;\n }", "public function setUserId($userId);", "public function setId_user($id_user)\n {\n $this->id_user = (int) $id_user;\n\n return $this;\n }", "public function testSetUserIdAllowsForSettingOfUserId()\n {\n $request = new Request($this->config, []);\n $user = uniqid('', true);\n\n $request->setUserId($user);\n $this->assertEquals($user, $request->getUserId());\n }", "public function setUserId($value)\n {\n return $this->set(self::_USER_ID, $value);\n }", "public function setUserId($value)\n {\n return $this->set(self::_USER_ID, $value);\n }", "public function setUserId($value)\n {\n return $this->set(self::_USER_ID, $value);\n }", "public function setUserId($value)\n {\n return $this->set(self::_USER_ID, $value);\n }", "public function setUserId($value)\n {\n $this->user_id = $value;\n return $this;\n }", "public function setUserId(int $userId): void\n {\n $this->_userId = $userId;\n }", "public function setUserId($value)\n {\n return $this->set(self::user_id, $value);\n }", "public function setUserId($value) {\n\t\tif(!is_numeric($value))\n\t\t\tthrow new \\Exception('Comment::setUserId() failed: value is not numeric');\n\n\t\t$this->user_id = $value;\n\t}", "public function setLoginId(): void\n {\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "public function setIdusuario($value){\n $this->idusuario = $value;\n }", "function SetUser(&$user)\n\t{\n\t\t$this->userId = $user->userId;\n\t}", "public function setId(int $userId)\n {\n $this->_id = (int) $userId;\n }", "public function setCreatedByUserId(?string $value): void {\n $this->getBackingStore()->set('createdByUserId', $value);\n }", "public function setUserId($userId) {\n $this->userId = $userId;\n }", "public function setIdUser($idUser)\n {\n $this->idUser = $idUser;\n\n return $this;\n }", "public function setIdUser($idUser)\n {\n $this->idUser = $idUser;\n\n return $this;\n }", "public function setIdUser($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }", "public function setIdUser($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }", "public function setIdUser($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }", "public function setUserId($data)\n {\n $this->_UserId=$data;\n return $this;\n }", "public function setUserId($value)\n {\n parent::setValue('user_id', $value);\n\n return $this;\n }", "public function set()\n\t{\n\t\t$this->created_at = date(TIMESTAMP_FORMAT);\n $user = new SessionUser();\n\t\t$this->created_by = $user->getID();\t\t\n\t}", "protected function _setId($value)\n\t{\n\t\tvar_dump($value);\n\t\tif (empty($value) || ($value < 0)) {\n\t\t\ttrigger_error('Invalid value used to set the member id', E_USER_ERROR);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\t$this->_id = $value;\n\t\t\t$_SESSION['user_id']=$value;\n\t\t\t\n\n\t\t}\n\t}", "public function setId_user($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }", "public function setId_user($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }", "Public Function setUserId($UserId) {\n\t\t$this->userId = $UserId;\n\t\n\t}", "public function setUser_id($user_id)\n {\n $this->user_id = htmlspecialchars($user_id);\n return $this;\n }", "function set_current_user($id, $name = '')\n {\n }" ]
[ "0.7870254", "0.7740763", "0.7546028", "0.75068474", "0.74682605", "0.7465337", "0.74568766", "0.74568766", "0.74209416", "0.7334768", "0.7327582", "0.7311374", "0.7307922", "0.71560735", "0.7028596", "0.7025103", "0.7025103", "0.7025103", "0.70120573", "0.6993875", "0.69618183", "0.69377935", "0.6937394", "0.6927435", "0.6926881", "0.68837565", "0.68517494", "0.68486863", "0.6846876", "0.6838139", "0.6828963", "0.68252784", "0.6823656", "0.68046576", "0.68046576", "0.68046576", "0.67620796", "0.6741251", "0.67299986", "0.6710343", "0.67035025", "0.66874576", "0.6686256", "0.6680152", "0.6680152", "0.6680152", "0.6680152", "0.6664962", "0.6662763", "0.6661583", "0.6660113", "0.6650219", "0.6647274", "0.6647274", "0.6647274", "0.6647274", "0.6647274", "0.6647274", "0.6647274", "0.6645636", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.6644955", "0.66377664", "0.6637364", "0.66218776", "0.6620579", "0.661934", "0.66140294", "0.66140294", "0.6594461", "0.6594461", "0.6594461", "0.65864414", "0.65775925", "0.6575617", "0.6575223", "0.65674686", "0.65674686", "0.65528244", "0.6542086", "0.64896864" ]
0.80293006
0
Get the user's tyk user id
public function get_tyk_id() { return get_user_meta($this->user->ID, self::META_TYK_USER_ID_KEY, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_user_id();", "function get_user_id()\r\n {\r\n return $this->user->get_id();\r\n }", "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "public function get_id_user()\n\t{\n\t\treturn $this->id_user;\n\t}", "public function getUserID () {\n return $this->id;\n }", "public function getIduser()\n {\n return $this->iduser;\n }", "public function getUserid()\n {\n return $this->userid;\n }", "public function getUser_id()\n {\n return $this->user_id;\n }", "public function getUser_id()\n {\n return $this->user_id;\n }", "public function get_user_id()\n {\n return self::getUser();\n }", "public function getId_user()\n {\n return $this->id_user;\n }", "public function getId_user()\n {\n return $this->id_user;\n }", "public function getId_user()\n {\n return $this->id_user;\n }", "public function getId_user()\n {\n return $this->id_user;\n }", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getIdUser()\n {\n return $this->id_user;\n }", "public function getIdUser()\n {\n return $this->id_user;\n }", "public function getIdUser()\n {\n return $this->id_user;\n }", "public function getUserIdentifier()\n {\n // that's why I am sending the id here\n return $this->id;\n }", "public function getUserID(){\n return($this->userID);\n }", "public function getUserId()\n {\n return (int) $this->_getVar('user_id');\n }", "public function id() {\n return isset($this->_adaptee->user_info['user_id']) ? $this->_adaptee->user_info['user_id'] : null;\n }", "public function getIdUser()\n {\n return $this->idUser;\n }", "public function getIdUser()\n {\n return $this->idUser;\n }", "public function getId_user()\n {\n return $this->_id_user;\n }", "public function getId_user()\n {\n return $this->_id_user;\n }", "protected function getUserId() {}", "protected function getUserId() {}", "public function getUserID() {\n\t\treturn $this->_user_id;\n\t}", "public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }", "public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }", "public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }", "public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }", "public function getIdUser() \n\t{\n\t\treturn $this->idUser;\n\t}", "public function getUserId()\n {\n return parent::getValue('user_id');\n }", "public function getUser_id()\n {\n return $this->user_id;\n }", "public function getUser_id()\n {\n return isset($this->user_id) ? $this->user_id : null;\n }", "Public Function UserId() {\n\t\treturn $this->userId;\n\t\n\t}", "function user_id () {\r\n\t$info = user_info();\r\n\treturn (isset($info[0]) ? $info[0] : 0);\r\n}", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function get_id_user()\n {\n return (isset($this->_id_user)) ? $this->_id_user : null;\n }", "public function getUserId()\n {\n return (int)$this->user_id;\n }", "public function get_user_id() {\n\t\treturn $this->user_id;\n\t}", "public function getUserId() {\n\t\treturn $this->Session->read('UserAuth.User.id');\n\t}", "public function getUserId()\r\n \t{\r\n \treturn $this->_client->getUser();\r\n \t}", "public function getID() {\n return $this->user_id;\n }", "public function getUserId() {\n\t\treturn $this->user_id;\n\t}", "function get_userid() {\n return $this->userid;\n }", "public function getUserId()\n {\n return UsniAdaptor::app()->user->getId();\n }", "public function getUserId()\n {\n \treturn $this->getCurrentUserid();\n }", "public function getUserId() {\n return $this->user_id;\n }", "public function getUserId() {\n return $this->user_id;\n }", "public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }", "public function getUserId()\n {\n return $this->id;\n }", "public function getId()\n {\n return $this->ID_user;\n }", "public function getUserID() {\n\t\tif (is_numeric($this->user_id)) {\n\t\t\treturn $this->user_id;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public function id()\n {\n return $this->user->id;\n }", "public function getUserId(): string;", "public function getUserId()\n {\n $this->checkIfKeyExistsAndIsInteger('user_id');\n\n return $this->data['user_id'];\n }", "public function getUserID() {\n\t\t\treturn $this->iUser; \t\n\t\t}", "public function get_user_id() {\n\n return $this -> user_id;\n\n }", "public function getUserId()\n {\n return $this->getValue('nb_user_id');\n }", "public function getUserID()\n {\n return $this->userID;\n }", "public function getUserID()\n {\n return $this->userID;\n }", "public function getId_user(){\n return $this->id_user;\n }", "abstract protected function getUserId() ;", "function get_user_id(){\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->userid;\n }", "public function getUserId()\n {\n return $this->userid;\n }", "function user_id() {\n isset($this->_user_id) || $this->_load_from_session();\n return $this->_user_id;\n }" ]
[ "0.8223575", "0.78589934", "0.78430516", "0.78430516", "0.78430516", "0.77170604", "0.770004", "0.76999384", "0.7699036", "0.7627572", "0.7627572", "0.7595936", "0.75680137", "0.75680137", "0.75680137", "0.75680137", "0.75630814", "0.75630814", "0.75630814", "0.75630814", "0.75630814", "0.75630814", "0.75630814", "0.75630814", "0.75630814", "0.7547285", "0.7547285", "0.7547285", "0.7534882", "0.75344354", "0.7527606", "0.7524021", "0.7519932", "0.7519932", "0.7518885", "0.7518885", "0.7517161", "0.7517161", "0.750485", "0.75028914", "0.75028914", "0.75028914", "0.750249", "0.7502312", "0.7494441", "0.7488448", "0.74846506", "0.74846476", "0.7475938", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.7469278", "0.74645126", "0.74612176", "0.74578005", "0.7450081", "0.7445194", "0.74336904", "0.7421486", "0.7418366", "0.7397971", "0.73971593", "0.73968565", "0.73968565", "0.73942065", "0.7389375", "0.73858595", "0.73804516", "0.73748815", "0.7370517", "0.7365373", "0.7355923", "0.73411286", "0.7337138", "0.73344606", "0.73344606", "0.7323734", "0.73128927", "0.7308778", "0.730343", "0.730343", "0.72984785" ]
0.8597926
0
Get tyk access token
public function register_with_tyk() { try { $tyk = new Tyk_API(); $user_id = $tyk->post('/portal/developers', array( 'email' => $this->user->user_email, )); $this->set_tyk_id($user_id); } catch (Exception $e) { trigger_error(sprintf('Could not register user for API: %s', $e->getMessage()), E_USER_WARNING); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "private function _get_access_token() {\n return $this->_http->request( \n 'POST', 'https://oauth.api.189.cn/emp/oauth2/v3/access_token',\n http_build_query( array(\n 'grant_type' => 'client_credentials',\n 'app_id' => C( 'SMS_189_KEY' ),\n 'app_secret' => C( 'SMS_189_SECRET' )\n ) ) );\n\n }", "public function getAccessToken($access_token);", "public function getAccessToken()\n {\n return $this->get(self::_ACCESS_TOKEN);\n }", "public function getToken()\n {\n $params = array(\n 'client_id' => $this->client_id,\n 'client_secret' => $this->client_secret,\n 'code' => $this->code,\n 'redirect_uri' => $this->redirect_uri\n );\n $res = $this->getRequest('oauth/access_token',$params);\n //$token = $res['access_token'];\n return $this->res = $res;\n\n\n }", "public function getToken() {\n return $this->accessToken;\n }", "public function getToken()\n\t{\n\t\treturn $this->getOption('accesstoken');\n\t}", "function GetAccessToken()\r\n {\r\n return $this->Rest->GetAccessToken();\r\n }", "abstract public function url_access_token();", "protected function getAccessToken()\n {\n return $this->access_token->getToken();\n }", "public function getToken()\n {\n return $this->accessToken;\n }", "protected function get_access_token() {\n global $SESSION;\n if (isset($SESSION->{self::SESSIONKEY})) {\n return $SESSION->{self::SESSIONKEY};\n }\n return null;\n }", "public function getAccessToken() {\n return $this->accessToken;\n }", "public function get_access_token() {\r\n\t\t$session = $_SESSION['auth_baidu']['last_key'];;\r\n\t\tif (isset ( $session ['access_token'] )) {\r\n\t\t\treturn $session ['access_token'];\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private function getAccessToken() {\n\n // set the request token and secret we have stored\n $this->tmhOAuth->config['user_token'] = $_SESSION['authtoken'];\n $this->tmhOAuth->config['user_secret'] = $_SESSION['authsecret'];\n\n\n // send request for an access token\n $this->tmhOAuth->request('POST', $this->tmhOAuth->url('oauth/access_token', ''), array(\n\n // pass the oauth_verifier received from Twitter\n 'oauth_verifier' => $_GET['oauth_verifier']\n ));\n\n\n\n if($this->tmhOAuth->response['code'] == 200) {\n\n // get the access token and store it in a cookie\n $response = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\n setcookie('access_token', $response['oauth_token'], time()+3600*24*30);\n setcookie('access_token_secret', $response['oauth_token_secret'], time()+3600*24*30);\n\n // state is now 2\n $_SESSION['authstate'] = 2;\n\n // redirect user to clear leftover GET variables\n header('Location: ' . $this->tmhOAuth->php_self());\n\n exit;\n }\n\n return false;\n }", "public function get_access_token()\n\t\t{\n\t\t\tif(isset($_COOKIE['bing_access_token']))\n\t\t\t\treturn $_COOKIE['bing_access_token'];\n\t\t\n\t\t\t// Get a 10-minute access token for Microsoft Translator API.\n\t\t\t$url = 'https://datamarket.accesscontrol.windows.net/v2/OAuth2-13';\n\t\t\t$postParams = 'grant_type=client_credentials&client_id='.urlencode($this->clientID).\n\t\t\t'&client_secret='.urlencode($this->clientSecret).'&scope=http://api.microsofttranslator.com';\n\t\t\t\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url); \n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postParams);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); \n\t\t\t$rsp = curl_exec($ch); \n\t\t\t$rsp = json_decode($rsp);\n\t\t\t$access_token = $rsp->access_token;\n\t\t\t\n\t\t\tsetcookie('bing_access_token', $access_token, $rsp->expires_in);\n\t\t\t\n\t\t\treturn $access_token;\n\t\t}", "public function getAccessToken()\n\t{\n\t\treturn $this->client->getAccessToken();\n\t}", "public function getAccessToken()\n {\n return $this->access_token;\n }", "public function getAccessToken()\n\t{\n\t\tif ($this->makeRequest())\n\t\t{\n\t\t\tif ($token = isset($this->getJson()->access_token) ? $this->getJson()->access_token : null) {\n\t\t\t\treturn $token;\n\t\t\t}\n\t\t}\n\t}", "public function getAccessToken()\n {\n return $this->getQuery('accesstoken');\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->_access_token;\n }", "private function getToken() {\n\t // CHECK API and get token\n\t\t$post = [\n\t\t\t'grant_type' => 'password',\n\t\t\t'scope' => 'ost_editor',\n\t\t\t'username' => 'webmapp',\n\t\t\t'password' => 'webmapp',\n\t\t\t'client_id' => 'f49353d7-6c84-41e7-afeb-4ddbd16e8cdf',\n\t\t\t'client_secret' => '123'\n\t\t];\n\n\t\t$ch = curl_init('https://api-intense.stage.sardegnaturismocloud.it/oauth/token');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\t$j=json_decode($response,TRUE);\n\t\t$this->token=$j['access_token'];\n\t}", "public function retrieveAccessToken() {\n\n $helper = Api::getInstance();\n $helper->retrieveAccessToken();\n\n $this->output()->writeln('Done');\n }", "public function getAccessToken()\n {\n return $this->_accessToken;\n }", "public function getAccessToken()\n {\n return $this->client->getAccessToken();\n }", "protected function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken(): string\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->request->getAccessToken();\n }", "public function access_token() {\n\t\ttry {\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t$this->OAuth2Lib->grantAccessToken();\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->fail($e);\n\t\t}\n\t}", "public function getAccessToken() {\n return $this->authenticate();\n }", "private function get_bitly_client_access_token()\n {\n\n if (FCMSUtils::acf_available()) {\n\n return get_field('fpt_bitly_access_token', 'options');\n\n }\n\n }", "public function getToken()\n {\n return $this->getAttr('access_token');\n }", "protected function access_token() {\r\n\r\n\t\t$this->tmhOAuth->config['user_token'] = $_SESSION['oauth']['oauth_token'];\r\n\t\t$this->tmhOAuth->config['user_secret'] = $_SESSION['oauth']['oauth_token_secret'];\r\n\r\n\t\t$code = $this->tmhOAuth->request(\r\n\t\t\t'POST',\r\n\t\t\t$this->tmhOAuth->url('oauth/access_token', ''),\r\n\t\t\tarray(\r\n\t\t\t\t'oauth_verifier' => $_REQUEST['oauth_verifier']\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tif ($code == 200) {\r\n\t\t\t$token = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\r\n\t\t\t$this->conf->TwitterOAuthToken = $token['oauth_token'];\r\n\t\t\t$this->conf->TwitterOAuthSecret = $token['oauth_token_secret'];\r\n\t\t\t$this->conf->TwitterUsername = $token['screen_name'];\r\n\t\t\t$this->conf->write();\r\n\t\t\tunset($_SESSION['oauth']);\r\n\t\t\theader('Location: ' . SocialHelper::php_self());\r\n\t\t} else {\r\n\t\t\t$this->addError();\r\n\t\t}\r\n\t}", "public function getAccessToken()\n\t{\n\t\tif(!$this->hasAccessToken()){\n\t\t\t//reset all the parameters\n\t\t\t$this->resetParams();\n\t\t\t\n\t\t\t//set the returned token\n\t\t\t$this->setParam('token', $this->getRequestToken()->getToken());\n\t\t\t\n\t\t\t//build the signiture\n\t\t\t$this->setSecret($this->getRequestToken()->getTokenSecret());\n\t\t\t$this->setRequestUrl($this->_accessTokenUrl);\n\t\t\t$this->_buildSignature();\n\t\t\t\n\t\t\t//get the response\n\t\t\t$response = $this->_send($this->_accessTokenUrl)->getBody();\n\t\t\t\n\t\t\t//format the response\n\t\t\t$responseVars = array();\n\t\t\tparse_str($response, $responseVars);\n\t\t\t$response = new BaseOAuthResponse($responseVars);\n\t\t\t$this->setAccessToken($response);\n\t\t}\n\t\treturn $this->getData('access_token');\n\t}", "private static function generate_access_token()\n {\n $url = 'https://' . env('MPESA_SUBDOMAIN') . '.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n $credentials = base64_encode(env('MPESA_CONSUMER_KEY') . ':' . env('MPESA_CONSUMER_SECRET'));\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Basic ' . $credentials)); //setting a custom header\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n $curl_response = curl_exec($curl);\n\n return json_decode($curl_response)->access_token;\n }", "private function getAccessToken(): string\n {\n try {\n $token = Storage::disk('local')->get(self::ALIGO_ACCESS_TOKEN_FILE);\n } catch (\\Exception $exception) {\n $token = null;\n }\n\n if (empty($token)) {\n try {\n $response = $this->call('/akv10/token/create/10/y');\n $data = json_decode((string) $response->getBody(), false);\n } catch (\\Throwable $exception) {\n throw CouldNotSendNotification::serviceRespondedWithAnError($exception);\n }\n Storage::disk('local')->put(self::ALIGO_ACCESS_TOKEN_FILE, $data->token);\n\n return $data->token;\n }\n\n return $token;\n }", "public function getAccessToken(): string {\n\t\tif(!$this->_accessToken || $this->isAccessTokenExpired()) {\n\t\t\t$json = $this->request->authorize($this->getClientId(), $this->getClientSecret());\n\n\t\t\t$data = $json['data'];\n\n\t\t\t$expireDateTime = new DateTime($data['expireDateTime']);\n\n\t\t\t$this->setAccessToken($data['accessToken'], $data['accessTokenType'], $expireDateTime);\n\t\t}\n\n\t\treturn $this->_accessToken;\n\t}", "private function GetAccessToken()\n\t{\n\t\tif(IsSet($_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url]))\n\t\t{\n\t\t\t$access_token = $_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$access_token = array();\n\t\t}\n\t\treturn($access_token);\n\t}", "private function requestToken() \n {\n $requestUrl = $this->configuration->getBaseUrl() . \"connect/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->configuration->getClientId() . \"&client_secret=\" . $this->configuration->getClientSecret();\n $headers = [];\n $headers['Content-Type'] = \"application/x-www-form-urlencoded\";\n $headers['Content-Length'] = strlen($postData);\n $response = $this->client->send(new Request('POST', $requestUrl, $headers, $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->configuration->setAccessToken($result[\"access_token\"]);\n }", "public function get_access_token($oauth_token, $oauth_addon);", "private function __get_access_token() {\r\n // Access token exists in a cookie\r\n if($_COOKIE[ACCESS_TOKEN_COOKIE_NAME]) {\r\n parse_str($_COOKIE[ACCESS_TOKEN_COOKIE_NAME], $tok); \r\n return $tok;\r\n }\r\n\r\n // Handling a redirect back from login\r\n else if($_COOKIE[REQUEST_TOKEN_COOKIE_NAME] && $_REQUEST['oauth_verifier'] && $_REQUEST['oauth_token']) {\r\n $tok = YMClient::oauth_token_from_query_string($_COOKIE[REQUEST_TOKEN_COOKIE_NAME]);\r\n\r\n if($tok['oauth_token'] != $_REQUEST['oauth_token']) {\r\n throw new Exception(\"Cookie and URL disagree about request token value\");\r\n }\r\n\r\n $tok['oauth_verifier'] = $_REQUEST['oauth_verifier']; \r\n $newtok = $this->ymc->oauth_get_access_token($tok);\r\n\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, \"\", time()-3600);\r\n setcookie(ACCESS_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($newtok));\r\n return $newtok;\r\n }\r\n\r\n // Sending the user to login to grant access to this app\r\n else {\r\n list ($tok, $url) = $this->ymc->oauth_get_request_token($this->callbackURL);\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($tok));\r\n header(\"Location: $url\");\r\n }\r\n }", "public function getAccessToken()\n {\n // maybe the token will expire in next 10 seconds\n $expiryCutoff = new \\DateTime('+10 seconds');\n\n // if the token expires try to reauthenticate\n if (!$this->accessToken or $this->getExpires() < $expiryCutoff->getTimestamp()) {\n $this->authenticate();\n }\n\n return $this->accessToken->getToken();\n }", "public function getSessionToken()\n {\n return $this->provider->accessToken;\n }", "public function getSessionToken()\n\t{\n\t\treturn \\Session::get('google.access_token');\n\t}", "public function accessToken()\n {\n return $this->accessToken;\n }", "public function get_access_token() {\n $access_token = get_transient( 'yith-wcbk-gcal-access-token' );\n if ( !$access_token ) {\n $refresh_token = $this->get_option( 'refresh-token' );\n if ( $refresh_token ) {\n $data = array(\n 'client_id' => $this->get_client_id(),\n 'client_secret' => $this->get_client_secret(),\n 'refresh_token' => $refresh_token,\n 'grant_type' => 'refresh_token',\n );\n\n $params = array(\n 'body' => http_build_query( $data ),\n 'sslverify' => false,\n 'timeout' => 60,\n 'headers' => array(\n 'Content-Type' => 'application/x-www-form-urlencoded',\n ),\n );\n\n $response = wp_remote_post( $this->oauth_url . 'token', $params );\n\n if ( !is_wp_error( $response ) && 200 == $response[ 'response' ][ 'code' ] && 'OK' == $response[ 'response' ][ 'message' ] ) {\n $body = json_decode( $response[ 'body' ] );\n $access_token = sanitize_text_field( $body->access_token );\n $expires_in = isset( $body->expires_in ) ? absint( $body->expires_in ) : HOUR_IN_SECONDS;\n $expires_in -= 100;\n\n set_transient( 'yith-wcbk-gcal-access-token', $access_token, $expires_in );\n\n $this->debug( 'Access Token refreshed successfully', compact( 'access_token', 'expires_in', 'body' ) );\n } else {\n $this->error( 'Error while refreshing Access Token: ', $response );\n }\n }\n }\n\n return $access_token;\n }", "protected function getTokenUrl()\n {\n return 'https://auth.kodular.io/oska/access_token';\n }", "public function getAuthorizationCode()\n {\n $oauth_param = array(\n 'grant_type' => $this->grant_type, \n 'client_id' => config::$clientId,\n 'client_secret' => config::$secretKey,\n 'scope' => implode(',', $this->scope));\n\n $url = config::$apiUrl . 'oauth/access_token';\n $response = $this->curl->request('post', $url, $oauth_param);\n\n if( $response )\n {\n $res = json_decode($response);\n if( isset($res->access_token) )\n {\n $this->setExpiresAtFromTimeStamp($res->expires);\n $this->session->write('access_token',$res->access_token);\n $this->session->write('expires', $this->expiresAt);\n\n $read = $this->session->read('access_token');\n session_write_close();\n }\n elseif( isset($res->error) )\n {\n die($response);\n }\n }\n }", "protected function getAccessToken($oauth_token) {\n\n\t}", "public static function getAccessToken()\n {\n $authorization = request()->header('Authorization');\n // $authorization = @getallheaders()['Authorization'];\n // before running unit tests...\n //$authorization = '$2y$10$tSM.PiN9BnMfyonqjHlwTONa1DPHbyQSAMOtmt4chJYXenGeYySHC';\n return (isset($authorization))?$authorization:null;\n }", "public function getAccessToken()\n {\n return trim($this->scopeConfig->getValue(self::XML_PATH_GENERAL_API_CREDENTIALS_ACCESS_TOKEN));\n }", "public function fetchAccessToken() {\n if (!isset($_SESSION['ACCESS_TOKEN'])) {\n if (!empty($_GET) && isset($_SESSION['REQUEST_TOKEN'])) {\n return parent::getAccessToken(\n $_GET, unserialize($_SESSION['REQUEST_TOKEN']));\n }\n }\n return null;\n }", "private function getRequestToken() {\n \n // send request for a request token\n $this->tmhOAuth->request('POST', $this->tmhOAuth->url('oauth/request_token', ''), array(\n\n // pass a variable to set the callback\n 'oauth_callback' => $this->tmhOAuth->php_self()\n ));\n\n\n if($this->tmhOAuth->response['code'] == 200) {\n\n // get and store the request token\n $response = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\n\t error_log($response);\n $_SESSION['authtoken'] = $response['oauth_token'];\n $_SESSION['authsecret'] = $response['oauth_token_secret'];\n\n // state is now 1\n $_SESSION['authstate'] = 1;\n\n // redirect the user to Twitter to authorize\n $url = $this->tmhOAuth->url('oauth/authorize', '') . '?oauth_token=' . $response['oauth_token'];\n header('Location: ' . $url);\n exit;\n }\n\n return false;\n }", "private function _requestToken() \n {\n $requestUrl = $this->config->getHost() . \"/oauth2/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->config->getAppSid() . \"&client_secret=\" . $this->config->getAppKey();\n $response = $this->client->send(new Request('POST', $requestUrl, [], $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->config->setAccessToken($result[\"access_token\"]);\n $this->config->setRefreshToken($result[\"refresh_token\"]);\n }", "public static function accessToken(){\n $appInfo = WxAppInfo::get(1);\n if($appInfo->is_over_time){\n // 过期重新获取access token\n $appid = $appInfo->appid;\n $appsecret = $appInfo->appsecret;\n $grantType = 'client_credential';\n $url = 'https://api.weixin.qq.com/cgi-bin/token?appid=' . $appid . '&secret=' . $appsecret . '&grant_type=' . $grantType;\n $api = curl_init();\n curl_setopt($api, CURLOPT_URL, $url);\n curl_setopt($api, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($api, CURLOPT_HEADER, false);\n $tokenObj = curl_exec($api);\n curl_close($api);\n $tokenObj = json_decode($tokenObj);\n $appInfo->access_token = $tokenObj->access_token;\n $appInfo->expires_in = $tokenObj->expires_in;\n $appInfo->isUpdate(true)->save();\n $token = $tokenObj->access_token;\n }else{\n // 未过期\n $token = $appInfo->access_token;\n }\n\n return $token;\n }", "public function _getAccessToken()\n {\n $this->setAccessToken($this->_getStoreConfig($this->path_access_token));\n }", "public function getAccessToken(): ?string;", "public function getAccessToken(): ?string;", "private function getAccessToken()\n {\n if (time() < $this->get_option('paypal_access_token_expires_at')) {\n return $this->get_option('paypal_access_token');\n }\n\n $response = wp_remote_retrieve_body(wp_remote_post('https://api.sandbox.paypal.com/v1/oauth2/token', [\n 'method' => 'POST',\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/x-www-form-urlencoded',\n 'Authorization' => 'Basic ' . base64_encode($this->get_option('client_id') . ':' . $this->get_option('client_secret'))\n ],\n 'body' => [\n 'client_id' => $this->get_option('client_id'),\n 'client_secret' => $this->get_option('client_secret'),\n 'grant_type' => 'client_credentials'\n ]\n ]));\n\n $response = json_decode($response, true);\n\n add_option('paypal_access_token', $response['access_token']);\n add_option('paypal_access_token_expires_at', time() + $response['expires_in']);\n\n return $response['access_token'];\n }", "public function requestToken() {\n \n $result = $this->doRequest('v1.0/token?grant_type=1', 'GET');\n\n $this->_setToken($result->result->access_token);\n $this->_setRefreshToken($result->result->refresh_token);\n $this->_setExpireTime($result->result->expire_time);\n $this->_setUid($result->result->uid);\n\n }", "public function getAccessToken() {\n return $this->credential->getAccessToken();\n }", "protected function request_token() {\r\n\t\t$code = $this->tmhOAuth->request(\r\n\t\t\t'POST',\r\n\t\t\t$this->tmhOAuth->url('oauth/request_token', ''),\r\n\t\t\tarray(\r\n\t\t\t\t'oauth_callback' => SocialHelper::php_self()\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tif ($code == 200) {\r\n\t\t\t$_SESSION['oauth'] = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\r\n\t\t\t$this->authorize();\r\n\t\t} else {\r\n\t\t\t$this->addError();\r\n\t\t}\r\n\t}", "public function get_request_token($accid) {\n // Get a request token from the appliance\n $url = $this->appliance_url . \"/api/request_token.php\";\n $result = $this->call($url, array());\n // dbg(\"Received request token $result\");\n $req_token = array();\n parse_str($result,$req_token);\n\n if(!isset($req_token['oauth_token'])) {\n //error_log(\"Failed to retrieve request token from \".$url.\" result = \".$result);\n throw new Exception(\"Unable to retrieve request token\");\n }\n $token = new OAuthToken($req_token['oauth_token'], $req_token['oauth_token_secret']);\n return $token;\n }", "protected function getAccessToken()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$params = $this->getParams();\n\t\t$consumerKey = $params->get('oauth_consumer_key');\n\t\t$session = JFactory::getSession();\n\t\t$oauthToken = $app->input->get('oauth_token', '', 'string');\n\t\ttry\n\t\t{\n\t\t\t//$_GET['http_error_codes'] = array(200, 201, 301, 302);\n\n\t\t\t$curlOpts = $this->getOAuthCurlOpts();\n\t\t\t$result = XingOAuthRequester::requestAccessToken($consumerKey, $oauthToken, 0, 'POST', $_GET, $curlOpts);\n\t\t\t//$result = OAuthRequester::requestAccessToken($consumerKey, $oauthToken, 0, 'POST', $_GET, $curlOpts);\n\t\t}\n\t\tcatch (OAuthException2 $e)\n\t\t{\n\t\t\techo \"<h1>get access token error</h1>\";\n\t\t\techo \"<pre>restult...\";print_r($result);echo \"</pre>\";\n\t\t\tprint_r($e->getMessage());\n\t\t\treturn false;\n\t\t}\n\t\treturn $result;\n\t}", "public function getAccessToken()\n {\n if ($this->_accessToken == null) {\n\n if ($this->_oauthToken == null) {\n $this->_setOauthToken();\n }\n\n $this->_accessToken = json_decode($this->_oauthToken)->access_token;\n }\n\n return $this->_accessToken;\n }", "public function getBaseAccessToken() {\n\t\t\n// \t\tif ($result == null) {\n\t\t\treturn $token = $this->get_access_token ();\n// \t\t} else {\n// \t\t\treturn $result;\n// \t\t}\n\t}", "protected function getAccessToken()\n {\n $accessToken = parent::getAccessToken();\n Yii::app()->session['tumblr_token'] = $accessToken;\n return $accessToken;\n }", "public function getAccessToken() {\n\n $data = $this->redis->get('pa_access_token');\n if (!$data) {\n $data['expire_time'] = 0;\n $data['access_token'] = \"0\";\n $this->redis->set('pa_access_token', $data, 7200);\n }\n if ($data['expire_time'] < time()) {\n $url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.$this->config['appId'].'&secret='.$this->config['appSecret'];\n $res = json_decode($this->httpGet($url));\n $access_token = $res->access_token;\n if ($access_token) {\n $data['expire_time'] = time() + 7000;\n $data['access_token'] = $access_token;\n }\n }\n //debug_info(\"getaccesstoken,b4 storage:\".json_encode($data));\n $this->redis->set('pa_access_token', $data, 7200);\n return $data;\n }", "public function getAccessTokenFromClientCredentials(): AccessToken;", "function getRequestToken() {\n\t\t$r = $this->oAuthRequest ( $this->requestTokenURL () );\n\t\t$token = $this->oAuthParseResponse ( $r );\n\t\t$this->token = new OAuthConsumer ( $token ['oauth_token'], $token ['oauth_token_secret'] );\n\t\treturn $token;\n\t}", "protected function getToken()\n {\n // We have a stateless app without sessions, so we use the cache to\n // retrieve the temp credentials for man in the middle attack\n // protection\n $key = 'oauth_temp_'.$this->request->input('oauth_token');\n $temp = $this->cache->get($key, '');\n\n return $this->server->getTokenCredentials(\n $temp,\n $this->request->input('oauth_token'),\n $this->request->input('oauth_verifier')\n );\n }", "public static function acquire_token() {\n\n\t\t\n\n\t\t$response = skydrive_tokenstore::get_tokens_from_store();\n\n\t\tif (empty($response['access_token'])) {\t// No token at all, needs to go through login flow. Return false to indicate this.\n\n\t\t\treturn false;\n\n\t\t\texit;\n\n\t\t} else {\n\n\t\t\tif (time() > (int)$response['access_token_expires']) { // Token needs refreshing. Refresh it and then return the new one.\n\n\t\t\t\t$refreshed = skydrive_auth::refresh_oauth_token($response['refresh_token']);\n\n\t\t\t\tif (skydrive_tokenstore::save_tokens_to_store($refreshed)) {\n\n\t\t\t\t\t$newtokens = skydrive_tokenstore::get_tokens_from_store();\n\n\t\t\t\t\treturn $newtokens['access_token'];\n\n\t\t\t\t}\n\n\t\t\t\texit;\n\n\t\t\t} else {\n\n\t\t\t\treturn $response['access_token']; // Token currently valid. Return it.\n\n\t\t\t\texit;\n\n\t\t\t}\n\n\t\t}\n\n\t}", "public function urlAccessToken() {\n return $this->host . '/oauth/token';\n }", "public function getAccessTokenType(){\n $this->tokenType = variable_get(EBConsts::EBS_CONFIG_AUTHTOKEN_TYPE, 'bearer');\n return $this;\n }", "public function actionGetToken() {\n\t\t$token = UserAR::model()->getToken();\n\t\t$this->responseJSON($token, \"success\");\n\t}", "public function get_accesstoken() {\n return $this->accesstoken;\n }", "function accessTokenURL() { return 'https://api.twitter.com/oauth/access_token'; }", "public function token() {\r\n\t\t\r\n\t\t$response = $this->OAuth2->getAccessTokenData();\r\n\t\t\r\n\t\tif (empty($response)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->set($response);\r\n\t\t\r\n\t}", "public function getAccessToken() {\n $spotify_config = \\Drupal::config('spotify.settings');\n $url = 'https://accounts.spotify.com/api/token';\n $query = [\n 'grant_type' => 'client_credentials',\n 'client_id' => $spotify_config->get('client_id') ? $spotify_config->get('client_id') : '83c0f9f106b1493590e4d45cd5f0a979',\n 'client_secret' => $spotify_config->get('client_secret') ? $spotify_config->get('client_secret') : 'c8411ff0b00646c88a373e21a445acca',\n ];\n $options = [\n 'headers' => [\n 'Content-Type' => 'application/x-www-form-urlencoded',\n ],\n 'form_params' => $query,\n ];\n try {\n $request = $this->httpClient->request('post', $url, $options);\n if ($response = json_decode($request->getBody(), TRUE)) {\n return $response['access_token'];\n }\n } catch (RequestException $requestException) {\n if (function_exists('dpm')) {\n dpm($requestException->getMessage());\n }\n }\n return FALSE;\n }" ]
[ "0.7853391", "0.7853391", "0.7853391", "0.7853391", "0.7853391", "0.76726425", "0.7552758", "0.7402057", "0.7400856", "0.7365982", "0.73391557", "0.73372877", "0.73102456", "0.73051476", "0.72974217", "0.7227648", "0.7199288", "0.7199071", "0.7191996", "0.71821594", "0.7174882", "0.71622545", "0.7151099", "0.7144258", "0.71391153", "0.71391153", "0.71391153", "0.71391153", "0.71391153", "0.71391153", "0.71391153", "0.71391153", "0.7138092", "0.7128779", "0.7122119", "0.71087694", "0.7107332", "0.7104627", "0.70961267", "0.709379", "0.709379", "0.709379", "0.709379", "0.709379", "0.709379", "0.7093516", "0.7093516", "0.7093516", "0.7093516", "0.7065059", "0.70554805", "0.70469165", "0.7017599", "0.7010236", "0.70017916", "0.69886154", "0.69864184", "0.69486815", "0.6946679", "0.69360495", "0.6934472", "0.6923194", "0.6914899", "0.69127357", "0.69091105", "0.68983626", "0.6891981", "0.68763965", "0.6870587", "0.68372595", "0.6831745", "0.6827588", "0.6822848", "0.68143857", "0.67933553", "0.6778215", "0.67621046", "0.6757044", "0.6744367", "0.6744367", "0.67435336", "0.67344505", "0.6731221", "0.6726602", "0.6723377", "0.67219603", "0.67112285", "0.6701803", "0.66652215", "0.6659018", "0.665365", "0.6645519", "0.66223526", "0.6611955", "0.6602259", "0.6597885", "0.6597702", "0.65898097", "0.6585707", "0.6565913", "0.6564213" ]
0.0
-1
Check if the user still has according to tyk
private function has_token($hash) { if (!isset($this->tyk_subscriptions) || !is_array($this->tyk_subscriptions)) { $user_data = $this->fetch_from_tyk(); if (!isset($user_data->subscriptions)) { throw new Exception('Missing policy subscriptions'); } $this->tyk_subscriptions = array_flip((array) $user_data->subscriptions); } return isset($this->tyk_subscriptions[$hash]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function has_tyk_id() {\n\t\t$tyk_user_id = get_user_meta($this->user->ID, self::META_TYK_USER_ID_KEY, true);\n\t\treturn !empty($tyk_user_id);\t\n\t}", "public function notYou()\n {\n return $this->user_id !== auth()->id();\n }", "public static function isLoged(){\n\t\t\treturn isset($_SESSION['data']['User']['idUsuario']);\n\t\t}", "function isLost(){\n\tglobal $userid;\n\tif(!isConnected() && !isVisitor()) return true;\n\n\treturn false;\n}", "function UserIsClear()\n {\n StartSession();\n $isClear = isset($_SESSION[GetExamIdentifier()]);\n \n return $isClear;\n }", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function is_surveillant() {\n return $this->session->get(\"niveau_acces\") >= 1;\n }", "function is() {\n global $_SESSION;\n if (! empty($_SESSION['payback']['user'])) return true;\n else return false;\n }", "private function checkCurrentUser(){\n return isset($_SESSION['user']);\n }", "public function notAuthenticated() {\n $objUser = App_Factory_Security::getSecurity()->getObjuser();\n\n if(!($objUser instanceof App_Data_User)) {\n return true;\n }\n \n if($objUser->getUID() !== $this->getlngPlayer1() && $objUser->getUID() !== $this->getlngPlayer2()) {\n return true;\n }\n\n return false;\n }", "function check_user() {\n\treturn false; // update allowed\n\treturn true; //no update allowed\n}", "public function hasUnlock(){\n return $this->_has(3);\n }", "public function hasUser();", "public function isLoged() {\n\n\t\tif (is_null($this->getSession()))\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public function allowedToAndSetCookie(){\n\t\t$rechte_zum_sperren=$this->dbObj->sqlGet(\"select etchat_userprivilegien FROM {$this->_prefix}etchat_user where etchat_user_id = \".$_SESSION['etchat_'.$this->_prefix.'user_id']);\n\t\tif ($rechte_zum_sperren[0][0]!=\"admin\" && $rechte_zum_sperren[0][0]!=\"mod\"){\n\t\t\t$this->dbObj->sqlSet(\"DELETE FROM {$this->_prefix}etchat_useronline WHERE etchat_onlineuser_fid = \".$_SESSION['etchat_'.$this->_prefix.'user_id']);\n\t\t\tsetcookie(\"cookie_etchat_blacklist_until\", $this->user_bann_time, $this->user_bann_time, \"/\"); \n\t\t\tsetcookie(\"cookie_etchat_blacklist_ip\", $this->user_param_all, $this->user_bann_time, \"/\");\n\t\t\treturn true;\n\t\t}\n\t\telse return false;\n\t}", "public function check()\t{\n\t\treturn ! is_null($this->user());\n\t}", "private function checkValidUser() {\n return;\n if(!($this->getData('key') == $this->sessionId && isset($_SESSION['user']) && isset($_SESSION['valid']) && $_SESSION['valid'] === true)) {\n $this->output = array(\n 'success' => false,\n 'key' => 'kMIvl'\n );\n\n // Terminate the call now, user isn't allowed to perform this action\n $this->renderOutput(true);\n }\n }", "public function isProposition()\n {\n $u = $this->user()->first();\n\n return auth()->user()->id != $u->id;\n }", "private function userHasResources() {\n $utenti = new MUtenti;\n foreach ($utenti->find(array(), $utenti->getPosition()) as $itemUtenti) {\n if ($itemUtenti[$_POST['nomeRisorsaOfferta']] < $_POST['quantitaOfferta']) {\n return false;\n }\n }\n return true;\n }", "public function isLoged()\n\t{\t\n\t\treturn $this->session->userdata('assistant_id');\n\t}", "protected function is_remembered()\r\n {\r\n return false;\r\n }", "public function isKetua()\n {\n return ($this->hasRole(HakAkses::KETUA_TIM));\n }", "public function userActive(){\n\t\treturn (isset($this->session) && $this->session != null && isset($this->session['id']) && $this->session['id'] > 0) ? true : false;\n\t}", "public function is_watched_by_auth_user() {\n $id = Auth::id();\n\n\n $watcher_user_ids = [];\n\n foreach($this->watchers as $watcher) {\n\n //ja polnime nizata so user_id-s od konkretniot watcher\n $watcher_user_ids[] = $watcher->user_id;\n\n }\n\n // go sporeduvame sekoj user_id od watchers so id-to na logiraniot user\n if(in_array($id, $watcher_user_ids)){\n\n return true;\n }else{\n\n return false;\n }\n\n\n }", "public function hasUsershow(){\n return $this->_has(32);\n }", "function customerIsLogedIn() {\n\t\treturn isset($_SESSION) && isset($_SESSION[\"webuser\"]) && isset($_SESSION[\"webuser\"][\"ID\"]);\n\t}", "public function needKuserFromPuser ( )\r\n\t{\r\n\t\treturn self::KUSER_DATA_KUSER_ID_ONLY;\r\n\t}", "public function needKuserFromPuser ( )\r\n\t{\r\n\t\treturn self::KUSER_DATA_KUSER_ID_ONLY;\r\n\t}", "public function check()\n {\n $user = $this->user();\n return !empty($user);\n }", "function auth_current_user_is_guest($db)\r\r\n{\r\r\n if (!ISSET($_SESSION['NX3_USER']))\r\r\n {\r\r\n return true;\r\r\n }\r\r\n else\r\r\n {\r\r\n return $_SESSION['NX3_USER']['user_id'] == (int)lookup_setting($db, 'nx3.global.guestuserid');\r\r\n }\r\r\n}", "public function check()\n\t{\n\t\treturn ! is_null($this->user());\n\t}", "static function userchanged($data)\n {\n $cache=cache::make('block_ilp','user_capability_cache');\n $cache->delete($data->userid);\n return true;\n }", "public static function checkAccount () {\n $user_id = session::getUserId();\n if ($user_id) {\n $a = q::select('account')->filter('id =', $user_id)->fetchSingle();\n \n // user may have been deleted\n if (empty($a)) {\n self::killSessionAll($user_id);\n return false;\n } \n \n if ($a['locked'] == 1) {\n self::killSessionAll($user_id);\n return false;\n }\n }\n return true;\n }", "public function isLiked(){\n $likeKey = $this->getLikeKey();\n if ( Auth::check() ){\n $isLiked = $this->user_counters()->where('user_id', Auth::user()->id)->where('action', 'like')->count();\n return $isLiked;\n } else {\n $isLiked = session($likeKey);\n return !empty($isLiked);\n }\n }", "public function isGerechtigd()\n {\n if(isset($_SESSION['gebruiker'])&&!empty($_SESSION['gebruiker']))\n {\n $gebruiker=$_SESSION['gebruiker'];\n if ($gebruiker->getRecht() == \"medewerker\")\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n \n return false;\n \n \n }", "public function checkUsersSession(){\n\t}", "public function hasPwIsExist(){\n return $this->_has(2);\n }", "static public function isUser(){\n if ( isset($_SESSION['id']) && $_SESSION['id'] != 0 ) {\n return true;\n } else {\n return false;\n }\n }", "function isAuthed ()\r\n\t{\r\n\t\tif ((strlen($this->acUserAuth) > 0 ? $this->acUserAuth : 0) >= $this->acPageAuth)\r\n\t\t{\r\n\t\t\t$status = true;\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$status = false;\r\n\t\t}\r\n\t\treturn $status;\r\n\t}", "public function hasQuotaUnlock(){\n return $this->_has(10);\n }", "function isUser(){\n\t\tif(isset($_SESSION['type']) && $_SESSION['type']=='user')\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public function check()\n {\n return null !== $this->user();\n }", "public function CheckTransactionUser() {\n\t\t\t\t\t\tif (isset ( $_SESSION ['UserSession'] )) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t}", "function chk_teach_id(){\n\n\t\t$Q = $this->teach_lgn->chk_teach_id();\n\n\t\tif ($Q) {\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\n\t\t\treturn TRUE;\n\t\t}\n\n\t}", "public function isLogedInOrHasKey(){\n if (isset($_GET['key']) && (Yii::app()->user->isGuest) && (\n (in_array($_GET['key'], $this->keys) )) ) return true;\n \n if (isset($_POST['key']) && (Yii::app()->user->isGuest) && (\n (in_array($_POST['key'], $this->keys) )) ) return true;\n \n return false;\n }", "public static function check()\n {\n return !is_null(static::user());\n }", "public function hasUsername(){\n return $this->_has(6);\n }", "public function hasUsername(){\n return $this->_has(6);\n }", "public function has() {\n\t\t$userid = $this->get();\n\t\treturn ! empty( $userid );\n\t}", "function hasKnown() {\n\t if (\\Idno\\Core\\site()->session()->currentUser()->known) {\n\t\treturn true;\n\t }\n\t return false;\n\t}", "private function isGod() : bool\n {\n return $this->user->id === 1;\n }", "function user_is_free_gacha(int $user_id): bool\r\n{\r\n\tglobal $DATABASE;\r\n\tglobal $UNIX_TIMESTAMP;\r\n\t\r\n\t$temp = $DATABASE->execute_query(\"SELECT next_free_gacha FROM `free_gacha_tracking` WHERE user_id = $user_id\");\r\n\t\r\n\treturn count($temp) == 0 ? true : $temp[0][0] >= $UNIX_TIMESTAMP;\r\n}", "public function is_inactive(): bool;", "public function hasPostAuthentication()\n {\n return isset($this->sessionStorage->user['twofactor_activated']) && $this->sessionStorage->user['twofactor_activated'] === true;\n }", "public function disable_2fa_totp()\n {\n return $this->db\n ->where('id', $this->current_user->user_id)\n ->update('users', array('totp_secret' => '',\n 'totp_two_factor' => '0')) == TRUE;\n }", "function randomUser_exists()\t{\n\t\treturn $this->recordNumber(self::RNDUSERSC_NAME) > 0;\n\t}", "function revalidateUserID() {\n\t\tglobal $pun_user;\n\t\t\n\t\tif($this->getUserRole() === AJAX_CHAT_GUEST && $pun_user['is_guest'] || ($this->getUserID() === $pun_user['id'])) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function hasUsername(){\n return $this->_has(4);\n }", "public function check_user(){\n\t\tsession_regenerate_id(true);\n\t\tif((isset($_SESSION['angemeldet']) AND $_SESSION['angemeldet'] !== TRUE) OR !isset($_SESSION['angemeldet'])){\n\t\t\treturn FALSE;\n\t\t}else{\n\t\t\t$user = $this->sql->real_escape_string($_SESSION['benutzername']);\n\t\t\t$query = \"SELECT\n\t\t\t\t`\".IP.\"`, \n\t\t\t\t`\".USERAGENT.\"`,\n\t\t\t\t`\".REQUEST_TIME.\"`,\n\t\t\t\tUNIX_TIMESTAMP(`\".LIVESIGN.\"`) as \".LIVESIGN.\"\n\t\t\t\t\tFROM\n\t\t\t\t\t`\".USERS.\"`\n\t\t\t\t\tWHERE\n\t\t\t\t\t`\".USER.\"` = '\".$user.\"'\";\n\t\t\t$result = $this->sql->query($query);\n\t\t\tif ($result->num_rows == 1){\n\t\t\t\t$data = $result->fetch_object();\n\t\t\t\t$result->close();\n\t\t\t\t$ip \t\t\t\t\t= IP;\n\t\t\t\t$useragent \t\t= USERAGENT;\n\t\t\t\t$request_time = REQUEST_TIME;\n\t\t\t\t$livesign\t\t\t= LIVESIGN;\n\t\t\t\tif ($data->$ip !== $_SERVER['REMOTE_ADDR']) return FALSE;\n\t\t\t\tif ($data->$useragent !== $_SERVER['HTTP_USER_AGENT']) return FALSE;\n\t\t\t\tif ($data->$request_time !== $_SESSION['anmeldung']) return FALSE;\n\t\t\t\tif (($data->$livesign + 6000) <= $_SERVER['REQUEST_TIME']) return FALSE;\n\t\t\t}else{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t$query = \"UPDATE\n\t\t\t\t`\".USERS.\"`\n\t\t\t\tSET\n\t\t\t\t`\".LIVESIGN.\"` = NOW()\n\t\t\t\tWHERE\n\t\t\t\t`\".USER.\"` = '\".$user.\"'\n\t\t\t\tLIMIT 1\";\n\t\t\tif($this->sql->query($query)){\n\t\t\t\treturn TRUE;\n\t\t\t}else{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}", "function check_suspension($user_id) {\n\t\t$user = get_user_by('ID', $user_id);\n\t\tupdate_user_meta($user_id, 'suspended', $_POST['suspend']);\n\t}", "public function hasUserLimit()\n {\n return $this->user_limit !== null;\n }", "public function hasUserCount()\n {\n return $this->user_count !== null;\n }", "public function loginUserConditionDoesNotMatchSingleLoggedInUser() {}", "public function hasuser()\n {\n return is_object($this->luser);\n }", "static function isTrackable()\n {\n if(!Auth::check())\n return true;\n $user = Auth::User();\n if(stristr($user->type, 'Employee') || stristr($user->type, 'Demo'))\n return false;\n return true;\n }", "function etherpadlite_user_complete($course, $user, $mod, $etherpadlite) {\n return true;\n}", "public function check()\n {\n return ! $this->guest();\n }", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "function has_message($type)\n{\n if (isset($_SESSION[$type], $_SESSION[$type . '_time'])) {\n $old_time = $_SESSION[$type . '_time'];\n if ((time() - $old_time) < 3) {\n return true;\n } else {\n unset($_SESSION[$type], $_SESSION[$type . '_time']);\n }\n\n return false;\n }\n\n return false;\n}", "public function guest()\n {\n return !$this->check();\n }", "public function guest()\n {\n return !$this->check();\n }", "public function isUserLigue()\n\t{\n\t\t$q = new BN_query('rights');\n\t\t$q->addTable('assocs', 'rght_themeid = asso_id');\n\t\t$q->addField('count(*)');\n\t\t$q->addWhere('rght_theme = ' . THEME_ASSOS);\n\t\t$q->addWhere(\"rght_status ='\" . AUTH_MANAGER . \"'\");\n\t\t$q->addWhere('rght_userid =' . Bn::getValue('user_id', -1));\n\t\t$q->addWhere('asso_type =' . OASSO_TYPE_LIGUE);\n\t\t$nb = $q->getFirst();\n\t\treturn (Bn::getValue('user_type') == AUTH_ASSO || $nb);\n\t}", "public function is_user_over_quota()\n {\n }", "public function isGuest ()\n\t{\n\t\treturn !$this->check();\n\t}", "function canDismiss($user) {\n \treturn $this->getUserId() == $user->getId();\n }", "function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }", "public function mustbeuser()\n {\n if (!$this->hasuser())\n {\n $this->web()->noaccess();\n }\n }", "public function isAccountNonExpired(){\n return true;\n }", "public function isAccountNonExpired(){\n return true;\n }", "public function isUttMember()\n\t{\n\t\treturn $this->isUser() && ! $this->user->getIsStudent() && ! $this->user->getKeepActive();\n\t}", "protected function is_timed_out( )\n\t{\n\t\t$user = $this->php_session->get('user');\n\t\tif( $user['last_active'] <= time()-1800 ) //times out in 30 minutes\n\t\t\treturn False; \n\t\treturn True;\t\n\t}", "public function guest() {\n\t\t\t// If user has session, return false\n\t\t\tif ($this->session->has('user')) return false;\n\t\t\t// If user is Authed return fales\n\t\t\tif ($this->auth()) return false;\n\t\t\t// Else, return true\n\t\t\treturn true;\n\t\t}", "public static function check ()\n {\n return (bool)self::$user;\n }", "public function check() {\n return (isset($_SESSION['usuario']));\n }", "public function isUsed()\n\t{\n\t\treturn $this->data && $this->data['forms_attempts'] > 0;\n\t}", "public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "protected function wasActualUser()\n {\n return ($this->wrappedObject->user_id == $this->wrappedObject->revisionable_id || !$this->wrappedObject->user_id);\n }", "public function check(): bool\n {\n return ! is_null($this->user());\n }", "private function isViewed() {\n $viewKey = $this->getViewKey();\n\n if ( Auth::check() ) {\n $viewed = Cache::get($viewKey.':user:'.Auth::user()->id);\n return !empty($viewed);\n } else {\n $time = session($viewKey);\n if ( !empty($time) ) {\n $viewed = (time() - $time) < config('counter.viewCountDuration') * 60;\n } else {\n $viewed = false;\n }\n return $viewed;\n }\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function CheckTransactionUser() {\n\t\ttry{\n\t\t\tif (isset ( $_SESSION ['UserSession'] )) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t}catch(ErrorException $ex){\n\t\techo \"Message\".$ex->getMessage();\n\t\t}\n\t}", "function check_user($visibility)\n\t\t{\n\t \t\tglobal $_SESSION;\n\n\t\t\tif ($visibility == -1) { return true; }\n\t\t\telse if ($visibility <= $_SESSION['gmlevel']) { return true; }\n\t\t\telse { return false; }\n\t\t\t\t\n\t\t\t\n\t\t}", "public function hasSecretQuestion()\n {\n return Mage::getResourceModel('twofactorauth/user_question')->hasQuestions($this->getUser());\n }", "function isDisabled()\n{\n $obDB = new cstDB();\n $obDB->doQuery('SELECT ownerID from AuctionItems where itemID='.$_GET[\"itemID\"].' LIMIT 1');\n $result=$obDB->fetchAssocResult();\n \n \n if(!isset($_SESSION[\"user\"]) )\n {\n return \"disabled\";\n }\n else if(count($result)!=0)\n {\n if($result[0][\"ownerID\"]==$_SESSION[\"user\"])\n {\n return \"disabled\";\n }\n }\n \n return \"\";\n}", "public function hasPwIsExist(){\n return $this->_has(4);\n }", "public function inactiveCheck()\n\t\t{\n\t\t\t$schedule = $this->getSchedule();\n\t\t\tif ($schedule->getAnalyzer()->getBalance() <= 0)\n\t\t\t{\n\t\t\t\t$as = $_SESSION['current_app']; // App Status can be grabbed from here\n\n\t\t\t\tif ($as->level1 == 'external_collections')\n\t\t\t\t{\n\t\t\t\t\tUpdate_Status(NULL, $this->getId(), array(\"recovered\",\"external_collections\",\"*root\"));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tUpdate_Status(NULL, $this->getId(), array(\"paid\",\"customer\",\"*root\"));\n\t\t\t\t}\n\n\t\t\t\t$this->Affiliations->expireAll();\n\t\t\t\t$schedule->removeScheduledTransactions();\n\t\t\t\t$schedule->save();\n\n\t\t\t\t$queue_manager = ECash::getFactory()->getQueueManager();\n\t\t\t\t$queue_item = new ECash_Queues_BasicQueueItem($this->getId());\n\t\t\t\t$queue_manager->getQueueGroup('automated')->remove($queue_item);\n\n\t\t\t\treturn TRUE;\n\t\t\t}\n\n\t\t\treturn FALSE;\n\n\t\t}", "public function isLoggedBack()\n {\n\t\t\n\t\t$cookie = Context::getInstance()->getCookie();\n\t\t$result = (\n\t\t\t$this->id && Validate::isUnsignedId($this->id) && $this->isAdmin() && self::checkPassword($this->id, $cookie->password, true) &&\n\t\t\t\t(!isset($cookie->remoteAddress) || ($cookie->remoteAddress == Tools::getNumericRemoteAddress()) || !Configuration::get('COOKIE_CHECKIP'))\n\t\t);\n\t\treturn $result;\n }" ]
[ "0.6899445", "0.66319233", "0.65711534", "0.6497903", "0.64751095", "0.6432706", "0.6431964", "0.6351374", "0.6307052", "0.63064784", "0.6268326", "0.62585133", "0.6244491", "0.62221634", "0.6196825", "0.6175563", "0.6169567", "0.61565846", "0.61493653", "0.6139117", "0.61377656", "0.60965616", "0.607842", "0.6062798", "0.6059734", "0.6057624", "0.60563505", "0.60563505", "0.60460985", "0.6042557", "0.60410464", "0.6036019", "0.60210085", "0.6018867", "0.6007735", "0.60060066", "0.59964705", "0.5989823", "0.5984037", "0.5979023", "0.59664994", "0.5964276", "0.5959046", "0.59588593", "0.59499866", "0.59495723", "0.5940292", "0.5940292", "0.5938632", "0.59267277", "0.59265053", "0.5925782", "0.5920155", "0.59201336", "0.59198153", "0.5896931", "0.5894685", "0.58811015", "0.58784866", "0.5877878", "0.5874344", "0.5868308", "0.5867454", "0.58613646", "0.58594584", "0.5858758", "0.5856877", "0.58428127", "0.58411264", "0.58409315", "0.58409315", "0.5837176", "0.5832074", "0.58298415", "0.5827763", "0.5818004", "0.5817968", "0.58125305", "0.58125305", "0.5811763", "0.58117276", "0.58048415", "0.5804076", "0.5793126", "0.5792597", "0.5792112", "0.57819694", "0.57799906", "0.5765795", "0.57605517", "0.57605517", "0.57605517", "0.57605517", "0.57605517", "0.5758", "0.5754794", "0.5754689", "0.5754232", "0.5750059", "0.5749317", "0.5746794" ]
0.0
-1
Fetch developer data from Tyk
public function fetch_from_tyk() { try { $tyk = new Tyk_API(); $developer = $tyk->get(sprintf('/portal/developers/%s', $this->get_tyk_id())); if (!is_object($developer) || !isset($developer->id)) { throw new Exception('Received invalid response'); } return $developer; } catch (Exception $e) { trigger_error(sprintf('Could not fetch developer from API: %s', $e->getMessage()), E_USER_WARNING); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tampil_data()\n {\n return $this->db->get('developer')->result_array();\n }", "function getDeveloperInfo()\n\t{\n\t\t$developer_info = array(\"Team\"=>$this->Info['Team'], \"Username\"=>$this->Info['Username'], \"Position\"=>$this->Info['Position']);\n\t\treturn $developer_info;\n\t}", "function get_owner_data($user_id){\n $ch = curl_init();\n $url = $GLOBALS['App-Logic'].\"?\" .http_build_query([\n 'get_owner_data' => true, //a flag to execute the right code in App-Logic! \n 'user_id' => $user_id,\n ]);\n\n curl_setopt($ch,CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPGET, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);\n \n $response = curl_exec($ch);\n curl_close($ch);\n \n return json_decode($response,true);\n\n }", "public function getApiData();", "public function getDevelopers(): array\n {\n }", "function getDeveloper() \n {\n return $this->_developer;\n }", "public function index()\n {\n return Developer::all();\n }", "public function get_data();", "public function getDeveloper($uuid)\n {\n }", "public function get_developers()\n {\n $this->data['developer'] = $this->CreateTeamModel->get_developers();\n $this->load->view('add_member_view',$this->data);\n }", "public function index()\n {\n return Developer::latest()->paginate(10);\n }", "public function getDataWithTypeDebugPage() {}", "public function get_data()\n {\n return $this->retrieve('SELECT * FROM isys_import LIMIT 1000;');\n }", "public function getDeveloperKey();", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function getUserInfo() {}", "public static function get_developer_keys() {\n\t\t\t// phpcs:ignore WordPress.NamingConventions.ValidHookName\n\t\t\t$developers = array( apply_filters( 'redux/tracking/developer', array() ) );\n\t\t\tif ( empty( $developers ) ) {\n\t\t\t\t$developers = '';\n\t\t\t} else {\n\t\t\t\tif ( 1 === count( $developers ) ) {\n\t\t\t\t\tif ( empty( $developers[0] ) ) {\n\t\t\t\t\t\t$developers = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$instances = Redux_Instances::get_all_instances();\n\t\t\t$data = array();\n\t\t\tforeach ( $instances as $instance ) {\n\t\t\t\tif ( isset( $instance->args['developer'] ) ) {\n\t\t\t\t\t$data[] = $instance->args['developer'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$data = wp_json_encode( $data );\n\n\t\t\treturn $data;\n\t\t}", "public function Individualgetdata();", "public static function get_user_data()\n {\n }", "public function fetchDetail(): void\n {\n $request = Certification::$request;\n\n $url = sprintf('%s/projects/%s', Certification::$endpoint, $this->id);\n $payload = $request->get($url)->throw()->json();\n\n $attributes = Arr::get($payload, 'data.attributes');\n\n conmsg(sprintf('Project ID: %s', Arr::get($attributes, 'id')));\n conmsg(sprintf('Project Name: %s', Arr::get($attributes, 'name')));\n conmsg(sprintf('Project Description: %s', Arr::get($attributes, 'description')));\n }", "function dev_list() {\r\n\tglobal $gResult;\r\n\t$dev_controller = new Developer_Controller(new Developer);\r\n\t$msg = $dev_controller->getAllDevelopers();\r\n\t$gResult = $gResult.$msg;\r\n\treturn cCmdStatus_OK; \r\n}", "public function getDeveloper_id()\n {\n return $this->developer_id;\n }", "private function _get_info() {\n\n\t\t/* Grab the basic information from the catalog and return it */\n\t\t$sql = \"SELECT * FROM `access_list` WHERE `id`='\" . Dba::escape($this->id) . \"'\";\n\t\t$db_results = Dba::query($sql);\n\n\t\t$results = Dba::fetch_assoc($db_results);\n\n\t\treturn $results;\n\n\t}", "public function fetch()\n {\n return $this->info;\n }", "public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}", "function _gizra_access_strongarm() {\n $export = array();\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'content_profile_use_profile';\n $strongarm->value = 1;\n\n $export['content_profile_use_profile'] = $strongarm;\n return $export;\n}", "function get_api_info() {\n $response = $this->api_query(array('mode' => 'api_info'));\n\n if ($response['error']) {\n return false;\n }\n return ($response['data']);\n }", "private static function getStoreData($mnt,&$options,&$buildInfo)\n{\n$caching=(is_null(self::$caching) ? true : self::$caching);\n\n// Must check this first\n\n$mv=\\PHK\\Tools\\Util::getMinVersion($mnt,$caching);\n\nif (version_compare($mv,\\PHK::RUNTIME_VERSION) > 0)\n\t{\n\t\\PHK\\Tools\\Util::formatError('Cannot understand this version. '\n\t\t.'Requires at least PHK version '.$mv);\n\t}\n\n$options=\\PHK\\Tools\\Util::getOptions($mnt,$caching);\n$buildInfo=\\PHK\\Tools\\Util::getBuildInfo($mnt,$caching);\n}", "public function getPersonal();", "public function testFetching()\n {\n $this->assertType('Horde_Kolab_Server_Object', $this->koward->getObject('cn=Gunnar Wrobel,dc=example,dc=org'));\n }", "public function selectDev() {\r\n\t\t$sql = \"Select id, module_name, is_system From #modules Order By module_name\"; \r\n\t\treturn $this->_select($sql);\r\n\t}", "function getAllViewerAppData() {\r\n $this->debug(\"getting persistent data for viewer (all keys) ... \");\r\n $batch = $this->osapi->newBatch();\r\n\r\n // Get the current user's app data\r\n $app_data_self_params = array(\r\n 'userId' => $this->userId,\r\n 'groupId' => '@self',\r\n 'appId' => $this->appId,\r\n );\r\n\r\n $batch->add($this->osapi->appData->get($app_data_self_params), 'appdataSelf');\r\n $response = $batch->execute();\r\n\r\n $this->debug(\"Response:<br /><pre>\" . print_r($response, true) . \"</pre>\");\r\n\r\n $responseArray = get_object_vars($response['appdataSelf']); //this is an osapiPerson object but we want assoc. array\r\n $result = isset($responseArray['list'][$this->viewer['id']]) ? $responseArray['list'][$this->viewer['id']] : false;\r\n\r\n return $result;\r\n }", "public function getUserInfo()\n {\n }", "function getMetaData($dataType){\n\t\t$AccessToken = Auth::token();\n\t\t$baseUrl = url . '/api/v1/' . customerAlias . '/' . databaseAlias;\n\t\t$endpoint = '/meta/';\n\t\t$request = $baseUrl . $endpoint . $dataType;\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, array(\n\t\t CURLOPT_HTTPGET => true,\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t\t\t'Authorization: Bearer ' . $AccessToken),\n\t\t CURLOPT_URL => $request,\n\t\t\tCURLOPT_RETURNTRANSFER => 1\n\t\t ));\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $response;\n\t}", "public static function get_core_data()\n {\n }", "public static function getvendorData()\n {\n\n $value=DB::table('users')->where('user_type','=','vendor')->where('drop_status','=','no')->orderBy('id', 'desc')->get(); \n return $value;\n\t\n }", "public function index()\n {\n $developers = DB::table('developers')->get();\n\n return response()->json($developers, 200);\n }", "public static function getData($kyc_type=''){ \n try {\n $result=self::where('kyc_type','=',$kyc_type)->get();\n return ($result?:false);\n } catch (\\Exception $e) {\n $data['errors'] = $e->getMessage();\n }\n }", "public function getDataWithTypeDebugData() {}", "public function fetchSessionData() {}", "public function getInfo() {}", "public function getInfo() {}", "function apiGetCokeData()\n\t{\n\t\t$data = $this->model->dbGetData();\n\t\techo json_encode($data);\n\t}", "public function retrieveData() {\n return $this->fetch();\n }", "function getInfo()\n\t{\n\t\treturn array_merge($this->getDeveloperInfo(), $this->getContact()->getInfo());\n\t}", "public function getInfo();", "public function getConfiguredAppsDataProvider() {}", "public function getDataWithTypeDebugRootline() {}", "function get_data()\n {\n }", "public function get_data()\n {\n\n\n }", "public function fetchData()\n {\n // TODO Build URI and add PARAMS, METHODS, API TOKEN etc...\n // TODO Handle POST, GET requests using curl\n // TODO Authentication\n $path = $this->endpoint;\n return json_decode(file_get_contents($path, true));\n }", "public static function get_data(){\n\n }", "public function getInformation();", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts'; \n\t\t$info['hacked_by']=NULL; \n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "public static function getDevelopment()\r\n {\r\n return self::get('dev');\r\n }", "public function getUserData()\n {\n exit(json_encode(['data' => $this->users_model->get_users()]));\n }", "function getDevId()\n {\n return $this->_props['DevId'];\n }", "function getData() {\n checkIfNotAjax();\n $this->libauth->check(__METHOD__);\n $cpData = $this->BeOnemdl->getDataTable();\n $this->BeOnemdl->outputToJson($cpData);\n }", "public function getData() {}", "public function getInfo()\n {\n $user = User::with(['optician'])->find(auth()->id());\n\n return api_resource('mobile\\User')->make($user);\n }", "public static function getDevInfo()\n {\n return self::$devInfo;\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function getUserInformation(){\n\t\tinclude ($_SERVER['DOCUMENT_ROOT'] . '_inc/controller/fb/getUserInformation.fb.inc.php');\n return $this->resObject;\n\t}", "public function tampilSapi()\n {\n return $this->db->get('tb_sapi');\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=3;\n\t\t$info['locked']=true;\n\t\t$info['update_require_upgrade']=1;\n\t\treturn $info;\n\t}", "public function getUserInfo(): array;", "public static function getUserAPI();", "public function getUserInfo($access_token);", "function get_provinsi(){\n\t\t$curl = curl_init();\n\n\t\tcurl_setopt_array($curl, array(\n\t\t\tCURLOPT_URL => \"http://api.rajaongkir.com/starter/province?id=12\",\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLOPT_ENCODING => \"\",\n\t\t\tCURLOPT_MAXREDIRS => 10,\n\t\t\tCURLOPT_TIMEOUT => 30,\n\t\t\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t\tCURLOPT_CUSTOMREQUEST => \"GET\",\n\t\t\tCURLOPT_HTTPHEADER => array(\n\t\t\t\t\"key: 8f22875183c8c65879ef1ed0615d3371\"\n\t\t\t\t),\n\t\t\t));\n\n\t\t$response = curl_exec($curl);\n\t\t$err = curl_error($curl);\n\n\t\tcurl_close($curl);\n\n\t\tif ($err) {\n\t\t\techo \"cURL Error #:\" . $err;\n\t\t} else {\n\t\t\techo $response;\n\t\t}\n\t}", "protected function fetchDetails() {\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'tstamp, crdate, cruser_id, name',\n\t\t\t'tx_passwordmgr_group',\n\t\t\t'uid=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this['uid'],'tx_passwordmgr_group')\n\t\t);\n\t\t$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\t\t$this['name'] = $row['name'];\n\t\t$this['timeStamp'] = $row['timeStamp'];\n\t\t$this['createDate'] = $row['crdate'];\n\t\t$this['cruserUid'] = $row['cruser_id'];\n\t}", "abstract function is_developer();", "public function fetch() {}", "public function preRetrieve();", "public function getData(): ContuctUsPage;", "public function testUsingApi_GettingData()\n\t{\n\t\t/** @var BrexSdk\\API\\Team\\Client $oTeamClient; */\n\t\t$oSdkHost=new BrexSdk\\SDKHost;\n\t\t$oSdkHost->addHttpPlugin($this->oHostPlugin);\n\n\t\t$oTeamClient=$oSdkHost->setAuthKey($this->BREX_TOKEN)\n\t\t\t\t->setupTeamClient();\n\n\n\t\t/** @var BrexSdk\\API\\Team\\Model\\CompanyResponse */\n\t\t$aCompanyDetails=$oTeamClient->getCompany();\n\n\t\t$sCompanyName=$aCompanyDetails->getLegalName();\n\t\tcodecept_debug($sCompanyName);\n\t\t$this->assertStringContainsString('Nxs Systems Staging 01', $sCompanyName);\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=4;\n\t\t$info['locked']=false;\n\t\t$info['parameters']=array();\n\t\t$info['update_require_upgrade']=1;\n\n\t\treturn $info;\n\t}", "private function just_curl_get_data($url,$data)\n {\n \n $json_str = file_get_contents($this->cil_config_file);\n $json = json_decode($json_str);\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($doc)));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_POSTFIELDS,$data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $json->readonly_unit_tester);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n\n }", "public function show_paket()\n\t\t{\n\t\t\t$show = $this->db->query(\"SELECT * FROM paket\");\n\t\t\treturn $show;\n\t\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n $info['parameters'] = array('param', 'limit', 'hot', 'date_key', 'username_key', 'title', 'check');\n return $info;\n }", "private function getUserInfo()\n {\n // TODO This could be cached\n return $this->userInfoApi->getUserInfo();\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\t$info['parameters']=array('root','sort','search','max','param','select','template_set','display_type');\n\t\treturn $info;\n\t}", "public function fetchTempleAdmin(){\n // $sql = \"select * from local_authorities join city c on local_authorities.cityId = 1\";\n $sql = \"select * from temple_admin \";\n $rows = $this->executeGenericDQLQuery($sql);\n $localAuthorities = array();\n for($i=0 ; $i<sizeof($rows);$i++)\n {\n $localAuthorities[$i]['id'] = $rows[$i]['id'];\n $localAuthorities[$i]['designation'] = $rows[$i]['designation'];\n $localAuthorities[$i]['name'] = $rows[$i]['name'];\n $localAuthorities[$i]['contact'] = $rows[$i]['contact_no'];\n // $localAuthorities[$i]['CityName'] = $rows[$i]['CityName'];\n \n }\n $this->response($this->json($localAuthorities), 200);\n }", "public function get_data()\n\t{\n\t\t$query = \"SELECT * FROM tb_users\";\n\t\t$data = DB::connect()->query($query)->style(FETCH_ASSOC)->fetch_all();\n\t\t$json_data = json_fetch([\n\t\t\t\"data\" => $data\n\t\t]);\n\n\t\treturn $json_data;\n\t}", "function getAllCustomers() {\n\t// Get cURL resource\n\t$curl = curl_init();\n\t// Set some options - we are passing in a useragent too here\n\tcurl_setopt_array($curl, array(\n\t CURLOPT_RETURNTRANSFER => 1,\n\t CURLOPT_URL => 'https://hackathon-be.mybluemix.net/customers',\n\t CURLOPT_USERAGENT => 'BankBase BOC Hackathon Request'\n\t));\n\t// Send the request & save response to $resp\n\t$resp = curl_exec($curl);\n\t// Close request to clear up some resources\n\tcurl_close($curl);\n\n\t$resp_decode = json_decode($resp);\n\techo \"<pre>\";\n\tprint_r($resp_decode);\n\techo \"</pre>\";\n}", "public static function getMetaData()\n {\n $site_controller = \\Yii::$app->urlManager->parseRequest(\\Yii::$app->request)[0];\n if ('site/show-product' == $site_controller )\n {\n $prodId = \\Yii::$app->urlManager->parseRequest(\\Yii::$app->request)[1];\n return Teg::findOne(['id'=>$prodId]);\n }\n }", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();" ]
[ "0.6131129", "0.575422", "0.5665066", "0.5656201", "0.56180054", "0.5609868", "0.5554601", "0.5489803", "0.544095", "0.54401875", "0.5422686", "0.54207516", "0.5400289", "0.53936344", "0.53861177", "0.53861177", "0.53861177", "0.5385225", "0.5343173", "0.5338647", "0.52843785", "0.5276749", "0.5259634", "0.5215813", "0.52021116", "0.5185233", "0.5132322", "0.51257557", "0.508888", "0.50793236", "0.5076429", "0.5071526", "0.50715214", "0.50641996", "0.5057928", "0.5055377", "0.5053841", "0.5046668", "0.5040119", "0.50379854", "0.5037806", "0.5036771", "0.5022914", "0.50225806", "0.50225806", "0.5009322", "0.50073177", "0.49965447", "0.49940243", "0.49938998", "0.49903667", "0.49841303", "0.49810633", "0.49787387", "0.49745587", "0.497066", "0.49705824", "0.49695557", "0.4967109", "0.49606156", "0.49564123", "0.4951807", "0.4951627", "0.49447063", "0.49429092", "0.49429092", "0.49429092", "0.49420965", "0.49382845", "0.49345052", "0.4931043", "0.49222642", "0.49056226", "0.49049556", "0.4900207", "0.48999822", "0.4890967", "0.4889809", "0.48883924", "0.48865488", "0.48848632", "0.48839527", "0.48794234", "0.48781416", "0.48766476", "0.48748755", "0.487047", "0.48696917", "0.48678067", "0.48668388", "0.48646754", "0.48646754", "0.48646754", "0.48646754", "0.48646754", "0.48646754", "0.48646754", "0.48646754", "0.48646754", "0.48646754" ]
0.75973237
0
A list of headers to be used when a table is displayed
public function getTableHeaders() { return ['#', 'Fatura','Ordem Servico']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTableHeaders()\n {\n return ['#', 'Autor', 'Título', 'Subtítulo', 'Preço', 'Categorias'];\n }", "public function getTableHeaders()\n {\n return ['ID', 'Ponto', 'Endereço', 'Cidade'];\n }", "function headers()\n {\n // Maintain URL params for pagination\n if (empty($this->params['pass'])) {\n $this->params['pass'] = array();\n }\n $options = array(\n 'url' => array_merge($this->tableOptions['url'], $this->params['named'], $this->params['pass']),\n //'model' => $this->defaultModel\n );\n if (!empty($this->tableOptions['ajax'])) {\n $options['update'] = $this->tableOptions['ajax']['mh-update'];\n $options['indicator'] = $this->tableOptions['ajax']['mh-indicator'];\n $options['before'] = $this->Js->get($options['indicator'])->effect('fadeIn', array('buffer' => false));\n $options['complete'] = $this->Js->get($options['indicator'])->effect('fadeOut', array('buffer' => false));\n }\n\n\n $this->Paginator->options($options);\n\n $lines = array();\n foreach ($this->Columns as $field => $Column) {\n $lines[] = $headerHTML[] = $Column->header();\n }\n\n $row = $this->Html->tag('tr', implode(chr(10), $lines));\n\n return $this->Html->tag('thead', $row);\n }", "public function table_headers() {\n\t\t\tglobal $mycred_types;\n\n\t\t\treturn apply_filters( 'mycred_log_column_headers', array(\n\t\t\t\t'column-username' => __( 'User', 'twodayssss' ),\n\t\t\t\t'column-time' => __( 'Date', 'twodayssss' ),\n\t\t\t\t'column-creds' => $this->core->plural(),\n\t\t\t\t'column-entry' => __( 'Entry', 'twodayssss' )\n\t\t\t), $this );\n\t\t}", "public static function get_edit_table_headers() {\n\n $headerdata = array();\n $headerdata[] = get_string('sequence', 'mod_simplelesson');\n $headerdata[] = get_string('pagetitle', 'mod_simplelesson');\n $headerdata[] = get_string('prevpage', 'mod_simplelesson');\n $headerdata[] = get_string('nextpage', 'mod_simplelesson');\n $headerdata[] = get_string('hasquestion', 'mod_simplelesson');\n $headerdata[] = get_string('actions', 'mod_simplelesson');\n\n return $headerdata;\n }", "function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }", "public static function getTableHeaders() {\r\n\t\t$array = self::getHeadersArray();\r\n\r\n\t\tif( $array == null ) {\r\n\t\t\t$headers = [];\r\n\t\t\treturn $headers;\r\n\t\t}\r\n\r\n\t\t$headers = self::getTableHeaderTitles( $array );\r\n\t\treturn $headers;\r\n\t}", "public static function getHeadersForListGrid()\n {\n return array(\n 'usd',\n 'eur',\n 'pln'\n );\n }", "private function getHeaders(){\n\t\t$thead=\"\";\n\t\tif(!empty($this->headers)){\n\t\t\t$thead=\"<thead>\";\n\t\t\t$thead.=\"<tr>\";\n\t\t\t$headerNumber=0;\n\t\t\t$fieldNumber=0;\n\t\t\t$count=count($this->headers)-1;\n\t\t\t\n\t\t\t//Busca si hay columnas anteriores a agregar\n\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Busca las columnas declaradas\n\t\t\tforeach($this->headers as $name){\n\t\t\t\tif($this->headerSortable){\n\t\t\t\t\tif($this->order!==\"\"&&!empty($this->order)){\n\t\t\t\t\t\t$order=explode('|',$this->order);\n\t\t\t\t\t\tif(is_array($order)&&$fieldNumber==$order[0]){\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-\".$order[1];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header class=\\\"$classSortable\\\" onclick=\\\"javascript:{$this->id}Reorder($fieldNumber);\\\" {$this->id}_field_number=\\\"$fieldNumber\\\">$name</th>\";\n\t\t\t\t}else{\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header>$name</th>\";\n\t\t\t\t}\n\t\t\t\t$fieldNumber++;\n\t\t\t\t$headerNumber++;\n\t\t\t}\n\t\t\t\n\t\t\t//Busca si hay columnas posteriores a agregar\n\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"</tr>\";\n\t\t\t\n\t\t\t//Guardamos el numero total de columnas\n\t\t\t$this->cols=$headerNumber;\n\t\t\t\n\t\t\t\n\t\t\t$tfilter=\"\";\n\t\t\t$type=\"\";\n\t\t\tif($this->headerFilterable){\n\t\t\t\t$cols=count($this->fields)-1;\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<=$cols;$i++){\n\t\t\t\t\t$meClass=velkan::$config[\"datagrid\"][\"filters\"][\"inputClass\"];\n\t\t\t\t\t\n\t\t\t\t\t$type=\"\";\n\t\t\t\t\tif(!empty($this->types)){\n\t\t\t\t\t\t$type=$this->types[$i];\n\t\t\t\t\t}\n\t\t\t\t\t$value=\"\";\n\t\t\t\t\tif(!empty($this->filters)){\n\t\t\t\t\t\tforeach($this->filters as $filter){\n\t\t\t\t\t\t\tif($filter[0]==$i){\n\t\t\t\t\t\t\t\t$value=$filter[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tfilter.=\"<th class='velkan-grid-column-filter'>\";\n\t\t\t\t\t\n\t\t\t\t\tswitch($type){\n\t\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATE));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"datetime\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATETIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"time\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_TIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$tfilter.=\"<input type='search' name='grid{$this->id}Filter[]' $type value=\\\"$value\\\">\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$tfilter.=\"</th>\";\n\t\t\t\t}\n\t\t\t\t$display=($this->ShowFilters?\"\":\"style='display:none'\");\n\t\t\t\t\n\t\t\t\t$filterPrepend=\"\";\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$filterPrepend.=\"<th>&nbsp;</th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filterAppend=\"\";\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$filterAppend.=\"<th>&nbsp;</th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tfilter=\"<tr id='grid{$this->id}Filters' $display>{$filterPrepend}{$tfilter}{$filterAppend}</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($type!=\"\"){\n\t\t\t\t$jss=new generalJavaScriptFunction();\n\t\t\t\t$jss->registerFunction(\"applyFormats\");\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"$tfilter</thead>\";\n\t\t}\n\t\t\n\t\treturn $thead;\n\t}", "function output_header($allLists)\n {\n $output_html = '';\n if (count($allLists) == 0) return '';\n $output_html .= '<tr>';\n foreach ($allLists as $item) {\n $output_html .= '<th>' . $item . '</th>';\n }\n $output_html .= '</tr>';\n return $output_html;\n }", "function output_header($allLists)\n {\n $output_html = '';\n if (count($allLists) == 0) return '';\n $output_html .= '<tr>';\n foreach ($allLists as $item) {\n $output_html .= '<th>' . $item . '</th>';\n }\n $output_html .= '</tr>';\n return $output_html;\n }", "function output_header($allLists)\n {\n $output_html = '';\n if (count($allLists) == 0) return '';\n $output_html .= '<tr>';\n foreach ($allLists as $item) {\n $output_html .= '<th>' . $item . '</th>';\n }\n $output_html .= '</tr>';\n return $output_html;\n }", "function output_header($allLists)\n {\n $output_html = '';\n if (count($allLists) == 0) return '';\n $output_html .= '<tr>';\n foreach ($allLists as $item) {\n $output_html .= '<th>' . $item . '</th>';\n }\n $output_html .= '</tr>';\n return $output_html;\n }", "public function headings(): array\n {\n return [\n 'Name',\n 'Department',\n 'OT Date',\n 'Shift',\n 'From',\n 'To',\n 'Total Hrs',\n 'Job Content',\n 'Results',\n 'Supervisor',\n 'Manager',\n 'Date Created',\n 'Last Update'\n ];\n }", "private function createHeaders($headers) {\r\n $html = '<tr class=\"ctable-headertag\">';\r\n foreach ($headers as $index => $header) {\r\n $html .= '<th>' . $header . '</th>';\r\n }\r\n $html .= '</tr>';\r\n return $html;\r\n\r\n }", "protected function getTableHeader() {\n $newDirection = ($this->sortDirection == 'asc') ? 'desc' : 'asc';\n\n $tableHeaderData = array(\n 'title' => array(\n 'link' => $this->getLink('title', ($this->sortField == 'title') ? $newDirection : $this->sortDirection),\n 'name' => 'Title',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n 'document_type' => array(\n 'link' => $this->getLink('type', $this->sortField == 'document_type' ? $newDirection : $this->sortDirection),\n 'name' => 'Type',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n 'date' => array(\n 'link' => $this->getLink('date', $this->sortField == 'date' ? $newDirection : $this->sortDirection),\n 'name' => 'Date',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n );\n\t\t\n // insert institution field in 3rd column, if this is search results\n if($this->uri == 'search') {\n $tableHeaderData = array_slice($tableHeaderData, 0, 2, true) +\n array('institution' => array(\n 'link' => $this->getLink('institution', $this->sortField == 'institution' ? $newDirection : $this->sortDirection),\n 'name' => 'Institution',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n )) +\n array_slice($tableHeaderData, 2, count($tableHeaderData)-2, true);\n }\n\t\t\n return $tableHeaderData;\n }", "public function headers(): array\n {\n return [\n Header::title('Student Name'),\n Header::title('Module 1'),\n Header::title('Module 2'),\n Header::title('Actions'),\n ];\n }", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "public function headings(): array\n {\n return [\n 'Part Number',\n 'Description',\n 'Quantity',\n 'Date Received',\n// 'Month',\n// 'Year',\n 'Invoice Number',\n 'Vendor',\n 'Unit Price',\n 'Total Price',\n 'Location',\n 'Received By',\n ];\n }", "public function headings(): array\n {\n return [\n 'Name',\n 'Developer Name',\n 'Status',\n 'Description',\n 'Created At',\n ];\n }", "public function getHeaders()\n {\n $model = $this;\n \n $headers = \\DB::table('information_schema.columns')\n ->select(LaraCrudGrammar::getColumns())\n ->where('table_schema', env('DB_DATABASE'))\n ->where('table_name', $model->getTable())\n ->get();\n \n return $this->prettyNames($this->removeUnnecessaryHeaders($headers, $model));\n }", "abstract function getheadings();", "public function headings(): array\n\t{\n\t\treturn [\n\t\t\t\t'No',\n\t\t\t\t'Title',\n\t\t\t\t'Price',\n\t\t\t\t'Category',\n\t\t\t\t'Type',\n\t\t\t\t'Post By',\n\t\t\t\t'Province',\n\t\t\t\t'District',\n\t\t\t\t'Commune',\n\t\t\t\t'views',\n\t\t\t\t'Status'\n\t\t];\n }", "public function createHeader($columns)\n {\n $html = \"<tr>\";\n\n \n foreach ($columns as $column) {\n $html .= \"<th>\".$column['label'].\"</th>\";\n }\n $html .= \"</tr>\";\n return $html; \n }", "public function csvHeaders()\n\t{\n\t\t$headers = array();\n\t\tforeach ($this->Columns as $field => $Column) {\n\t\t\t$headers[] = $Column->label();\n\t\t}\n\t\treturn $headers;\n\t}", "function showHeader(){\n\t\t$header = \"\";\n\t\t// print the header row\n\t\t$header .= \"\t<tr>\\n\";\n\t\t// loop the fields\n\t\tforeach ($this->fields as $field) {\n\t\t\t// print each field\n\t\t\t$header .= \"\t\t<th>\".$field.\"</th>\\n\";\n\t\t}\n\t\t// end the header row\n\t\t$header .= \"\t</tr>\\n\";\n\t\treturn $header;\n\t}", "public function _list()\n {\n return header_list();\n }", "public function headings() {\n\t\t$vals = array_keys(get_object_vars($this));\n\t\treturn( array_reduce($vals,\n\t\t\t\tcreate_function('$a,$b','return is_null($a) ? \"$b\" : \"$a\".\"\\t\".\"$b\";')));\n\t}", "function wv_commission_table_heading_list($type = \"thead\") {\n $output = \"\";\n\n //verify the header and footer of the table list\n $type = ($type == \"thead\") ? \"thead\" : \"tfoot\";\n\n $output .=\"<$type>\";\n $output .=\" <tr>\n <th>#OrderId</th>\n <th>Order Date</th>\n <th>ProductName</th>\n <th>Vendor</th>\n <th>Commission</th>\n <th>Status</th>\n <th>Commission Date</th>\n </tr>\";\n\n $output .=\"</$type>\";\n return $output;\n }", "public function auto_build_list_thead(){\r\n\t\t$list_thead = \"<thead>\".\r\n\t\t\t\"<tr>\" .\r\n\t\t\t\"<th>#</th>\";\r\n\r\n\t\tforeach ($this->model->table_fields as $list_field)\r\n\t\t\tif ($list_field->get_visible_grid())\r\n\t\t\t\t$list_thead .= \"<th class='th-sm' >\" . ($list_field->get_label()) . \"</th>\";\r\n\r\n\t\treturn $list_thead . \"<th class='text-center'>Accion</th>\" .\r\n\t\t\t\"</tr>\" .\r\n\t\t\t\"</thead>\";\r\n\t}", "public function headings() {\n\t\t$vals = array_keys(get_object_vars($this));\n\t\treturn( array_reduce($vals, create_function('$a,$b','return is_null($a) ? \"$b\" : \"$a\".\"\\t\".\"$b\";')));\n\t}", "public function headings(): array\n {\n return [\n '#ID',\n 'APELLIDO',\n 'NOMBRE',\n 'EMAIL',\n 'ROLE',\n 'PERMISOS ADICIONALES',\n 'FECHA DE CREACIÓN',\n ];\n }", "function get_subscribersTableHeader(){\n $table_head = array();\n $table_head[0] = \"Id\";\n $table_head[1] = \"Email\";\n $table_head[2] = \"Date\";\n return $table_head;\n}", "public function headers(): array\n {\n return [\n Header::title('Code')->sortBy('course.code'),\n Header::title('Name')->sortBy('course.name'),\n Header::title('Year')->sortBy('year'),\n Header::title('Credits')->sortBy('credits'),\n Header::title('Group')->sortBy('group'),\n Header::title('Semester')->sortBy('semester'),\n ];\n }", "protected function getTableHeader() {\n /** @var \\Drupal\\webform\\WebformInterface $webform */\n $webform = $this->getEntity();\n $header = [];\n $header['title'] = $this->t('Title');\n\n $header['key'] = [\n 'data' => $this->t('Key'),\n 'class' => [RESPONSIVE_PRIORITY_LOW],\n ];\n $header['type'] = [\n 'data' => $this->t('Type'),\n 'class' => [RESPONSIVE_PRIORITY_LOW],\n ];\n $header['correct_answer'] = $this->t('Answer');\n $header['weight'] = $this->t('Weight');\n $header['operations'] = $this->t('Operations');\n// $header['answer'] = [\n// 'data' => $this->t('Answer'),\n// 'class' => [RESPONSIVE_PRIORITY_LOW],\n// ];\n//\n// $header['required'] = [\n// 'data' => $this->t('Required'),\n// 'class' => ['webform-ui-element-required', RESPONSIVE_PRIORITY_LOW],\n// ];\n// $header['parent'] = $this->t('Parent');\n// $header['operations'] = [\n// 'data' => $this->t('Operations'),\n// 'class' => ['webform-ui-element-operations'],\n// ];\n return $header;\n }", "public function pi_list_header() {}", "public function tableHeaderRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($cols as $k){\n $out .= '<td>'.$k.'</td>';\n }\n return('<tr>'.$out.'</tr>');\n }", "public static function excelSummaryHeadings()\n {\n return [\n 'Industry',\n 'Survey responses',\n 'Employer',\n 'Government body',\n 'Non-government organisation',\n 'Registered training organisation',\n 'Enterprise training provider',\n 'Group training organisation',\n 'Skills service organisation',\n 'Individual',\n 'Trade union',\n 'Industry Association/Peak body',\n 'Statutory authority',\n 'Self-employed',\n 'Not for profit',\n 'School or University',\n 'Other',\n 'Small',\n 'Medium',\n 'Large'\n ];\n }", "public function makeReportUnusableToBeAbleToSeeAllColumnHeaders()\n {\n $javascript = <<<JS\n $('thead th').css('display', 'inline');\nJS;\n\n $this->getSession()->executeScript($javascript);\n }", "public function headings(): array\n {\n return ['ID', 'Email ID', 'Status', 'Created At', 'Last Updated At'];\n }", "protected function renderTableHeader(): string\n {\n if (!$this->options['showHeader']) {\n return '';\n }\n\n return\n '<thead>' .\n '<tr>' .\n '<th>' . $this->_('differences') . '</th>' .\n '</tr>' .\n '</thead>';\n }", "public function getTableHeader()\n {\n $tableHead = null;\n $tableHead .= \"<thead>\";\n $tableHead .= \"<tr>\";\n $tableHead .= \"<th>Vecka</th>\";\n $tableHead .= \"<th>Måndag</th>\";\n $tableHead .= \"<th>Tisdag</th>\";\n $tableHead .= \"<th>Onsdag</th>\";\n $tableHead .= \"<th>Torsdag</th>\";\n $tableHead .= \"<th>Fredag</th>\";\n $tableHead .= \"<th>Lördag</th>\";\n $tableHead .= \"<th>Söndag</th>\";\n $tableHead .= \"</tr>\";\n $tableHead .= \"</thead>\";\n\n return $tableHead;\n }", "function constructTableHead() {\n\n $header = '<tr><th>Country</th>';\n if (isset($_GET['pop'])) {\n $header .= '<th>Total Population</th>';\n }\n if (isset($_GET['birth'])) {\n $header .= '<th>Birth Rate</th>';\n }\n if (isset($_GET['death'])) {\n $header .= '<th>Death Rate</th>';\n }\n\n $header .= '</tr>';\n return $header;\n }", "function getColumnHeaders(){\n\t\t$columnHeaders = array();\n\n\t\t//fixed headers\n\t\t$columnHeaders[0] = 'User';\n\t\t$columnHeaders[1] = 'Action';\n\n\t\t//two headers were added, offsett to make up for it\n\t\t$count = 2;\n\t\tforeach ($this->schedule as $date => $times) {\n\n\t\t\t//convert the full date to a more readable version\n\t\t\t$converter = strtotime($date); \n\t\t\t$formattedDate =date('l', $converter);\n\t\t\t$formattedDate = $formattedDate.'</br>'.date('m-d-y', $converter);\n\n\t\t\tforeach($times as $time){// #2dimensionlswag\n\n\t\t\t\t//convert the international time to AM/PM\n\t\t\t\t$converter = strtotime($time); \n\t\t\t\t$formattedTime = date(\"g:i A\", $converter);\n\n\t\t\t\t$columnHeaders[$count] = $formattedDate.'</br>'.$formattedTime;\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\treturn $columnHeaders;\n\t}", "public function getTableRowNames()\n \t{\n \t\treturn array('title', 'author', 'date', 'email', 'website', 'comment', 'relevantSection', 'relevantItemId', 'isApproved', 'isPrivate', 'isAdminComment');\n \t}", "public static function create_table_head()\n\t{\n\t\t\n\t\tif (!static::$columns)\n\t\t{\n\t\t\treturn static::$template['wrapper_start'].'<tr><th>No columns config</th></tr>'.static::$template['wrapper_end'];\n\t\t}\n\n\t\t$table_head = static::$template['wrapper_start'];\n\t\t$table_head .= '<tr>';\n\t\t\n\t\tforeach(static::$columns as $column)\n\t\t{\n\t\t\t$sort_key \t= (is_array($column) ? isset($column[1]) ? $column[1] : strtolower($column[0]) : $column);\n\t\t\t$col_attr\t= (is_array($column) && isset($column[2]) ? $column[2] : array());\n\t\t\t\n\t\t\t$new_direction = static::$direction;\n\t\t\t\n\t\t\tif(static::$sort_by == $sort_key)\n\t\t\t{\n\t\t\t\t$active_class_name = static::$template['col_class_active'].' '.static::$template['col_class_active'].'_'.$new_direction;\n\t\t\t\tif(isset($col_attr['class']))\n\t\t\t\t{\n\t\t\t\t\t$col_attr['class'] .= ' '.$active_class_name;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$col_attr['class'] = $active_class_name;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$new_direction = (static::$direction == 'asc' ? 'desc' : 'asc');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(is_array($column) && (!isset($column[1]) || isset($column[1]) && $column[1] !== false)){\n\t\t\t\t\n\t\t\t\t$url \t\t\t= rtrim(static::$base_url, '/').(static::$current_page ? '/'.static::$current_page : '');\n\t\t\t\t$url \t\t\t.= '/'.$sort_key.static::$uri_delimiter.$new_direction;\n\t\t\t\t\n\t\t\t\t$cell_content \t= rtrim(static::$template['link_start'], '> ').' href=\"'.$url.'\">';\n\t\t\t\t$cell_content \t.= $column[0];\n\t\t\t\t$cell_content \t.= static::$template['link_end'];\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tif(is_array($column))\n\t\t\t\t{\n\t\t\t\t\t$column = $column[0];\n\t\t\t\t}\n\t\t\t\t$cell_content = static::$template['nolink_start'].$column.static::$template['nolink_end'];\t\n\t\t\t}\n\t\t\t\n\t\t\t$table_head .= html_tag(static::$template['col_tag'], $col_attr, $cell_content);\n\t\t\t\n\t\t}\n\t\t\n\t\t$table_head .= '</tr>';\n\t\t$table_head .= static::$template['wrapper_end'];\n\n\t\treturn $table_head;\n\t}", "public function headings(): array\n {\n return [\n 'id',\n 'mshp_version_id',\n 'cmr_law_number',\n 'cmr_chapter',\n 'cmr_charge_code_seq',\n 'cmr_charge_code_fingerprintable',\n 'cmr_charge_code_effective_year',\n 'cmr_charge_code_ncic_category',\n 'cmr_charge_code_ncic_modifier',\n 'charge_code',\n 'ncic_mod',\n 'state_mod',\n 'description',\n 'type_class',\n 'dna',\n 'sor',\n 'roc',\n 'case_type',\n 'effective_date',\n ];\n }", "function echoHeader($spec) {\n\techo('<div class=\"tr\">');\n\tforeach($spec as $col) {\n\t\techo('<div class=\"th\">' . htmlspecialchars($col) . '</div>');\n\t}\n\techo('<div class=\"th\">Actions</div>');\n\techo('</div>');\n}", "function rallies_table_row_header($hdrs)\r\n{\r\n global $MYKEYWORDS;\r\n\r\n\t$OK = ($_SESSION['ACCESSLEVEL'] >= $GLOBALS['ACCESSLEVEL_READONLY']);\r\n\r\n\t$res = '';\r\n\t$hdrcols = explode(';',$hdrs);\r\n\tforeach ($hdrcols as $col)\r\n\t\t$res .= \"<th>\".$col.\"</th>\";\r\n\r\n return $res;\r\n}", "public function header()\n\t{\n\t\treturn array(\t'Translation ID (Do not change)',\n\t\t\t\t\t\t'Translation Group (Do not change)',\n\t\t\t\t\t\t'Original Text (Do not change)',\n\t\t\t\t\t\t'Translated Text (Change only this column to new translated text)');\n\t}", "public function headings(): array\n {\n return [\n 'id',\n 'name',\n 'email',\n 'active',\n 'roles', /*,\n 'email_verified_at',\n 'password',\n 'remember_token',*/\n ];\n }", "public function renderTableHeader()\n {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = Html::tag('tr', implode('', $cells), $this->headerRowOptions);\n if ($this->filterPosition === self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition === self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }", "function print_column_headers($screen, $with_id = \\true)\n {\n }", "function get_userTableHeader(){\n $table_head = array();\n $table_head[0] = \"Id\";\n $table_head[1] = \"Username\";\n $table_head[2] = \"Password\";\n $table_head[3] = \"Email\";\n $table_head[4] = \"Group\";\n return $table_head;\n}", "private function buildHeader()\n\t{\n\t\tif ($this->hide_header)\n\t\t\treturn;\n\n\t\techo '<thead><tr>';\n\n\t\t// Get field names of result\n\t\t$headers = $this->_db->fieldNameArray($this->result);\n\t\t$this->column_count = count($headers);\n\n\t\t// Add a blank column if the row number is to be shown\n\t\tif ($this->show_row_number)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\">&nbsp;</td>';\n\t\t}\n\n\t\t// Show checkboxes\n\t\tif ($this->show_checkboxes)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header tbl-checkall\"><input type=\"checkbox\" name=\"checkall\" onclick=\"tblToggleCheckAll'.$this->_clsnumber.'()\"></td>';\n\t\t}\n\n\t\t// Loop through each header and output it\n\t\tforeach ($headers as $t)\n\t\t{\n\t\t\t// Skip column if hidden\n\t\t\tif (in_array($t, $this->hidden))\n\t\t\t{\n\t\t\t\t$this->column_count--;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check for header caption overrides\n\t\t\tif (array_key_exists($t, $this->header))\n\t\t\t\t$header = $this->header[$t];\n\t\t\telse\n\t\t\t\t$header = $t;\n\n\t\t\tif ($this->hide_order)\n\t\t\t\techo '<td class=\"tbl-header\">' . $header; // Prevent the user from changing order\n\t\t\telse {\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\t$order = ($this->order['Order'] == self::ORDER_ASC)\n\t\t\t\t\t? self::ORDER_DESC\n\t\t\t\t\t: self::ORDER_ASC;\n\t\t\t\telse\n\t\t\t\t\t$order = self::ORDER_ASC;\n\n\t\t\t\techo '<td class=\"tbl-header\"><a href=\"javascript:;\" onclick=\"tblSetOrder'.$this->_clsnumber.'(\\'' . $t . '\\', \\'' . $order . '\\')\">' . $header . \"</a>\";\n\n\t\t\t\t// Show the user the order image if set\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\techo '&nbsp;<img src=\"images/sort_' . strtolower($this->order['Order']) . '.gif\" class=\"tbl-order\">';\n\t\t\t}\n\n\t\t\t// Add filters if allowed and only if the column type is not \"special\"\n\t\t\tif ($this->allow_filters and !empty($t)){\n\t\t\t\t\t\n\t\t\t\tif (!in_array($this->type[$t][0], array(\n\t\t\t\t\t\tself::TYPE_ARRAY,\n\t\t\t\t\t\tself::TYPE_IMAGE,\n\t\t\t\t\t\tself::TYPE_FUNCTION,\n\t\t\t\t\t\tself::TYPE_DATE,\n\t\t\t\t\t\tself::TYPE_CHECK,\n\t\t\t\t\t\tself::TYPE_CUSTOM,\n\t\t\t\t\t\tself::TYPE_PERCENT\n\t\t\t\t)))\n\t\t\t\t{\n\t\t\t\t\tif ($this->filter['Column'] == $t and !empty($this->filter['Value']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter_display = 'block';\n\t\t\t\t\t\t$filter_value = $this->filter['Value'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$filter_display = 'none';\n\t\t\t\t\t\t$filter_value = '';\n\t\t\t\t\t}\n\t\t\t\t\techo '<a href=\"javascript:;\" onclick=\"tblShowHideFilter'. $this->_clsnumber .'(\\'' . $t . '\\')\"> filter </a>\n\t\t\t\t\t<br><div class=\"tbl-filter-box\" id=\"'.$this->_clsnumber.'filter-' . $t . '\" style=\"display:' . $filter_display . '\">\n\t\t\t\t\t<input type=\"text\" size=\"6\" id=\"'.$this->_clsnumber.'filter-value-' . $t . '\" value=\"'.$filter_value.'\">&nbsp;\n\t\t\t\t\t<a href=\"javascript:;\" onclick=\"tblSetFilter'.$this->_clsnumber.'(\\'' . $t . '\\')\">filter</a></div>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\techo '</td>';\n\t\t}\n\n\t\t// If we have controls, add a blank column\n\t\tif (count($this->controls) > 0)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\">&nbsp;</td>';\n\t\t}\n\n\t\techo '</tr></thead>';\n\t}", "public static function get_question_table_headers() {\n\n $headerdata = array();\n $headerdata[] = get_string('qnumber', 'mod_simplelesson');\n $headerdata[] = get_string('question_name', 'mod_simplelesson');\n $headerdata[] = get_string('question_text', 'mod_simplelesson');\n $headerdata[] = get_string('questionscore', 'mod_simplelesson');\n $headerdata[] = get_string('pagetitle', 'mod_simplelesson');\n $headerdata[] = get_string('setpage', 'mod_simplelesson');\n $headerdata[] = get_string('qlinkheader', 'mod_simplelesson');\n\n return $headerdata;\n }", "function register_column_headers( $screen, $columns ) {\n\tnew Backend\\List_Table_Compat( $screen, $columns );\n}", "public static function headers() {\n $listado = array('Nombre', 'Email', 'Rol');\n\n return $listado;\n }", "function get_column_headers($screen)\n {\n }", "function Table_Headers($header,$w)\r\n{\r\n //Colors, line width and bold font\r\n $this->SetFillColor(153,153,153);\r\n $this->SetTextColor(0);\r\n $this->SetDrawColor(128,0,0);\r\n $this->SetLineWidth(.3);\r\n $this->SetFont('Arial','B','7');\r\n\t\r\n //Header\r\n\t\r\n\t//Output table header\r\n for($i=0;$i<count($header);$i++)\r\n $this->Cell($w[$i],5,$header[$i],1,0,'C',1);\r\n $this->Ln();\r\n}", "public function buildHeader() {\n return [\n ['data' => t('Teaching format'), 'class' => ['align-middle']],\n ['data' => t('Event'), 'class' => ['align-middle']],\n ['data' => t('Tutor'), 'class' => ['align-middle']],\n ['data' => t('Location'), 'class' => ['align-middle']],\n ['data' => t('Room'), 'class' => ['align-middle']],\n [\n 'data' => t('Date/time'),\n 'field' => 'time.field_event_time_value',\n 'sort' => 'desc',\n 'class' => ['align-middle'],\n ],\n ['data' => t('Registration status'), 'class' => ['align-middle']],\n ];\n }", "function print_column_headers( $screen, $with_id = true ) {\n\n\t$wp_list_table = new Backend\\List_Table_Compat( $screen );\n\n\t$wp_list_table->print_column_headers( $with_id );\n}", "public function printTableHeader($open)\n {\n\n print \"<tr>\\n\";\n print \"<th>&nbsp;\";\n print \" Admin Email\";\n print \"&nbsp;</th>\";\n print \"<th>&nbsp;\";\n print \" Level\";\n print \"&nbsp;</th>\";\n if (!$open)\n print \"</tr>\\n\";\n }", "public function getTableRowNames()\n \t{\n \t\treturn array('title', 'author', 'publishDate', 'client', 'workType', 'briefDescription', 'description', 'caseStudyID', 'isPrivate', 'commentsAllowed', 'screenshots', 'prevImageURL', 'finalURL');\n \t}", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<p class=left>Description:</p>\\n\";\n\t}", "function print_header_entries() {\n\n $result = '';\n\n if($entries = $this->get_header_entries()) {\n $result .= '<div class=\"php_report_header_entries\">';\n foreach($entries as $value) {\n\n $label_class = \"php_report_header_{$value->css_identifier} php_report_header_label\";\n $value_class = \"php_report_header_{$value->css_identifier} php_report_header_value\";\n\n $result .= '<div class=\"' . $label_class . '\">' . $value->label . '</div>';\n $result .= '<div class=\"' . $value_class . '\">' . $value->value . '</div>';\n\n }\n $result .= '</div>';\n }\n\n return $result;\n }", "public function renderTableHeader() {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = $this->html()->tag('table-row', array('content' => implode('', $cells)), $this->headerRowOptions);\n\n if ($this->filterPosition == self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition == self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }", "function tablethead_open() {\n $this->doc .= DOKU_TAB.'<thead>'.DOKU_LF;\n }", "public static function excelMigrationHeadings()\n {\n return [\n 'Occupation/Job Title',\n 'Region',\n 'Industry',\n ];\n }", "function get_header_entries() {\n return array();\n }", "public static function make_table_header(Array $headings){\n\t\t$html = Xml::openElement( 'thead' );\n $html .= Xml::openElement( 'tr' );\n foreach ( $headings as $heading ) {\n $html .= Xml::element( 'th', array(), $heading );\n\t\t}\n $html .= Xml::closeElement( 'tr' );\n $html .= Xml::closeElement( 'thead' );\n\t\treturn $html;\n\t}", "public function getGridHeadings() {\n return [ StringLiterals::GRIDHEADING => [ [ 'name' => trans ( 'cms::latestnews.title' ),StringLiterals::VALUE => 'name','sort' => false ],[ 'name' => trans ( 'cms::latestnews.post_creator' ),StringLiterals::VALUE => '','sort' => false ],[ 'name' => trans ( 'cms::latestnews.post_image' ),StringLiterals::VALUE => '','sort' => false ],[ 'name' => trans ( 'cms::latestnews.created_at' ),StringLiterals::VALUE => '','sort' => false ],[ 'name' => trans ( 'cms::latestnews.status' ),StringLiterals::VALUE => 'is_active','sort' => false ],[ 'name' => trans ( 'cms::latestnews.action' ),StringLiterals::VALUE => 'is_active','sort' => false ] ] ];\n }", "static public function __hx__list () {\n\t\treturn [\n\t\t\t0 => 'AlwaysShowHeader',\n\t\t\t1 => 'NeverShowHeader',\n\t\t\t2 => 'ShowHeaderWithResults',\n\t\t];\n\t}", "function BeginIncidentTable() {\n $headings = array(\"Year\", \"Section\", \"Description\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\", \"Count\");\n echo \"<table class='sortable' align='center' cellpadding='5' border=1>\";\n echo \"<tr>\";\n foreach ($headings as $heading) {\n echo \"<th>$heading</th>\";\n }\n echo \"</tr>\";\n}", "public function printHeaders() {\n\t}", "public static function excelSummaryHeadingsMYSQL()\n {\n return [\n 'employer' => 'Employer',\n 'enterprise_t_p' => 'Enterprise training provider',\n 'government_body' => 'Government body',\n 'group_t_o' => 'Group training organisation',\n 'individual' => 'Individual',\n 'industry_a_p_b' => 'Industry association peak body',\n 'non_gov_body' => 'Non-government organisation',\n 'registered_t_o' => 'Registered training organisation',\n 'skills_s_o' => 'Skills service organisation',\n 'statutory_authority' => 'Statutory authority',\n 'trade_union' => 'Trade union',\n 'self_employed' => 'Self-employed',\n 'not_for_profit' => 'Not for profit',\n 'school_or_university' => 'School or University',\n ];\n }", "protected function _compile_http_headers()\n\t{\n\t\t$output = \"\\n\\n\";\n\t\t$output .= \"\\n\";\n\t\t$output .= '<h4>'.$this->CI->lang->line('profiler_headers').'</h4>';\n\t\t$output .= \"\\n\";\n\n\t\t$output .= \"\\n\\n<div class=\\\"grid-container table-bordered\\\"><table id='ci_profiler_httpheaders_table' class=\\\"grid table table-hover table-striped table-condensed\\\">\\n\";\n\n\t\tforeach (array('HTTP_ACCEPT', 'HTTP_USER_AGENT', 'HTTP_CONNECTION', 'SERVER_PORT', 'SERVER_NAME', 'REMOTE_ADDR', 'SERVER_SOFTWARE', 'HTTP_ACCEPT_LANGUAGE', 'SCRIPT_NAME', 'REQUEST_METHOD',' HTTP_HOST', 'REMOTE_HOST', 'CONTENT_TYPE', 'SERVER_PROTOCOL', 'QUERY_STRING', 'HTTP_ACCEPT_ENCODING', 'HTTP_X_FORWARDED_FOR') as $header)\n\t\t{\n\t\t\t$val = (isset($_SERVER[$header])) ? $_SERVER[$header] : '';\n\t\t\t$output .= \"<tr><td>\".$header.\"</td><td>\".$val.\"</td></tr>\\n\";\n\t\t}\n\n\t\t$output .= \"</table></div>\\n\";\n\n\t\treturn $output;\n\t}", "private function buildHeader()\n {\n $month_name = $this->monthLabels[$this->month - 1] . ' ' . $this->year;\n $vclass = strtolower($this->view);\n $h = \"<table class='\" . $this->tableClass . \" \" . $vclass . \"'>\";\n $h .= \"<thead>\";\n $h .= \"<tr class='\" . $this->headClass . \"'>\";\n $cs = 5;\n if ($this->view == 'week' || $this->view == 'day') {\n $h .= \"<th>&nbsp;</th>\";\n }\n if ($this->view == 'day') {\n $cs = 1;\n }\n\n if ($this->nav) {\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->prevClass . \"' href='\" . $this->prevLink() . \"'>\" . $this->prevIco . \"</a>\";\n $h .= \"</th>\";\n $h .= \"<th colspan='$cs'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->nextClass . \"' href='\" . $this->nextLink() . \"'>\" . $this->nextIco . \"</a>\";\n $h .= \"</th>\";\n } else {\n $h .= \"<th colspan='7'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n }\n $h .= \"</tr>\";\n $h .= \"</thead>\";\n\n $h .= \"<tbody>\";\n if ($this->view != 'day' && $this->view != 'week') {\n $h .= \"<tr class='\" . $this->labelsClass . \"'>\";\n\n for ($i = 0; $i <= 6; $i++) {\n $h .= \"<td>\";\n $h .= $this->dayLabels[$i];\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n }\n if ($this->view == 'day' || $this->view == 'week') {\n $h .= self::getWeekDays();\n }\n\n $this->html .= $h;\n }", "function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}", "function listTemplate($headers)\n\t{\n\t\t$template = array(\n\t\t\t'table' => array(\n\t\t\t\t'\n\t<table>',\n\t\t\t\t'\n\t</table>'\n\t\t\t),\n\t\t\t'defRow' => array(\n\t\t\t\t'tr' => array(\n\t\t\t\t\t'\n\t\t<tr>',\n\t\t\t\t\t'\n\t\t</tr>'\n\t\t\t\t),\n\t\t\t\t'defCol' => array(\n\t\t\t\t\t'\n\t\t\t<td>\n\t\t\t\t',\n\t\t\t\t\t'\n\t\t\t</td>'\n\t\t\t\t)\n\t\t\t),\n\t\t\t0 => array(\n\t\t\t\t'defCol' => array(\n\t\t\t\t\t'\n\t\t\t<th>\n\t\t\t\t',\n\t\t\t\t\t'\n\t\t\t</th>'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\tforeach($headers as $index => $name)\n\t\t{\n\t\t\t$template[0][$index] = array(\n\t\t\t\t'\n\t\t\t<th id=\"table_' . $name . '\">\n\t\t\t\t',\n\t\t\t\t'\n\t\t\t</th>'\n\t\t\t);\n\t\t\t$template['defRow'][$index] = array(\n\t\t\t\t'\n\t\t\t<td headers=\"table_' . $name . '\">\n\t\t\t\t',\n\t\t\t\t'\n\t\t\t</td>'\n\t\t\t);\n\t\t}\n\t\treturn $template;\n\t}", "public static function getTableHeaderTitles( $array ) {\r\n\t\t$smarty = new Smarty();\r\n\t\t$smarty->assign( $_REQUEST );\r\n\r\n\t\t$titles = array();\r\n\r\n\t\tforeach( $array as $element ) {\r\n\t\t\tarray_push(\r\n\t\t\t\t$titles,\r\n\t\t\t\t$smarty->fetch( 'string:' . $element[ self::$KEY_TABLE_TITLE ] )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn $titles;\r\n\t}", "abstract protected function getColumnsHeader(): array;", "function register_column_headers($screen, $columns)\n {\n }", "public static function excelRecruitmentHeadings()\n {\n return [\n 'Occupation/Job Title',\n 'Region',\n 'Industry',\n 'Type',\n ];\n }", "public static function getColumnTitles()\n {\n return array_keys(self::$columns);\n }", "private function executeTableShowHeader(array $columns): void\n {\n $separator = '+';\n $header = '|';\n\n foreach ($columns as $column)\n {\n $separator .= str_repeat('-', $column['length'] + 2).'+';\n $spaces = ($column['length'] + 2) - mb_strlen((string)$column['header']);\n\n $spacesLeft = (int)floor($spaces / 2);\n $spacesRight = (int)ceil($spaces / 2);\n\n $fillerLeft = ($spacesLeft>0) ? str_repeat(' ', $spacesLeft) : '';\n $fillerRight = ($spacesRight>0) ? str_repeat(' ', $spacesRight) : '';\n\n $header .= $fillerLeft.$column['header'].$fillerRight.'|';\n }\n\n echo \"\\n\", $separator, \"\\n\";\n echo $header, \"\\n\";\n echo $separator, \"\\n\";\n }", "public static function getHeadersArray() {\r\n\t\t$table = $_REQUEST[ self::$KEY_TABLE ];\r\n\t\t$array = Config::$TABLE_COLUMN_MAP[ $table ];\r\n\t\treturn $array;\r\n\t}", "function pgm_list_column_headers($columns){\n $columns = array(\n 'cb'=>'<input type=\"checkbox\" />', //checkbox-HTML empty checkbox\n 'title'=>__('Lists'), //update header name to 'List Name'\n 'shortcode'=>__('Shortcode'),\n );\n\n return $columns;\n}", "private function createFileHeadings() {\n\t\t// Allow other plugins to add their own column headers\n\t\t$headings = elgg_trigger_plugin_hook('row:headers', 'userexport', array(), $this->fields);\n\n\t\t// Attempt to translate the fields\n\t\tforeach ($headings as $key => $field) {\n\t\t\t$lang_string = \"profile:{$field}\";\n\t\t\t$heading = elgg_echo($lang_string);\n\n\t\t\t// No translation was found, fall back to the original string\n\t\t\tif ($heading === $lang_string) {\n\t\t\t\t$heading = elgg_echo($field);\n\t\t\t}\n\n\t\t\t$headings[$key] = $heading;\n\t\t}\n\n\t\t$this->writeToCSV($headings);\n\t}", "public function allHeaderAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $headers = $em->getRepository('AppBundle:Header')->findAll();\n\n return $this->render('header/show_all.html.twig', array(\n 'headers' => $headers,\n ));\n }", "function showTableHeader($phaseName) {\n?>\n\t<table>\n\t\t<colgroup>\n\t\t\t<col width='4%'>\n\t\t\t<col width='10%'>\n\t\t\t<col width='15%'>\n\t\t\t<col width='5%'>\n\t\t\t<col width='23%'>\n\t\t\t<col width='10%'>\n\t\t\t<col width='23%'>\n\t\t\t<!--<col width='10%'>\n\t\t\t<col width='*'>-->\n\t\t</colgroup>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>#</th>\n\t\t\t\t<th>Datum/Zeit</th>\n\t\t\t\t<th>Ort</th>\n\t\t\t\t<?php echo ($phaseName == 'Gruppenphase') ? \"<th>Grp</th>\" : \"<th></th>\" ?>\n\t\t\t\t<th colspan='3'>Resultat</th>\n\t\t\t\t<!--<th>Tipp</th>\n\t\t\t\t<th>Pkt</th>-->\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n<?php\n}", "public function getDefaultHeaders() {\n\n $dbMethods = DBHelper::helper($this->getConnection()->getName());\n\n $headers = $dbMethods->listColumnsDatatypes($this->getTable());\n\n unset($headers['id']);\n unset($headers[$this->getDatafileIdField()]);\n unset($headers[$this->getRowIndexField()]);\n\n return array_keys($headers);\n }", "public function getOutputHeaders()\n {\n }", "protected function buildHeaders() {\n\n $headers = array();\n\n foreach($this->states as $state_id => $state) {\n $headers[] = $state['label'];\n }\n\n return $headers;\n }", "function pgm_subscriber_column_headers($columns){\n $columns = array(\n 'cb'=>'<input type=\"checkbox\" />', //checkbox-HTML empty checkbox\n 'title'=>__('Subscriber Name'), //update header name to 'Subscriber Name'\n 'email'=>__('Email Address'), //create new header for email\n );\n\n return $columns;\n}", "function Header()\r\n{\r\n if($this->ProcessingTable)\r\n $this->TableHeader();\r\n}", "public function getAllHeaders(){\n\t\t$query = $this->db->query(\"SELECT * FROM header\");\n\t\t$result = $query->result();\n\n\t\treturn $result;\n\n\t}", "function create_pool_header()\n{\n $header =\n \"<thead>\n <tr>\n <th scope='col' class='rounded-company'>Pool</th>\n <th scope='col' class='rounded-q1'>Priority</th>\n <th scope='col' class='rounded-q1' colspan='2'>URL</th>\n <th scope='col' class='rounded-q1'>Gets</th>\n <th scope='col' class='rounded-q1'>Accepts</th>\n <th scope='col' class='rounded-q1'>Rejects</th>\n <th scope='col' class='rounded-q1'>Discards</th>\n <th scope='col' class='rounded-q1'>Stales</th>\n <th scope='col' class='rounded-q1'>Get Fails</th>\n <th scope='col' class='rounded-q1'>Rem fails</th>\n </tr>\n </thead>\";\n\n return $header;\n}", "function render_table_header_footer($orderBy, $order) {\n?>\n\t\t<tr>\n<?php\n\t\t\t$this->render_th('title', 'Title', $orderBy, $order); \n\t\t\t$this->render_th('date', 'Date', $orderBy, $order); \n\t\t\t$this->render_th('facilitators', 'Facilitators', $orderBy, $order); \n\t\t\t$this->render_th('categories', 'Categories', $orderBy, $order); \n?>\n\t\t</tr>\n<?php\n\t}", "public function buildHeader() {\n $header['label'] = $this->t('Label');\n $header['workflow'] = $this->t('Workflow');\n $header['status'] = $this->t('Status');\n $header['transition'] = $this->t('Transitions');\n $header['roles'] = $this->t('Email Roles');\n $header['author'] = $this->t('Email Author');\n $header['emails'] = $this->t('Adhoc Emails');\n return $header + parent::buildHeader();\n }" ]
[ "0.8287764", "0.7940028", "0.78363127", "0.78100526", "0.77253723", "0.767054", "0.76474804", "0.76407033", "0.7527814", "0.7475104", "0.7475104", "0.7475104", "0.7475104", "0.74335015", "0.7424237", "0.74216956", "0.7392003", "0.73749894", "0.73449117", "0.73367417", "0.73219925", "0.7307277", "0.7305676", "0.7288766", "0.72848547", "0.72822034", "0.72798264", "0.72668844", "0.72623026", "0.7235377", "0.7230589", "0.7224885", "0.7198174", "0.7180936", "0.7180379", "0.71675444", "0.71618086", "0.7135749", "0.7131636", "0.71153337", "0.71149033", "0.7100663", "0.7086931", "0.70848", "0.70637065", "0.7062807", "0.7057959", "0.7052479", "0.70457506", "0.7042702", "0.70343375", "0.70281154", "0.7021556", "0.7018416", "0.700583", "0.700562", "0.70014197", "0.6994298", "0.6979697", "0.6956267", "0.69437635", "0.69381183", "0.6919384", "0.6915136", "0.69137883", "0.69126916", "0.69032574", "0.6894039", "0.6890446", "0.68858635", "0.6804607", "0.6791471", "0.6763135", "0.67547923", "0.6750302", "0.6743074", "0.6720279", "0.67147285", "0.6704351", "0.6701116", "0.66989934", "0.6677786", "0.6668173", "0.6659577", "0.66491956", "0.6627853", "0.6620807", "0.66185564", "0.66112524", "0.6608231", "0.66023904", "0.6587984", "0.6581766", "0.6572416", "0.65643674", "0.65630937", "0.6562457", "0.6544301", "0.65415937", "0.6528285" ]
0.8317937
0
Get the value for a given header. Note that this will be the value passed to any callback functions that are being used.
public function getValueForHeader($header) { switch ($header){ case '#': return $this->id; case 'Fatura': return $this->fatura_join()->first()->nome; case 'Ordem Serviço': return $this->ordem_servico_join()->first()->nome; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValueForHeader($header)\n {\n switch ($header){\n case 'ID':\n return $this->id;\n case 'Ponto':\n return $this->title;\n case 'Endereço':\n return $this->address;\n case 'Cidade':\n return $this->city . ' - ' . $this->state;\n }\n }", "public function getValueForHeader($header)\n {\n switch ($header) {\n\n\n case \"Descrição\":\n return $this->descricao;\n }\n }", "public function getValueForHeader($header)\n {\n switch ($header) {\n case '#':\n return $this->id;\n case 'Descrição':\n return $this->description;\n }\n }", "protected function get_header_value($header, $token) {\n\n /*\n * Init header value container\n */\n $header_value = FALSE;\n\n /*\n * Init language / content encoding containers\n */\n $content_encoding = FALSE;\n $content_language = FALSE;\n\n /*\n * Remove any trailing WSP\n */\n $header = trim($header);\n\n /*\n * Unfolding according to RFC 2822, chapter 2.2.3\n */\n $header = str_replace(\"\\r\\n \", \" \", $header);\n $header = str_replace(\"\\r\\n\\t\", \" \", $header);\n\n /*\n * Unfolding with compatibility with some non-standard mailers\n * that only add \\n instead of \\r\\n\n */\n $header = str_replace(\"\\n \", \" \", $header);\n $header = str_replace(\"\\n\\t\", \" \", $header);\n\n /*\n * explode headers on new line\n */\n $rows = explode(\"\\n\", $header);\n\n /*\n * standard delimiter is ':', match '=' only for following properties\n */\n $delimiter = $this->get_header_delimiter($token);\n\n /*\n * convert token to uppercase to perform case-insensitive search\n */\n $ci_token = strtoupper($token);\n\n /*\n * loop each row searching for supplied token\n */\n foreach ($rows as &$row) {\n\n /*\n * trim whitespaces\n */\n $row = trim($row);\n\n /*\n * split row by ';' to manage multiple key=>value pairs within same row\n */\n $items = explode(';', $row);\n\n foreach ($items as &$item) {\n\n $item = trim($item);\n\n /*\n * Parameter Value Continuations\n * \n * Long MIME media type or disposition parameter values do not interact\n * well with header line wrapping conventions. In particular, proper\n * header line wrapping depends on there being places where linear\n * whitespace (LWSP) is allowed, which may or may not be present in a\n * parameter value, and even if present may not be recognizable as such\n * since specific knowledge of parameter value syntax may not be\n * available to the agent doing the line wrapping. The result is that\n * long parameter values may end up getting truncated or otherwise\n * damaged by incorrect line wrapping implementations.\n * \n * A mechanism is therefore needed to break up parameter values into\n * smaller units that are amenable to line wrapping. Any such mechanism\n * MUST be compatible with existing MIME processors. This means that\n * \n * (1) the mechanism MUST NOT change the syntax of MIME media\n * type and disposition lines, and\n * \n * (2) the mechanism MUST NOT depend on parameter ordering\n * since MIME states that parameters are not order\n * sensitive. Note that while MIME does prohibit\n * modification of MIME headers during transport, it is\n * still possible that parameters will be reordered when\n * user agent level processing is done.\n * \n * The obvious solution, then, is to use multiple parameters to contain\n * a single parameter value and to use some kind of distinguished name\n * to indicate when this is being done. And this obvious solution is\n * exactly what is specified here: The asterisk character (\"*\") followed\n * by a decimal count is employed to indicate that multiple parameters\n * are being used to encapsulate a single parameter value. The count\n * starts at 0 and increments by 1 for each subsequent section of the\n * parameter value. Decimal values are used and neither leading zeroes\n * nor gaps in the sequence are allowed.\n * \n * The original parameter value is recovered by concatenating the\n * various sections of the parameter, in order. For example, the\n * content-type field\n * \n * Content-Type: message/external-body; access-type=URL;\n * URL*0=\"ftp://\";\n * URL*1=\"cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar\"\n * \n * is semantically identical to\n * \n * Content-Type: message/external-body; access-type=URL;\n * URL=\"ftp://cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar\"\n * \n * Note that quotes around parameter values are part of the value\n * syntax; they are NOT part of the value itself. Furthermore, it is\n * explicitly permitted to have a mixture of quoted and unquoted\n * continuation fields.\n * \n * \n * \n * =================================================================\n * \n * \n * Combining Character Set, Language, and Parameter Continuations\n * \n * Character set and language information may be combined with the\n * parameter continuation mechanism. For example:\n * \n * Content-Type: application/x-stuff\n * title*0*=us-ascii'en'This%20is%20even%20more%20\n * title*1*=%2A%2A%2Afun%2A%2A%2A%20\n * title*2=\"isn't it!\"\n * \n * Note that:\n * \n * (1) Language and character set information only appear at\n * the beginning of a given parameter value.\n * \n * (2) Continuations do not provide a facility for using more\n * than one character set or language in the same\n * parameter value.\n * \n * (3) A value presented using multiple continuations may\n * contain a mixture of encoded and unencoded segments.\n * \n * (4) The first segment of a continuation MUST be encoded if\n * language and character set information are given.\n * \n * (5) If the first segment of a continued parameter value is\n * encoded the language and character set field delimiters\n * MUST be present even when the fields are left blank.\n * \n * https://tools.ietf.org/html/rfc2231\n */\n\n \n // filename*=UTF-8''Sito%20Feste%20dell%E2%80%99unita%CC%80.docx\n // filename*0*=UTF-8''OVIDIO-TECH-RELAZIONE-DEL-REVISORE-LEGALE-DEI-CONTI-31\n \n // UTF8 decode filename\n if(strpos($item, 'UTF-8') !== false && strpos($item, 'filename') !== false){\n $res = array();\n preg_match('/=UTF-8\\'\\'(.*)$/', $item, $res);\n $item = $res[1];\n $filename_tmp = urldecode($item);\n $item = 'filename=\"'. $filename_tmp . '\"';\n }\n\n if (preg_match(\"/^{$ci_token}\\*0\\*{$delimiter}/i\", $item)) {\n /*\n * - multi-line property\n * - first occurrence\n * - language and encoding supplied (they could be empty though)\n * - must decode value\n * \n * example: title*0*=us-ascii'en'This%20is%20even%20more%20\n */\n list($key, $value) = explode($delimiter, $item, 2);\n\n /*\n * Split content on:\n * 1. content encoding\n * 2. language\n * 3. value\n */\n $exploded = explode(\"'\", $value);\n\n $content_encoding = strtoupper($exploded[0]);\n $content_language = strtoupper($exploded[1]);\n\n $value = implode(\"'\", array_slice($exploded, 2));\n\n /*\n * Content encoding supplied?\n */\n if (strlen($content_encoding) > 0 && $content_encoding != 'UTF-8') {\n $value = mb_convert_encoding($value, 'UTF-8', $content_encoding);\n }\n\n /*\n * Decode ASCII chars (if present)\n */\n $value = urldecode($value);\n } elseif (preg_match(\"/^{$ci_token}\\*\\d\\*{$delimiter}/i\", $item)) {\n\n /*\n * - multi-line property\n * - following occurrence\n * - language and encoding (if any) are supplied within first occurrence\n * - must decode value\n * \n * example: title*1*=%2A%2A%2Afun%2A%2A%2A%20\n */\n list($key, $value) = explode($delimiter, $item, 2);\n\n /*\n * Content encoding supplied?\n */\n if (strlen($content_encoding) > 0 && $content_encoding != 'UTF-8') {\n $value = mb_convert_encoding($value, 'UTF-8', $content_encoding);\n }\n\n /*\n * Decode ASCII chars (if present)\n */\n $value = urldecode($value);\n } elseif (preg_match(\"/^{$ci_token}\\*\\d{$delimiter}/i\", $item)) {\n\n /*\n * - multi-line property\n * - must NOT decode value\n * \n * example: title*2=\"isn't it!\"\n */\n list($key, $value) = explode($delimiter, $item, 2);\n } elseif (preg_match(\"/^{$ci_token}{$delimiter}/i\", $item)) {\n /*\n * - single-line property\n * - must NOT decode value\n * \n * example: title=myTitle\n */\n list($key, $value) = explode($delimiter, $item, 2);\n } else {\n /*\n * Doesn't match!\n */\n continue;\n }\n\n /*\n * remove trailing / leading:\n * - spaces \n * - quotes\n * - double quotes\n * from $value\n */\n $value = trim($value);\n\n if (strlen($value) > 2 && substr($value, 0, 1) == \"'\" && substr($value, -1) == \"'\") {\n $value = trim($value, \"'\");\n } elseif (strlen($value) > 2 && substr($value, 0, 1) == \"\\\"\" && substr($value, -1) == \"\\\"\") {\n $value = trim($value, \"\\\"\");\n }\n\n /*\n * Init header value to empty string (if needed) \n */\n if (strlen($header_value) == 0) {\n $header_value = '';\n }\n\n $header_value .= $value;\n }\n }\n\n return $header_value;\n }", "public function getHeader($header)\n {\n foreach ($this->headers as $key => $value)\n {\n if (str_replace('-', '_', strtolower($key)) == str_replace('-', '_', strtolower($header)))\n {\n return $value;\n }\n }\n }", "public function getHeader($header) {\n\n $normalized = strtolower($header);\n\n if (isset($this->headers[$normalized])) {\n return $this->headers[$normalized]['value'];\n }\n\n return '';\n\n }", "public function getValueForHeader($header)\n {\n switch ($header) {\n case '#':\n return $this->id;\n case 'Autor':\n return $this->author->name;\n case 'Título':\n if (file_exists($this->zip_file)) {\n $route = route('books.download', ['id' => $this->id]);\n return \"<a href=\\\"{$route}\\\" target=\\\"_blank\\\">{$this->title}</a>\";\n } else {\n return $this->title;\n }\n case 'Subtítulo':\n return $this->subtitle;\n case 'Preço':\n return $this->price;\n case 'Categorias':\n return $this->formCategoriesNameAttribute();\n // return $this->categories()->pluck('name');\n }\n }", "public function getHeader(string $header): string;", "public function getHeader($name) {\r\n\t\t$name = $this->_normalizeHeader ( $name );\r\n\t\tforeach ( $this->headers as $header ) {\r\n\t\t\tif ($header ['name'] == $name) {\r\n\t\t\t\treturn $header ['value'];\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function get($header)\n {\n }", "protected function getHeader($header)\n {\n $this->initialize();\n $header = str_replace('-','_',$header);\n return isset($this->parsed['headers'][$header]) ? $this->parsed['headers'][$header] : null;\n }", "public function getHeader($header)\n {\n return isset($this->headers[$header]) ? $this->headers[$header] : null;\n }", "public function get_header() {\n\t\tif (!isset($this->header)) {\n\t\t\t$this->get_array();\n\t\t}\n\t\treturn $this->header;\n\t}", "public function getHeader();", "public function getHeader();", "public function getHeader();", "public function getHeader(){\n\t\treturn $this->header;\n\t}", "function GetHeader() {\n return ($this->ses['response']['header']);\n }", "public function getHeader($name) {\n if (!$this->headers->hasHeader($name)) {\n return null;\n }\n\n $header = $this->headers->getHeader($name);\n\n if (!is_array($header)) {\n return $header->getValue();\n }\n\n $values = array();\n foreach ($header as $h) {\n $values[] = $h->getValue();\n }\n\n return $values;\n }", "public function pickOne( $header )\r\n\t{\r\n\t\tif( is_array( $header ) ) {\r\n\t\t\treturn $header[0];\r\n\t\t}\r\n\t\treturn $header;\r\n\t}", "public function getHeader($headerKey);", "function get_header()\n\t{\n\t\treturn $this->header;\n\t}", "function getHeader()\n\t{\n\t\treturn $this->header;\n\t}", "public function getHeader() {\n return $this->header;\n }", "public function getHeader()\n\t{\n\t\treturn $this->header;\n\t}", "public function getHeader ()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function GetHeader()\n {\n return $this->HeaderName;\n }", "public function getHeader() {\n return $this->Header;\n }", "public function getHeader() {\r\n return $this->__header;\r\n }", "public function getHeader($header)\n {\n return $this->wrapped->getHeader($header);\n }", "public function getHeader()\n {\n return $this->Header;\n }", "public function offsetGet($offset)\n {\n return $this->headers[$offset];\n }", "private function get_header_value_id_by_header_value($header_value) {\n\n $query = \"SELECT id \"\n . \"FROM dbmail_headervalue \"\n . \"WHERE headervalue = '{$this->dbmail->escape($header_value)}' \"\n . \"LIMIT 1\";\n\n $res = $this->dbmail->query($query);\n $row = $this->dbmail->fetch_assoc($res);\n return (is_array($row) && array_key_exists('id', $row) ? $row['id'] : FALSE);\n }", "public function getHeader()\n {\n return isset($this->header) ? $this->header : null;\n }", "public function getHeader()\n {\n return isset($this->header) ? $this->header : null;\n }", "public function getHeader($headerName);", "function getHeader( $headername )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"getHeaderName( $headername )\\n\";\r\n\t\treturn $this->responseHeaders[$headername];\r\n\t}", "public static function getHeader()\n {\n return self::$_header;\n }", "function getHeader()\n {\n return (string) $this->_sHeader;\n }", "function getHeader()\n {\n return (string) $this->_sHeader;\n }", "public static function getHeader($header)\n {\n $headers = static::getHeaders();\n $header = strtolower($header);\n\n if (true !== array_key_exists($header, $headers)) {\n return null;\n }\n\n return $headers[$header];\n }", "function getresponseheader($header = false){\n $headers = $this->getLastResponseHeaders();\n foreach ($headers as $head){\n if ( is_integer(strpos ($head, $header) )){\n $hstart = strpos ($head, \": \");\n $head = trim(substr($head,$hstart+2,100));\n return $head;\n }\n }\n }", "public function getHeader()\n {\n return $this->content['header'];\n }", "public function getResponseHeader($header)\n {\n if (!$this->response) {\n throw new FlowException('You have to call the request in order to obtain the response');\n }\n\n if (!$this->hasResponseHeader($header)) {\n return null;\n }\n\n return $this->response->getHeader($header)[0];\n }", "public function header($key)\n {\n if (isset($this->headers[$key])) {\n return $this->headers[$key];\n }\n return null;\n }", "public static function getHeaderValue($header, $directive) {\n preg_match(\"#[\\r\\n]\" . $directive . \":(.*)[\\r\\n\\;]# Ui\", $header, $match);\n\n if (isset($match[1]) && trim($match[1]) != \"\") {\n return trim($match[1]);\n } else\n return null;\n }", "public function get_header() {\n $this->do_header();\n return $this->c_header;\n }", "public function getHeader($header, $default = NULL) {\n\n\t\t\tif(in_array((string)$header, array_keys($this->headers))) {\n\t\t\t\treturn $this->headers[(string)$header];\n\t\t\t} else return $default;\n\n\t\t}", "public function getHeader(): string\n {\n return $this->header;\n }", "public function getHeader()\r\n {\r\n return $this->headers;\r\n }", "public function getHeader()\n {\n return $this->httpHeader;\n }", "public function header() {\n return $this->header;\n }", "public function getHeaderValue();", "private function getParamHeader()\n {\n $header = $this->getMenuParams()->get( 'header', '' );\n return (string)$header;\n }", "public function getHeader($key){\n $key = FW_String::strtolower($key);\n \n if($this->getHeader($key)){\n return $this->header[$key];\n }\n \n return null;\n }", "public function getHeader($key) {\n if (isset($this->httpHeaders[$key])) {\n return $this->httpHeaders[$key];\n }\n return null;\n }", "public function getHeader($header)\n {\n // Try to get it from the $_SERVER array first\n $temp = 'HTTP_' . strtoupper(str_replace('-', '_', $header));\n if (isset($_SERVER[$temp])) {\n return $_SERVER[$temp];\n }\n\n // This seems to be the only way to get the Authorization header on\n // Apache\n if (function_exists('apache_request_headers')) {\n $headers = apache_request_headers();\n if (isset($headers[$header])) {\n return $headers[$header];\n }\n $header = strtolower($header);\n foreach ($headers as $key => $value) {\n if (strtolower($key) == $header) {\n return $value;\n }\n }\n }\n\n return false;\n }", "public function getHeaderValue($column)\n {\n $value = Lang::get($column->label);\n\n /**\n * @event backend.list.overrideHeaderValue\n * Overrides the column header value in a list widget.\n *\n * If a value is returned from this event, it will be used as the value for the provided column.\n * `$value` is passed by reference so modifying the variable in place is also supported. Example usage:\n *\n * Event::listen('backend.list.overrideHeaderValue', function($listWidget, $column, &$value) {\n * $value .= '-modified';\n * });\n *\n * Or\n *\n * $listWidget->bindEvent('list.overrideHeaderValue', function ($column, $value) {\n * return 'Custom header value';\n * });\n *\n */\n if ($response = $this->fireSystemEvent('backend.list.overrideHeaderValue', [$column, &$value])) {\n $value = $response;\n }\n\n return $value;\n }", "public function header($name) {\n return isset($this->headers[$name])? $this->headers[ucfirst($name)] : null;\n }", "public function seeHeader($header, $value = NULL)\n {\n $headers = $this->getActiveClient()->getInternalResponse()->getHeaders();\n\n $this->assertArrayHasKey($header, $headers);\n\n if ($value !== NULL)\n {\n \t$this->assertEquals($headers[$header], $value);\n }\n }", "public function header($name, $value = null)\n {\n if (!is_null($value)) {\n $this->headers->set($name, $value);\n }\n\n return $this->headers->get($name);\n }", "public function value($key){\n if (isset($this->data[$key])) return $this->data[$key];\n else return $key;\n }", "#[Pure]\n public function getHeader($header) {}", "public function getHeader() {\n }", "public function get($header): Header\n {\n if (!$this->has($header)) {\n $this->set($header, new Header());\n }\n\n return $this->headers[$header];\n }", "public function header()\n\t{\n\t\t$header = Request::current()->headers();\n\t\treturn $header;\n\t}", "public function getHeader($header)\n {\n $name = $this->headerName($header);\n if (isset($this->_headers[$name])) {\n return $this->_headers[$name];\n }\n\n return false;\n }", "private function _get_value_line($p_header_val): string {\n if (is_string($p_header_val)) {\n return $p_header_val;\n }\n if (!is_array($p_header_val)) {\n return '';\n }\n\n $options = [];\n\n foreach ($p_header_val as $key => $value) {\n if (is_string($key) && !is_array($value)) {\n $options[] = $key.'='.$value;\n } elseif (is_array($value)) {\n $key = key($value);\n $options[] = $key.'='.$value[$key];\n } elseif (is_numeric($key)) {\n $options[] = $value;\n }\n }\n\n return implode(', ', $options);\n }", "public function header($key, $value=null)\n {\n $key = trim((string) $key);\n\n if (!is_null($value)) {\n $value = trim((string) $value);\n $this->_array[\"headers\"][$key] = $value;\n }\n\n if (!isset($this->_array[\"headers\"][$key])) {\n return null;\n }\n\n return $this->_array[\"headers\"][$key];\n }", "public function getHeader($name, $treatAsSingle = true)\n {\n $value = null;\n\n if (!empty($this->headers[$name])) {\n if ($treatAsSingle) {\n $value = reset($this->headers[$name]);\n } else {\n $value = $this->headers[$name];\n }\n }\n\n return $value;\n }", "function curl_header(&$curl, $header) {\n return curl_headers($curl, [$header]);\n}", "public function offsetGet($key):mixed\n {\n return ($this->offsetExists($key))? $this->getHeader($key):static::throw($key);\n }", "public function getHeader($header)\n {\n // Try to get it from the $_SERVER array first\n $temp = 'HTTP_' . strtoupper(str_replace('-', '_', $header));\n if(!empty($_SERVER[$temp])) return $_SERVER[$temp];\n\n // This seems to be the only way to get the Authorization header on Apache\n if (function_exists('apache_request_headers'))\n {\n $headers = apache_request_headers();\n if(!empty($headers[$header])) return $headers[$header];\n }\n return null;\n }", "public function getHeader($parsedEmail, $header) {\n\t\t\tif (isset($parsedEmail[\"data\"][\"attributes\"][\"headers\"][$header])) {\n\t\t\t\treturn $parsedEmail[\"data\"][\"attributes\"][\"headers\"][$header];\n\t\t\t}\n\t\t\treturn \"\";\n\t\t}", "public function getHeader($name)\r\n {\r\n $name = strtolower($name);\r\n if ($this->hasHeader($name)) {\r\n return $this->headers[$name];\r\n }\r\n return NUll;\r\n }", "public function getHeader($header)\n {\n if ($this->isHeaderSet($header))\n {\n return $this->headers[$header];\n }\n \n throw new HeaderAbsentException(\"The header '$header' is not present\");\n }", "public function retrieveTokenFromHeader($token)\n {\n\n $index = 1;\n\n $ttoken = explode(\" \", $token);\n\n return $ttoken[$index];\n\n }", "protected function getHeader($headers, $header)\n {\n return empty($headers[$header]) ? '' : $headers[$header];\n }", "public function getHeader($name)\n {\n if (isset($this->headers[$name])) {\n return $this->headers[$name];\n }\n }", "public function getHeader($key,$default_val = null){\n return $this->headers->set($key,$default_val);\n }", "public function getHeader() {\n return (isset($this->header)) ? $this->header : '';\n }", "private function getValue($signature)\n {\n $items = explode(\",\", $signature);\n\n foreach ($items as $item) {\n $itemParts = explode(\"=\", $item, 2);\n if ($itemParts[0] == 'v') {\n return $itemParts[1];\n }\n }\n\n throw new SignatureVerificationException(\n \"Unable to extract value from signature\"\n );\n }", "public function getHeaderValue()\n {\n }", "public function requestheader() {\n return $this->info['request_header'];\n }", "public function getValue(string $value): mixed;", "function getHeader($header, $loc = '') {\n\tglobal $sql;\n\t$sql = \"SELECT header FROM \" . $loc . \"snapshot_headers WHERE id=\".$header;\n\t$query = mysql_query($sql);\n\tcheckDBError($sql);\n\tif ($result = mysql_fetch_array($query))\n\t\treturn $result['header'];\n\treturn \"\";\n}", "public function get($val)\n {\n return $this->userInfo->{$val};\n }", "public function getValue() {\n\t\treturn $this->data[\"value\"];\n\t}", "public function getHeader(string $name, mixed $default = null): mixed;", "public function get_value() {\n\t\t$row = $this->get_row();\n\t\tif ($row) {\n\t\t\treturn current($row);\n\t\t}\n\t}", "public function getHttpHeader($header)\n\t\t{\n\t\t\t//are we using PHP-flavored headers?\n\t\t\tif (strpos($header, '_') === false) {\n\t\t\t\t$header = str_replace('-', '_', $header);\n\t\t\t\t$header = strtoupper($header);\n\t\t\t}\n\n\t\t\t//test the alternate, too\n\t\t\t$altHeader = 'HTTP_' . $header;\n\n\t\t\t//Test both the regular and the HTTP_ prefix\n\t\t\tif (isset($this->httpHeaders[$header])) {\n\t\t\t\treturn $this->httpHeaders[$header];\n\t\t\t} elseif (isset($this->httpHeaders[$altHeader])) {\n\t\t\t\treturn $this->httpHeaders[$altHeader];\n\t\t\t}\n\t\t}", "public function getHeader(string $name): string;", "public function getHeader($name);", "protected function value()\n {\n $value = $this->keyVal();\n return reset($value);\n }", "public function getHeader(string $name);" ]
[ "0.72550374", "0.718386", "0.70529735", "0.6841788", "0.6648599", "0.6594048", "0.6494401", "0.6383101", "0.635595", "0.6276385", "0.6242303", "0.6170454", "0.6170256", "0.6101197", "0.6101197", "0.6101197", "0.6080047", "0.6035448", "0.6028599", "0.60244745", "0.60108674", "0.60082126", "0.6000277", "0.59887433", "0.59741306", "0.59700793", "0.59425366", "0.59425366", "0.59425366", "0.59425366", "0.59425366", "0.5939824", "0.59343815", "0.59331876", "0.5917613", "0.58955204", "0.5890076", "0.5883048", "0.5862724", "0.5862724", "0.58603954", "0.58416224", "0.5834271", "0.5807045", "0.5807045", "0.57685673", "0.5747003", "0.57439196", "0.5707701", "0.5707364", "0.5705284", "0.5703878", "0.5702949", "0.56720287", "0.5648975", "0.56452894", "0.5640509", "0.5640251", "0.56134504", "0.56013113", "0.55975765", "0.5587112", "0.5586633", "0.5582626", "0.5580627", "0.55741173", "0.5554278", "0.5541668", "0.5516481", "0.54962903", "0.5489828", "0.548643", "0.5477474", "0.54769933", "0.54761523", "0.54753256", "0.54610544", "0.54565036", "0.5438122", "0.54120344", "0.5410533", "0.54029036", "0.53999126", "0.5389823", "0.5389151", "0.5365421", "0.53620934", "0.5359466", "0.5357458", "0.53558344", "0.53495324", "0.53380275", "0.53329366", "0.5326992", "0.5314526", "0.53116924", "0.5306491", "0.53060675", "0.53059024", "0.5296811" ]
0.70371395
3
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/
function __construct(){ parent::__construct(); $this->load->helper('url'); $this->load->library('pagination'); $this->load->model('AdminUser'); if(!$this->session->userdata('username')){ redirect('../'); } elseif ($this->session->userdata('level') == "user") { redirect('dashUser'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [\n\t\t// \t\"name\" => \"Laura\",\n\t\t// \t\"colours\" => [\"red\", \"green\", \"blue\"]\n // ]);\n \n\t\t$this->showRouteParams();\n\t\t// echo \"Hello, World!\";\n }", "public function index()\n\t{\n\t\t//Default view\n\t\t$this->load->view('index.html');\n\t}", "function index() {\n\n // This page cannot be accessed without providing a page\n // the routes.php file will not allow the page to be accessed\n // $route['pages/(:any)'] = 'pages/view/$';\n redirect('/', 'refresh');\n\n }", "public function Index()\n\t{\n\t\t$this->views->SetTitle('Index Controller');\n\t\t$this->views->AddView('index/index.tpl.php', array(),'primary');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('default/index');\n\t}", "public function index() {\n\t\t$this->display('index');\n\t}", "public function index()\n\t{\t\n\n\t\t$this->load->view('welcome_message');\n\t}", "public function indexAction()\n {\n $arr = [\n 'title' => 'Welcome',\n 'data' => [\n 'name' => 'PHP FRAMEWORK',\n ]\n ];\n View::renderTemplate('Welcome/index.html', $arr);\n }", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n }", "public function show_index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function Index()\n {\n $this->standardView('Index');\n }", "public function index()\n {\n return view('main.welcome');\n }", "public function index()\n {\n // return view('welcome');\n }", "public function index()\n {\n $this->load->view('index');\n }", "public function index()\n {\n // return view('welcome');\n \n }", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function index()\n\t{\n\t\techo \"Nothing !\";\n\t}", "public function index() {\n \n return view('welcome');\n }", "public function index()\n {\n return view('pages.welcome');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function Index()\n {\n \treturn view(\"index\");\n\t}", "public function index()\n {\n\t\t/*$this->layout->setTitle('Welcome to our Blog');\n\t\t$this->layout->showView('welcome/about.php');*/\n\t\techo 'hello I\\'m using codeigniter';\n }", "public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\treturn view('pages/home');\n\t}", "public function index()\n {\n return \"INDEX PAGE\";\n }", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "function index() {\n \n parent::index();\n\n\t\t$data['user_id'] = $this->tank_auth->get_user_id();\n\t\t$data['username'] = $this->tank_auth->get_username();\n\t\t$data['main_content_view'] = $this->load->view('welcome', $data, true);\n $this->render_template($data);\n\t}", "public function index()\n {\n SEOMeta::setTitle('Trusted Mortgage & Remortgage Solutions In UK - SmartMortgages UK');\n SEOMeta::setDescription('Home Page Description: For competitive mortgage and remortgage quotes around the UK at affordable rates, speak to one of our expert credit consultants and get a mortgage. For more visit us today.');\n\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->title = 'My Index Action';\n\n\t\treturn new View('basic/index');\n\t}", "public function index()\n\t{\n\t\t$data['title'] = 'Home | Welcome to AEY';\n\t\t$data ['view_page'] = 'homepage';\n\n\t\t$this->load->view('site', $data);\n\t}", "public function index()\n {\n\n return view('welcome');\n\n }", "public function actionIndex(){ \n $this->view(\"index.php\");\n }", "public function index() {\n $this->registry->template->module = 'welcome';\n \n /*** load the index template ***/\n $this->registry->template->show('index');\n }", "public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}", "public function index()\n {\n return view('front.welcome');\n }", "public function index()\n\t{\n\t\treturn $this->traces();\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\t$this->loadViews(\"index\");\n\t}", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('home/home');\n\t}", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index()\r\n\t{\r\n\t\techo \"index\";\r\n\t}", "public function index()\n\t{\n\t\t$this->twig->display('welcome/index.html', []);\n\t}", "public function Index() {\n $this->Display();\n }", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function index()\n {\n $title = 'Welcome Page';\n return view($this->view . '.home', compact('title'));\n }", "public function index()\n\t{\n\t\t//\n\t\techo'index';\n\t}", "public function index() {\n $this->getView('navigation', array('pagename' => 'Welcome'));\n $this->getView('welcome');\n $this->getView('footer');\n }", "public function home()\n\t{\n\t\t$this->load->view('index_view');\n\t}", "public function index()\n {\n return view(\"home\");\n }", "function index() {\n $this->renderView(\"index\");\n }", "function index()\r\n\t{\r\n\t\t$this->view(); \r\n\t}", "public function index()\n\t{\n\t\treturn view('index');\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n\n\n\n return view('welcome');\n }", "public function index() {\n\t\t$page = Page::getInstance();\n\t\t$session = Session::getInstance();\n\t\t$page->setPageTitle('Method index notfound');\n\t\t$session->setFlash('Chaque controller doit avoir une m&eacute;thode index', 'error');\n\t}", "public function index()\r\n\t{\r\n\t\t//\r\n\t}", "public function index() {\n\t\t// render the view (/view/main/index.php)\n\t\t$this->view->render(\"main\", \"index\");\n\t}", "public function index()\n {\n return View(\"pages.home\");\n }", "public function index()\n {\n // Nothing to do\n }", "public function index(){\n return view('welcome');\n }", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}" ]
[ "0.7654489", "0.7412331", "0.73948133", "0.7315942", "0.72259814", "0.72259814", "0.7188918", "0.71641713", "0.714988", "0.7144209", "0.7106311", "0.7076066", "0.70737547", "0.70394766", "0.702776", "0.702776", "0.702776", "0.702776", "0.702776", "0.69714797", "0.6966663", "0.6946141", "0.6946141", "0.6946141", "0.6946141", "0.6946141", "0.6946141", "0.6946141", "0.6946141", "0.6946141", "0.6946141", "0.6946141", "0.6946141", "0.6946141", "0.69298625", "0.6924246", "0.6909921", "0.68990177", "0.68925", "0.6873907", "0.6856508", "0.68547875", "0.683725", "0.68013406", "0.68013406", "0.68007606", "0.67939454", "0.6788755", "0.6765774", "0.6765774", "0.6765774", "0.6765774", "0.6765774", "0.6765774", "0.6765774", "0.6765774", "0.6765774", "0.6765774", "0.6765774", "0.67632866", "0.6762711", "0.67588514", "0.67588514", "0.6750238", "0.67487144", "0.67457974", "0.6740939", "0.6736662", "0.67279446", "0.67159903", "0.6711807", "0.67096907", "0.6702782", "0.66981936", "0.66903543", "0.66736597", "0.66616577", "0.6659516", "0.66497034", "0.6629285", "0.66197956", "0.6611586", "0.66031384", "0.65970904", "0.65923166", "0.65920943", "0.65837", "0.65743506", "0.65731853", "0.65721244", "0.6552507", "0.6545818", "0.6543639", "0.65425116", "0.6540693", "0.6540274", "0.651574", "0.6514039", "0.6514039", "0.6514039", "0.6514039" ]
0.0
-1
ObjetBDD Fonction d'initialisation de la classe Modifier les parametres generaux de la classe si necessaire Dans la classe heritee, renseigner systematiquement les valeurs suivantes : $table : nom de la table en base de donnees decrire les colonnes ($colonnes => array ($key => array ("type"=>1, "requis"=>1))
function __construct(PDO &$p_connection, array $param = array()) { $this->connection = $p_connection; if (!is_array($this->paramori)) { $this->paramori = $param; } if (!is_array($this->param)) { $this->param = $param; } /* * configuration de la connexion */ $this->typeDatabase = $this->connection->getAttribute($p_connection::ATTR_DRIVER_NAME); $this->connection->setAttribute($p_connection::ATTR_DEFAULT_FETCH_MODE, $p_connection::FETCH_ASSOC); /* * Preparation des tableaux intermediaires a partir du tableau $colonnes */ if (is_array($this->colonnes)) { $this->keys = array(); $nbcle = 0; foreach ($this->colonnes as $key => $value) { /* * Preparation du tableau des cles */ if ($value["key"] == 1 || $value["cle"] == 1) { $this->keys[] = $key; $nbcle++; $this->cle = $key; } /* * Affectation de l'attribut parent */ if (strlen($value["parentAttrib"]) > 0) { $this->parentAttrib = $key; } } /* * Analyse de la cle */ if ($nbcle < 2) { $this->cleMultiple = 0; } else { $this->cleMultiple = 1; $this->cle = ""; } } /* * Integration des parametres utilisateur */ $this->setParam($param); /* * Integration du codage UTF8 */ if ($this->UTF8) { if ($this->typeDatabase == "mysql") { $this->connection->exec("set names 'utf8'"); } else { $this->connection->exec("SET CLIENT_ENCODING TO UTF8"); } } /* * Definition du mode de gestion des erreurs */ if ($this->debug_mode > 0) { $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } else { $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); } /* * Ajout du identifier quote character */ if ($this->typeDatabase == 'pgsql') { $this->quoteIdentifier = '"'; } elseif ($this->typeDatabase == 'mysql') { $this->quoteIdentifier = '`'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initTable(){\n\t\t\t\n\t\t}", "function __construct($id=\"\") {\n //echo \"ciao\";\n \n $this->setNometabella(\"localita\");\n $this->tabella= array(\"nome\"=>\"\",\"provincia\"=>\"\",\"cap\"=>\"\",\"codice\"=>\"\",\"solodestinazione\"=>\"\");\n parent::__construct($id);\n}", "function mesabonnes_declarer_tables_objets_sql($tables){\r\n\t$tables['spip_mesabonnes'] = array(\r\n\t\t/* Declarations principales */\r\n\t\t'table_objet' => 'mesabonnes',\r\n\t\t'table_objet_surnoms' => array('mesabonnes'),\r\n\t\t'type' => 'mesabonnes',\r\n\t\t'type_surnoms' => array('mesabonnes'),\r\n\r\n\t\t/* La table */\r\n\t\t'field'=> array(\r\n\t\t\t\t\"id_abonne\" \t=> \"bigint(21) NOT NULL auto_increment\",\r\n\t\t\t\t\"nom\"\t=> \"text DEFAULT '' NOT NULL\",\r\n\t\t\t\t\"email\"\t=> \"text DEFAULT '' NOT NULL\",\r\n\t\t\t\t\"lang\"\t=> \"tinytext DEFAULT '' NOT NULL\",\r\n\t\t\t\t\"date_modif\"\t=> \"datetime DEFAULT '0000-00-00 00:00:00' NOT NULL\",\r\n\t\t\t\t\"liste\"\t=> \"text DEFAULT '' NOT NULL\", // pas utilise pour l'instant, gestion multi-liste ?\r\n\t\t\t\t\"statut\"\t=> \"varchar(6) DEFAULT '0' NOT NULL\"),\r\n\t\t'key' => array(\r\n\t\t\t\"PRIMARY KEY\" => \"id_abonne\",\r\n\t\t),\r\n\t\t'principale' => 'oui'\r\n\r\n\t);\r\n\r\n\r\n\treturn $tables;\r\n}", "public function __construct()\n\n {\n parent::__construct();\n\n $this->tablename=\"etat_compte\";\n $this->ide = 'null' ;\n $this->idfa = 0 ;\n $this->idmouv = 0 ;\n $this->depense = 0 ;\n $this->gains = 0 ;\n $this->stock = 0 ;\n $this->datee = date(\"\") ;\n }", "private function _set_table()\n\t{\n\t\t$dossier = $this->config->item('dossier');\n\t\tif($dossier === false)\n\t\t{\n\t\t\tlog_message('info', '\"Dossier\" params is not set');\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_dossier = $dossier;\n\t\t\t$this->_table = $this->_dossier . '.' . $this->_table;\n\t\t}\n\t}", "protected function _initsTable() {}", "public function __construct($tabela) {\n $this->tabela = $tabela;\n parent::__construct();\n }", "public function __construct()\n\n {\n parent::__construct();\n\n $this->tablename=\"produit\";\n $this->idp = 'null' ;\n $this->idc = 0 ;\n $this->id_cat = 0 ;\n $this->desi = \"\" ;\n $this->photo = \"\" ;\n $this->prixa = 0 ;\n $this->prixv = 0 ;\n $this->qnt = 0 ;\n $this->composer = 0 ;\n $this->ftech = \"\" ;\n $this->flag = 0 ;\n }", "static function init($table = null){\n\t\tif(static::$object_inited){\n\t\t\treturn;\n\t\t}\n if(!static::$db){\n static::$db = DB::get();\n }\n\t\tif($table){\n\t\t\tstatic::$table = $table;\n\t\t}else{\n\t\t\t$class = get_called_class();\n\t\t\tstatic::$table = strtolower(preg_replace('/.+\\\\\\/si', '', $class).'s');\n\t\t}\n self::initFields();\n\t\tstatic::$object_inited = true;\n\t}", "function setInstancia($tabla){\r\n\t\t//DB_DataObject::debugLevel(1);\r\n\t\t//Crea una nueva instancia de $tabla a partir de DataObject\r\n\t\t$objDBO = DB_DataObject::Factory($tabla);\r\n\t\t\r\n\t\t$campos = $objDBO->table();\r\n\t\tunset($campos[\"id\"]);\r\n\t\tunset($campos[\"fecha\"]);\r\n\t\t\r\n\t\t//Asigna los valores\r\n\t\tforeach($campos as $key => $value){\r\n\t\t\t$objDBO->$key = utf8_decode($this->$key);\r\n\t\t}\r\n\t\t$objDBO->fecha = date(\"Y-m-d H:i:s\");\r\n\t\t$objDBO->find();\r\n\t\tif($objDBO->fetch()){\r\n\t\t\t$ret = $objDBO->id;\r\n\t\t}else{\r\n\t\t\t$ret = $objDBO->insert();\r\n\t\t}\r\n\t\t\r\n\t\t//Libera el objeto DBO\r\n\t\t$objDBO->free();\r\n\t\t\r\n\r\n\t\treturn ($ret);\r\n\t}", "private function __construct($table, $data = array()) {\n $temp = array_merge(array('data' => array()), $data);\n\n $this->set_table_name($table);\n $this->load_columns_information();\n $this->new_register = true;\n\n\n // Carrega os dados iniciais, caso $temp['data'] esteja definido\n if(sizeof($temp['data']) > 0)\n $this->load_data($temp['data']);\n }", "public function __construct()\n\t\t{\n\t\t\t$this->_db_table = new Application_Model_DbTable_TourType();\n\t\t}", "public function __Construct($table){\n \n //dbconnect obj instance\n //set the connection obj on $conn property\n $db=new DbConnect;\n $this->conn=$db->connect();\n //set table name that use in the query\n $this->table=$table;\n }", "function __construct($table_name, $class_name) {\n parent::__construct($table_name, $class_name, \"dictionary_table_text\", \"dictionary_table_text\");\n $this->foreigen_keys = array();\n $this->select_display_field = \"person_type_name\";\n $this->fields_prev_text_array = array(\"person_type_name\"=>\"Наименование должности\");\n $this->hidden_keys = array(\"id\"=>\"hidden\", \"code\"=>\"hidden\");\n }", "protected function init()\r\n {\r\n $this->table_name = 'libelles';\r\n $this->table_type = 'system';\r\n $this->table_gateway_alias = 'Sbm\\Db\\SysTableGateway\\Libelles';\r\n $this->id_name = array(\r\n 'nature',\r\n 'code'\r\n );\r\n }", "public function __construct($table)\n {\n $this->table=$table;\n }", "public function testSetInitTable() {\n\n $obj = new ParamEtiquettes();\n\n $obj->setInitTable(\"initTable\");\n $this->assertEquals(\"initTable\", $obj->getInitTable());\n }", "function __construct($table){\n\t\tparent::__construct($table);\n\t}", "public function init()\r\n {\r\n $dbTable = new Application_Model_DbTable_Fournisseur();\r\n $this->mapper = new Application_Model_Mapper_Fournisseur($dbTable);\r\n }", "function __construct($table, $param = '*')\n {\n $this->table = $table;\n $this->param = $param;\n $this->where = '';\n $this->order = '';\n $this->having= '';\n $this->join = [];\n $this->setOperations = [];\n }", "function __construct() {\r\n\t\t\r\n\t\t$this->conexaoDB=new DB();\r\n\t\t$this->tabela=\"retirante\";\r\n\t\r\n\t}", "public function __construct($numero = NULL, $nom = NULL, $description = NULL, $type = NULL, $temperature = NULL, $duree=NULL, $nbre_donnee=NULL,$etat=NULL ) {\n // valeurs nulles si pas de passage de parametres\n if (!is_null($numero)) {\n $this->numero= $numero;\n $this->nom = $nom;\n $this->description = $description;\n $this->type = $type;\n $this->temperature = $temperature;\n $this->duree = $duree;\n $this->nbre_donnee = $nbre_donnee;\n $this->etat = $etat;\n \n \n \n \n }\n }", "function __construct(){\n\t\t\t$this->model = new model(); //variabel model merupakan objek baru yang dibuat dari class model\n\t\t\t$this->model->table=\"tb_dosen\";\n\t\t}", "public function genTable($table) {\n $this->table = $table;\n $my_class = new $table();\n $class_vars = get_class_vars(get_class($my_class));\n # remove everything that begins with _, that is not _meta or _model_meta\n # - these values creep in from SalamaAccessTable that Model extends\n $ok = array('_meta', self::$meta_model);\n foreach ($class_vars as $k => $v) {\n if (substr($k, 0, 1) == '_') {\n if (!in_array($k, $ok)) {\n unset($class_vars[$k]);\n }\n }\n }\n $fields = array();\n # PROCESS FIELD VARS\n foreach ($class_vars as $k => $v) {\n # @TODO process _meta properly\n if ($k == '_meta') {\n $metaSettings = $this->parseSettings($v);\n if (isset($metaSettings['tablename'])) {\n $this->settingsAll[$this->table][self::$meta]['tablename'] = $metaSettings['tablename'];\n }\n }\n # do not include _meta_model outside Model\n if ($k == '_meta' || ($k == self::$meta_model && $table != 'Model')) {\n continue;\n }\n $res = $this->processVars($k, $v);\n $fields[] = $res;\n }\n\n # PROCESS PK\n # check if primaryKey was defined in Model\n $hasCustomPk = false;\n foreach ($this->settingsAll[$this->table] as $k => $v) {\n foreach ($v as $k2 => $v2) {\n if (stripos($k2, 'primarykey') !== false) {\n $hasCustomPk = true;\n $pk = $v;\n $pkName = $k;\n }\n }\n }\n $this->log(\"PK status: (int) \" . intval($hasCustomPk) . \" hasCustomPk: \" . $hasCustomPk);\n if ($hasCustomPk) {\n $res = $this->processVars($pkName, $pk);\n $sql = $res['sql'];\n } else {\n $sql = \"`id` int(11) AUTO_INCREMENT NOT NULL PRIMARY KEY,\";\n $pk = 'type=IntegerField,maxLength=11,primaryKey=true,autoIncrement=true';\n $pkName = 'id';\n $this->log($sql);\n }\n // - save pk\n $this->settingsAll[$this->table][self::$meta][$this->primaryKey]['custom'] = intval($hasCustomPk);\n $this->settingsAll[$this->table][self::$meta][$this->primaryKey]['sql'] = $sql;\n $settings = $this->processVars($pkName, $pk);\n $this->settingsAll[$this->table][self::$meta][$this->primaryKey]['settings'] = $settings;\n $this->settingsAll[$this->table][self::$meta][$this->primaryKey]['name'] = $pkName;\n if (!$hasCustomPk) {\n $this->settingsAll[$this->table][self::$meta]['create'][] = $settings;\n }\n // - save fields\n foreach ($fields as $the => $field) {\n $this->settingsAll[$this->table][self::$meta]['create'][] = $field;\n }\n # field names container\n foreach ($this->settingsAll[$this->table][self::$meta]['create'] as $k => $v) {\n # purely field names (includes belongsTo)\n if (empty($v['val']['relation']) && !in_array($v['val']['name'], $ok)) {\n $this->settingsAll[$this->table][self::$meta]['fields'][] = $v['val']['name'];\n }\n }\n # relations names container\n foreach ($this->settingsAll[$this->table][self::$meta]['create'] as $k => $v) {\n # hasOne, hasMany\n if (!empty($v['val']['relation']) && !in_array($v['val']['name'], $ok)) {\n $this->settingsAll[$this->table][self::$meta]['relations'][] = $v['val']['name'];\n }\n }\n }", "function simplecal_declarer_tables_objets_sql($tables) {\n\t$fields = array(\n\t\t\"id_evenement\" => \"bigint(21) NOT NULL auto_increment\",\n\t\t\"id_secteur\" => \"bigint(21) NOT NULL DEFAULT '0'\",\n\t\t\"id_rubrique\" => \"bigint(21) NOT NULL DEFAULT '0'\",\n\t\t\"id_trad\" => \"bigint(21) NOT NULL DEFAULT '0'\",\n\t\t\"id_objet\" => \"bigint(21) NOT NULL DEFAULT '0'\",\n\t\t\"type\" => \"varchar(25) NOT NULL\",\n\t\t\"titre\" => \"varchar(255) NOT NULL\",\n\t\t\"date_debut\" => \"datetime NOT NULL DEFAULT '0000-00-00 00:00:00'\",\n\t\t\"date_fin\" => \"datetime NOT NULL DEFAULT '0000-00-00 00:00:00'\",\n\t\t\"horaire\" => \"varchar(3) NOT NULL DEFAULT 'oui'\",\n\t\t\"descriptif\" => \"text NOT NULL\",\n\t\t\"texte\" => \"text NOT NULL\",\n\t\t'lieu'\t\t\t\t=> \"text NOT NULL DEFAULT ''\",\n\t\t'adresse'\t\t\t=> \"text NOT NULL DEFAULT ''\",\n\t\t\"lien_titre\" => \"varchar(255) NOT NULL\",\n\t\t\"lien_url\" => \"varchar(255) NOT NULL\",\n\t\t\"date\" => \"datetime NOT NULL DEFAULT '0000-00-00 00:00:00'\", // creation ou publication (selon statut) \n\t\t\"statut\" => \"varchar(20) DEFAULT '0' NOT NULL\",\n\t\t\"lang\" => \"varchar(10) NOT NULL DEFAULT ''\",\n\t\t\"langue_choisie\" => \"varchar(3) NULL DEFAULT 'non'\", \n\t\t\"maj\" => \"timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\"\n\t);\n\t\n\t// champs qui possedent les cles\n\t$key = array(\n\t\t\"PRIMARY KEY\" => \"id_evenement\",\n\t\t\"KEY statut\" => \"statut\", \n\t\t\"KEY id_secteur\" => \"id_secteur\",\n\t\t\"KEY id_rubrique\" => \"id_rubrique\",\n\t\t\"KEY id_trad\" => \"id_trad\",\n\t\t\"KEY lang\" => \"lang\"\n\t);\n\t\n\t// champ 'statut'\n\t$statut = array(\n\t\t'champ'=>'statut',\n\t\t'publie'=>'publie',\n\t\t'previsu'=>'publie,prop',\n\t\t'exception'=>'statut'\n\t);\n\t\n\t// titre des statuts\n\t$statut_titres = array(\n\t\t'prepa'=>'simplecal:titre_evenement_redaction',\n\t\t'prop' => 'simplecal:titre_evenement_propose',\n\t\t'publie' => 'simplecal:titre_evenement_publie',\n\t\t'refuse' => 'simplecal:titre_evenement_refuse',\n\t\t'poubelle'=>'simplecal:titre_evenement_supprime'\n\t);\n\t\n\t$statut_textes_instituer = array(\n\t\t'prepa' => 'texte_statut_en_cours_redaction',\n\t\t'prop' => 'texte_statut_propose_evaluation',\n\t\t'publie' => 'texte_statut_publie', \n\t\t'refuse' => 'texte_statut_refuse',\n\t\t'poubelle' => 'texte_statut_poubelle'\n\t);\n\t\n\t// La Table\n\t$tables['spip_evenements'] = array(\n\t\t'type' => 'evenement',\n\t\t'principale' => 'oui',\n\t\t'field'=> $fields,\n\t\t'key' => $key,\n\t\t'titre' => 'titre, lang',\n\t\t'date' => 'date', // indique le nom du field pour le formulaires_dater_charger_dist\n\t\t'champs_editables' => array('titre', 'date_debut', 'date_fin', 'horaire', 'descriptif', 'texte', 'lieu', 'adresse', 'lien_titre', 'lien_url', 'type', 'id_objet'),\n\t\t'champs_versionnes' => array('titre', 'descriptif', 'texte', 'lieu', 'adresse', 'lien_titre', 'lien_url'),\n\t\t'rechercher_champs' => array('titre'=>8, 'descriptif'=>4, 'texte'=>2),\n\t\t'tables_jointures' => array(),\n\t\t'statut' => array($statut),\n\t\t'statut_textes_instituer' => $statut_textes_instituer,\n\t\t'statut_titres' => $statut_titres,\n\t\t'texte_retour' => 'icone_retour',\n\t\t'texte_objets' => 'simplecal:evenements',\n\t\t'texte_objet' => 'simplecal:evenement',\n\t\t'texte_modifier' => 'simplecal:icone_modifier_evenement',\n\t\t'texte_creer' => 'simplecal:icone_nouvel_evenement',\n\t\t'info_aucun_objet'=> 'simplecal:info_aucun_evenement',\n\t\t'info_1_objet' => 'simplecal:info_1_evenement',\n\t\t'info_nb_objets' => 'simplecal:info_nb_evenements',\n\t\t'texte_logo_objet' => 'simplecal:logo_evenement',\n\t\t'texte_langue_objet' => 'simplecal:titre_langue_evenement',\n\t\t'texte_changer_statut' => 'simplecal:entree_evenement_publie'\n\t);\n\t\n\treturn $tables;\n}", "function __construct() \n {\n // Creation de la table\n self::createTableIfNeeded();\n }", "public function __construct($table)\n {\n $this->table = $table;\n }", "protected function prepareTable($table){\n $date = Factory::getDate();\n\t if(empty($table->id)){\n\t $table->created = $date->toSql();\n\t }\n\t}", "public function __construct(){\n $this->table=\"usuarios\";\n parent::__construct($this->table);\n }", "public function __construct($table) {\n if(strcmp($table, \"user\") == 0){\n $this->_dbTable = new Application_Model_DbTable_User();\n }\n else{\n $this->_dbTable = new Application_Model_DbTable_Organization();\n }\n \n }", "function __construct($table_name = NULL, $data_row_name = NULL, $id_row_name = NULL){\r\n\t\t$this->Init($table_name, $data_row_name, $id_row_name);\r\n\t}", "public function __construct($table = '', $primaryKey = '') \n\t{\n\t\t$configs = include('app/config.php');\n\t\t$this->db = $configs['mysql']['db_database'];\n\n\t\tif (!$configs) {\n\t\t\tdie('ERROR:config file not exist!');\n\t\t}\n\t\t//set mysql connect\n\t\t$this->mysql = new \\mysqli(\n\t\t\t$configs['mysql']['db_host'], \n\t\t\t$configs['mysql']['db_user'], \n\t\t\t$configs['mysql']['db_pwd'], \n\t\t\t$configs['mysql']['db_database']\n\t\t);\n\n\t\t//connect error\n\t\tif ($this->mysql->connect_error) {\n\t\t\tdie('Error : ('. $this->mysql->connect_errno .') '. $this->mysql->connect_error);\n\t\t}\n\n\t\t//set charset\n\t\tmysqli_set_charset($this->mysql, $configs['mysql']['db_charset']);\n\n\t\t//fill self table and primary key\n\t\tif ($table) {\n\t\t\t$this->table = $table;\n\t\t}\n\n\t\tif ($primaryKey) {\n\t\t\t$this->primaryKey = $primaryKey;\n\t\t}\n\n\t\t//init fields\n\t\t$this->_initAllFIeld();\n\t}", "private function init() {\n\t\tlist(, $this->db, $this->table) = explode('_', get_called_class(), 3);\n\t\t$this->db = defined('static::DB') ? static::DB : $this->db;\n\t\t$this->table = defined('static::TABLE') ? static::TABLE : $this->table;\n\t\t$this->pk = defined('static::PK') ? static::PK : 'id';\n\t}", "public function __construct() {\n parent::__construct();\n $this->_table_columns = array(\"id\", \"entry_date\", \"account_type\", \"entry_value\", \"memo\", \"expense\", \"confirm\", \"deleted\", \"create_stamp\", \"modified_stamp\");\n }", "public function __construct($table){\n parent::__construct($table);\n }", "public function __conctruct($Matricule=\"\",$Nom=\"\",$Prenom=\"\",$Email=\"\",$Tel=\"\",$Naiss=\"\"){\n $this->Matricule=$Matricule;\n $this->Nom=$Nom;\n $this->Prenom=$Prenom;\n $this->Email=$Email;\n $this->Tel=$Tel;\n $this->Naiss=$Naiss;\n }", "public function __construct(array $table)\n {\n $this->table = $table;\n }", "public function __construct(){\n\t\tparent::__construct($this->table);\n\t}", "public static function createTable(){\n if (RBModel::recreateTable(get_called_class()) == false){\n return;\n }\n\n $bean = R::dispense( strtolower(get_called_class()));\n $fields = get_class_vars(get_called_class());\n \n foreach( $fields as $field=>$value){\n\n \n //ignora as variaveis que começam com _\n if ($field[0] == \"_\" || $field == \"id\"){\n continue;\n }\n\n $r = new ReflectionProperty(get_called_class(), $field);\n $comment = strtolower($r->getDocComment());\n\n if (strstr($comment,\"@varchar\")){\n $value = \"\";\n } else\n if (strstr($comment,\"@int\")){\n $value = 0;\n } else\n if (strstr($comment,\"@date\")){\n $value = \"1990-01-01\";\n } else\n if (strstr($comment,\"@datetime\")){\n $value = \"1990-01-01 00:00:00\";\n } else\n if (strstr($comment,\"@double\")){\n $value = 0.0;\n } else\n if (strstr($comment,\"@bool\")){\n $value = false;\n } else\n if (strstr($comment,\"@money\")){\n $value = \"10.00\";\n }\n \n \n $bean->$field = $value;\n }\n \n R::store($bean);\n R::trash($bean);\n }", "function __construct() {\n\t\t\t$this->db_name = DATABASE;\n\t\t\t//$this->table1 = TKR_TBL; \n\t\t\t//$this->table2 = DATA_TBL;\n\t\t\t\n\t\t\t}", "public function __construct()\n {\n parent::__construct();\n $this->set_column(\"penj_nomor\", \"nomor penjualan\", true);\n $this->set_column(\"penj_nominal\", \"nominal penjualan\", false);\n $this->set_column(\"penj_tgl\", \"tanggal penjualan\", false);\n $this->set_column(\"cust_perusahaan\", \"customer\", false);\n $this->set_column(\"penj_jenis\", \"jenis penjualan\", false);\n $this->set_column(\"penj_status\", \"status\", false);\n $this->set_column(\"status_pembayaran\", \"status pembayaran\", false);\n $this->set_column(\"selisih_tanggal\", \"durasi jatuh tempo\", false);\n $this->penj_create_date = date(\"y-m-d h:i:s\");\n $this->penj_last_modified = date(\"y-m-d h:i:s\");\n $this->id_create_data = $this->session->id_user;\n $this->id_last_modified = $this->session->id_user;\n }", "public function __construct() \n\t{ \n\t parent::__construct();\n \n //- ajout du header\n $this->obj_tr_entete=$this->addTr();\n $this->obj_tr_entete->setClass('table_with_search_header titre3');\n \n //- limite du nombre de ligne\n $this->int_nb_ligne_page=30; \n\t}", "function __construct(){\n $this->Connection=Connector::GetConnection();\n if($this->TestStructure){\n $this->TestTableStructure();\n }\n }", "protected function prepareTable(&$table)\n\t{\n\t}", "public function __construct($table=\"telephones\",$id=0)\n {\n $this->table=$table;\n $this->id=$id;\n $this->code=[];\n }", "public function crearTablas(){\r\n\t\t\t$this->crearTablaUsuario();\r\n\t\t\t$this->crearTablaDeporte();\r\n\t\t\t$this->crearTablaUsuarioDeporte();\r\n\t\t\t$this->crearTablaPassw();\r\n\t\t}", "public function __construct() {\n $this->db = \\Config\\Database::connect();\n // Wir verwenden die Query Builder Klasse über table()\n $this->reiter = $this->db->table('Reiter');\n }", "function __construct(){\n\n\t\tparent::__construct(); //Llamada al constructor de la clase padre\n\n\t\t$this->id = \"\";\n\t\t$this->actividad = \"\";\n\t\t$this->nota = \"\";\n\t\t$this->alumno = \"\";\n\t\t$this->materia = \"\";\n\n\t}", "public function __construct(array $tableau = null)\r\n {\r\n if ($tableau != null) {\r\n $this->fill($tableau);\r\n }\r\n\t}", "public function __Construct(){\n\t\t\t\t$this->conexao = mysqli_connect(\"127.0.0.1\",\"root\",\"\" ,\"seumadrugagames\")\n\t\t\t\tor die (\"Erro 404\");\n\t\t\t\t$this->tabela = \"vendas\";\n\t\t\t}", "protected function prepareTable($table)\r\n \t{\r\n \t\t// Provide created and modified values\r\n \t \tif (empty($table->id)) {\r\n \t\t\tif (empty($table->created_by)) {\r\n \t\t\t\t$table->created_by = JFactory::getUser()->id;\r\n \t\t\t}\r\n \t\t\tif (empty($this->created)) {\r\n \t\t\t\t$table->created = JFactory::getDate()->toSql();\r\n \t\t\t} \t\t\t\r\n \t\t} else {\r\n \t\t\t$table->modified_by = JFactory::getUser()->id;\r\n \t\t\t$table->modified = JFactory::getDate()->toSql();\r\n \t\t}\r\n \t}", "public function __construct() {\n parent::__construct();\n $this->tableName = \"variables2\";\n $this->table = \"erp_custom_fields\";\n }", "public function setTable($tablename){\r\n$this->tablename=$tablename;\r\n}", "public function __construct($id=0,$keyName='id',$table=''){\n\t\t$this->firephp = FirePHP::getInstance(true);\n\t\t\n\t\tif($id){\n\t\t\t$this->table = $table;\t\t\t\n\t\t\t$this->keyName = $keyName;\t\t\t\n\t\t\t$this->loadItem($id);\n\t\t}\n\t}", "public function __construct()\n {\n $this->setColumnsMeta(array(\n 'deskribapena'=> array('html'),\n 'irudiaFileSize'=> array('FSO'),\n 'banerraFileSize'=> array('FSO'),\n 'widgetEdukiakOrdena'=> array('enum:data|karma'),\n 'widgetIkastegiakOrdena'=> array('enum:edukiKopurua|data|karma|erabiltzaileKopurua'),\n 'widgetErabiltzaileakOrdena'=> array('enum:edukiKopurua|data|karma'),\n 'widgetKategoriakOrdena'=> array('enum:edukiKopurua|data|karma'),\n 'url'=> array('urlIdentifier:izena'),\n ));\n\n $this->setMultiLangColumnsList(array(\n ));\n\n $this->setAvailableLangs(array('eu'));\n\n $this->setParentList(array(\n ));\n\n $this->setDependentList(array(\n 'FkKanpainaHasEdukiaKanpaina1' => array(\n 'property' => 'EdukiaRelKanpaina',\n 'table_name' => 'EdukiaRelKanpaina',\n ),\n 'KanpainaRelEdukiKategoriakIbfk1' => array(\n 'property' => 'KanpainaRelEdukiKategoriak',\n 'table_name' => 'KanpainaRelEdukiKategoriak',\n ),\n 'KanpainaRelIkastegiMotaIbfk1' => array(\n 'property' => 'KanpainaRelIkastegiMota',\n 'table_name' => 'KanpainaRelIkastegiMota',\n ),\n 'KanpainaRelKategoriaIbfk1' => array(\n 'property' => 'KanpainaRelKategoria',\n 'table_name' => 'KanpainaRelKategoria',\n ),\n ));\n\n\n\n\n $this->_defaultValues = array(\n 'egoera' => '0',\n 'kanpaina' => '0',\n 'widgetEdukiak' => '0',\n 'widgetIkastegiak' => '0',\n 'widgetErabiltzaileak' => '0',\n 'widgetKategoriak' => '0',\n );\n\n $this->_initFileObjects();\n parent::__construct();\n }", "public function __construct()\n {\n parent::__construct();//, $this->fields);\n parent::findTable($this->tableName);\n }", "private function prepareParams($table){\n $controllerName = implode('',array_map(function($part){\n return Str::ucfirst(Str::singular($part));\n },explode(\"_\",$table->table_name)));\n $params['controller_name'] = $controllerName.'Controller';\n $params['model_name'] = $controllerName;\n $params['crud_url'] = '/api/'.str_replace('_','/',Str::singular($table->table_name));\n $params['table_name'] = $table->table_name;\n $params['author'] = env('PACKAGE_AUTHOR');\n return $params;\n }", "public function initialize()\n\t{\n\t // attributes\n\t\t$this->setName('tbaluno');\n\t\t$this->setPhpName('Tbaluno');\n\t\t$this->setClassname('Tbaluno');\n\t\t$this->setPackage('lib.model');\n\t\t$this->setUseIdGenerator(true);\n\t\t$this->setPrimaryKeyMethodInfo('tbpessoa_id_pessoa_seq');\n\t\t// columns\n\t\t$this->addColumn('ID_PESSOA', 'IdPessoa', 'INTEGER', true, null, null);\n\t\t$this->addPrimaryKey('MATRICULA', 'Matricula', 'BIGINT', true, null, null);\n\t\t$this->addColumn('NOME', 'Nome', 'VARCHAR', true, 100, null);\n\t\t$this->addColumn('CELULAR', 'Celular', 'VARCHAR', false, 15, null);\n\t\t$this->addColumn('EMAIL', 'Email', 'VARCHAR', false, 100, null);\n\t\t$this->addColumn('FONE_RESIDENCIAL', 'FoneResidencial', 'VARCHAR', false, 15, null);\n\t\t$this->addColumn('FOTO', 'Foto', 'BLOB', false, null, null);\n\t\t$this->addForeignKey('ID_NECES_ESPECIAL', 'IdNecesEspecial', 'VARCHAR', 'tbnecesespecial', 'ID_NECES_ESPECIAL', true, 255, null);\n\t\t$this->addColumn('DT_NASCIMENTO', 'DtNascimento', 'DATE', true, null, null);\n\t\t$this->addForeignKey('NATURALIDADE', 'Naturalidade', 'INTEGER', 'tbcidade', 'ID_CIDADE', true, null, null);\n\t\t$this->addColumn('UF_NASCIMENTO', 'UfNascimento', 'CHAR', false, 2, null);\n\t\t$this->addForeignKey('NACIONALIDADE', 'Nacionalidade', 'INTEGER', 'tbpais', 'ID_PAIS', true, null, null);\n\t\t$this->addColumn('SEXO', 'Sexo', 'CHAR', true, 1, null);\n\t\t$this->addColumn('ESTADO_CIVIL', 'EstadoCivil', 'VARCHAR', false, 15, null);\n\t\t$this->addColumn('TITULO', 'Titulo', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('TITULO_ZONA', 'TituloZona', 'INTEGER', false, null, null);\n\t\t$this->addColumn('TITULO_SECAO', 'TituloSecao', 'INTEGER', false, null, null);\n\t\t$this->addColumn('RG', 'Rg', 'VARCHAR', true, 20, null);\n\t\t$this->addColumn('RG_DT_EXPED', 'RgDtExped', 'DATE', false, null, null);\n\t\t$this->addColumn('RG_ORG_EXPED', 'RgOrgExped', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('CPF', 'Cpf', 'VARCHAR', true, 11, null);\n\t\t$this->addColumn('RESERVISTA', 'Reservista', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('PAI', 'Pai', 'VARCHAR', false, 50, null);\n\t\t$this->addColumn('MAE', 'Mae', 'VARCHAR', false, 50, null);\n\t\t$this->addForeignKey('CEP', 'Cep', 'VARCHAR', 'tblogradouro', 'CEP', true, 9, null);\n\t\t$this->addColumn('NUMERO', 'Numero', 'VARCHAR', true, 8, null);\n\t\t$this->addColumn('COMPLEMENTO', 'Complemento', 'VARCHAR', false, 50, null);\n\t\t$this->addForeignKey('ID_VERSAO_CURSO', 'IdVersaoCurso', 'INTEGER', 'tbcursoversao', 'ID_VERSAO_CURSO', true, null, null);\n\t\t$this->addForeignKey('ID_TIPO_INGRESSO', 'IdTipoIngresso', 'INTEGER', 'tbtipoingresso', 'ID_TIPO_INGRESSO', true, null, null);\n\t\t$this->addColumn('DT_INGRESSO', 'DtIngresso', 'DATE', true, null, null);\n\t\t$this->addForeignKey('ID_SITUACAO', 'IdSituacao', 'INTEGER', 'tbalunosituacao', 'ID_SITUACAO', true, null, null);\n\t\t$this->addColumn('DT_SITUACAO', 'DtSituacao', 'DATE', false, null, null);\n\t\t$this->addForeignKey('ID_DESTINO', 'IdDestino', 'INTEGER', 'tbinstexterna', 'ID_INST_EXTERNA', false, null, null);\n\t\t$this->addForeignKey('ID_2GRAU', 'Id2grau', 'INTEGER', 'tbinstexterna', 'ID_INST_EXTERNA', false, null, null);\n\t\t$this->addColumn('ANO_CONCL_2GRAU', 'AnoConcl2grau', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('ID_3GRAU', 'Id3grau', 'INTEGER', 'tbinstexterna', 'ID_INST_EXTERNA', false, null, null);\n\t\t$this->addColumn('ANO_CONCL_3GRAU', 'AnoConcl3grau', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('ID_TRABALHO', 'IdTrabalho', 'INTEGER', 'tbinstexterna', 'ID_INST_EXTERNA', false, null, null);\n\t\t$this->addForeignKey('CEP_TRABALHO', 'CepTrabalho', 'VARCHAR', 'tblogradouro', 'CEP', false, 8, null);\n\t\t$this->addColumn('FONE_TRABALHO', 'FoneTrabalho', 'VARCHAR', false, 15, null);\n\t\t$this->addColumn('RAMAL_TRABALHO', 'RamalTrabalho', 'VARCHAR', false, 5, null);\n\t\t$this->addColumn('MEDIA_GERAL', 'MediaGeral', 'NUMERIC', false, 10, null);\n\t\t$this->addColumn('CH_ELETIVA_CURSADA', 'ChEletivaCursada', 'INTEGER', false, null, null);\n\t\t$this->addColumn('CH_ELETIVA_SOLICITADA', 'ChEletivaSolicitada', 'INTEGER', false, null, null);\n\t\t$this->addColumn('CH_OBRIG_CURSADA', 'ChObrigCursada', 'INTEGER', false, null, null);\n\t\t$this->addColumn('CH_OBRIG_SOLICITADA', 'ChObrigSolicitada', 'INTEGER', false, null, null);\n\t\t$this->addColumn('CH_TOTAL', 'ChTotal', 'INTEGER', false, null, null);\n\t\t$this->addColumn('OP_INGRESSO', 'OpIngresso', 'INTEGER', false, null, 0);\n\t\t$this->addForeignKey('ID_POLO', 'IdPolo', 'INTEGER', 'tbpolos', 'ID_POLO', true, null, 0);\n\t\t$this->addColumn('CREATED_AT', 'CreatedAt', 'DATE', false, null, null);\n\t\t$this->addColumn('UPDATED_AT', 'UpdatedAt', 'DATE', false, null, null);\n\t\t$this->addColumn('CREATED_BY', 'CreatedBy', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('UPDATED_BY', 'UpdatedBy', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('ID_ANTIGO', 'IdAntigo', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('ID_RACA', 'IdRaca', 'INTEGER', 'tbaluno_racacor', 'ID_RACA', true, null, null);\n\t\t$this->addColumn('ENADE', 'Enade', 'BOOLEAN', false, null, false);\n\t\t// validators\n\t}", "function initAsSpecimen()\n\t{\n\t\t$this->id=0;\n\n\t\t$this->fk_commande='';\n\t\t$this->fk_product='';\n\t\t$this->fk_commandefourndet='';\n\t\t$this->qty='';\n\t\t$this->fk_entrepot='';\n\t\t$this->fk_user='';\n\t\t$this->datec='';\n\t\t$this->comment='';\n\t\t$this->status='';\n\t\t$this->tms='';\n\t\t$this->batch='';\n\t\t$this->eatby='';\n\t\t$this->sellby='';\n\n\n\t}", "public function __construct()\n {\n parent::__construct();\n\n if (!$this->table) {\n $this->table = strtolower(str_replace('_model','',get_class($this))); //fungsi untuk menentukan nama tabel berdasarkan nama model\n }\n }", "public function __construct() {\n\n $this->tableName = \"re_event_type\";\n $this->setColumnsInfo(\"id\", \"int(11)\", 0);\n $this->setColumnsInfo(\"name\", \"varchar(250)\", \"\");\n $this->setColumnsInfo(\"id_space\", \"int(11)\", 0);\n $this->primaryKey = \"id\";\n }", "public function __construct($cfg, $table){\n parent::__construct();\n\t\t$this->init($cfg, $table);\n\t}", "function init(){\n\t\t/*\n\t\t * Redefine this object, call parent then use addField to specify which fields\n\t\t * you are going to use\n\t\t */\n\t\tparent::init();\n\t\t$this->table_name = get_class($this);\n\t}", "public function __construct() {\n self::$presidencia=new Camara(\"CamaraPresidencia\");\n self::$alumnos1=new Camara(\"CamaraAlumnos1\");\n self::$alumnos2=new Camara(\"CamaraAlumnos2\");\n }", "public function __construct(Table $table)\n {\n $this->table = $table;\n }", "public function __construct() {\r\n parent::__construct();\r\n parent::set_tabel('jadwal', 'kd_jadwal');\r\n }", "public function __construct($table, $type = null)\n {\n $this->type = null;\n $this->table = $table;\n $this->on = array();\n $this->using = array();\n\n if (null !== $type) {\n $this->type = (string) $type;\n }\n\n $this->quoter = Quoter::instance();\n }", "function __construct(){\n\t\t\t\tparent::__construct();\n\t\t\t\t$this->table = 't_register';\n\t\t\t\t// $this->join1 = 't_r_kategori b', 'b.id_item = a.id', 'left';\n\t\t\t\t// $this->join2 = 't_r_brand c', 'c.id_item = a.id', 'left';\n\t\t\t\t$this->column = '*';\n\t\t\t\t$this->order = 'id';\n\t\t\t\t$this->asc = 'asc';\n\t\t\t\t$this->desc = 'desc';\n\t\t\t\t$this->id = 'id';\n\t\t\t\t// $this->where = array('removed_at <>'=>null);\n\t\t\t\t$this->where = \"\";\n\t\t\t}", "public function __construct(string $table)\n {\n $connexion = new Connection();\n $this->pdoConnection = $connexion->getPdoConnection();\n $this->table = $table;\n $this->className = __NAMESPACE__ . '\\\\' . ucfirst($table);\n }", "protected function __construct()\n\t\t{\n\t\t\t$this->Connect();\n// \t\t\t$this->Create($this->query); // Czy tak?\n\t\t\t$this->Insert();\n \t\t\t$this->Update('update tabelka ');\n// \t\t\t$this->Delete();\n// \t\t\t$this->Select();\n\t\t}", "function tabledata_Cadre_voirlestables ($serveur,$boolSPIP=false)\r\n{\r\n global $connect_statut, $spip_lang, $connect_id_auteur;\r\n\r\n $tables_extra = array();\r\n $tables_spip = array();\r\n $intNbExtra = 0 ;\r\n\r\n $sqlResultTables = sql_showbase('%');\r\n while ($tabNomTable = sql_fetch($sqlResultTables))\r\n {\r\n foreach ($tabNomTable as $key => $val)\r\n {\r\n if (preg_match('#^'.tabledata_table_prefix().'_#', $val))\r\n {\r\n $tables_spip[] = $val;\r\n }\r\n else\r\n {\r\n $tables_extra[] = $val;\r\n ++$intNbExtra ;\r\n }\r\n }\r\n }\r\n\r\n // affichage\r\n echo \"Choisir une table Extra parmis celle ci-dessous:\\n\";\r\n if ($intNbExtra<1)\r\n {\r\n echo \"Aucune table extra ne semble disponible.\";\r\n }\r\n else\r\n {\r\n echo tabledata_table_HTML ($tables_extra);\r\n }\r\n if ($boolSPIP)\r\n {\r\n echo \"<hr/>\";\r\n echo \"Les tables de SPIP :\\n\";\r\n echo tabledata_table_HTML ($tables_spip);\r\n }\r\n return;\r\n}", "public function __construct($table = null)\n {\n if ($table)\n {\n $this->table = $table;\n }\n }", "public function __construct()\n\n {\n parent::__construct();\n\n $this->tablename=\"v_article_en_stock\";\n $this->id = 0 ;\n $this->ref_article = \"\" ;\n $this->id_article = 0 ;\n $this->id_stock = 0 ;\n $this->qnt_article_en_stock = 0 ;\n $this->valeur_article_en_stock = 0 ;\n $this->min_qnt_article_en_stock = 0 ;\n $this->max_qnt_article_en_stock = 0 ;\n $this->id_conditionement_article = 0 ;\n $this->qnt_unite = 0 ;\n $this->pxa_u_article_en_stock = 0 ;\n $this->cout_achat_conditionement_article = 0 ;\n $this->pxv_u_conditionement_article = 0 ;\n $this->pxv_bar_conditionement_article = 0 ;\n $this->pxv_conditionement_article = 0 ;\n $this->id_conditionement = 0 ;\n $this->nom_conditionement = \"\" ;\n $this->id_unite = 0 ;\n $this->nom_unite_conditionement = \"\" ;\n $this->nom_article = \"\" ;\n $this->id_service = 0 ;\n $this->nom_stock = \"\" ;\n $this->type_stock = \"\" ;\n $this->path_photo = \"\" ;\n $this->master = 0 ;\n }", "public function __construct($table = null) {\n $this->table = $table;\n $this->setConnection();\n }", "function usuarios_estados_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_estados\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Estado\",2);\n$this->agregarVariable2($v);\n\n\t}", "public function __construct($table = null)\r\n {\r\n if ($table) {\r\n $this->from($table);\r\n }\r\n\r\n $this->builder = new SQLBuilder();\r\n $this->db = new \\Database();\r\n }", "private function prepareTables() {}", "public function init()\r\n\t{\r\n\t\tif (count($this->table_fields) < 1)\r\n\t\t\treturn false;\r\n\t\tforeach ($this->table_fields as $table_field) {\r\n\t\t\tif ($table_field->get_primary_key()) {\r\n\t\t\t\t$this->id_field = $table_field->get_name();\r\n\t\t\t}\r\n\t\t\tif ($table_field->get_name_key()) {\r\n\t\t\t\t$this->name_fields[] = $table_field->get_name();\r\n\t\t\t}\r\n\t\t\tif ($table_field->get_unike_key()) {\r\n\t\t\t\t$this->unike_keys[] = $table_field->get_name();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function __construct() {\n parent::__construct();\n\n //kapcsolódás a db-hez:\n $this->db = db_connect();\t//\\Config\\Database::connect();\n $this->builder = $this->db->table(\"feladatok\");\n\n }", "public function create(){\n $alter = '';\n $crear = '';\n $creartablas = '';\n\n $a = '';\n if(!empty($_POST)){\n if( isset($_POST['creartabla']) )\n $a = $_POST['creartabla'];\n }\n if($a!=''):\n $array = explode(',', $a);\n $crear = '';\n $tablas = array();\n foreach ($array as $v): \n $v = trim($v);\n $inic = $crear;\n if( stristr($v, 'id_') ){ \n $tabla = str_replace('id_', '', $v);\n $crear.= 'CREATE TABLE IF NOT EXISTS '.$tabla.' ( ';\n $crear.= ' id_'.$tabla.' INTEGER(10) PRIMARY KEY AUTO_INCREMENT ';\n }\n if( stristr( $v, '_id') ){\n $tablas[] = str_replace('_id', '', $v);\n $crear.= ','.$v.' INTEGER(10)'; \n } \n\n if( stristr($v, 'fecha' )or stristr($v, 'fecha') ) $crear.= ','.$v.' DATE NOT NULL '; \n if( stristr($v, '_nro' ) or stristr($v, 'nro_' ) ) $crear.= ','.$v.' INTEGER(10) NOT NULL '; \n if( stristr($v, 'text' ) or stristr($v, 'texto' ) ) $crear.= ','.$v.' TEXT NOT NULL COMMENT \\'col:12\\' '; \n if( stristr($v, 'timestamp' ) ) $crear.= ','.$v.' TIMESTAMP DEFAULT CURRENT_TIMESTAMP '; \n if($inic==$crear) $crear.= ','.$v.' VARCHAR(255) NOT NULL '; \n \n \n endforeach;\n\n $fk = '';\n $creartablas ='';\n foreach ($tablas as $value):\n $fk.=', FOREIGN KEY('.$value.'_id) REFERENCES '.$value.'(id_'.$value.') '; \n $creartablas.= 'CREATE TABLE IF NOT EXISTS '.$value.' ( ';\n $creartablas.= ' id_'.$value.' INTEGER(10) PRIMARY KEY AUTO_INCREMENT ';\n $creartablas.= ', name_'.$value.' VARCHAR(99) NOT NULL';\n $creartablas.= ', detail_'.$value.' VARCHAR(99) NOT NULL ';\n $creartablas.= ') ENGINE = InnoDB; ';\n endforeach;\n $crear .= $fk.') ENGINE = InnoDB;';\n\n $a = $creartablas.$crear;\n $b = explode(';', $a);\n $re = 'INICIO DE PETICION<BR>#####################';\n $this->db->trans_start();\n foreach ($b as $value) {\n if($value!='')\n $this->db->query($value);\n $re.= \"<BR>Peticion: \".$value.'';\n }\n $this->db->trans_complete();\n $re.= '#####################<br>Fin de las peticiones';\n $tables = $this -> Tables_model -> table_name();\n $this->session->set_userdata('tables', $tables);\n return $re;\n endif;\n }", "protected function _initialize()\r\n {\r\n $this->metadata()->setTablename('funcionario');\r\n $this->metadata()->setPackage('system.application.models.dao');\r\n \r\n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\r\n \r\n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true, 'autoincrement' => true));\r\n $this->metadata()->addField('nome', 'nome', 'varchar', 255, array());\r\n $this->metadata()->addField('login', 'login', 'varchar', 45, array());\r\n $this->metadata()->addField('senha', 'senha', 'varchar', 255, array());\r\n $this->metadata()->addField('email', 'email', 'varchar', 255, array());\r\n $this->metadata()->addField('lotacao', 'lotacao', 'varchar', 45, array());\r\n\r\n \r\n }", "function __construct($tabName){\n\t\tif(count($tabName) == 1){\n\t\t\tparent::setTableName($tabName);\n\t\t\t/**$this->s = */parent::executeQuery();\n\t\t\t//parent::displayResults($this->s);\n\t\t}else{\n\t\t\t$this->fieldName = $tabName[\"fieldName\"];\n\t\t\t$this->fieldValue = $tabName[\"fieldValue\"];\n\t\t\tparent::setTableName($tabName[\"tabName\"]);\n\t\t\t$this->s = parent::executeQuery();\n\t\t\t//parent::displayResults($this->s);\n\t\t\t}\n\t}", "public function __construct(){\n\t\t//Invocar el constructor del padre\n\t\tparent::__construct();\n\t\tFactoriaDAO::setTipoBaseDatos(\"MySQL\");\n\t}", "function getInstancia2($tabla,$campo=NULL){\r\n\t\t//DB_DataObject::debugLevel(5);\r\n\t\t//Crea una nueva instancia de $tabla a partir de DataObject\r\n\t\t$objDBO = DB_DataObject::Factory($tabla);\r\n\t\tif(is_array($campo)){\r\n\t\t\tforeach($campo as $key => $value){\r\n\t\t\t\t$objDBO->$key = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$contador = 0;\r\n\t\t$objDBO->find();\r\n\t\t$columna = $objDBO->table();\r\n\t\twhile ($objDBO->fetch()) {\r\n\t\t\tforeach ($columna as $key => $value) {\r\n\t\t\t\t$ret[$contador]->$key = cambiaParaEnvio($objDBO->$key);\r\n\t\t\t}\r\n\t\t\t$contador++;\r\n\t\t}\r\n\t\t\r\n\t\t//Libera el objeto DBO\r\n\t\t$objDBO->free();\r\n\r\n\t\treturn $ret;\t\r\n\t}", "function __construct(){\n\t\t\t$this->setId(0);\n\t\t\t$this->setIdUsuario(0);\n\t\t\t$this->setFecha('');\n\t\t\t// $this->setHora('');\t\t\n\t\t\t$this->setObservacion('');\t\t\n\t\t\t$this->setEstado(true);\n\t\t\t$this->setIngreso(true);\n\t\t\t\n\t\t}", "public function __construct() \r\n {\r\n \t$this->id = 0;\r\n\t\t$this->nombre = \"\";\r\n\t\t$this->clave = \"\";\r\n\t\t$this->privilegio = \"\";\r\n \t$this->con = new cConexion();\r\n\t\t$this->tabla = \"usuario\";\r\n\t\t//$this->con->Conectar();\r\n }", "function __construct()\n {\n if (empty($this->table)) {\n $this->table = get_called_class();\n }\n }", "private function init($cfg, $table){\n \n $this->host = $cfg->dbConfig['host'];\n $this->user = $cfg->dbConfig['user'];\n $this->pass = $cfg->dbConfig['pass'];\n $this->db = $cfg->dbConfig['db'];\n $this->table = $table;\n\n $this->paging = $cfg->paging;\n $this->cfg = $cfg;\n\n $this->openConnection();\n mysql_query(\"SET NAMES 'utf8'\");\n mysql_query(\"SET CHARACTER SET utf8\");\n\t}", "public function __construct($tableinfo) {\n\t\t\tparent::__construct( $tableinfo ); }", "public function __construct(){\n \n $this->create_tables();\n \n }", "function __construct( $objParams = NULL){\n $this->setHtml('table');\n \n //Define os parâmetros específicos da classe atual:\n $this->addParam('cellPadding'); \n $this->addParam('cellSpacing'); \n $this->addParam('border'); \n $this->addParam('width');\n $this->addParam('height');\n $this->addParam('columns');\n $this->addParam('rows');\n \n //Carrega as propriedades do objeto atual a partir de objParams:\n $this->popParams($objParams); \n }", "public function init() {\n $this->table = 'depenses';\n }", "public function __construct ($init)\n {\n if(is_string($init)) //this is suppose to be a table name\n {\n $init = $this->add_table($init);\n $this->base_table = $this->base_models[$init]->_table;\n }\n }", "protected function prepareTable($table)\n\t{\n\t\t// Derived class will provide its own implementation if required.\n\t}", "function insertarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_ime';\n\t\t$this->transaccion='WF_tabla_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_tipo_proceso','id_tipo_proceso','int4');\n\t\t$this->setParametro('vista_id_tabla_maestro','vista_id_tabla_maestro','int4');\n\t\t$this->setParametro('bd_scripts_extras','bd_scripts_extras','text');\n\t\t$this->setParametro('vista_campo_maestro','vista_campo_maestro','varchar');\n\t\t$this->setParametro('vista_scripts_extras','vista_scripts_extras','text');\n\t\t$this->setParametro('bd_descripcion','bd_descripcion','text');\n\t\t$this->setParametro('vista_tipo','vista_tipo','varchar');\n\t\t$this->setParametro('menu_icono','menu_icono','varchar');\n\t\t$this->setParametro('menu_nombre','menu_nombre','varchar');\n\t\t$this->setParametro('vista_campo_ordenacion','vista_campo_ordenacion','varchar');\n\t\t$this->setParametro('vista_posicion','vista_posicion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('menu_codigo','menu_codigo','varchar');\n\t\t$this->setParametro('bd_nombre_tabla','bd_nombre_tabla','varchar');\n\t\t$this->setParametro('bd_codigo_tabla','bd_codigo_tabla','varchar');\n\t\t$this->setParametro('vista_dir_ordenacion','vista_dir_ordenacion','varchar');\n\t\t$this->setParametro('vista_estados_new','vista_estados_new','varchar');\n\t\t$this->setParametro('vista_estados_delete','vista_estados_delete','varchar');\t\t\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function __construct($table)\n {\n $this->dbh = require __DIR__ . '\\..\\db\\init.php';\n $this->table = $table;\n }", "function CTabla($dt) {\r\n $this->dt = $dt;\r\n }", "function __construct() {\n \t$this->tablename \t\t\t= \"block_ilp_plu_dd\";\n \t$this->data_entry_tablename = \"block_ilp_plu_dd_ent\";\n\t\t$this->items_tablename \t\t= \"block_ilp_plu_dd_items\";\n\tparent::__construct();\n }", "public function __construct($tableName='table',$nickName='') {\r\n $a = explode('--', preg_replace('/\\s+/', '--', trim($tableName)));\r\n $this->name = $tableName;\r\n $this->tableName = $a[0];\r\n if(count($a)>1){\r\n $this->nickName = $a[count($a)-1];\r\n }\r\n if(preg_match('/^[A-z]{1}[A-z0-9_]+$/',$nickName)){\r\n $this->nickName = $nickName;\r\n }\r\n $p = db::getPrefix();\r\n $fields = array();\r\n $types = array();\r\n $stmt = db::query(\"DESCRIBE {$p}{$a[0]}\");\r\n if($tableFields = $stmt->fetchAll(PDO::FETCH_ASSOC)){\r\n foreach($tableFields as $column){\r\n $f = $column['Field'];\r\n if($column['Key']=='PRI'){\r\n $this->idField = $f;\r\n }\r\n $fields[] = $f;\r\n $b = explode('(', $column['Type']);\r\n $types[$f] = $b[0];\r\n }\r\n }\r\n $this->fields = $fields;\r\n $this->fieldTypes = $types;\r\n }", "function setTable($table) {\r\r\n\t\t$this->table = $table;\r\r\n\t}" ]
[ "0.70206136", "0.68849486", "0.67713827", "0.67192143", "0.67092687", "0.6706279", "0.6665721", "0.66610324", "0.65036696", "0.64958787", "0.64676064", "0.6425281", "0.6421519", "0.6390407", "0.6360509", "0.6312022", "0.6305058", "0.627415", "0.6232818", "0.6231299", "0.62165254", "0.62094975", "0.61696726", "0.6125766", "0.61218077", "0.61216176", "0.6120778", "0.6117491", "0.61073905", "0.60979617", "0.6070996", "0.6065718", "0.60504276", "0.604291", "0.6036388", "0.5996537", "0.59888816", "0.5986847", "0.59728235", "0.5967786", "0.5966728", "0.59644514", "0.59610415", "0.59563", "0.5949887", "0.5930467", "0.59227026", "0.5922529", "0.59216624", "0.59215283", "0.5918611", "0.5910691", "0.58964634", "0.58950543", "0.58881456", "0.5887768", "0.58756524", "0.58749425", "0.5867588", "0.5852032", "0.5851379", "0.58511937", "0.58509237", "0.5849142", "0.58457077", "0.5833869", "0.583137", "0.5823482", "0.5823147", "0.5813285", "0.5811879", "0.5808454", "0.5807192", "0.58017206", "0.5800961", "0.5795821", "0.579389", "0.5786806", "0.57862806", "0.57844216", "0.5783851", "0.57820064", "0.5781236", "0.57793075", "0.5778755", "0.5767302", "0.57619345", "0.576156", "0.57614785", "0.57594955", "0.5756748", "0.57541347", "0.5748666", "0.5745978", "0.57268494", "0.5720365", "0.5720277", "0.5720183", "0.5719053", "0.5713547" ]
0.61649317
23
Fonction executant les requetes SQL
function execute($sql): array { $rs = array(); try { foreach ($this->connection->query($sql) as $row) { $rs[] = $row; } return $rs; } catch (PDOException $e) { $message = $e->getCode() . " " . $e->getMessage(); if ($this->debug_mode > 0) { $this->addMessage($message); } throw new ObjetBDDException($message); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function exec($sql);", "public function execute($sql);", "public function execute($sql);", "public function execSql(){\n\t\t$cant=func_num_args();\n\t\t$instSql=\"\";\n\t\t$instSql=$this->reemplazaParametro(func_get_args());\n//\t\techo \"<br>\".$instSql.\"<br>\";\n//\t\techo $this->tipodb.\"<br>\";\n//\t\t$this->registroLog($instSql,$_SESSION['PERMISO'][0],$_SESSION['PERMISO'][1]);\n\t\tswitch ($this->tipodb) {\n\t\t\tcase \"my\":\n\t\t\t\t$resultado=mysql_query($instSql,$this->conn);\n//echo mysql_errno().\"<br>\";\n\t\t\t\tbreak;\n\t\t\tcase \"pg\":\n\t\t\t\t$resultado=pg_query($this->conn,$instSql);\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $resultado;\n\t}", "function exec($sql);", "abstract public function execute($sql);", "public abstract function execute($sql);", "abstract protected function executeSql($sql);", "public function executeStatement()\n {\n \n }", "abstract public function execute() ;", "function executerSQL($requete){\n global $dbhost,$dbusername,$dbpassword,$dbname;\n\n //Créer une connection mysql\n $connection = new sql($dbhost,$dbusername,$dbpassword,$dbname); //Connection à  la db\n $connection->setQuery($requete);\t\t\t \t//créeer la requete\n $requete = $connection->runQuery($connection->getQuery());\t//executer la requête\n\n return $requete;\n }", "abstract function executeQuery($cons);", "public function execute($sql, $params = array());", "public function execute() {\n $lastImplementaion = '';\n $finalWhere = ( count($this->_lastWhere) > 0) ? ' WHERE ' . join($this->_currentImplement['where'], ' ' ) : '';\n $finalLimit = ( strlen($this->_lastLimit) > 0 ) ? ' lIMIT ' . $this->_lastLimit : '';\n\n if ( !empty($this->_lastSelect) ) {\n $finalSelect = ' SELECT ' . join( $this->_currentImplement['select'], ',' );\n\n $finalTables = ' FROM ' . join( array_map(function($item ){\n return '`'.$item.'`';\n }, $this->_currentImplement['table']), ',');\n\n $finalOrder = ( strlen($this->_lastOrder) > 0 ) ? ' ORDER BY ' . $this->_lastOrder : '';\n\n $finalJoin = '';\n\n if ( isset($this->_currentImplement['join']) && count($this->_currentImplement['join']) > 0 ) {\n foreach ( $this->_currentImplement['join'] as $key => $value ) {\n $finalJoin[] = ' ' . $value['type'] . ' JOIN `' . $value['table'] . '`' . ' ON ' . $value['on'];\n }\n\n $finalJoin = join( $finalJoin, ' ' );\n }\n\n $lastImplementaion = $finalSelect . $finalTables . $finalJoin . $finalWhere . $finalOrder . $finalLimit;\n } else if ( !empty($this->_lastUpdate) ) {\n if(empty($finalWhere)){\n throw new Exception(\"If you preform this query, you will update all rows in table\", 1);\n }\n\n $lastImplementaion = 'UPDATE ' . $this->_lastTable . ' SET ' . $this->_lastUpdate . $finalWhere . $finalLimit;\n } else if ( !empty($this->_lastInsert) ) {\n $lastImplementaion = 'INSERT INTO `' . $this->_lastTable . '` ' . $this->_lastInsert;\n } else if ( !empty($this->_lastCreate) ) {\n $lastImplementaion = $this->_lastCreate;\n } else if ( !empty($this->_lastDrop) ) {\n $lastImplementaion = $this->_lastDrop;\n }else if( !empty($this->_lastTruncate) ){\n $lastImplementaion = $this->_lastTruncate;\n }else if( !empty($this->_lastDelete) ) {\n if(empty($finalWhere)){\n throw new Exception(\"If you preform this query, you will delete all rows in table, if you want so user truncate() instead.\", 1);\n }\n\n $lastImplementaion = $this->_lastDelete . $finalWhere . $finalLimit;\n }\n\n $lastImplementaion = trim( $lastImplementaion );\n $this->unsetAll();\n\n unset( $this->_currentImplement );\n unset( $finalSelect );\n unset( $finalTables );\n unset( $finalJoin );\n unset( $finalWhere );\n unset( $finalOrder );\n unset( $finalLimit );\n return $lastImplementaion;\n }", "abstract function execute();", "abstract function execute();", "abstract public function execute();", "abstract public function execute();", "abstract public function execute();", "abstract public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "private function execute() {\n $this->statement = $this->pdo->prepare($this->queryString);\n\n foreach ($this->params as $boundParam) {\n $this->statement->bindValue($boundParam->name, $boundParam->value, $boundParam->type);\n }\n\n $this->statement->execute();\n }", "public function executeAll();", "public function execute(): Statement;", "public function execute() {\n $exec = $this->db->prepare($this->sql);\n $exec->execute($this->placeHolder);\n $this->placeHolder = array(); //make placeHolder array empty SO that placeholder property is ready for another action.\n $return = '';\n $this->count = $exec->rowCount();\n switch ($this->type) {\n case self::TYPE_SELECT:\n $return = $exec->fetchAll(PDO::FETCH_OBJ);\n break;\n case self::TYPE_DELETE:\n $return = $this->count;\n break;\n case self::TYPE_UPDATE:\n break;\n case self::TYPE_ALTER:\n break;\n default :\n $return = '';\n break;\n }\n return $return;\n }", "abstract function execute ();", "function executarSQLAction($query)\n\t {\n\t global $basedados;\n\t try\n\t {\n\t $stmt = $basedados->prepare($query);\n\t $stmt->execute();\n\n\t return( $stmt );\n\t }\n\t catch (PDOException $e)\n\t {\n\t imprimir($e->getMessage());\n\t return false;\n\t }\n\t }", "public function execute($sql) {\n\t\tquery_db2($sql, true);\n\t}", "function executeQuery($query);", "function _execQ($query, $param_strs, $params){\n $db = MySQLConnect::get_instance();\n $res = $db->prepare($query);\n \t array_unshift($params, $param_strs);\n call_user_func_array(array($res, 'bind_param'), $params);\n $bool = $res->execute();\n $sonuclar = $res->get_result();\n $rows = $sonuclar->fetch_all(MYSQLI_ASSOC);\n return $rows;\n }", "function ejecuta($strsql){\n\n $query = $this->db->query($strsql);\n return $query;\n\n }", "public abstract function execute();", "public abstract function execute();", "public abstract function execute();", "public function executarQuery($sql)\n {\n return $this->con->query($sql);\n \n }", "abstract public function query($sql);", "function SQLExecuterRequete($sql, array $arg) {\n try {\n $sth = SQLPreparerRequete($sql);\n $sth->setFetchMode(PDO::FETCH_ASSOC);\n foreach ($arg as $key => &$val) {\n $sth->bindParam($key, $val);\n }\n if (!$sth->execute()) {\n throw new Exception(\"La requete SQL a echouee\", 500);\n }\n } catch (Exception $e) {\n ob_end_clean();\n die('<!DOCTYPE html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>Arcade 2i</title><link rel=\"stylesheet\" type=\"text/css\" href=\"assets/css/bootstrap.css\"/><link rel=\"stylesheet\" type=\"text/css\" href=\"assets/css/style.css\"/><script src=\"https://code.jquery.com/jquery-2.2.3.min.js\"></script><script src=\"assets/js/bootstrap.js\"></script></head><body><div class=\"container\"><div class=\"row\"><div class=\"alert alert-danger\">Erreur lors de l\\'execution de la page : ' . $e->getMessage() . '</div></div></div></body></html>');\n }\n return $sth;\n}", "abstract public function execute($query);", "public function executar($sql)\n {\n return $this->con->exec($sql);\n }", "public function execute($query);", "function pp_run_query($query_set)\n{\n global $debug;\n $sql_exeq_words = array(\"CREATE\", \"UPDATE\", \"INSERT\", \"DELETE\");\n $d = getDBLink();\n if (!is_array($query_set)) {\n if (in_array(substr($query_set,0,6), $sql_exeq_words)) {\n $res = $d->ExecuteSQL($query_set);\n } else {\n $res = $d->FetchAll($query_set, null);\n }\n } else {\n $format_str = '';\n $params = array($query_set[0]);\n foreach($query_set[1] as $p) $format_str .= $p[0];\n if ($format_str != \"\") {\n $params[] = $format_str;\n }\n foreach($query_set[1] as $p) $params[] = $p[1];\n if(in_array(substr($query_set[0],0,6), $sql_exeq_words)) $func='ExecuteSQL';\n else {\n $func='FetchAll';\n }\n $res = call_user_func_array(array($d, $func), $params);\n }\n return $res;\n}", "function ejecutar($sql){\n\t\t$res = mysqli_query($this->id,$sql);\t\n\t\t/*if (!$res) // error en la sentencia\n\t\t\tthrow new Exception (\"Error en la sentencia SQL\");*/\n\t\treturn $res;\n\t}", "public function executeQuery($sql)\r\n\t{\r\n\t\t//return qocqal_query($sql);\r\n\t}", "public function run() {\n\t\t\\DB::statement(\" INSERT INTO efectores.tipo_efector(id_tipo_efector,sigla,descripcion)\n(\n\tSELECT *\n\tFROM dblink('dbname=sirge host=192.6.0.118 user=postgres password=PN2012\\$',\n\t 'SELECT id_tipo_efector,sigla,descripcion\n\t\t FROM efectores.tipo_efector')\n\t AS migracion(id_tipo_efector integer,\n sigla character varying(4),\n descripcion character varying(50))\n);\");\n\t}", "public function execute() { \n return $this -> stmt -> execute();\n }", "private function ExecuteQuery()\n\t{\n\t\tswitch($this->querytype)\n\t\t{\n\t\t\tcase \"SELECT\":\n\t\t\t{\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$this->querydata = $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"INSERT\":\n\t\t\tcase \"UPDATE\":\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->beginTransaction();\n\t\t\t\t\t$this->stmt->execute();\n\t\t\t\t\t$this->commit();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcatch (PDOException $e)\n\t\t\t\t{\n\t\t\t\t\t$this->rollBack();\n\t\t\t\t\techo(\"Query failed: \" . $e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function execute();", "public function run() {\n\t\t\\DB::statement(\"INSERT INTO pss.codigos_mujer(codigo_prestacion,id_linea_cuidado,id_grupo_etario,embarazo_riesgo,embarazo_normal)\n\t(\n\t\tSELECT *\n\t\tFROM dblink('dbname=sirge host=192.6.0.118 user=postgres password=PN2012\\$',\n\t\t 'SELECT codigo_prestacion,id_linea_cuidado,id_grupo_etario,embarazo_riesgo,embarazo_normal\n\t\t\t FROM pss.codigos_mujer')\n\t\t AS migracion(codigo_prestacion character varying(11),\n\t\t\t\t id_linea_cuidado smallint,\n\t\t\t\t id_grupo_etario smallint,\n\t\t\t\t embarazo_riesgo character varying(1),\n\t\t\t\t embarazo_normal character varying(1))\n\t);\");\n\t}", "public function ejecutarQuery($sql){\n return mysqli_query($this->conn,$sql);\n }", "private function func_execute () {\n $this -> connection = parent::func_query ($this -> query, $this -> query_data);\n }", "abstract public function exec($query='');", "public function run()\n {\n \\DB::statement(\" INSERT INTO solicitudes.estados(id, descripcion, css)\n\t(\n\t\tSELECT *\n\t\tFROM dblink('dbname=sirge3 host=192.6.0.118 user=postgres password=LatinoSandwich007',\n\t\t 'SELECT id, descripcion, css\n\t\t\t FROM solicitudes.estados')\n\t\t AS migracion( id integer,\n\t\t\t\t\t\t descripcion character varying(50),\n\t\t\t\t\t\t css character varying(20) )\t\t\t\n\t); \");\n }", "public function executeQuery(string $sql) {\n try {\n $sql=$this->secureSQL($sql);\n $stmt = $this->conn->prepare($sql);\n $stmt->execute();\n $this->result=$stmt->fetchAll(PDO::FETCH_ASSOC);\n $this->rsetRowCount = count($this->result);\n } catch (PDOException $e) {\n $this->lastException = $e;\n }\n }", "function exeSql($sql, $pars, $isLimit = 1){ \n $ini = parse_ini_file('config.ini');\n $servername = $ini['db_name'];\n $username = $ini['db_user'];\n $password = $ini['db_password'];\n\n // Create connection\n $conn = new mysqli($servername, $username, $password);\n \n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n \n for ($i=0; $i < count($pars); $i++)\n $sql = str_replace(\"{\".$i.\"}\", $pars[$i], $sql); \n\n if($isLimit)\n $sql .= \" LIMIT 30 \";\n\n \n\n $data = mysqli_query($conn, $sql); \n\n return $data; \n }", "public function execute () {\n $this->query->execute();\n }", "function executeSQL($script) {\n\t\t$queryRes = mysqli_query($this->connectionString, $script);\n\t\tif(!empty($queryRes))\n\t\t{\n\t\t\twhile($row = mysqli_fetch_assoc($queryRes)) {\n\t\t\t\t$resultFromDB[] = $row;\n\t\t\t}\t\t\n\t\t\tif(!empty($resultFromDB))\n\t\t\t\treturn $resultFromDB;\n\t\t}\n\t\t\n\t}", "public function execute() {\n\t\t\t$connection = \\Leap\\Core\\DB\\Connection\\Pool::instance()->get_connection($this->data_source);\n\t\t\tif ($this->before !== NULL) {\n\t\t\t\tcall_user_func_array($this->before, array($connection));\n\t\t\t}\n\t\t\t$connection->execute($this->command());\n\t\t\tif ($this->after !== NULL) {\n\t\t\t\tcall_user_func_array($this->after, array($connection));\n\t\t\t}\n\t\t}", "public function execute($sql){\r\n\t\t\tglobal $link;\r\n\t\t\tmysqli_query($link,$sql);\r\n\t\t}", "private function executeQuery() {\n\t\t$recordset = $this->getConnection()->execute( $this );\n\t\t\n\t\tif( $recordset === false ) {\n\t\t\t$this->_recordset = array();\n\t\t} else {\n\t\t\t$this->_recordset = $recordset;\n\t\t}\n\n\t\t$this->_currentRow = 0;\n\t\t$this->isDirty( false );\n\t}", "private function sqlstatements() {\n $this->select = array( );\n $this->insert = array( 'INSERT INTO :entity (xxx) VALUES (yyy)' );\n $this->update = array( );\n $this->delete = array( );\n }", "public function query($sql);", "public function query($sql);", "public function query($sql);", "public function query($sql);", "public function run() {\n\t\t\\DB::statement(\"INSERT INTO pss.codigos_sumar_nacer(codigo_prestacion,id_grupo_etario,codigo_prestacion_nacer,codigo_prestacion_rural)\n\t(\n\t\tSELECT *\n\t\tFROM dblink('dbname=sirge host=192.6.0.118 user=postgres password=PN2012\\$',\n\t\t 'SELECT codigo_prestacion,id_grupo_etario,codigo_prestacion_nacer,codigo_prestacion_rural\n\t\t\t FROM pss.codigos_sumar_nacer')\n\t\t AS migracion(codigo_prestacion character varying(11),\n\t\t\t\t id_grupo_etario smallint,\n\t\t\t\t codigo_prestacion_nacer character varying(6),\n\t\t\t\t codigo_prestacion_rural character varying(11))\n\t);\");\n\t}", "function db_raw_exec( $sql )\n{\n return Chev_PDO::instance()->raw_exec( $sql );\n}", "public function actionExeSql()\n {\n //$mysql->runSql($sql);\n }", "private function runQuery () {\n\n // Prepare the constructed SQL statement\n if ($this->_query = $this->_pdo->prepare($this->_sql)) {\n\n // Set a counter to one to use when binding\n $x = 1;\n \n // Loop through the binding array\n foreach($this->_bindArray as $param) {\n \n // Run the bindValue function to match the correct value to the correct placing\n $this->_query->bindValue($x, $param);\n\n // Increment the counter\n $x++;\n \n }\n \n // Run the execute function\n $this->execute();\n }\n }", "function execute_query() {\n $args = func_get_args();\n $args_count = func_num_args();\n if ($args_count == 1) {\n $sql = $args[0];\n }\n else {\n $sql = $args[0];\n }\n\n global $db_host, $db_user, $db_pass, $db_name;\n $conn = new mysqli($db_host, $db_user, $db_pass, $db_name);\n if ($conn->connect_errno) {\n echo T_(\"<h1>데이터베이스에 연결하던 도중 오류가 발생했습니다.</h1>\");\n exit;\n }\n $conn->query(\"SET time_zone = '+9:00'\");\n $stmt = $conn->prepare($sql);\n if ($args_count != 1) {\n $sliced = array_slice($args, 1);\n call_user_func_array(array($stmt, \"bind_param\"), make_values_referenced($sliced));\n }\n $stmt->execute();\n $stmt->store_result();\n\n if ($stmt->errno) {\n $stmt->close();\n $conn->close();\n return false; // error: false\n }\n else {\n $stmt->close();\n $conn->close();\n return true; // success: true\n }\n}", "abstract protected function _query($sql);", "function sql_execute($sql)\n{\n global $ctx;\n return $ctx['sqlconn']->query($sql);\n}", "function query(\\database $dbase){\n //\n //Get the sql string \n $sql=$this->to_str();\n //\n // Execute the $sql on columns to get the $result\n $dbase->query($sql);\n \n }", "public static function execute()\n {\n //bind params\n foreach ( self::$_BINDS as $k => $_b ):\n $type = \\PDO::PARAM_STR;\n if ( $_b['type'] ):\n $type = self::getDataType( $_b['type'] );\n endif;\n\n $length = NULL;\n if ( $_b['size'] ):\n $length = (int) $_b['size'];\n endif;\n $k++;\n self::$stmt->bindParam( $k, $_b['value'], $type, $length );\n endforeach;\n self::$_BINDS = array(); //reset\n return self::$stmt->execute();\n }", "function execute ($sql)\n {\n return pg_query($this->_conn, $sql);\n }", "function executeInsert($script) {\n\t\t$queryRes = mysqli_query($this->connectionString, $script);\n\t}", "function _execute($sql) {\n\t\t$result = sqlite_query($this->connection, $sql);\n\n\t\tif (preg_match('/^(INSERT|UPDATE|DELETE)/', $sql)) {\n\t\t\t$this->resultSet($result);\n\t\t\tlist($this->_queryStats) = $this->fetchResult();\n\t\t}\n\t\treturn $result;\n\t}", "protected function execute()\n{\n\t$this->result = $this->db->query($this->getSql());\n\t$this->position = 0;\n\t$this->data = array();\n\n\treturn $this->result;\n}", "public function query_trans($lista){\n try {\n $this->conn->beginTransaction();\n $this->conn->query($lista[\"Sql1\"]);\n $this->conn->query($lista[\"Sql2\"]); \n $this->conn->query($lista[\"Sql3\"]); \n $this->conn->commit();\n\n \n echo '<script>alert(\"inserto todo\");</script>';\n\n } catch (PDOException $th) {\n $this->conn->rollback();\n echo '<script>alert(\"Error\");</script>';\n echo $th;\n }\n }", "static public function execSQL($raw_sql) {\n if (self::$_static_handler == null) {\n self::$_static_handler = slDatabaseManager::getConnection();\n }\n $res = null;\n if (!is_array($raw_sql)) $raw_sql = array($raw_sql);\n foreach($raw_sql as $sql) {\n $res = self::$_static_handler->query($sql);\n }\n return $res;\n }", "public function run_sql($bindVars = FALSE, $outvar = NULL);", "public function executeQuery($sql)\r\n\t{\r\n\t\t//return mysql_query($sql);\r\n\t}", "abstract protected function doQuery( $sql );", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}" ]
[ "0.7527598", "0.7491417", "0.7491417", "0.7485012", "0.73974806", "0.7338291", "0.72297436", "0.7039901", "0.7025007", "0.695478", "0.69435596", "0.6926874", "0.69180834", "0.6886585", "0.6872866", "0.6872866", "0.68411314", "0.68411314", "0.68411314", "0.68411314", "0.6733519", "0.6733519", "0.6733519", "0.6733519", "0.6733519", "0.6733519", "0.6733519", "0.6733519", "0.6733519", "0.6733519", "0.6733519", "0.6733519", "0.6733519", "0.6733519", "0.6733519", "0.6675786", "0.6671208", "0.66472423", "0.66305256", "0.66171896", "0.6612996", "0.66120255", "0.66109794", "0.6610496", "0.6607129", "0.6585852", "0.6585852", "0.6585852", "0.6579069", "0.65646046", "0.6559493", "0.6557556", "0.6514662", "0.6503237", "0.6473795", "0.6449165", "0.64275825", "0.6426254", "0.64259994", "0.6419234", "0.64039546", "0.6403657", "0.64019656", "0.6391758", "0.63891983", "0.63870615", "0.6384217", "0.6384058", "0.6377458", "0.63773143", "0.6366465", "0.6363703", "0.6360874", "0.6360757", "0.6348326", "0.6348326", "0.6348326", "0.6348326", "0.6341979", "0.63326514", "0.6331034", "0.6330948", "0.63227296", "0.63078135", "0.62926126", "0.6290428", "0.62876964", "0.62833726", "0.6278897", "0.6277556", "0.62732816", "0.6261233", "0.62577105", "0.6248871", "0.62424964", "0.6239302", "0.623181", "0.623181", "0.623181", "0.623181", "0.623181" ]
0.0
-1
Lit un enregistrement en base de donnees
function lire($id, $getDefault = true, $parentValue = 0) { $data = array(); // Integration cles multiples if ($this->cleMultiple == 1) { // Verification de la structure de la cle if ($this->verifData == 1 && !$this->verifDonnees($id)) { return false; } $where = ""; foreach ($id as $key => $value) { if ($where != "") { $where .= " and "; } if (strlen(preg_replace("#[^A-Z]+#", "", $key)) > 0) { $cle = $this->quoteIdentifier . $key . $this->quoteIdentifier; } else { $cle = $key; } $where .= $cle . ' = :' . $key; $data[$key] = $value; } } else { /* * Verification de la cle unique */ if ($this->verifData == 1 && !is_numeric($id)) { return false; } if (strlen(preg_replace("#[^A-Z]+#", "", $this->cle)) > 0) { $cle = $this->quoteIdentifier . $this->cle . $this->quoteIdentifier; } else { $cle = $this->cle; } $where = $cle . ' = :id'; $data["id"] = $id; } /* * Generation de la liste des colonnes, et integration du type POSTGIS Ne fonctionne que si la description est complete */ if ($this->fullDescription == 1) { $select = ""; $i = 0; foreach ($this->colonnes as $key => $value) { /* * Rajout des doubles quotes sur le nom des colonnes en cas de présence de majuscules */ if (strlen(preg_replace("#[^A-Z]+#", "", $key)) > 0) { $cle = $this->quoteIdentifier . $key . $this->quoteIdentifier; } else { $cle = $key; } if ($i == 1) { $select .= ", "; } else { $i = 1; } if ($value["type"] == 4) { /* * Traitement des champs geographiques */ $select .= "ST_AsText(" . $cle . ")"; } else { $select .= $cle; } } $sql = "select " . $select . " from " . $this->table . " where " . $where; } else { $sql = "select * from " . $this->table . " where " . $where; } $collection = $this->executeAsPrepared($sql, $data); if (empty($collection)) { if ($getDefault) { $collection = $this->getDefaultValue($parentValue); } else { $collection = false; } } else { /* * on ne conserve que la premiere ligne */ $collection = $collection[0]; if ($this->auto_date == 1) { $collection = $this->utilDatesDBVersLocale($collection); } if ($this->codageHtml) { $collection = $this->htmlEncode($collection); } if ($this->toUTF8) { $collection = $this->utf8Encode($collection); } } return $collection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registrar(){\n $cedula = $_POST['cedula'];\n $nombre = $_POST['nombre'];\n $apellido = $_POST['apellido'];\n $edad = $_POST['edad'];\n \n //2. Crear un objeto Estudiante y enviar a actualizar\n $estudiante = new Estudiante($cedula,$nombre,$apellido,$edad); \n \n //3. llamar al modelo para registar un Estudiante\n $this->model->registrarEstudiante($estudiante);\n \n //4. redirección index. \n $mensaje= \"El estudiante fue registrado de manera correcta!\";\n Util::mostarAlerta($mensaje);\n }", "public function register(){\n $db = Database::init();\n $sql = \"INSERT INTO CLIENT(NOMC,PRENOMC,SEXE,DATE_DE_NAISSANCE,ADRESSEC,TELEPHONEC,EMAILC,USERC,PASSWORDC,NUM_PASSEPORT) VALUES (:nom,:prenom,:sexe,:daten,:adresse,:tel,:email,:username,:password,:passeport)\";\n $qry = $db->prepare($sql);\n //htmlentities\n $daten = date(\"Y-m-d\", strtotime($this->daten));\n $qry->bindParam(\":nom\",$this->nom,\\PDO::PARAM_STR);\n $qry->bindParam(\":prenom\",$this->prenom,\\PDO::PARAM_STR);\n $qry->bindParam(\":sexe\",$this->sexe,\\PDO::PARAM_STR);\n $qry->bindParam(\":daten\",$daten,\\PDO::PARAM_STR);\n $qry->bindParam(\":adresse\",$this->adresse,\\PDO::PARAM_STR);\n $qry->bindParam(\":tel\",$this->tel,\\PDO::PARAM_STR);\n $qry->bindParam(\":email\",$this->email,\\PDO::PARAM_STR);\n $qry->bindParam(\":username\",$this->username,\\PDO::PARAM_STR);\n $qry->bindParam(\":password\",$this->password,\\PDO::PARAM_STR);\n $qry->bindParam(\":passeport\",$this->passeport,\\PDO::PARAM_INT);\n $qry->execute();\n }", "function registerChild($id_resp,$nom,$prenom,$age){\n$co = connect_me();\n$query = \"INSERT INTO enfant(id_enfant,id_responsable,nom,prenom,age) VALUES (NULL,'\".$id_resp.\"','\".$nom.\"','\".$prenom.\"',\".$age.\")\";\n\tif($res =$co->query($query)){\n\t\t$msg= \"<p class='message'>L'enregistrement s'est bien passé. <a href='index.php'> Retour à l'accueil</a></p>\";\n\t\t//header(\"Location: settings.php?query_res=\".$msg.\"\");\n\t}else{\n\t\t$msg= \"<p class='message_error'>L'enregistrement s'est mal passé.<a href='index.php'> Retour à l'accueil</a></p>\";\n\t\t//header(\"Location: settings.php?query_res=\".$msg.\"\");\n\t}\n\t$co->close();\n}", "public function EnregistrerSite()\n {\n \n }", "function alta_tipo_entrada(){\n\t\t$u= new Tipo_entrada();\n\t\t$related = $u->from_array($_POST);\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos del Tipo de Entrada.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "private function registrarLocalmente()\n\t{\n\t\t$conexionBd = new ConectorBaseDatos();\n\t\t$conexionBd->Sentencia = sprintf(\"INSERT UsuarioFacebook (IdFacebook, DatosFacebook, ValidadoPor, FbAccessToken) VALUES (%s, %s, NULL, %s)\",\n\t\t$conexionBd->Escapar($this->IdFacebook),\n\t\t$conexionBd->Escapar(addslashes(serialize($this->DatosFacebook))),\n\t\t$conexionBd->Escapar($this->accessToken)\n\t\t);\n\t\t$conexionBd->EjecutarComando();\n\t\t$conexionBd->Desconectar();\n\t}", "function registrar(){\r\n\r\n include('config.php');\r\n\r\n date_default_timezone_set('America/Cuiaba');\r\n $pdo = new PDO('mysql:host='.HOST.';dbname='.DATABASE, USUARIO, SENHA);\r\n\r\n $cursos = array('Engenharia da Computação', 'Engenharia de Controle e Automação', 'Engenharia de Minas', 'Engenharia de Trasportes', 'Engenharia Quimica');\r\n \r\n $nome = $_POST['nome'];\r\n $email = $_POST['email'];\r\n $rga = $_POST['rga'];\r\n $semestre = $_POST['semestre']; \r\n $data = date('Y-m-d H:i:s');\r\n $senha = $_POST['senha'];\r\n $confirmaSenha = $_POST['confirmaSenha'];\r\n $curso = '';\r\n \r\n for($i = 1; $i <= 5; $i++){ //verificando qual o curso pelo rga\r\n\r\n if($rga['9'] == $i)\r\n $curso = $cursos[$i];\r\n \r\n \r\n }\r\n \r\n\r\n $sql = $pdo->prepare(\"INSERT INTO `tabela_estudantes` VALUES (null,?,?,?,?,?,?,?)\"); //inserirndo na tabela vendas\r\n\r\n $sql->execute(array($nome, $senha, $data, $email, $curso, $semestre, $rga));\r\n\r\n echo '<h6 style=\"color: rgb(255, 255, 255);\">Usuario registrado com sucesso!</h6>';\r\n\r\n }", "public function registrar_registro()\n \n {\n /** \n * @brief : Metodos para ingresar registro en la base de datos.\n * @return :Vista donde nos mostrara todos lo registro.\n */\n \n $data =Request()->all();\n registro::create($data);\n\n }", "function registrar(){\n\n\t\t\t\n\t\t$sql = \"INSERT INTO USUARIOS (\n\t\t\tlogin,\n\t\t\tpassword,\n\t\t\tnombre,\n\t\t\tapellidos,\n\t\t\temail,\n\t\t\tDNI,\n\t\t\ttelefono,\n\t\t\tFechaNacimiento,\n\t\t\tfotopersonal,\n\t\t\tsexo\n\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'\".$this->login.\"',\n\t\t\t\t\t'\".$this->password.\"',\n\t\t\t\t\t'\".$this->nombre.\"',\n\t\t\t\t\t'\".$this->apellidos.\"',\n\t\t\t\t\t'\".$this->email.\"',\n\t\t\t\t\t'\".$this->DNI.\"',\n\t\t\t\t\t'\".$this->telefono.\"',\n\t\t\t\t\t'\".$this->FechaNacimiento.\"',\n\t\t\t\t\t'\".$this->fotopersonal.\"',\n\t\t\t\t\t'\".$this->sexo.\"'\n\n\t\t\t\t\t)\";\n\t\t\t\t\t\t\t\t\n\t\tif (!$this->mysqli->query($sql)) { //Si la sentencia sql no devuelve información\n\t\t\treturn 'Error de gestor de base de datos';\n\t\t}\n\t\telse{\n\t\t\treturn 'Inserción realizada con éxito'; //si es correcta\n\t\t}\t\t\n\t}", "public function registrar(){\n\n /*parametros del metodo input:\n *nomnbre del campo,\n *si es requerido o no (true,false)\n *tipo del campo -actualmente valida (string,int,date,email)*/\n\n $nombre=$this->input('nombre',true,'string');\n\n $descripcion=$this->input('descripcion',true,'string');\n\n\n\n //si la validacion falla lo redirecciona a la vista donde esta los mensaje de error\n if($this->validateFails()){\n //este metodo REDIRECCIONA osea cambia de pagina, se le pasa a que controlador y que accion\n\n $this->redirect('Example','index');\n }else{\n\n $example=new Example();//no hace falta incluir el modelo ya esta incluido\n $example->setExampleParameters1($nombre);\n $example->setExampleParameters2($descripcion);\n $example->save();\n $this->redirect('Example','index');\n }\n }", "public function addRecordInDB($nome, $cognome, $codice_fiscale, $data_nascita, $numero_telefono, $email, $password){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n //Escaping\r\n $nome = DB_Functions::esc($nome);\r\n $cognome = DB_Functions::esc($cognome);\r\n $codice_fiscale = DB_Functions::esc($codice_fiscale);\r\n $numero_telefono = DB_Functions::esc($numero_telefono);\r\n $data_nascita = DB_Functions::esc($data_nascita);\r\n $email = DB_Functions::esc($email);\r\n $password = DB_Functions::esc($password);\r\n\r\n $query = \"INSERT INTO UTENTE_REGISTRATO (ID_UTENTE_REGISTRATO, NOME, COGNOME, CODICE_FISCALE, NUMERO_TELEFONO, DATA_NASCITA, EMAIL, PASSWORD) \r\n\t VALUES ($nome , $cognome, $codice_fiscale, $numero_telefono, $data_nascita, $email, SHA1($password)\";\r\n $resQuery1 = $db->executeQuery($query);\r\n // Se la query ha esito positivo\r\n if ($resQuery1[\"state\"]) {\r\n //Salva valore ID del record creato\r\n $query = \"SELECT max(ID_UTENTE_REGISTRATO) FROM UTENTE_REGISTRATO;\";\r\n $resQuery2 = $db->executeQuery($query);\r\n $this->id_utente_registrato = $resQuery2[\"response\"][0][0];\r\n $this->nome = $nome;\r\n $this->cognome = $cognome;\r\n $this->codice_fiscale = $codice_fiscale;\r\n $this->data_nascita = $data_nascita;\r\n $this->numero_telefono = $numero_telefono;\r\n $this->email = $email;\r\n $this->password = $password;\r\n }\r\n return $resQuery1;\r\n }", "public function Registrar_Ref_Personal(HojaVida $data){\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n \n $tiporegistro = \"Referencia Personal\";\n $accion = \"Registra una Nueva \".$tiporegistro.\" En el Sistema (Hoja vida) TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_SESSION['idUsuario'];\n \n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n\n $sql = \"INSERT INTO `th_referencias_personales`(`ref_id_hv`, `ref_id_usuario`, `ref_id_usuarioR`, `ref_nombre`, `ref_cargo`, `ref_empresa`, `ref_telefono`) \n VALUES (?,?,?,?,?,?,?)\";\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->id,\n $data->usuario,\n $idusuario,\n $data->ref_per_nombre,\n $data->ref_per_cargo,\n $data->ref_per_empresa,\n $data->ref_per_telefono\n )\n ); \n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n \n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "function ADD() {\n // si el atributo clave de la entidad no esta vacio\n\t\tif ( ( $this->login <> '' && $this->IdTrabajo <> '' ) ) {\n \n\t\t\t// construimos el sql para buscar esa clave en la tabla\n\t\t\t$sql = \"SELECT * FROM ENTREGA WHERE ( login = '$this->login' && IdTrabajo = '$this->IdTrabajo')\";\n // si da error la ejecución de la query\n\t\t\tif ( !$result = $this->mysqli->query( $sql ) ) { \n\t\t\t\treturn 'No se ha podido conectar con la base de datos'; // error en la consulta (no se ha podido conectar con la bd). Devolvemos un mensaje que el controlador manejara\n // si la ejecución de la query no da error\n\t\t\t} else { \n if ($result->num_rows == 0){ // miramos si el resultado de la consulta es vacio\n //Variable que almacena la sentencia sql\n\t\t\t\t\t$sql = \"INSERT INTO ENTREGA (\n\t\t\t\t\t\t\t login,\n IdTrabajo,\n Alias,\n Horas,\n Ruta) \n\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t'$this->login',\n\t\t\t\t\t\t\t\t'$this->IdTrabajo',\n\t\t\t\t\t\t\t\t'$this->Alias',\n '$this->Horas',\n '$this->Ruta'\n\t\t\t\t\t\t\t\t)\";//se contruye la sentencia sql para insertar la entrega\n \n \n \n }\n //si el número de tuplas no es 0\n else{\n return 'Ya existe la entrega introducida en la base de datos'; // ya existe\n }\n }\n // si da error en la ejecución del insert devolvemos mensaje\n\t\t\t\t\tif ( !$this->mysqli->query( $sql )) { \n\t\t\t\t\t\treturn \"Error en la inserción\";\n\t\t\t\t\t}\n \n //si no da error en la insercion devolvemos mensaje de exito\n else { \n\t\t\t\t\t\treturn 'Inserción realizada con éxito'; //operacion de insertado correcta\n\t\t\t\t\t}\n // si ya existe ese valor de clave en la tabla devolvemos el mensaje correspondiente\n\t\t\t\t} else \n\t\t\t\t\treturn 'Inserta un valor'; // ya existe\n \n\t}", "function registrarUsuario($nombre,$apellidos,$email,$edad,$puntos,$passW)\n {\n $consulta =\"INSERT INTO usuario (nombre,apellidos,email,edad,puntos,password) VALUES ('$nombre','$apellidos','$email',$edad,$puntos,'$passW')\";\n if($this->conexion->query($consulta))\n {\n \n }else{ \n echo \"Falló la creación de la tabla: (\" . $this->conexion->errno . \")// \" . $this->conexion->error.\"<br>\";\n }\n }", "function evt__Agregar()\n\t{\n\t\t$this->tabla()->resetear();\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "function enregistrerMembreJuryEpreuve(){\n $this->vue->titre='';\n $this->informations();\n $tableMembresJuryEpreuve=new Zoraux_Modeles_MembreJuryEpreuve();\n $tableMembresJuryEpreuve->supprimerMembreJuryEpreuve($_POST['epreuve_id']);\n foreach($_POST['professeur_id'] as $membreJury_id){\n $membreJuryEpreuve=$tableMembresJuryEpreuve->newMembreJuryEpreuve();\n $membreJuryEpreuve->epreuve_id=$_POST['epreuve_id'];\n $membreJuryEpreuve->membreJury_id=$membreJury_id;\n $membreJuryEpreuve->enregistrer();\n }\n foreach($_POST['professionnel_id'] as $membreJury_id){\n $membreJuryEpreuve=$tableMembresJuryEpreuve->newMembreJuryEpreuve();\n $membreJuryEpreuve->epreuve_id=$_POST['epreuve_id'];\n $membreJuryEpreuve->membreJury_id=$membreJury_id;\n $membreJuryEpreuve->enregistrer();\n }\n }", "function inserir() {\n\t\t$this->sql = mysql_query(\"INSERT INTO suporte (user_cad, data_cad, id_regiao, exibicao, tipo, prioridade, assunto, mensagem, arquivo, status, status_reg,suporte_pagina)\n\t\t\t\t\t VALUES\t('$this->id_user_cad ','$this->data_cad','$this->id_regiao', '$this->exibicao', '$this->tipo','$this->prioridade', '$this->assunto', '$this->menssagem', '$this->tipo_arquivo','1','1','$this->pagina');\") or die(mysql_error());\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\n\t\t}", "function RegEdificio ($nEdificio){\n\t\t \t$sql=\"INSERT INTO edificio(nomEdf)\n\t\t \tVALUES('$nEdificio')\";\n\t\t\t$this->db->query($sql, Adapter::QUERY_MODE_EXECUTE);\n\t\t\t$idEdificio = $this->db->getDriver()->getLastGeneratedValue();\n\t\t\t\n\t\t\treturn $this->DatosEdificio($idEdificio);\n\t\t }", "public function guardarRegistro2(){\r\n $this->database->execute(\"INSERT INTO empleados (nombreApellido, dni, email, pass) VALUES ('rodri', '12345678', 'rodri@gmail.com', '123456'\");\r\n }", "public function register($pseudo,$prenom,$nom,$email,$password,$classe,$datedenaissance,$sexe)\n {\n try\n {\n $passwordhash = passwordhash($password);\n\n $dateinscription = date('Y-m-d', time());\n $prenomplusnom = $prenom.\" \".$nom;\n $lastco = strftime('%d %B %Y à %H:%M');\n \n $stmt = $this->db->prepare(\"INSERT INTO users(pseudo,prenom,nom,prenomplusnom,email,password,classe,datedenaissance,sexe,dateinscription,notifMailPrive,allowFindSearch,comptePrive,lastco) VALUES(:pseudo, :prenom, :nom, :prenomplusnom, :email, :password, :classe, :datedenaissance, :sexe, :dateinscription, :notifMailPrive, :allowFindSearch, :comptePrive, :lastco)\"); \n $stmt->execute(array(\n 'pseudo' => $pseudo,\n 'prenom' => $prenom,\n 'nom' => $nom,\n 'prenomplusnom' => $prenomplusnom,\n 'email' => $email,\n 'password' => $passwordhash,\n 'classe' => $classe,\n 'datedenaissance' => $datedenaissance,\n 'sexe' => $sexe,\n 'dateinscription' => $dateinscription,\n 'notifMailPrive' => 'true',\n 'allowFindSearch' => 'true',\n 'comptePrive' => 'false',\n 'lastco' => $lastco\n ));\n \n return true; \n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }", "public function examen(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idExamen=\"\";\t\t\r\n\t\t$this->tipoExamen=\"\";\t\r\n\t\t$this->descripcion=\"\";\r\n\t}", "public function registrar()\n\t{\n\t\t$estado = new Estado();\n\t\t$estado->nombre = $_POST['nombre'];\n\t\t$estado->poblacion_hombres = $_POST['poblacionH'];\n\t\t$estado->poblacion_mujeres = $_POST['poblacionM'];\n\t\t$estado->poblacion_total = $_POST['poblacionT'];\n\t\t$estado->edad_promedio = $_POST['edadP'];\n\t\t$estado->create();\n\t\t//redireccionamos con un header location a la vista de agregarEstado\n\t\theader(\"location: index.php?controller=Direccion&action=agregarEstado\");\n\t}", "private function tbl_guiones_registro() {\r\n\t\t\t$this->guiones_registro = $this->esquema->createTable('GUIONES_REGISTRO');\r\n\t\t\t$this->guiones_registro->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del registro del guion'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('FECHA', 'datetime', array(\r\n\t\t\t\t'notnull' => false,\r\n\t\t\t\t'comment' => 'Fecha de ingreso del registro'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('USUARIO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del usuario del registro [ID de la tabla USUARIOS]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('TIPO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del tipo de registro [ID de la tabla GUIONES_REGISTRO_TIPO]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('AFECTACION', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de la afectacion del registro [ID de la tabla GUIONES_REGISTRO_AFECTACION]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('AVISO', 'bigint', array(\r\n\t\t\t\t'notnull' => false,\r\n\t\t\t\t'default' => 0,\r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'Numero del aviso del registro'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('UBICACION', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de la UBICACION del registro [ID de la tabla GUIONES_REGISTRO_UBICACION]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->setPrimaryKey(array('ID'));\r\n\t\t\t$this->guiones_registro->addForeignKeyConstraint($this->usuarios, array('USUARIO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->guiones_registro->addForeignKeyConstraint($this->guiones_registro_tipo, array('TIPO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->guiones_registro->addForeignKeyConstraint($this->guiones_registro_afectacion, array('AFECTACION'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->guiones_registro->addForeignKeyConstraint($this->guiones_registro_ubicacion, array('UBICACION'), array('ID'), $this->opcForeign);\r\n\t\t}", "public function save() {\n $query = \"\";\n\n // Se for um novo registro, cria uma query INSERT INTO\n if($this->new_register) {\n $columns = array();\n $values = array();\n\n foreach($this->get_columns_information() as $column) {\n if(('id' == $column['column_name'] && $this->get_column_value($column['column_name']) > 0) || 'id' != $column['column_name']) {\n $columns[] = $column['column_name'];\n $values[] = $this->get_column_value($column['column_name']);\n }\n }\n\n $query = \"INSERT INTO {$this->get_table_name()}(\" . implode(', ', $columns) . \") VALUES(\" . implode(', ', $values) . \");\";\n\n unset($columns, $values);\n\n // Se o registro ja existe e foi alterado, cria uma query UPDATE\n } else {\n $sets = array();\n $conds = array();\n\n $changed = false;\n\n // Cria o trecho da query com os valores para SET e as condicoes para WHERE\n foreach($this->get_columns_information() as $column) {\n $value = $this->get_column_value($column['column_name']);\n $old_value = $this->get_column_value($column['column_name'], true);\n\n // Verifica se algum campo foi modificado\n if($value !== $old_value)\n $changed = true;\n\n $sets[] = \"{$column['column_name']} = {$value}\";\n $conds[] = ($old_value != 'NULL') ? (\"{$column['column_name']} = {$old_value}\")\n : (\"({$column['column_name']} IS NULL OR {$column['column_name']} = '')\");\n }\n\n // Cria query de atualizacao apenas se houve alguma modificacao\n if($changed)\n $query = \"UPDATE {$this->get_table_name()}\n SET \" . implode(', ', $sets) . \"\n WHERE \" . implode(' AND ', $conds) . \";\";\n\n unset($sets, $conds);\n }\n\n // Tenta salvar o registro\n // Se salvar corretamente, atualiza os dados do objeto para que da proxima vez ele seja atualizado, caso seja um registro novo\n if(DB::execute($query)) {\n $this->new_register = false;\n $data = array();\n\n foreach($this->get_columns_information() as $column) {\n $this->{'_' . $column['column_name']} = $this->$column['column_name'];\n $data[$column['column_name']] = $this->$column['column_name'];\n }\n\n return true;\n }\n\n return false;\n }", "function newEpreuve(){\n $epreuve = $this->newEnregistrement();\n return $epreuve;\n }", "function alumno_registra_entrada($codigo_curso,$codigo_alumno,$entrada){\r\n\t\t$cn = $this->conexion();\r\n \r\n if($cn!=\"no_conexion\"){\r\n \t\r\n \t$sql=\"update $this->nombre_tabla_blog set eliminable=0 where codigo_curso='$codigo_curso' and codigo_alumno='$codigo_alumno'\";\r\n \t\r\n \t$rs = mysql_query($sql,$cn);\r\n \t\r\n\t \t$sql=\"insert into $this->nombre_tabla_blog (codigo_curso,codigo_alumno,entrada,persona_responde,fecha,hora) values ('$codigo_curso','$codigo_alumno','$entrada','A',curdate(),curtime() )\";\r\n\t\t\t\r\n\t $rs = mysql_query($sql,$cn);\r\n \r\n\t\t\tmysql_close($cn);\r\n\r\n\t\t\treturn \"mysql_si\";\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t}", "function registrarGuia($ulimoIdGuia, $numremesa, $idestablecimiento, $iddestinatario, $formaPago, $pesokg, $alto, $ancho, $largo, $unidades, $pesocobrar, $valorDeclarado, $flete, $costomanejo, $totalflete, $tipocarga, $idoperario, $numplaca, $idoperarioext, $estadocarga, $estadoRecogida, $observaciones, $idusaurio, $fechaRegistro) {\n \t\t $data = array('id_control' => $ulimoIdGuia,\n \t'nro_remesa' => $numremesa,\n 'id_establecimientos' => $idestablecimiento,\n \n 'id_destinatario' => $iddestinatario,\n 'forma_pago' => $formaPago,\n 'unidades' => $unidades,\n 'peso' => $pesokg,\n 'pv_alto' => $alto,\n 'pv_ancho' => $ancho,\n 'pv_largo' => $largo,\n 'peso_cobrar' => $pesocobrar,\n 'valor_declarado' => $valorDeclarado,\n 'flete' => $flete,\n 'costo_manejo' => $costomanejo,\n 'total_fletes' => $totalflete,\n 'tipo_carga' => $tipocarga,\n 'id_usuario_operario' => $idoperario,\n 'nro_placa' => $numplaca,\n 'id_operario' => $idoperarioext,\n 'estado_carga' => $estadocarga,\n 'estado_control' => $estadoRecogida,\n 'observaciones' => $observaciones,\n 'estado_contable' => 0,\n 'id_usuario' => $idusaurio,\n 'fecha_registro' => $fechaRegistro);\n $this->db->insert('txtar_admin_control', $data);\n $this->db->close();\n //echo $this->db->last_query();\n }", "public function saveEntidad(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_entidades SET entidad = \"%s\" WHERE entidad_id = %d',\n $this->entidad,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_entidades(entidad) VALUES (\"%s\")',\n $this->usuario);\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "public function save()\n {\n $ins = $this->valores();\n unset($ins[\"idInscription\"]);\n\n $ins['idUser'] = $this->userO->idUser;\n unset($ins[\"userO\"]);\n\n $ins['idProject'] = $this->project->idProject;\n unset($ins[\"project\"]);\n\n if (empty($this->idInscription)) {\n $this->insert($ins);\n $this->idInscription = self::$conn->lastInsertId();\n } else {\n $this->update($this->idInscription, $ins);\n }\n }", "public function registradoAction()\n {\n //Vacio\n }", "function alta_tipo_salida(){\n\t\t$u= new Tipo_salida();\n\t\t$related = $u->from_array($_POST);\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos del Tipo de Salida.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "function NouveauProfil($prenom,$nom,$pseudonyme,$mdp,$date,$sexe,$orientation){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"INSERT INTO allinformations VALUES ('$pseudonyme','$mdp','$nom','$prenom', '$date', '', '01', '$sexe', '$orientation', '1', '1', '0', '0', '0', '0', '', '', '', '', '', 'logo.jpg','logo2.png','logo3.jpg','0','1','0', NULL)\";\r\n\t\t//Les champs obligatoires sont remplis par défaut mais l'utilisateur peut directement les modifier dans ModifierMonProfil\r\n\t\t$ligne= mysqli_query($conn, $requete);\r\n\t\tmysqli_close($conn);\r\n\t\t}", "protected function fijarSentenciaInsert(){}", "public function creer(){ /*** Cree un utilisateur par insertion d'un tuple dans la table UserTab ***/\r\n \r\n \r\n // $this -> setInscrit(1);\r\n $this -> insertDb();//Insertion en Bd d'un tuple user\r\n\t\t\t\r\n }", "public function persist() {\n $bd = BD::getConexion();\n $sql = \"insert into usuarios (nombre, clave) values (:nombre, :clave)\";\n $sthSql = $bd->prepare($sqlInsertUsuario);\n $result = $sthSql->execute([\":nombre\" => $this->nombre, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "function evt__agregar()\n\t{\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "public function registro() {\n\n\t\tif(!$_SESSION[\"currentuser\"]){\n\t\t\techo \"<script>window.location.replace('index.php');</script>\";\n\t\t}\n\n\t\t$concu= new Concurso();\n\t\tif (isset($_POST[\"nombreC\"])){\n\t\t\t/*Comprueba si ya existe un concurso en la base de datos*/\n\t\t\t$existe=$concu->existConcurso();\n\t\t\t/*Si existe muestra un mensaje de error ya que solo puede existir un concurso\n\t\t\ten la base de datos*/\n\t\t\tif($existe){\n\t\t\t\t$errors = array();\n\t\t\t\t$errors[\"nombreC\"] = \"Ya existe un concurso registrado, no puede haber más\";\n\t\t\t\t$this->view->setVariable(\"errors\", $errors);\n\n\t\t\t\t/*Si no existe guarda los datos introducidos.*/\n\t\t\t}else{\n\t\t\t\t$concu->setIdC('1');\n\t\t\t\t$concu->setNombreC($_POST[\"nombreC\"]);\n\n\t\t\t\t$ruta=\"./resources/bases/\";//ruta carpeta donde queremos copiar las imagenes\n\t\t\t\t$basesCTemp=$_FILES['basesC']['tmp_name'];//guarda el directorio temporal en el que se sube la imagen\n\t\t\t\t$basesC=$ruta.$_FILES['basesC']['name'];//indica el directorio donde se guardaran las imagenes\n\t\t\t\tmove_uploaded_file($basesCTemp, $basesC);\n\n\t\t\t\t$concu->setBasesC($basesC,$basesCTemp);\n\t\t\t\t$concu->setCiudadC($_POST[\"ciudadC\"]);\n\t\t\t\t$concu->setFechaInicioC($_POST[\"fechaInicioC\"]);\n\t\t\t\t$concu->setFechaFinalC($_POST[\"fechaFinalC\"]);\n\t\t\t\t$concu->setFechaFinalistasC($_POST[\"fechaFinalistasC\"]);\n\t\t\t\t$concu->setPremioC($_POST[\"premioC\"]);\n\t\t\t\t$concu->setPatrocinadorC($_POST[\"patrocinadorC\"]);\n\n\t\t\t\ttry{\n\t\t\t\t\t/*Comprueba si los datos son validos*/\n\t\t\t\t\t$concu->checkIsValidForRegister();\n\n\t\t\t\t\t// guarda el objeto en la base de datos\n\t\t\t\t\t$concu->save();\n\n\t\t\t\t\t//mensaje de confirmación y redirige al metodo consultarConcurso del controlador ConcursoCotroller\n\t\t\t\t\techo \"<script> alert('Concurso registrado correctamente'); </script>\";\n\t\t\t\t\techo \"<script>window.location.replace('index.php?controller=concurso&action=consultarConcurso');</script>\";\n\n\t\t\t\t}catch(ValidationException $ex) {\n\n\t\t\t\t\t$errors = $ex->getErrors();\n\t\t\t\t\t$this->view->setVariable(\"errors\", $errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// renderiza la vista (/view/vistas/altaConcurso.php)\n\t\t$this->view->render(\"vistas\", \"altaConcurso\");\n\n\t}", "public function register(){\n $this->registration->execute([], $this);\n }", "public function persist() {\n $bd = BD::getConexion();\n $sqlInsertUsuario = \"insert into usuarios (nomUsuario, clave) values (:nomUsuario, :clave)\";\n $sthSqlInsertUsuario = $bd->prepare($sqlInsertUsuario);\n $result = $sthSqlInsertUsuario->execute([\":nomUsuario\" => $this->nomUsuario, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "function Save(){\n $rowsAffected = 0;\n if(isset($this->legajo)){\n $rowsAffected = $this->UpdateSQL([\"legajo = \".$this->legajo]);\n }else{\n $rowsAffected = $this->InsertSQL();\n if($rowsAffected > 0){\n $this->legajo = $this->Max(\"legajo\");\n }\n }\n if($rowsAffected == 0){\n throw new \\Exception(\"Error al guardar Usuario\");\n }else{\n $this->Refresh();\n }\n }", "public function register() {\n //\n $this->registeCRUD();\n }", "public function inserir()\n {\n }", "function prelasesor(){\n include(\"../include/conectar.php\"); \n $query =\"UPDATE tblsemestrepro SET asesor = '$this->asesor' WHERE tblsemestrepro.id_semestrepro = $this->semestrepy;\";\n $sql = mysqli_query($conection, $query);\n mysqli_close($conection); \n if($sql){\n\t\t\t $p =\"relacion\";\n include('../plantillas/paso.php');\n } \n else\n throw new Exception (\"Error: No es posible registrar\");\n }", "public function ulogiraj_registiraj()\r\n\t{\r\n\t\tif(isset($_POST['ulogiraj']))\r\n\t\t{\r\n\t\t\t$this->registry->template->title = 'Login';\r\n\t\t\t$this->registry->template->show( 'login' );\r\n\t\t}\r\n\t\tif(isset($_POST['registriraj']))\r\n\t\t{\r\n\t\t\t$this->registry->template->title = 'Registriraj se';\r\n\t\t\t$this->registry->template->show( 'register' );\r\n\t\t}\r\n\r\n\t}", "private function insertNew() {\n $sth=NULL;\n $array=array();\n $query=\"INSERT INTO table_spectacles (libelle) VALUES (?)\";\n $sth=$this->dbh->prepare($query);\n $array=array($this->libelle);\n $sth->execute($array);\n $this->message=\"\\\"\".$this->getLibelle().\"\\\" enregistré !\";\n $this->blank();\n $this->test=1;\n }", "public function setRecordInDB($id_utente_registrato, $nome, $cognome, $codice_fiscale, $data_nascita, $numero_telefono, $email, $password){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n //Escaping\r\n $nome = DB_Functions::esc($nome);\r\n $cognome = DB_Functions::esc($cognome);\r\n $codice_fiscale = DB_Functions::esc($codice_fiscale);\r\n $numero_telefono = DB_Functions::esc($numero_telefono);\r\n $data_nascita = DB_Functions::esc($data_nascita);\r\n $email = DB_Functions::esc($email);\r\n $password = DB_Functions::esc($password);\r\n\r\n $query = \"UPDATE UTENTE_REGISTRATO \r\n SET \tNOME = $nome,\r\n COGNOME = $cognome,\r\n CODICE_FISCALE = $codice_fiscale,\r\n NUMERO_TELEFONO = $numero_telefono,\r\n DATA_NASCITA = $data_nascita,\r\n EMAIL = $email,\r\n PASSWORD = SHA1($password)\r\n WHERE \t\r\n ID_UTENTE_REGISTRATO = $id_utente_registrato;\";\r\n $resQuery = $db->executeQuery($query);\r\n if ($resQuery[\"state\"]) {\r\n $this->nome = $nome;\r\n $this->cognome = $cognome;\r\n $this->codice_fiscale = $codice_fiscale;\r\n $this->data_nascita = $data_nascita;\r\n $this->numero_telefono = $numero_telefono;\r\n $this->email = $email;\r\n $this->password = $password;\r\n }\r\n return $resQuery;\r\n }", "function act_tipo_entrada(){\n\t\t$u= new Tipo_entrada();\n\t\t$related = $u->from_array($_POST);\n\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado los datos del Tipo de Entrada.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "function alta_familia(){\n\t\t$u= new Familia_producto();\n\t\t$u->fecha_alta=date(\"Y/m/d\");\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\n\t\t$related = $u->from_array($_POST);\n\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se ha registrado los datos de la Familia de Productos.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "public function registreerBeheerder() {\n $beheerder = new stdClass();\n $beheerder->voornaam = strip_tags($this->input->post('voornaam'));\n $beheerder->naam = strip_tags($this->input->post('naam'));\n $beheerder->email = strip_tags($this->input->post('email'));\n $beheerder->paswoord = sha1(strip_tags($this->input->post('paswoord')));\n $beheerder->soort = \"Beheerder\";\n $this->load->model('persoon_model');\n $data['beheerder'] = $this->persoon_model->insert($beheerder);\n\n redirect('persoon/index');\n }", "function inserirAgencia(){\n\n $banco = abrirBanco();\n //declarando as variáveis usadas na inserção dos dados\n $nomeAgencia = $_POST[\"nomeAgencia\"];\n $cidadeAgencia = $_POST[\"cidadeAgencia\"];\n\n //a consulta sql\n $sql = \"INSERT INTO Agencias(nomeAgencia,cidadeAgencia) VALUES ('$nomeAgencia','$cidadeAgencia')\";\n \n //executando a inclusão\n $banco->query($sql);\n //fechando a conexao com o banco\n $banco->close();\n voltarIndex();\n\n }", "public function insert(){\n\t\tif(!mysql_query(\"INSERT INTO $this->tabla (nombre) VALUES ('$this->nombre')\")){\n\t\t\tthrow new Exception('Error insertando renglón');\n\t\t}\n\t}", "public function save(){\n\t\t$bd=baseDatos::getInstance();\n\t\t$bd=new baseDatos(BD_USUARIO, BD_CONTRASENA, BD_NOMBRE_BD, BD_SERVIDOR);\n\t\t$bd->connect();\n\t\tif($this->id<>null){\n\t\t$columnas= array('idHotel','nombre','descripcion','cantidadEstrellas','ciudad','direccion','telefono','email','ubicacionFotografia');\n\t\t$valores = array($this->id,$this->nombre, $this->descripcion, $this->cantidadEstrellas, $this->ciudad, $this->direccion, $this->telefono, $this->email, $this->ubicacionFotografia);\n\t\t$filtros=array('idHotel'=>$this->id!= null);\n\t\tif (is_numeric($this->id) && $this->id > 0) {\n\t\t\t$bd->update(self::$tabla, $columnas, $valores, $filtros);\n\t\t} else {\n\t\t\t$bd->insert(self::$tabla, $columnas, $valores);\n\t\t}\n\t\t}else{\n\t\t\t$columnas= array('nombre','descripcion','cantidadEstrellas','ciudad','direccion','telefono','email','ubicacionFotografia');\n\t\t\t$valores = array($this->nombre, $this->descripcion, $this->cantidadEstrellas, $this->ciudad, $this->direccion, $this->telefono, $this->email, $this->ubicacionFotografia);\n\t\t\t$filtros=array('idHotel'=>$this->id!= null);\n\t\t\tif (is_numeric($this->id) && $this->id > 0) {\n\t\t\t\t$bd->update(self::$tabla, $columnas, $valores, $filtros);\n\t\t\t} else {\n\t\t\t\t$bd->insert(self::$tabla, $columnas, $valores);\n\t\t\t}\n\t\t}$bd->disconnect();\n\n\t}", "private function tbl_guiones_registro_afectacion() {\r\n\t\t\t$this->guiones_registro_afectacion = $this->esquema->createTable('GUIONES_REGISTRO_AFECTACION');\r\n\t\t\t$this->guiones_registro_afectacion->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de la afectacion'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_afectacion->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombre de la afectacion'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_afectacion->addColumn('ESTADO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Estado de la afectacion [ID de la tabla ESTADOS]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_afectacion->setPrimaryKey(array('ID'));\r\n\t\t\t$this->guiones_registro_afectacion->addForeignKeyConstraint($this->estados, array('ESTADO'), array('ID'), $this->opcForeign);\r\n\t\t}", "function reg_Empleado($ife, $name, $apellido, $dir, $tel, $ciudad) {\n\t\t\t$bit = false;\n\t\t\t$existe = $this->query_Registro('empleados', 'ife', $ife);\n\t\t\tif ($existe) {\n\t\t\t\techo \"<script>alert('La clave para el Empleado ya se encuentra registrada, intente de nuevo.');</script>\";\n\t\t\t}else{\n\t\t\t\t$sql_Reg = 'INSERT INTO empleados (IFE, nombre, apellido, direccion, telefono, ciudad)' .\n\t\t\t\t\t\t\t'VALUES (\"'.$ife.'\", \"'.$name.'\", \"'.$apellido.'\", \"'.$dir.'\", \"'.$tel.'\", \"'.$ciudad.'\")';\n\t\t\t\t$sql_Res = $this->conn->query($sql_Reg);\n\t\t\t\tif ($sql_Res) {\n\t\t\t\t\t$bit = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $bit;\n\t\t\t$this->conn->close();\n\t\t}", "function registrarDetalleDocumento(DetalleDocumento $nuevoDetalle){\n\n require 'parametrosBD.php';\n\n try{\n $conn = new PDO(\"mysql:host=$host;dbname=$nombreBaseDatos\", $usuario,$password);\n\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n $query = $conn->prepare(\"INSERT INTO DETALLE_DOCUMENTO (idTipoDoc, folioDoc, codProd, precioUnitario, cantUnitaria, descuento, valor) \n VALUES (?, ?, ?, ?, ?, ?, ?)\");\n \n $result = $query->execute([$nuevoDetalle->getEncabezadoDocumento()->getTipoDoc()->getIdTipoDoc(),\n $nuevoDetalle->getEncabezadoDocumento()->getFolioDoc(), \n $nuevoDetalle->getProducto()->getCodProd(),\n $nuevoDetalle->getPrecioUnitario(),\n $nuevoDetalle->getCantUnitaria(),\n $nuevoDetalle->getDescuento(),\n $nuevoDetalle->getValor()]);\n \n if($result === true)\n {\n return 'ok';\n }\n else\n {\n return 'err';\n }\n\n }catch(PDOException $pe){\n\n return \"err : \" . $pe->getMessage();\n\n }\n }", "public function registrar_usuario($nombre,$apellido,$genero,$fecha_nacimiento,$correo,$imagen,$contraseña, $type){\n \n \n $nodo_usuario = new Usuario();\n $mysql = new Conexion();\n\n $nodo_usuario->nombre = $nombre;\n $nodo_usuario->apellido = $apellido; \n $nodo_usuario->genero = $genero;\n $nodo_usuario->fecha_nacimiento = $fecha_nacimiento;\n $nodo_usuario->correo = $correo; \n $nodo_usuario->imagen = $imagen; \n $nodo_usuario->contraseña = $contraseña;\n $nodo_usuario->type = $type;\n \n /* aun no esta funcionando esto\n\t $nodo_usuario->nick = $nik;\n\t $nodo_usuario->ciudad_origen = $orig;\n\t $nodo_usuario->lugar_recidencia = $reci; \n\t $nodo_usuario->sitio_web = $web; \n\t $nodo_usuario->facebook = $face;\n\t $nodo_usuario->twitter = $twit;\n\t $nodo_usuario->youtube = $you;\n */ \n \n ModelUsuarios::crearNodoUsuario($nodo_usuario); //crea el nodo del Usuario \n\n $idneo4j = $nodo_usuario->id; //obtengo el id del nodo creado\n \n\n /*\n * Registro de usuario en Mysql\n * \"la url de facebook es importante y no se esta capturando\"\n */\n \n $sql = \"INSERT INTO usuario (\n email,\n idfacebook,\n idneo4j,\n password\n )VALUES(\n '\".$correo.\"',\n '12345678',\n '\".$idneo4j.\"',\n '\".$contraseña.\"'\n );\";\n \n return $mysql->ejecutar_query($sql); \n \n \n \n \n }", "public function register()\n {\n $this->registration->execute([],$this);\n }", "public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }", "public function store(){\n\n echo parent::register($_POST) ? header('location: ?controller=factura&method=create') : 'Error en el registro';\n }", "function ajouter_user($nom, $prenom, $email, $password, $cle_d_activation, $actif, $newsletter){\n\n\t\t$bdd=connexion_BD('projetLion');\n\n\t\t //Ajout de l'utilisateur dans la table login_users\n\t\t$req = $bdd->prepare('INSERT INTO login_users(nom, prenom, email, password, cle_d_activation, actif, newsletter) VALUES(:nom, :prenom, :email, :password, :cle_d_activation, :actif, :newsletter)');\n\t\t$req->execute(array(\n\t\t\t'nom' => $nom,\n\t\t\t'prenom' => $prenom,\n\t\t\t'email' => $email,\n\t\t\t'password' => $password,\n\t\t\t'cle_d_activation' => $cle_d_activation,\n\t\t\t'actif' => $actif,\n\t\t\t'newsletter' => $newsletter\n\t\t\t));\n\n\t\t\n\t}", "function registrarModeloIns() {\n $Accion = \"\";\n $Datos[0] = $Accion;\n $Datos[1] = $this->getNModCodigo(); //1\n $Datos[2] = $this->getNModCodigo(); //1\n $Datos[3] = $this->getNModCodigo(); //1\n $query = $this->db->query(\"CALL USP_MOD_I_MODELO(?,?,?)\", $Datos);\n /*return $query;*/\n //$query = $this->db->query(\"CALL USP_MUL_I_HIJOS2(?,?,?,?)\", $Datos);\n $this->db->close();\n if($query){\n $query = $query->result_array();\n $this->setNModeloId($query[0]['nModID']);\n return true;\n }else{\n return false;\n }\n }", "function crearEntrenador(){\n\t\tglobal $con;\n\t\t$Nombre = $_POST['Nombre'];\n\t\t$Apellido = $_POST['Apellido'];\n\t\t$Telefono = $_POST['Telefono'];\n\t\t$Club = $_POST['Club'];\n\t\t$Email = $_POST['Email'];\n\t\t$Password = $_POST['Password'];\n\t\t$user = strstr($Email, '@', true);\n\n\t\t$crear_entrenador = \"INSERT INTO User(Name, LastName, UserName, Password, Phone, Email, Role)\n\t\t\t\t\t\t\tVALUES('$Nombre', '$Apellido', '$user', '$Password', '$Telefono','$Email', 'Entrenador')\";\n\t\t$send_query = mysqli_query($con, $crear_entrenador);\n\n\t\t$login = \"INSERT INTO Coachs(UserID, Role, Asociacion)\n\t\t\t\t\tVALUES( LAST_INSERT_ID(),'Entrenador','$Club')\";\n\t\t$send_query2 = mysqli_query($con, $login);\n\n\t\tif(!$send_query or !$send_query2){\n\t\t\t\tdie('Could not update data: ');\n\t\t}\n\t\telse{\n\t\t\t\techo \"Updated data successfully\\n\";\n\t\t\t\tunset($_POST);\n\t\t\t\tunset($_REQUEST);\n\t\t\t\techo \"<script>location.href='tablaEntrenadoresAdmin.php';</script>\";\n\t\t}\n}", "public function guardar()\n\t{\n\t\t// Crear una instancia de la conexion\n\t\t$conexion = new Conexion;\n\n\t\t// Comprobar si es un registro nuevo o uno ya existente\n\t\tif ($this->update) {\n\n\t\t\t// Preparar la sentencia para actualizar el tipo de rol en la bd\n\t\t\t$sentencia = $conexion->conn->prepare(\"UPDATE \". static::$tablaConsulta . \" SET medio= ? WHERE id= ?\");\n\n\t\t\t// Pasar los campos del objecto a la sentencia\n\t\t\t$sentencia->bind_param(\n\t\t\t\t\t'si',\n\t\t\t\t\t$this->medio,\n\t\t\t\t\t$this->id\n\t\t\t);\n\n\t\t} else {\n\n\t\t\t// Preparar la sentencia para isertar el tipo de rol en la bd\n\t\t\t$sentencia = $conexion->conn->prepare(\"INSERT INTO \". static::$tablaConsulta . \" VALUES (null, ?)\");\n\n\t\t\t// Pasar los campos del objecto a la sentencia\n\t\t\t$sentencia->bind_param(\n\t\t\t\t\t's',\n\t\t\t\t\t$this->medio\n\t\t\t);\n\t\t}\n\n\n // Ejecutar la sentencia\n\t\tif ( $sentencia->execute() ) {\n\n\t\t\t// Devolver un uno si fue un exito\n\t\t\treturn 1;\n\t\t} else {\n\n\t\t\t// Devolver un 0 si ocurrio un error\n\t\t\treturn 0;\n\t\t}\n\t}", "public function persist (){\n \n $this->query = \"INSERT INTO libros(titulo,autor,editorial) VALUES (:titulo, :autor, :editorial)\";\n\n // $this->parametros['id']=$user_data[\"id\"];\n $this->parametros['titulo']=$this->titulo;\n $this->parametros['autor']=$this->autor;\n $this->parametros['editorial']=$this->editorial;\n \n $this->get_results_from_query();\n\n\n $this->mensaje = \"Libro agregado exitosamente\";\n \n }", "public function insertionUtilisateur(Tache $t){\n $fait = 0;\n $login = $_SESSION['pseudo'];\n $query = \"insert into tache values ('\".NULL.\"','\".$t->getTitre().\"','\".$t->getDescription().\"','\".$t->getDatePrevu().\"','\".$t->getDateInscrite().\"','\".$fait.\"','\".$login.\"')\";\n $this->con->executeQuery($query);\n }", "function registerToDatabase() {\n\t\t\tif ($this->id != null && $this->id != 0) return false;\n\n\t\t\t$this->conn = connectToDb(\"db_avalanche_store\");\n\n\t\t\t$add_query = \"INSERT INTO tbl_dev_info \n\t\t\t(user_id, \n\t\t\t dev_name,\t\n\t\t\t dev_desc) \n\t\t\tVALUES \n\t\t\t('$this->dev_id', \n\t\t\t '$this->dev_name',\t\n\t\t\t '$this->dev_description');\";\n\n\t\t\t$result = $this->conn->query($add_query);\n\n\t\t\t$this->conn->close();\n\n\t\t\tif (!$result) return false;\n\n\t\t\treturn true;\n\t\t}", "public static function add($entreprise){\n $con=new connexion();\n $resultat=$con->executeactualisation(\"insert into tblentreprise (id_entreprise,admin_id,nom,logo,ville_id,adresse_complete,etat,date_ajout,date_modifier)\n values('\" . $entreprise->ident . \"','\" . $entreprise->adminid . \"','\" . $entreprise->nom . \"','\" . $entreprise->logo . \"','\" . $entreprise->villeid . \"','\" . $entreprise->adressecomp . \"',1,NOW(),NOW())\");\n $con->closeconnexion();\n\n }", "function ajouterUe($id, $nomUe,$libelleUe) {\n $query = 'insert into ue values(\"\",\"'.$nomUe.'\",\"'.$id.'\",\"'.$libelleUe.'\")';\n mysql_query($query) or die (\"Impossible d'inserer une UE\");\n\t\n}", "public function registrarConsulta(){\n\t\tConexion::getConexion();\n\t\t$con = Conexion::$conexion;\n\t\t$ins = $con->prepare(\"INSERT INTO consulta(idconsulta, idpaciente, fechaconsulta, consulta) VALUES (:idconsulta,:idpaciente,:fechaconsulta,:consulta)\");\n\t\t$ins->execute(array(\n\t\t\t\":idconsulta\" => 0,\n\t\t\t\":idpaciente\" => $this->getIdPaciente(),\n\t\t\t\":fechaconsulta\" => $this->getFechaConsulta(),\n\t\t\t\":consulta\" => $this->getConsultaCadena()\n\t\t\t));\n\t\tConexion::killConexion();\n\t\tif ($ins) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "function ajoue_proprietaire($nom,$CA,$debut_contrat,$fin_contrat)\r\n{ $BDD=ouverture_BDD_Intranet_Admin();\r\n\r\n if(exist($BDD,\"proprietaire\",\"nom\",$nom)){echo \"nom deja pris\";return;}\r\n\r\n $SQL=\"INSERT INTO `proprietaire` (`ID`, `nom`, `CA`, `debut_contrat`, `fin_contrat`) VALUES (NULL, '\".$nom.\"', '\".$CA.\"', '\".$debut_contrat.\"', '\".$fin_contrat.\"')\";\r\n\r\n $result = $BDD->query ($SQL);\r\n\r\n if (!$result)\r\n {echo \"<br>SQL : \".$SQL.\"<br>\";\r\n die('<br>Requête invalide ajoue_equipe : ' . mysql_error());}\r\n}", "public function RegistrarDatosPersonales(HojaVida $data){\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n \n $tiporegistro = \"Info. Datos Personales\";\n $accion = \"Registra una Nueva \".$tiporegistro.\" En el Sistema (HOJA VIDA) TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_POST['id_usuarioR'];\n $idusuarioR = $_SESSION['idUsuario'];\n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n\n $sql = \"INSERT INTO `th_personas`(`per_id_usuario`, `per_cedula`, `per_nombres`, `per_apellidos`, `per_fecha_nacimiento`,\n `per_id_dep_nacimiento`, `per_id_ciu_nacimiento`, `per_direccion`, `per_telefono`, `per_celular`, `per_email`, `per_ruta_foto`, \n `per_id_usuarioR`) \n VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->id_usuario,\n $data->per_cedula,\n $data->per_nombres,\n $data->per_apellidos,\n $data->per_fecha_nacimiento,\n $data->per_id_departamento,\n $data->per_id_municipio,\n $data->per_direccion,\n $data->per_telefono,\n $data->per_celular,\n $data->per_email,\n $data->per_ruta_foto,\n $idusuarioR\n )\n ); \n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n \n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "public function insert( $objet);", "public function agregar_docente(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n\r\n\r\n if(empty($_POST[\"nombre\"]) or empty($_POST[\"apellido\"]) or empty($_POST[\"num_identidad\"])){\r\n header(\"Location:\".Conectar::ruta().\"admin/profesores/crear.php?m=1\");\r\n exit();\r\n }\r\n $esta='activo';\r\n $conectar=parent::conexion();\r\n $sql=\"insert into docente values(null,?,?,?,?,now());\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->bindValue(1, $_POST[\"nombre\"]);\r\n $sql->bindValue(2, $_POST[\"apellido\"]);\r\n $sql->bindValue(3, $_POST[\"num_identidad\"]);\r\n $sql->bindValue(4, $esta);\r\n $sql->execute();\r\n $resultado=$sql->fetch(PDO::FETCH_ASSOC);\r\n header(\"Location:\".Conectar::ruta().\"admin/profesores/index.php?m=2\");\r\n \r\n }", "Function donneefournisseurs()\r\n {\r\n echo \"copie des données de la table fournisseurs\";\r\n $req=\"INSERT INTO `\".Valorisation::$anneenouvelle.\"`.`fournisseurs` SELECT * FROM `\".Valorisation::$anneeancienne.\"`.`fournisseurs`\";\r\n Valorisation::$bddnew->query($req); \r\n }", "public function register() {\n\t\t\n\t\t// DB connection\n\t\t$db = Database::getInstance();\n \t$mysqli = $db->getConnection();\n\t\t\n $data = (\"INSERT INTO user (username,password,first_name,\n last_name,dob,address,postcode,email)\n VALUES ('{$this->_username}',\n '{$this->_sha1}',\n '{$this->_first_name}',\n '{$this->_last_name}',\n '{$this->_dob}',\n '{$this->_address}',\n '{$this->_postcode}',\n '{$this->_email}')\");\n\t\t\t\t\t\t \n\t\t\t$result = $mysqli->query($data);\n if ( $mysqli->affected_rows < 1)\n // checks if data has been succesfully inputed\n $this->_errors[] = 'could not process form';\n }", "public function avoir_realisateur_favoris_new(){\r\n\t\tglobal $conn;\r\n\t\t$query = $conn->prepare(\"INSERT INTO avoir_realisateur_favoris(id_realisateur, id_films) VALUES (:id_realisateur, :id_films)\");\r\n\t\t$query->execute(array(\"id_realisateur\" => $this->id_realisateur, \"id_films\" => $this->id_films));\r\n\t}", "public function registration(){\n\n // ejecuta la funcion del modelo verificando que sea post \n \tif ($_SERVER['REQUEST_METHOD'] == 'POST') \n \t{\n \t\t$this->model->registration($_POST['contratista']);\n \t}\n \telse\n \t{\n \t\tshow_404();\n \t}\n }", "public function saveUsuario(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_usuario SET usuario = \"%s\" password = \"%s\" WHERE usuario_id = %d',\n $this->usuario,\n $this->password,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_usuario ( usuario, password) VALUES (\"%s\", \"%s\")',\n $this->usuario,\n $this->password );\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "function agregar($nombre,$correo,$usuario,$rol,$zonah,$estado,$psw)\n {\n $Valores = \"'\".$usuario.\"','\".$psw.\"','\".$nombre.\"','\".$correo.\"',\".$estado.\",\".$zonah.\",\".$rol;\n $this->Insertar(\"usuarios\",\"usuario,password,nombre,correo,activo,zonashorarias_id,roles_id\",$Valores);\n }", "public function Registrar_FormacionProfesional(HojaVida $data){\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n \n $tiporegistro = \"Formación Profesional\";\n $accion = \"Registra una Nueva \".$tiporegistro.\" En el Sistema (Hoja vida) TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_SESSION['idUsuario'];\n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n\n $sql = \"INSERT INTO `th_formacion_profesional`(`for_pro_id_HV`, `for_pro_id_user`, `for_pro_id_userR`, `for_pro_id_nivel_educacion`, \n `for_pro_titulo`,`for_pro_institucion`, `for_pro_fecha_inicio`, `for_pro_fecha_fin`, `for_pro_ruta_certificado`) \n VALUES (?,?,?,?,?,?,?,?,?)\";\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->id,\n $data->usuario,\n $idusuario,\n $data->for_pro_id_nivel,\n $data->for_pro_titulo,\n $data->for_pro_institucion,\n $data->for_pro_fecha_inicio,\n $data->for_pro_fecha_fin,\n $data->for_pro_ruta_certificado\n )\n ); \n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "public function GuardarEstado()\n\t{\n\t\t$query=\"INSERT INTO estado (idpais,estado,descripcion) VALUES ($this->id_pais,'$this->estado','$this->descripcion')\";\n\t\t$resp=$this->db->consulta($query);\n\t\t$this->id_estado = $this->db->id_ultimo();\n\t\t\n\t\t\n\t\t\n\t}", "public function createNoUser(){\r\n $this -> setInscrit(0);\r\n $this -> insertDb();//Insertion en Bd d'un tuple user\r\n \r\n }", "public function registrar_usuario($nombre, $apellido, $cedula, $telefono, $email, $direccion, $cargo, $usuario, $password1, $password2, $estado, $permisos)\n {\n $conectar = parent::conexion();\n parent::set_names();\n $sql = \"insert into usuarios \n values(null,?,?,?,?,?,?,?,?,?,?,now(),?);\";\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $_POST[\"nombre\"]);\n $sql->bindValue(2, $_POST[\"apellido\"]);\n $sql->bindValue(3, $_POST[\"cedula\"]);\n $sql->bindValue(4, $_POST[\"telefono\"]);\n $sql->bindValue(5, $_POST[\"email\"]);\n $sql->bindValue(6, $_POST[\"direccion\"]);\n $sql->bindValue(7, $_POST[\"cargo\"]);\n $sql->bindValue(8, $_POST[\"usuario\"]);\n $sql->bindValue(9, $_POST[\"password1\"]);\n $sql->bindValue(10, $_POST[\"password2\"]);\n $sql->bindValue(11, $_POST[\"estado\"]);\n $sql->execute();\n //obtenemos el valor del id del usuario\n $id_usuario = $conectar->lastInsertId();\n //insertamos los permisos\n //almacena todos los checkbox que han sido marcados\n //este es un array tiene un name=permiso[]\n $permisos = $_POST[\"permiso\"];\n // print_r($_POST);\n $num_elementos = 0;\n while ($num_elementos < count($permisos)) {\n $sql_detalle = \"insert into usuario_permiso\n values(null,?,?)\";\n $sql_detalle = $conectar->prepare($sql_detalle);\n $sql_detalle->bindValue(1, $id_usuario);\n $sql_detalle->bindValue(2, $permisos[$num_elementos]);\n $sql_detalle->execute();\n //recorremos los permisos con este contador\n $num_elementos = $num_elementos + 1;\n }\n }", "public function inserCompte()\n {\n $username = \"Numherit\";\n $userId = 1;\n $token = $this->utils->getToken($userId);\n\n $nom = $this->utils->securite_xss($_POST['nom']);\n $prenom = $this->utils->securite_xss($_POST['prenom']);\n $adresse = $this->utils->securite_xss($_POST['adresse']);\n $email = $this->utils->securite_xss($_POST['email']);\n $password = $this->utils->generation_code(12);\n $dateNaissance = $this->utils->securite_xss($_POST['datenaiss']);\n $typePiece = $this->utils->securite_xss($_POST['typepiece']);\n $numPiece = $this->utils->securite_xss($_POST['piece']);\n $dateDeliv = $this->utils->securite_xss($_POST['datedelivrancepiece']);\n $telephone = trim(str_replace(\"+\", \"00\", $this->utils->securite_xss($_POST['phone'])));\n $sexe = $this->utils->securite_xss($_POST['sexe']);\n $user_creation = $this->userConnecter->rowid;\n $agence = $this->userConnecter->fk_agence;\n $response = $this->api_numherit->creerCompte($username, $token, $nom, $prenom, $adresse, $email, $password, $dateNaissance, $telephone, $user_creation, $agence, $sexe, $typePiece, $numPiece, $dateDeliv);\n\n $tab = json_decode($response);\n if (is_object($tab)) {\n if ($tab->{'statusCode'} == '000') {\n @$num_transac = $this->utils->generation_numTransaction();\n @$idcompte = $this->utils->getCarteTelephone($telephone);\n @$this->utils->SaveTransaction($num_transac, $service = ID_SERVICE_CREATION_COMPTE, $montant = 0, $idcompte, $user_creation, $statut = 0, 'SUCCESS: CREATION COMPTE', $frais = 0, $agence, 0);\n $true = 'bon';\n $this->utils->log_journal('Creation compte', 'Client:' . $nom . ' ' . $prenom . ' Agence:' . $agence, 'succes', 1, $user_creation);\n $this->rediriger('compte', 'compte/' . base64_encode($true));\n } else {\n $this->utils->log_journal('Creation compte', 'Client:' . $nom . ' ' . $prenom . ' Agence:' . $agence, 'echec', 1, $user_creation);\n $this->rediriger('compte', 'compte/' . base64_encode($tab->{'statusMessage'}));\n }\n }\n }", "public function guardar(){\r\n\r\n\t $conexion = new Conexion();\r\n\t if($this->nombre ==true ){\r\n\t \t $consulta = $conexion->prepare('INSERT INTO ' . self::TABLA .' ( nombre,apellidos,edad,curso,transporteEscolar) \r\n\t \tVALUES(:nombre,:apellidos,:edad,:curso,:transporteEscolar)');\r\n\t \r\n\t $consulta->bindParam(':nombre', $this->nombre);\r\n\t $consulta->bindParam(':apellidos', $this->apellidos);\r\n\t $consulta->bindParam(':edad', $this->edad);\r\n\t $consulta->bindParam(':curso', $this->curso);\r\n\t $consulta->bindParam(':transporteEscolar', $this->transporteEscolar);\r\n\t $consulta->execute();\r\n\t\t\t$this->idAlumno = $conexion->lastInsertId();\r\n\t\t//\tif($respuesta1){\r\n\t\t//\t\treturn $respuesta1;\r\n\t\t//\t}\t\r\n\t\t\techo \"<h2 style='color:white;'>El Alumno se ha registrado con el id: \" . $this->idAlumno.\"</h2>\";\r\n\t\t\t printf (\"<br/><a href='registroAlumnos.php'><button class='lila'>Volver</button></a>\");\t\r\n\t\t}else{\r\n\t\t\techo \"<h2 style='color:white;'>No se pudo realizar el registro.</h2>\";\r\n\t\t\t printf (\"<br/><a href='registroAlumnos.php'><button class='lila'>Volver</button></a>\");\r\n\t\t}\r\n\t\t$conexion = null; \r\n\t\t}", "public function agregar_empresa_controlador(){\n\t\t$codigo=mainModel::limpiar_cadena($_POST[\"cc-reg\"]);\n\t\t$nombre=mainModel::limpiar_cadena($_POST[\"nombre-reg\"]);\n\t\t$telefono=mainModel::limpiar_cadena($_POST[\"telefono-reg\"]);\n\t\t$email=mainModel::limpiar_cadena($_POST[\"email-reg\"]);\n\t\t$direccion=mainModel::limpiar_cadena($_POST[\"direccion-reg\"]);\n\t\t$director=mainModel::limpiar_cadena($_POST[\"director-reg\"]);\n\t\t$telefono2=mainModel::limpiar_cadena($_POST[\"telefono2-reg\"]);\n\t\t$year=mainModel::limpiar_cadena($_POST[\"year-reg\"]);\n\t\t\n\t\t\n\t\t$consulta1=mainModel::ejecutar_consulta_simple(\"SELECT EmpresaCodigo FROM empresa WHERE EmpresaCodigo='$codigo'\");\n\t\t\t\t\n\t\t\tif ($consulta1->rowCount()<=0){\n\n\t\t\t\t$consulta2=mainModel::ejecutar_consulta_simple(\"SELECT EmpresaNombre FROM empresa WHERE EmpresaNombre='$nombre'\");\t\n\n\t\t\t\tif($consulta2->rowCount()<=0){\n\t\t\t\t\t$datosEmpresa=[\n\t\t\t\t\t\t\"Codigo\"=>$codigo,\n\t\t\t\t\t\t\"Nombre\"=>$nombre,\n\t\t\t\t\t\t\"Telefono\"=>$telefono,\n\t\t\t\t\t\t\"Email\"=>$email,\n\t\t\t\t\t\t\"Direccion\"=>$direccion,\n\t\t\t\t\t\t\"Director\"=>$director,\n\t\t\t\t\t\t\"Telefono2\"=>$telefono2,\n\t\t\t\t\t\t\"Year\"=>$year\n\t\t\t\t\t\t];\n\t\t\t\t\t$guardarEmpresa=empresaModelo::agregar_empresa_modelo($datosEmpresa);\n\t\t\t\t\tif($guardarEmpresa->rowCount()>=1){\n\t\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\"=>\"Registro exitoso\",\n\t\t\t\t\t\t\t\"Texto\"=>\"Se ha registrado la empresa en el sistema\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t}else{\n\t\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\"=>\"No se ha podido registrar la Empresa en el sistema\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El nombre de la empresa que acaba de ingresar ya se encuentra resgitrada en el sistema\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El NIT que acaba de ingresar ya se encuentra resgitrada en el sistema\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t}\n\t\t\treturn mainModel::sweet_alert($alerta);\n\t}", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "public function addNewRegiuneByAdmin($data)\n {\n $nume = $data['nume'];\n\n $checkRegiune = $this->checkExistRegiune($nume);\n\n\n if ($nume == \"\") {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Câmpurile de introducere nu trebuie să fie Golite!</div>';\n return $msg;\n } elseif (strlen($nume) < 2) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Numele regiunii este prea scurt, cel puțin 2 caractere!</div>';\n return $msg;\n } elseif ($checkRegiune == TRUE) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Regiunea există deja, vă rugăm să încercați o alta regiune ...!</div>';\n return $msg;\n } else {\n\n $sql = \"INSERT INTO regiune(nume ) VALUES(:nume)\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':nume', $nume);\n $result = $stmt->execute();\n if ($result) {\n $msg = '<div class=\"alert alert-success alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Success !</strong> Ați înregistrat cu succes!</div>';\n return $msg;\n } else {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Error !</strong> Ceva n-a mers bine !</div>';\n return $msg;\n }\n }\n }", "public function registrarCliente($dados){\n //$conexao = $c->conexao();\n $tipoCadastro = $_POST['tipocad'];\n $tipoCliente = $_POST['tipo'];\n $iss = $_POST['iss'];\n $nome = trim($_POST['nome']);\n // $nomeJuridico = trim($_POST['nomeJuridico']);\n $nomeFantasia = trim($_POST['nomeFantasia']);\n $apelido = trim($_POST['apelido']);\n $cnpj = $_POST['cnpj'];\n $cpf = $_POST['cpf'];\n $rg = trim($_POST['rg']);\n $dt_nascimento = trim($_POST['dtnascimento']);\n $telefone = $_POST['telefone'];\n // $telefoneJ = $_POST['telefoneJ'];\n $telefone2J = $_POST['telefone2J'];\n $cep = $_POST['cep'];\n $endereco = $_POST['endereco'];\n $bairro = $_POST['bairro'];\n $uf = $_POST['uf'];\n $cidade = $_POST['cidade'];\n $complemento = $_POST['complemento'];\n $numero = trim($_POST['numero']);\n $usuid = $_SESSION['usuid'];\n\n $sql = \"SELECT count(*) as total from tbclientes WHERE rg = '$rg' or cnpj = '$cnpj' or cpf = '$cpf' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n\n if($row['total'] == 1){\n return 0;\n }else{\n\n $sql = \"INSERT INTO tbclientes (nome, nomefantasia, apelido, tipocad, tipopessoa, iss, cpf, cnpj, rg, telefone, telefone2, dt_nascimento, data_cadastro, usuid, habilitado, cep, endereco, bairro, uf, cidade, complemento, numero) VALUES ('$nome', '$nomeFantasia', '$apelido', '$tipoCadastro', '$tipoCliente', '$iss', '$cpf', '$cnpj', '$rg', '$telefone', '$telefone2J', '$dt_nascimento', NOW(), '$usuid', 'S', '$cep', '$endereco', '$bairro', '$uf', '$cidade', '$complemento', '$numero') \";\n\n $mensagem = \"O Usuário \".$_SESSION['email'].\" cadastrou o Cliente $nome \";\n $this->salvaLog($mensagem);\n\n return $this->conexao->query($sql);\n\n }\n\n }", "public static function registrar($datos,$idEmpleado)\n {\n\n//convertimos a tipo date\n$date = new DateTime($datos->fecha);\n\n\nDB::table('recibonomina')->insert(array(\n 'idDocente' => $idEmpleado,\n 'fecha'=> $date->format('Y-m-d'),\n \t'mes_a_Pagar' => $datos->mes,\n 'totalPago'=> $datos->total,\n \t'descuentos' => $datos->valorDescuento,\n 'bonos'=> $datos->valorAdicional,\n \t'observaciones' =>$datos->Observaciones\n )); \n }", "private function ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}", "public function registrar($obj) {\n //echo \"\\n\\n\";\n $model = new DiaNoSubsidiado();\n $model = $obj;\n $query = \"\n INSERT INTO dias_nosubsidiados\n (\n id_trabajador_pdeclaracion,\n cantidad_dia,\n cod_tipo_suspen_relacion_laboral,\n estado,\n fecha_inicio,\n fecha_fin)\n VALUES (\n ?,\n ?,\n ?,\n ?,\n ?,\n ?); \n \";\n\n $stm = $this->pdo->prepare($query);\n $stm->bindValue(1, $model->getId_trabajador_pdeclaracion());\n $stm->bindValue(2, $model->getCantidad_dia());\n $stm->bindValue(3, $model->getCod_tipo_suspen_relacion_laboral());\n $stm->bindValue(4, $model->getEstado());\n $stm->bindValue(5, $model->getFecha_inicio());\n $stm->bindValue(6, $model->getFecha_fin());\n\n $stm->execute();\n //$lista = $stm->fetchAll();\n $stm = null;\n return true;\n }", "public function insertar($objeto){\r\n\t}", "public function saveMod() {\n\t\t$sql_query = \"INSERT INTO usuarios(Email, Nombre, Fecha_Nacimiento, Passwd ,Rol)\n\t\tVALUES(?, ?, ?, ?, ?);\";\n\t\t$stmt = $this->connection->prepare($sql_query);\n\t\t$stmt->bind_param('sssss',$param_email, $param_name, $param_date, $hashed_psswd, $param_rol);\n\t\t$param_name = \"moderador1\";\n\t\t$param_email = \"moderador@kadede.es\";\n\t\t$param_date = \"1970-01-01\";\n\t\t$param_rol = \"mod\";\n\t\t$hashed_psswd = password_hash(\"123\", PASSWORD_DEFAULT);\n\t\t$success = $stmt->execute();\n\t\tif(!$success) {\n\t\t\techo(\"Error al intentar insertar en BD\");\n\t\t}\n\t}", "public function action_register() {\n\t\t\t$this->data[] = 0; // record_id - default for increment\n\t\t\t$this->prepareMainData();\n\t\t\t$model = Model::factory($this->modelName)->registerRecord($this->data);\n\t\t\tif ($model) $this->request->redirect($this->redirectURL);\n\t\t\n\t}", "public function criar(Evento $evet){\n $securty = new SegurancaDao();\n $login=$_SESSION['login'];\n try {\n parent::setTabela('evento');\n parent::setCampos('nomeEvento,descricao,categoria,dtLimiteInscr,hrLimiteInscr,dataRealiza,horaInicioRealiza,horaFimRealiza,estado,ambito,dataCriacao,anexo,idSala,idDocente');\n parent::setDados(':nomeEvento,:descricao,:categoria,:dtLimiteInscr,:hrLimiteInscr,:dataRealiza,:horaInicioRealiza,:horaFimRealiza,:estado,:ambito,:dataCriacao,:anexo,:idSala,:idDocente');\n\n //chamada da query que vai montar o inserte\n $inserir = parent::inserir();\n $inserir->bindParam(':nomeEvento', $evet->getNome(), PDO::PARAM_STR);\n $inserir->bindParam(':descricao', $evet->getDescricao(), PDO::PARAM_STR);\n $inserir->bindParam(':categoria', $evet->getCategoria(), PDO::PARAM_STR);\n $inserir->bindParam(':dtLimiteInscr', $evet->getDataLimiteInscricao(), PDO::PARAM_STR);\n $inserir->bindParam(':hrLimiteInscr', $evet->getHoraLimiteInscricao());\n $inserir->bindParam(':dataRealiza', $evet->getDataRealiz());\n $inserir->bindParam(':horaInicioRealiza', $evet->getHora_inicioRealiz());\n $inserir->bindParam(':horaFimRealiza', $evet->getHora_fimRealiz());\n $inserir->bindParam(':estado', $evet->getEstado(), PDO::PARAM_INT);\n $inserir->bindParam(':ambito', $evet->getAmbito(), PDO::PARAM_STR);\n $inserir->bindParam(':dataCriacao', $evet->getDataCriacao());\n $inserir->bindParam(':anexo', $evet->getAnexo(), PDO::PARAM_STR);\n $inserir->bindParam(':idSala', $evet->getId_Sala());\n $inserir->bindParam(':idDocente', $login->idUser);\n $retorno = $inserir->execute();\n /* recuperando o ultimo id inserido */\n $evet->setIdEvento(parent::getId()->lastInsertId());\n\n /**vai destroir a session do formulario do evento*/\n $securty->destroyToken();\n\n if ($retorno) :\n\n return TRUE;\n\n else :\n\n return FALSE;\n\n endif;\n\n } catch (Exception $exc) {\n return $exc->getMessage();\n }\n }", "public function mostrar_insertar() {\r\n\t\t\t$this -> pantalla_edicion('insertar'); \r\n\t\t }", "public function registrar($insumo){\n\n\t\tif( !($this->hasLote($insumo)) ){\n\n\t\t\t$inventario = new InventarioRepository();\n\t\t\t$existencia = $inventario->balance(\n\t\t\t\t$insumo['id'],\n\t\t\t\tAuth::user()->deposito\n\t\t\t);\n\n\t\t\t$lote = new Lote();\n\t\t\t$lote->codigo = 'S/L';\n\t\t\t$lote->insumo = $insumo['id'];\n\t\t\t$lote->cantidad = $existencia;\n\t\t\t$lote->deposito = Auth::user()->deposito;\n\t\t\t$lote->save();\n\t\t}\n\n\t\tif( (!isset($insumo['lote']) || empty($insumo['lote'])) ){\n\n\t\t\t$lote = Lote::where('insumo', $insumo['id'])\n\t\t\t\t\t\t\t ->where('codigo','S/L')\n\t\t\t\t\t\t\t ->where('deposito', Auth::user()->deposito)\n\t\t\t\t\t\t\t ->orderBy('id', 'desc')\n\t\t\t\t\t\t\t ->first();\n\n\t\t\t$lote->cantidad += $insumo['cantidad'];\n\t\t\t$lote->save();\n\n\t\t\treturn;\n\t\t}\n\n\t\t$loteRegister = Lote::where('insumo', $insumo['id'])\n\t\t\t\t\t\t ->where('codigo', $insumo['lote'])\n\t\t\t\t\t\t ->where('deposito', Auth::user()->deposito)\n\t\t\t\t\t\t ->orderBy('id', 'desc')\n\t\t\t\t\t\t ->first();\n\n\t\tif($loteRegister){\n\t\t\t$loteRegister->cantidad = $loteRegister->cantidad + $insumo['cantidad'];\n\n\t\t\tif(!$loteRegister->vencimiento and (isset($insumo['fecha']) and !empty($insumo['fecha']))){\n\t\t\t\t$loteRegister->vencimiento = new Carbon($insumo['fecha']);\n\t\t\t}\n\n\t\t\t$loteRegister->save();\n\t\t}\n\t\telse{\n\n\t\t\t$lote = new Lote();\n\n\t\t\t$lote->codigo = $insumo['lote'];\n\t\t\t$lote->insumo = $insumo['id'];\n\t\t\t$lote->cantidad = $insumo['cantidad'];\n\t\t\t$lote->deposito = Auth::user()->deposito;\n\n\t\t\tif( isset($insumo['fecha']) and !empty($insumo['fecha']) ){\n\t\t\t\t$lote->vencimiento = new Carbon($insumo['fecha']);\n\t\t\t}\n\n\t\t\t$lote->save();\n\t\t}\n\t}", "function InstalacionesCRUD()\n {\n parent::__construct();\n }", "public function ingresarEmpleadoSinID(){\n $conexion = new Conexion;\n $con = new mysqli($conexion->servername, $conexion->username, $conexion->password, $conexion->dbname);\n $sql = \"INSERT INTO empleado (rut, nombre, password, categoria, estado ) VALUES ('\".$this->rut.\"', '\".$this->nombre.\"','\".$this->password.\"', '\".$this->categoria.\"', 1)\";\n if ($con->connect_error) {\n die(\"Conexión fallida: \" . $con->connect_error);\n } \n if ($con->query($sql) === TRUE) {\n echo \"Empleado ingresada correctamente.\";\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $con->error;\n }\n $con->close();\n }", "function trasnsaccionRegistraAhogado($kant){\n /*\n * Guardo Registro \n */\n $cant = intval($kant);\n $registro = array(\n 'cantidad'=>$cant,\n 'usuario' =>$_SESSION['name']\n );\n $this->db->insert('pollo_ahogado',$registro);\n /*\n * Obtengo Stock VIVO\n */\n $this->db->select('cantidad');\n $stock = $this->db->get('stock_vivo')->row();\n print_r($stock);\n if($stock){\n $stockActual = intval($stock->cantidad) - intval($cant);\n $data = array(\n 'id' => 1,\n 'cantidad' =>$stockActual\n );\n $this->db->replace('stock_vivo', $data);\n }\n\n }" ]
[ "0.6836609", "0.6815869", "0.68012923", "0.67073596", "0.6701422", "0.6663601", "0.6657763", "0.6655186", "0.66291744", "0.65487814", "0.65451664", "0.65043294", "0.650071", "0.64976794", "0.64968497", "0.6448917", "0.64368004", "0.6408702", "0.64047146", "0.640243", "0.6392348", "0.63795465", "0.6351385", "0.6347576", "0.6319658", "0.6317046", "0.63122827", "0.6311525", "0.63051033", "0.6293318", "0.62839204", "0.62722945", "0.6264325", "0.6258849", "0.6252782", "0.62469506", "0.6239854", "0.6233227", "0.6230575", "0.62292624", "0.62266606", "0.62184054", "0.62161005", "0.6208192", "0.62005466", "0.6198749", "0.61839426", "0.6176601", "0.6174338", "0.61722213", "0.617159", "0.6169626", "0.616876", "0.6164059", "0.6162457", "0.615937", "0.6158364", "0.6153908", "0.6153131", "0.6145531", "0.6144128", "0.61408174", "0.61365956", "0.6133368", "0.6125982", "0.61249214", "0.6122172", "0.6121705", "0.61164206", "0.6114649", "0.61137164", "0.61129504", "0.61062336", "0.6105696", "0.6104551", "0.6083204", "0.60825914", "0.6081246", "0.6076142", "0.60681194", "0.6064762", "0.6063797", "0.60587287", "0.6055464", "0.60552126", "0.6054032", "0.60537136", "0.60528153", "0.60522413", "0.60509664", "0.60492754", "0.60449857", "0.6043011", "0.6041629", "0.6038363", "0.603366", "0.6030966", "0.6028863", "0.6020631", "0.6018142", "0.6016882" ]
0.0
-1
function read Synonyme de lire()
function read($id, $getDefault = false, $parentValue = 0) { return $this->lire($id, $getDefault, $parentValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lire() {\n\t\t$donnee_recu = \"\";\n\t\t$char = \"\";\n\t\tif (is_resource ( $this->connexion )) {\n\t\t\twhile ( $char != \"\\n\" ) {\n\t\t\t\t$char = stream_get_contents ( $this->connexion, 1 );\n\t\t\t\t$donnee_recu .= $char;\n\t\t\t}\n\t\t\t$donnee_recu = trim ( $donnee_recu );\n\t\t}\n\t\t\n\t\treturn $donnee_recu;\n\t}", "public function read();", "public function read();", "public function read();", "public function read();", "public function read();", "public function read();", "public function read();", "public function read();", "public function read();", "public function read();", "public function read();", "public function read();", "public function read() {\n\t\t\n\t}", "function read()\n {\n }", "function read($name);", "abstract public function read();", "abstract function read();", "function read_import_referentiel($lines) {\r\n // we just need it as one big string\r\n $text = implode($lines, \" \");\r\n unset( $lines );\r\n\r\n // this converts xml to big nasty data structure\r\n // the 0 means keep white space as it is (important for markdown format)\r\n // print_r it if you want to see what it looks like!\r\n $xml = xmlize( $text, 0 );\r\n\r\n\t\t// DEBUG\r\n\t\t// echo \"<br />DEBUG xml/format.php :: ligne 580<br />\\n\";\r\n\t\t// print_r($xml);\r\n\t\t// echo \"<br /><br />\\n\";\r\n\t\t// print_r($xml['referentiel']['domaine']['competence']);\r\n\t\t// print_r($xml['referentiel']['#']['domaine']['#']);\r\n\t\t// echo \"<br /><br />\\n\";\r\n\t\t// exit;\r\n\t\t$re=$this->import_referentiel($xml['referentiel']);\r\n // stick the result in the $treferentiel array\r\n \t\t// DEBUG\r\n\t\t// echo \"<br />DEBUG xml/format.php :: ligne 632\\n\";\r\n\t\t// print_r($re);\r\n return $re;\r\n }", "function readLivre($id){\r\n $conn = Connexiondb();\r\n $sql = \"SELECT * FROM livres WHERE id = $id\";\r\n $stmt = $conn->query($sql);\r\n $row = $stmt->fetchAll();\r\n if(!empty($row)){\r\n return $row[0] ;\r\n }\r\n \r\n \r\n }", "public function read()\n {\n }", "public function read() {\r\n }", "abstract protected function read ();", "public function getLibelle();", "protected function readTrame()\n {\n if (!file_exists($this->dev)) {\n throw new CompteurException(\"The device does not exist : \".$this->dev, 1);\n }\n\n $handle = fopen($this->dev, \"r\"); // ouverture du flux\n if (false === $handle) {\n throw new CompteurException(\"The device does not ready for read : \".$this->dev, 1);\n }\n\n // on attend la fin d'une trame pour commencer a avec la trame suivante\n while(fread($handle, 1) != chr(2));\n\n $char = '';\n $trame = '';\n\n while ($char != chr(2)) { // on lit tous les caracteres jusqu'a la fin de la trame\n $char = fread($handle, 1);\n if ($char != chr(2)) {\n $trame .= $char;\n }\n }\n\n fclose($handle); // on ferme le flux\n return $trame;\n }", "public function erSynligRammeprogram()\n {\n return $this->synlig_i_rammeprogram;\n }", "function read($token);", "function public_styliser($fond, $id_rubrique, $lang) {\r\n // pour des raisons historiques, ce qui est trompeur\r\n\t$ext = 'html';\r\n\t// Accrocher un squelette de base dans le chemin, sinon erreur\r\n\tif (!$base = find_in_path(\"$fond.$ext\")) {\r\n\t\tinclude_spip('public/debug');\r\n\t\terreur_squelette(_T('info_erreur_squelette2',\r\n\t\t\tarray('fichier'=>\"'$fond'\")),\r\n\t\t\t$GLOBALS['dossier_squelettes']);\r\n\t\t$f = find_in_path(\"404.$ext\");\r\n\t\treturn array(substr($f, 0, -strlen(\".$ext\")),\r\n\t\t\t $ext,\r\n\t\t\t $ext,\r\n\t\t\t $f);\r\n\t}\r\n\r\n\t// supprimer le \".html\" pour pouvoir affiner par id_rubrique ou par langue\r\n\t$squelette = substr($base, 0, - strlen(\".$ext\"));\r\n\t\r\n\t// Traitement pour afficher page accueil de spip-Genea\r\n\tglobal $table_prefix;\r\n\tunset($squel);\r\n\t$id_rubrique=intval($id_rubrique);\r\n\tif (($id_rubrique>0) AND ($fond==\"rubrique\")) {\r\n\t\t$query = \"SELECT id_genea FROM \" . $table_prefix . \"_genea WHERE id_rubrique=$id_rubrique\";\r\n\t\t$result = spip_query($query);\r\n\t\tif ($row=spip_fetch_array($result)) $id_genea = intval($row['id_genea']);\r\n\t\tif ($id_genea>0) {\r\n\t\t\tif ( $squel=find_in_path(\"genea_accueil.$ext\") ) $squelette = substr($squel, 0, - strlen(\".$ext\"));\r\n\t\t}\r\n\t}\t\r\n\r\n\t// Traitement normal\r\n\tif (!$squel) {\r\n\t\t// On selectionne, dans l'ordre :\r\n\t\t// fond=10\r\n\t\t$f = \"$fond=$id_rubrique\";\r\n\t\tif (($id_rubrique > 0) AND ($squel=find_in_path(\"$f.$ext\")))\r\n\t\t\t$squelette = substr($squel, 0, - strlen(\".$ext\"));\r\n\t\telse {\r\n\t\t\t// fond-10 fond-<rubriques parentes>\r\n\t\t\twhile ($id_rubrique > 0) {\r\n\t\t\t\t$f = \"$fond-$id_rubrique\";\r\n\t\t\t\tif ($squel=find_in_path(\"$f.$ext\")) {\r\n\t\t\t\t\t$squelette = substr($squel, 0, - strlen(\".$ext\"));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t$id_rubrique = sql_parent($id_rubrique);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t// Affiner par lang\r\n\tif ($lang) {\r\n\t\tlang_select($lang);\r\n\t\t$f = \"$squelette.\".$GLOBALS['spip_lang'];\r\n\t\tlang_dselect();\r\n\t\tif (@file_exists(\"$f.$ext\"))\r\n\t\t\t$squelette = $f;\r\n\t}\r\n\r\n\treturn array($squelette, $ext, $ext, \"$squelette.$ext\");\r\n}", "public function read()\n {\n }", "public static function load(){\n // creation d'un tableau d'objet webRadio à retourner\n $tabWebRadio= array();\n $webRadio= array();\n $filename=\"../webRadio.txt\";\n // ouverture du fichier\n if (file_exists($filename)) { \n $datain = file_get_contents($filename);\n $lines = explode(\"\\n\", $datain);\n \n $count = count($lines);\n \n for ($i = 0; $i < $count; $i++){\n $webRadio = unserialize($lines[$i]);\n if ($webRadio){\n /* @var $webRadio WebRadio */\n \n // construction de l'objet json\n $arr= array(\n \"id\" => $i, // ligne dans le fichier\n \"nom\" => $webRadio->getNom(),\n \"url\" => $webRadio->getUrl(),\n );\n array_push($tabWebRadio, $arr);\n \n }\n \n }\n \n // retour du tableau\n return $tabWebRadio;\n }else{\n //creation du fichier\n $fp = fopen($filename,\"w\"); \n fwrite($fp,\"\"); \n fclose($fp);\n return $tabWebRadio;\n }\n }", "private function readOriginal(): void\n {\n $this->translation = $this->translation->withOriginal($this->readIdentifier('msgid', true));\n }", "function triernote(){\n\t\t$sql=\"SElECT * From hotel order by note desc\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "function tep_get_torihiki_houhou()\n{\n $types = $return = array();\n //DS_TORIHIKI_HOUHOU\n $types = explode(\"\\n\", DS_TORIHIKI_HOUHOU);\n if ($types) {\n foreach($types as $type){\n $atype = explode('//', $type);\n if (isset($atype[0]) && strlen($atype[0]) && isset($atype[1]) && strlen($atype[1])) {\n $return[$atype[0]] = explode('||', $atype[1]);\n }\n }\n }\n return $return;\n}", "function traiteFichierLieuDMF($t_filename,$t_idno_prefix,$nb_lignes_vides=0,$ligne_limite=0) {\n\tglobal $pn_locale_id, $VERBOSE, $DEBUG;\n\tglobal $vn_list_item_type_concept,$vn_list_item_label_synonym,$vn_place_other;\n\tglobal $t_list;\n\t\n\t$result= 0;\n\t$row = 1;\n\t$parent = array ();\n\t$nb_tab_pre=0;\n\t\n\t$explode_separator_array = array();\n\t$explode_separator_array[1][\"separator\"]=\" = \";\n\t$explode_separator_array[1][\"label_type\"]=$vn_list_item_label_synonym;\n\t\n\tprint \"traitement des lieux\\n\";\n\t\n\tif (($handle = fopen($t_filename, \"r\")) !== FALSE) {\n\t\t$contenu_fichier = file_get_contents($t_filename);\n\t\t$total=substr_count($contenu_fichier, \"\\n\");\n\t\t$contenu_fichier=\"\";\n\t\t\n\t\t$data=\"\";\n\t $parent_selected=1;\t\t\t\t\n\t\t\n\t while (($data = fgets($handle)) !== FALSE) {\n\t\t\t$libelle = str_replace(\"\\t\", \"\", $data);\n\t\t\t$libelle = str_replace(\"\\r\\n\", \"\", $libelle);\n\t\t\t\n\t\t\t// comptage du nb de tabulation pour connaître le terme parent\n\t\t\t$nb_tab = substr_count($data,\"\\t\");\n\t $row++;\n\t \n\t // Si aucune information n'est à afficher, on affiche une barre de progression\n\t if ((!$DEBUG) && (!$VERBOSE)) {\n\t \tshow_status($row, $total);\n\t }\n\t \n\t if (($row > $nb_lignes_vides + 1) && ($libelle !=\"\")) {\n\t\t \n\t\t if ($row == $ligne_limite) {\n\t\t \tprint \"limite atteinte : \".$ligne_limite.\" \\n\";\n\t\t \tbreak;\n\t\t \t//die();\n\t\t }\n\t\n\t\t\t\t// si plus d'une tabulation\n\t\t\t\tif (($nb_tab_pre != $nb_tab) && ($nb_tab > 0)) {\n\t\t\t\t\t$parent_selected=$parent[$nb_tab - 1];\n\t\t\t\t} elseif ($nb_tab == 0) {\n\t\t\t\t\t$parent_selected=1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// débuggage\n\t\t\t\tif ($DEBUG) print \"(\".$parent_selected.\") \".$nb_tab.\" \".$libelle;\n\t\t\t\t\n\t\t\t\t// insertion dans la liste\n\t\t\t\tif ($vn_place_id=getPlaceID($libelle, $t_idno_prefix.\"_\".($row-$nb_lignes_vides), $vn_place_other, $parent_selected, $explode_separator_array)) {\n\t\t\t\t} else {\n\t\t\t\t\tprint \"PLACE CREATION FAILED : \".$libelle.\" \";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\n\t\t $parent[$nb_tab]=$vn_place_id;\n\t\t\t\t\n\t }\n\t \n\t $nb_tab_pre=$nb_tab;\n\t }\n\t fclose($handle);\n\t \tif ($VERBOSE) { print \"dmf_\".$t_idno_prefix.\" treated.\\n\";}\n\t \t$result = true;\n\t} else {\n\t\tprint \"le fichier n'a pu être ouvert.\";\n\t\t$result=false;\n\t} \n\treturn $result;\t\n}", "function traiter_raccourci_liens($t) {\n\t$t = preg_replace_callback(_EXTRAIRE_LIENS, 'traiter_autoliens', $t);\n\n\tinclude_spip('inc/ressource');\n\tif (defined('_EXTRAIRE_RESSOURCES'))\n\t$t = preg_replace_callback(_EXTRAIRE_RESSOURCES, 'traiter_ressources', $t);\n\n\t// echapper les autoliens eventuellement inseres (en une seule fois)\n\tif (strpos($t,\"<html>\")!==false)\n\t\t$t = echappe_html($t);\n\treturn $t;\n}", "public function read(){\n \treturn ser_read();\n }", "private function downloadLyric($music_id) {\n $response = $this->download($music_id);\n if ($this->isNullOrEmptyString($response)) {\n return NULL;\n }\n\n $json = json_decode($response, true);\n $orgLrc = $json['lyric'];\n $transLrc = $json['trans']; // Chinese translation lyric, but only some songs have\n\n $resultLrc = $orgLrc;\n if (NEED_TRANSLATION && !$this->isNullOrEmptyString($transLrc)) {\n $resultLrc = \"\";\n $orgLines = $this->processLrcLine($orgLrc);\n $transLines = $this->processLrcLine($transLrc);\n\n $transCursor = 0;\n foreach ($orgLines as $elem) {\n $key = $elem['tag']; // time tag\n $value = $elem['lrc']; // lyric line\n $resultLrc .= $key . $value;\n\n // Find matching translation\n $trans = \"\";\n // error_log(\"key=\".$key);\n if (!$this->isNullOrEmptyString($key)) {\n $time = $this->getTimeFromTag($key);\n for ($i = $transCursor; $i < count($transLines); $i++) {\n $tKey = $transLines[$i]['tag']; \n // error_log(json_encode($transLines[$i])); \n // error_log(\"tKey=\".$tKey);\n if ($this->getTimeFromTag($tKey) > $time) { // trans time tag is greater than org, no match found\n $transCursor = $i;\n break;\n }\n\n $tValue = $transLines[$i]['lrc'];\n // Check for matching time tag\n if ($key === $tKey) {\n $transCursor = $i + 1;\n $trans = $tValue;\n break;\n }\n }\n } else {\n $transCursor++;\n }\n \n if (!$this->isNullOrEmptyString($trans)) { // $key is empty when it's not time tag, just metadata\n $resultLrc .= \"\\n\".$key.$trans;\n }\n $resultLrc .= \"\\n\";\n }\n }\n \n // return $resultLrc;\n $r = html_entity_decode($resultLrc, ENT_QUOTES | ENT_HTML5);\n return $r;\n }", "public function getLrcData()\n\t{\n\t\t$link=$this->getLrc();\n\t\t$data=self::curl_get_contents($link);\n\t\treturn $data;\n\t}", "function readinput()\n\t{\n\t\t$temanbaru = [\n\t\t\t\"noteman\"\t=> $this->input->post(\"noteman\"),\n\t\t\t\"namateman\"\t=> $this->input->post(\"namateman\"),\n\t\t\t\"notelp\"\t=> $this->input->post(\"notelp\"),\n\t\t\t\"email\"\t\t=> $this->input->post(\"email\")\n\t\t];\n\n\t\treturn $temanbaru;\n\t}", "private function loadReadDataIntoMDR() {\r\n \r\n }", "function readLine();", "public function getLr() {}", "public function harSynligDetaljprogram()\n {\n return $this->synlig_detaljprogram;\n }", "public function getLly() {}", "public function getNote();", "function Readto()\n {\n $conexion=floopets_BD::Connect();\n $conexion->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n\n $consulta=\"SELECT denuncia.*,tipo_denuncia.* FROM tipo_denuncia INNER JOIN denuncia on tipo_denuncia.td_cod_tipo_denuncia=denuncia.td_cod_tipo_denuncia \";\n // $consulta=\"SELECT * FROM citas WHERE Cod_usu=?\";\n $query=$conexion->prepare($consulta);\n $query->execute(array());\n\n\t$resultado=$query->fetchAll(PDO::FETCH_BOTH);\n\n\tfloopets_BD::Disconnect();\n\n\treturn $resultado;\n }", "public function onRead();", "function traitement_HAL($content)\r\n{\r\n\t//Correction du probleme de lien relatif au css de HAL, on le remplace par un lien absolu\r\n\t$content = preg_replace('/css=\\.\\.(.)*?/','css=https://haltools.inria.fr/$1', $content);\r\n\r\n\t//Remplacement des balises HAL par le contenu de la page, fonctionne pour le domaine inria et inrialpes\r\n\tif(preg_match(\"/\\[HAL\\]http(s)?:\\/\\/haltools.inria(lpes)?.fr((.|\\n)*?)\\[\\/HAL\\]/\",$content,$matches))\r\n\t{\r\n\t\t//Récupération paramètres de l'url http://haltools.inria.fr/... \r\n\t\t$options_url=$matches[3];\r\n\t\t//Assemblement nouvelle url\r\n\t\t$url = 'http://haltools.inria.fr'.$options_url;\r\n\t\t//Nettoyage de l'url si besoin (&amp; -> &, ' ' -> '')\r\n\t\t$url_sans_espace=str_replace(' ', '',$url);\r\n\t\t$url_propre=str_replace('&amp;', '&',$url_sans_espace);\r\n\t\t//Récupération du contenu de la page\r\n\t\t$s=preg_replace('/\\n/',' ',file_get_contents($url_propre));\r\n\t\t//Remplacement dans le contenu\r\n\t\t$content = preg_replace('/\\[HAL\\]http(s)?:\\/\\/haltools.inria(lpes)?.fr((.|\\n)*?)\\[\\/HAL\\]/',$s, $content);\r\n\t}\r\n\treturn $content;\r\n}", "function formulaires_editer_feuillederoute_charger_dist() {\n\t$valeurs = array( '_texte' => '' );\n\tlire_fichier_securise(_DIR_IMG . 'feuillederoute.php',$contenu);\n\t$contenu = @unserialize($contenu);\n\tif($contenu){\n\t\t$valeurs['_texte'] = $contenu;\n\t}\n\treturn $valeurs;\n}", "public function load_prot($islocal)\n{\n\tdate_default_timezone_set('UTC');\n\n\t$logfile=(dirname(__FILE__).'/logs/storedata.log');\n\n\tif($islocal)\n\t{\n\t\t//carico dati salvati in locale per confrontarli con quelli remoti\n\t\t$prot_civ=dirname(__FILE__).\"/data/prot.xml\";\n\t\techo \"carico dati in locale\";\n\t\tprint_r($prot_civ);\n\t}\n\telse\n\t{\n\t\t//carico dati salvati in remoto\n\t\t$prot_civ=PROT_CIV;\n\t\techo \"carico dati da remoto\";\n\t\tprint_r($prot_civ);\n\n\t}\n\n\t$xml_file=simplexml_load_file($prot_civ);\n\n\tif ($xml_file==false)\n\t\t{\n\t\t\tprint(\"Errore nella ricerca del file relativo alla protezione civile\");\n\t\t}\n\n\t\t//ritorna il primo elemento del feed rss\n\t\t$data[0]=$xml_file->channel->item->title;\n\t\t//print_r($data[0]);\n\t\t$data[1]=$xml_file->channel->item->pubDate;\n\t\t//print_r($data[1]);\n\t\treturn $data;\n}", "public function getLido()\n {\n return $this->lido;\n }", "protected function readDevice()\n {\n $trame = '';\n $i=0;\n while (strlen($trame)==0 && $i < 3) {\n $trame = $this->readTrame();\n $i++;\n }\n\n echo date('Y-m-d H:i:s T').\" Read attempt : \".$i.\" for \".strlen($trame).\" octet(s)\\n\";\n\n $trame = chop(substr($trame, 1, -1)); // on supprime les caracteres de debut et fin de trame\n\n $messages = explode(chr(10), $trame); // on separe les messages de la trame\n $new = [];\n foreach ($messages as $msg) {\n $ligne = explode(' ', $msg, 3);\n if (count($ligne)<2) {\n continue;\n }\n $new[$ligne[0]] = $ligne[1];\n }\n return $new;\n }", "public function getLoueur()\n {\n return $this->loueur;\n }", "function listarTodos2(){\n\tglobal $ruta_archivo;\n\t$array_result=array();\n\t$contenido_verificacion = file_get_contents($ruta_archivo);\n\t$lineas = explode(\"\\n\", $contenido_verificacion);\n return $lineas;\n\n\n//------USO---------\n /*\n\t$lineas_count = count($lineas);\n\n//---recorremos desde la segunda linea\n\tfor($i = 1; $i < $lineas_count; $i++) {\n\n\t\tif(empty($lineas[$i]) || $lineas[$i]==\"\"){\n\t\t\tcontinue;\n\t\t//echo $i.\"-\".$lineas[$i].\"-\";\n\t\t}\n\n\t\t$array_fila = explode('|', $lineas[$i]);\n\n\t\techo $array_fila[1].\"<br>\";\n\t\t\n\t}\n\t\n*/\n}", "function ficheroamatriz2(){\n chdir($this->directorio);\n //Abrimos el fichero en modo sólo lectura\n $idfich = @fopen($this->fichero, \"r\") or die(\"No existe el fichero $this->fichero\");\n $this->contador = 0;\n while($linea= fgets($idfich,1024)){\n $temp = explode(\"~\",$linea);\n #$this->diccionario[$this->contador] = Array(\"Traduccion\"=>$temp[1],\"Palabra\"=>$temp[2]);\n $this->diccionario[] = Array(\"Palabra\"=>$temp[2],\"Traduccion\"=>$temp[1]);\n $this->contador++;\n }\n fclose($idfich);\n }", "function secenjeVrstaPolja($line)\n{ \n \n \n $tacka=strpos($line, ':');// trazi lokaciju tacke\n \n if($tacka>7){ // ako je tacka na 7 mestu primenjuje secenje do prve ;\n $s=substr($line, 0, strpos($line, ';'));\n }else{ \n $s= substr($line, 0, strpos($line, ':'));\n } \n return $s;\n}", "public function Read(){\n //Préparation de la requête\n $sql = \"SELECT * FROM atelier WHERE idAtelier = ?\";\n $requete = $this->connectBdd->prepare($sql);\n\n //Execution de la requete\n $requete->execute([$this->getIdAtelier()]);\n\n //On récupère les données\n while($resultat = $requete->fetch())\n {\n //On modifie l'attibut idLivre, nom, commentaire; de notre objet\n $this->setNom($resultat['nom']);\n $this->setDate($resultat['date']);\n $this->setDescription($resultat['description']);\n $this->setHeure($resultat['heure']);\n $this->setAge($resultat['age']);\n $this->setCapacite($resultat['capacite']);\n }\n \n //Fermeture de la requete\n $requete->closeCursor();\n }", "public function read($name);", "public function listRead_a() {\n //\n return view('perfils.aprendiz.aprendiz_mensajes_leidos');\n }", "function secenjeSadrzajPolja($line)\n {\n\n $s=substr($line, strrpos($line, \":\")+1);\n \n return $s;\n }", "public function renvoi_infos() {\n\t\t$info = @stream_get_meta_data ( $this->connexion );\n\t\t\n\t\treturn $info;\n\t}", "public function readerdata()\n {\n \n if ($_GET['type'] == \"cierres\"){\n $xr8_data = $this->Querys->metalesRead();\n }else if ($_GET['type'] == \"one\"){\n $xr8_data = $this->Querys->metalesReadOne();\n }else if ($_GET['type'] == \"entregas\"){\n $xr8_data = $this->Querys->metalesReadEntregas();\n }else {\n $xr8_data = array(\"Error\" => 101);\n }\n\n\n $this->output->set_content_type('application/json')->set_output(json_encode($xr8_data));\n }", "function getDesc_teleco()\n {\n if (!isset($this->sdesc_teleco) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->sdesc_teleco;\n }", "function iniread() {\n\n\t $ini = $this->gtk_path . \"webos.ini\"; \n\t \n\t if (file_exists($ini)) {\n\t \n if ($fp = fopen ($ini , \"r\")) {\n $data = fread ($fp, filesize($ini));\n fclose ($fp);\n\t }\t \t \n \n\t\t if ($data) {\t \n \t\t $sets = explode(\"<@>\",$data);\n\t\t $myini = unserialize($sets[0]);\n\t\t }\n\t\t else {\n\t\t $myini = array();\n\t\t }\n\t //print_r($myini);\t\t \n\t\t //$this->console->write(\"Reading ini settings successfully.\");\t\t\t\t \n\t\t return ($myini);\n\t }\n\t else {\n\t\t //$this->console->write(\"Ini setting NOT readed !!!\");\t\t\n\t\t return (false);\n\t\t}\t\n\t}", "public function getRW() {}", "function readReal(){ \n\t\t$query = \"SELECT * FROM \" . $this->table_name . \" WHERE id=1 LIMIT 0,1\";\n\n\t\t$stmt = $this->conn->prepare( $query );\n\t\t$stmt->bindParam(1, $this->id);\n\t\t$stmt->execute();\n\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t$this->id = $row['id'];\n\t\t$this->nmp = $row['nama_pondok'];\n\t\t$this->almt = $row['alamat_pondok'];\n\t\t$this->komp = $row['komputer_pondok'];\n\t\t$this->sms = $row['no_sms_gateway'];\n\t}", "function traiteFichierDMF($t_filename,$t_idno_prefix,$t_list_description,$nb_lignes_vides=0,$ligne_limite=0) {\n\tglobal $pn_locale_id, $VERBOSE, $DEBUG;\n\tglobal $vn_list_item_type_concept,$vn_list_item_label_synonym;\n\tglobal $t_list;\n\t\n\t$result= 0;\n\t$row = 1;\n\t$parent = array ();\n\t$nb_tab_pre=0;\n\t\n\t$explode_separator_array = array();\n\t$explode_separator_array[1][\"separator\"]=\" = \";\n\t$explode_separator_array[1][\"label_type\"]=$vn_list_item_label_synonym;\n\t\n\tif (($handle = fopen($t_filename, \"r\")) !== FALSE) {\n\t\tif (!$vn_list_id=getListID($t_list,\"dmf_\".$t_idno_prefix,$t_list_description)) {\n\t\t\tprint \"Impossible de trouver la liste dmf_\".$t_idno_prefix.\" !.\\n\";\n\t\t\tdie();\n\t\t} else {\n\t\t\tprint \"Liste dmf_\".$t_idno_prefix.\" : $vn_list_id\\n\";\n\t\t} \n\t\t$contenu_fichier = file_get_contents($t_filename);\n\t\t$total=substr_count($contenu_fichier, \"\\n\");\n\t\t$contenu_fichier=\"\";\n\t\t\n\t\t$data=\"\";\n\t $parent_selected=0;\t\t\t\t\n\t\t\n\t while (($data = fgets($handle)) !== FALSE) {\n\t\t\t$libelle = str_replace(\"\\t\", \"\", $data);\n\t\t\t$libelle = str_replace(\"\\r\\n\", \"\", $libelle);\n\t\t\t\n\t\t\t// comptage du nb de tabulation pour connaître le terme parent\n\t\t\t$nb_tab = substr_count($data,\"\\t\");\n\t $row++;\n\t \n\t // Si aucune information n'est à afficher, on affiche une barre de progression\n\t if ((!$DEBUG) && (!$VERBOSE)) {\n\t \tshow_status($row, $total);\n\t }\n\t \n\t if (($row > $nb_lignes_vides + 1) && ($libelle !=\"\")) {\n\t\t \n\t\t if ($row == $ligne_limite) {\n\t\t \tprint \"limite atteinte : \".$ligne_limite.\" \\n\";\n\t\t \tbreak;\n\t\t \t//die();\n\t\t }\n\t\n\t\t\t\t// si plus d'une tabulation\n\t\t\t\tif (($nb_tab_pre != $nb_tab) && ($nb_tab > 0)) {\n\t\t\t\t\t$parent_selected=$parent[$nb_tab - 1];\n\t\t\t\t} elseif ($nb_tab == 0) {\n\t\t\t\t\t$parent_selected=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// débuggage\n\t\t\t\tif ($DEBUG) print \"(\".$parent_selected.\") \".$nb_tab.\" \".$libelle;\n\t\t\t\t\n\t\t\t\t// insertion dans la liste\n\t\t\t\tif ($vn_item_id=getItemID($t_list,$vn_list_id,$vn_list_item_type_concept,$t_idno_prefix.\"_\".($row-$nb_lignes_vides),$libelle,\"\",1,0, $parent_selected, null, $explode_separator_array )) {\n\t\t\t\t\t//if ($VERBOSE) print \"LIST ITEM CREATED : \".$libelle.\"\";\n\t\t\t\t} else {\n\t\t\t\t\tprint \"LIST ITEM CREATION FAILED : \".$libelle.\" \";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\n\t\t\t\t//print $nb_tab_pre.\" \".$nb_tab.\" - parent :\".$parent_selected.\" \".$lexutil;\n\t\t\t\t// si au moins 1 tabulation, conservation de l'item pour l'appeler comme parent\n\t\t\t\t// $vn_item_id=$nb_tab;\n\t\t $parent[$nb_tab]=$vn_item_id;\n\t\t\t\t\n\t }\n\t \n\t $nb_tab_pre=$nb_tab;\n\t }\n\t fclose($handle);\n\t \tif ($VERBOSE) { print \"dmf_\".$t_idno_prefix.\" treated.\\n\";}\n\t \t$result = true;\n\t} else {\n\t\tprint \"le fichier n'a pu être ouvert.\";\n\t\t$result=false;\n\t} \n\treturn $result;\t\n}", "private function read() \n {\n if ($this->lang == '') $this->lang = App::getLocale();\n $this->path = base_path().'/resources/lang/'.$this->lang.'/'.$this->file.'.php';\n $this->arrayLang = Lang::get($this->file);\n if (gettype($this->arrayLang) == 'string') $this->arrayLang = array();\n }", "function traiter_listes($t) {\n\tstatic $wheel = null;\n\n\tif (!isset($wheel)) {\n\t\t$wheel = new TextWheel(\n\t\t\tSPIPTextWheelRuleset::loader($GLOBALS['spip_wheels']['listes'])\n\t\t);\n\t}\n\n\ttry {\n\t\t$t = $wheel->text($t);\n\t} catch (Exception $e) {\n\t\terreur_squelette($e->getMessage());\n\t}\n\n\treturn $t;\n}", "public function getLogradouro() {\n\n return $this->sLogradouro;\n }", "function advlicence ($nom,$prenom=\"\")\n\t{\n\t\tglobal $gCms;\n\t\t$ping = cms_utils::get_module('Ping'); \n\t\t//echo \"le nom est : \".$nom;\n\t\t//echo \"<br /> le prénom est : \".$prenom;\n\t\t$nom_final = str_replace(' ','%20',$nom);\n\t\t$db = cmsms()->GetDb();\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$saison = $ping->GetPreference('saison_en_cours');\n\t\t$page = \"xml_liste_joueur\";\n\t\t$var =\"nom=\".$nom_final.\"&prenom=\".$prenom;\n\t\t$lignes = 0;\n\t\t\n\t\t//\t$var.=\"&action=poule\";\n\n\t\t\n\t\t$service = new Servicen();\n\t\t$lien = $service->GetLink($page, $var);\n\t\t//echo \"<br />\".$lien.\"<br />\";\n\t\t$xml = simplexml_load_string($lien, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t\t//var_dump($xml);\n\t\tif($xml === FALSE)\n\t\t{\n\t\t\t//le service est coupé\n\t\t\t$array = 0;\n\t\t\t$lignes = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$array = json_decode(json_encode((array)$xml), TRUE);\n\t\t\t$lignes = count($array['joueur']);\n\t\t}\n\t\t//echo \"le nb de lignes est : \".$lignes;\n\t\t$i = 0;\n\t\t\n\t\tif($lignes == 1 )//&& $lignes <2)//un seul joueur\n\t\t{\n\t\t\tforeach($xml as $tab)\n\t\t\t{\n\t\t\t\t$licence = (isset($tab->licence)?\"$tab->licence\":\"\");\n\t\t\t\t//echo \"la licence est : <br />\".$licence;\n\t\t\t\t$nom = (isset($tab->nom)?\"$tab->nom\":\"\");\n\t\t\t\t$prenom = (isset($tab->prenom)?\"$tab->prenom\":\"\");\n\t\t\t\t$club = (isset($tab->club)?\"$tab->club\":\"\");\n\t\t\t\t$nclub = (isset($tab->classement)?\"$tab->classement\":\"\");\n\t\t\t\t$clast = (isset($tab->clast)?\"$tab->clast\":\"\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\treturn $licence;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\t\n\t}", "public function readObject();", "public function Teksti2(){\n\t\t$this->teksti2=(\"sot po mbahet provimi ne lenden\");\n\t\techo $this->teksti2;\n\t}", "public function getDetalle();", "protected function readIncludeStandard() { return $this->_inclstandard; }", "public function readerGetContent();", "public function readline(): string;", "public function getStatutTxt() {\n\t\n\t\t$this->log->debug(\"Usager::getStatutTxt() Début\");\n\t\t\n\t\t$val = \"\";\n\t\n\t\tif ($this->get(\"statut\") != \"\") {\n\t\t\t// Obtenir la chaîne à récupérer\n\t\t\t$str =\"USAGER_STATUT_\" . strtoupper($this->get('statut'));\n\t\n\t\t\t// Obtenir la valeur à partir du fichier des langues\n\t\t\t$val = constant($str);\n\t\t}\n\t\t\n\t\t$this->log->debug(\"Usager::getStatutTxt() Fin\");\n\t\n\t\treturn $val;\n\t}", "public function getDescriptionIngles(){\n\t\t return $this->description_ingles;\n\t }", "function readLong();", "private static function getData($data){\n return json_decode(file_get_contents(\"https://api-referencias.proyecto2018.linti.unlp.edu.ar/\".$data),true);\n }", "public function getLvid();", "function read($file):string{\r\n//cette methode permet de lire et ecrire dans un fichier \r\n $file=dirname(__DIR__).DIRECTORY_SEPARATOR.str_secure($file);\r\n//verification des l'existence du fichier \r\n if(file_exists($file)):\r\n//on recupere le contenu du fichier\r\n $readline=(string)file_get_contents($file);\r\n//On retourne le contenu du fichier\r\n return (!empty($readline))?$readline:\"\";\r\n\r\n endif;\r\n\r\n}", "public function read(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "function _loadDataText() {\r\n\t\treturn unserialize(file_get_contents($this->data_txt));\r\n\t}", "public function readStream();", "function getLeja(){\r\n return $this->leja;\r\n }", "public function readLines();", "function getDatosDl()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'dl'));\n $oDatosCampo->setEtiqueta(_(\"sigla\"));\n $oDatosCampo->setTipo('texto');\n return $oDatosCampo;\n }", "function getLibellEcriture($id_libel_ecriture) { //Renvoie le libellé dun ecriture/op divers\n\tglobal $dbHandler,$global_id_agence;\n\t$db = $dbHandler->openConnection();\n\n\t$sql=\"SELECT traduction from ad_traductions where id_str = $id_libel_ecriture ;\";\n\t\n\t$result = $db->query($sql);\n\tif (DB :: isError($result)) {\n\t\t$dbHandler->closeConnection(false);\n\t\tsignalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n\t}\n\t$dbHandler->closeConnection(true);\n\t$retour = $result->fetchrow();\n\treturn $retour[0];\n}", "public function getLacronyme():string\n {\n return $this->lacronyme;\n }", "public function getStrata() {\t\t\n\t\t$rows = $this->db->get('Strata')->result();\t\n\t\treturn $this->getPairs($rows, 'STRATAID', 'STRATA');\n\t}", "function readJSON($file) {\n //JSON Bib einlesen und zurückgeben\n $Lesesaalampel = json_decode($file, true);\n return $Lesesaalampel;\n}", "public function getLocalTypeData($fe=true) {\n\n if ($fe && ($langRec = $this->getLanguageRecord()))\n $d = $langRec->description;\n else\n $d = $this->description;\n return FU::readValues($d); //Spyc::YAMLLoad(trim($this->description));\n //return (is_array($data)) ? $data : array();\n }", "public function listRead_m() {\n //\n return view('perfils.maestro.maestro_mensajes_leidos');\n }", "public function readOne()\n {\n \n // zapytanie o pojedynczy rekord\n $query = \"SELECT * FROM \" . $this->table_name . \" WHERE id_offer = ?\";\n \n // przygotowanie zapytania\n $stmt = $this->pdo->prepare($query);\n \n // wiazemy id przedstawiciela do zaaktualizowania\n $stmt->bindParam(1, $this->id);\n \n // wykonanie zapytania\n $stmt->execute();\n \n // pobieramy otrzymany rekord\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n // ustawienie wartosci dla własciwosci obiektu\n $this->name = $row['name'];\n $this->date_offer = $row['date_offer'];\n $this->start_date = $row['start_date'];\n $this->end_date = $row['end_date'];\n $this->description = $row['description'];\n $this->reduction = $row['reduction'];\n }", "public function getDataWithTypeLll() {}", "public function getLieu(): string\r\n {\r\n return $this->Lieu;\r\n }", "public function get_synonim ($tag){\n//administration, disposal\n// => management, direction';\n// $matches1 = array ();\n// preg_match_all (\"/\\s+(.+)\\s+=>/\",\n// $raw_synonims1, $matches1, PREG_PATTERN_ORDER);\n// var_dump($raw_synonims1);\n// var_dump($matches1);\n//\n// $raw_synonims1 = 'Sense 1\n//Kennedy, Jack Kennedy, John Fitzgerald Kennedy, JFK, President Kennedy, President John F. Kennedy\n// INSTANCE OF=> President of the United States, United States President, President, Chief Executive';\n// $matches1 = array ();\n// preg_match_all (\"/\\s+(.+)\\s+=>/\",\n// $raw_synonims1, $matches1, PREG_PATTERN_ORDER);\n// var_dump($raw_synonims1);\n// var_dump($matches1);\n// exit();\n\n\n // cmd commend\n $wn_command = '\"C:/Program Files (x86)/WordNet/2.1/bin/wn\" \"'.$tag.'\" \"-synsn\"';\n $raw_synonims = shell_exec ($wn_command);\n\n // if the word exist\n if (! $raw_synonims) {\n return null;\n }\n\n // get the result of cmmend\n $matches = array ();\n preg_match_all (\"/\\s+(.+)\\s+.+?=>/\",\n $raw_synonims, $matches, PREG_PATTERN_ORDER);\n// var_dump($raw_synonims);\n\n // if no matched result\n if(!isset($matches[1][0])){\n return null;\n }\n\n// dd($matches);\n // get all accepted words\n $expanded_query = array();\n\n foreach ($matches[1] as $match){\n $match = explode (\", \", $match);\n foreach ($match as $word){\n array_push($expanded_query, strtolower($word));\n }\n }\n\n // remove repeated element\n $expanded_query = array_unique($expanded_query);\n\n // return the word\n return $expanded_query;\n }", "function load_t2s_text(){\n\tglobal $config, $t2s_langfile, $t2s_text_stand, $templatepath;\n\t\n\tif (file_exists($templatepath.'/lang/'.$t2s_langfile)) {\n\t\t$TL = parse_ini_file($templatepath.'/lang/'.$t2s_langfile, true);\n\t} else {\n\t\tLOGGING(\"For selected T2S language no translation file still exist! Please go to LoxBerry Plugin translation and create a file for selected language \".substr($config['TTS']['messageLang'],0,2),3);\n\t\texit;\n\t}\n\treturn $TL;\n}", "protected function _readTable() {}" ]
[ "0.58287954", "0.57583344", "0.57583344", "0.57583344", "0.57583344", "0.57583344", "0.57583344", "0.57583344", "0.57583344", "0.57583344", "0.57583344", "0.57583344", "0.57583344", "0.5735846", "0.5526387", "0.54785496", "0.541916", "0.54181194", "0.5359645", "0.5299863", "0.5276473", "0.52760994", "0.5237245", "0.5218757", "0.5210889", "0.5204255", "0.51994133", "0.51559997", "0.5147587", "0.514347", "0.5141078", "0.51391405", "0.5118673", "0.51089513", "0.50921077", "0.5083948", "0.50217885", "0.5017448", "0.5016968", "0.5015088", "0.4998966", "0.4997197", "0.49964407", "0.49920088", "0.49903935", "0.49680582", "0.49641418", "0.4964072", "0.4963844", "0.4941578", "0.49363", "0.4935235", "0.4929858", "0.4926732", "0.49263155", "0.4919731", "0.49188983", "0.49144745", "0.4910045", "0.49006712", "0.48993894", "0.48939347", "0.4872912", "0.4869104", "0.48549023", "0.4838826", "0.4837996", "0.48353064", "0.48315227", "0.482901", "0.48191404", "0.48169598", "0.48143744", "0.48104474", "0.48080426", "0.4799512", "0.47923416", "0.47839323", "0.47833908", "0.47820857", "0.47755438", "0.47735184", "0.47723955", "0.47699615", "0.4762655", "0.4745951", "0.4745664", "0.47379625", "0.47356912", "0.47337088", "0.47299272", "0.47290483", "0.4725274", "0.4723684", "0.4709829", "0.4704492", "0.47041813", "0.47029284", "0.46907708", "0.4679061", "0.46736413" ]
0.0
-1
function lireParam Lit un enregistrement a partir d'une commande sql passee en parametre
function lireParam($sql) { $collection = $this->execute($sql); $collection = $collection[0]; if ($this->auto_date == 1) { $collection = $this->utilDatesDBVersLocale($collection); } if ($this->codageHtml) { $collection = $this->htmlEncode($collection); } if ($this->toUTF8) { $collection = $this->utf8Encode($collection); } return $collection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajouter_article($nom,$prix,$quantite,$description,$type){\r\n\tglobal $bdd;\r\n\r\n\t$req=$bdd->prepare('INSERT INTO article(id_article, nom_article, prix_article, quantite_article, description_article,type_article) VALUES (:id_article, :nom_article, :prix_article,:quantite_article, :description_article,:type_article)');\r\n\r\n\t$req->execute(array(\r\n\t\t'id_article'=>'',\r\n\t\t'nom_article'=>$nom,\r\n\t\t'prix_article'=>$prix,\r\n\t\t'quantite_article'=>$quantite,\r\n\t\t'description_article'=>$description,\r\n\t\t'type_article'=>$type));\r\n\r\n}", "function add($param) {\n extract($param);\n // nunca suponga el orden de las columnas: INSERT INTO tabla VALUES (v1, v2,v3, ...); tómese el trabajo de indicar los nombres de columnas\n // los nombres de los elementos del array asociativo corresponden a los atributos name de las columnas del jqGrid\n $sql = \"INSERT INTO usuario(id_usuario, direccion, telefonos, correos, contrasena, rol )\n VALUES ('$id_usuario', '$direccion','$telefonos', '$correos', '$contrasena','operario' );\n INSERT INTO operario(fk_usuario,nombres, apellidos) \n VALUES ('$id_usuario','$nombres', '$apellidos');\";\n $conexion->getPDO()->exec($sql);\n echo $conexion->getEstado();\n }", "function constitueCommande($idProd,$idCommande,$qteProd){\n require(\"./modele/connexionBD.php\");\n $sql_ajt = \"INSERT INTO `constitue`(`idProduit`, `idCommande`, `qteProduit`) \n VALUES (:idp,:idc,:qteP);\";\n try {\n $statement = $pdo->prepare($sql_ajt);\n $statement->bindParam(':idc', $idCommande);\n $statement->bindParam(':idp', $idProd);\n $statement->bindParam(':qteP', $qteProd);\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $statement->execute();\n } catch (PDOException $e) {\n echo utf8_encode(\"Echec de select : \" . $e->getMessage() . \"\\n\");\n die();\n }\n\n}", "function get_param($param)\n{\n\t$user_id = $_SESSION['lid'];\n $atskaites_id = $_GET['h'];\n//\techo \"Lietotaja nr. =\".$user_id.'<br />';\n\n\t$r = mysql_query(\"select * from parametrs where nosaukums = '$param' and user_id = '$user_id' and atskaites_id = '$atskaites_id'\");\n\t\n\tif ($m = mysql_fetch_array($r))\n\t\treturn $m['vertiba'];\n\telse\n\t\treturn '';\n}", "function ajouter_commande($date,$id_client,$prix_commande){\r\n\tglobal $bdd;\r\n\r\n\t$req=$bdd->prepare('INSERT INTO commande(id_commande, date_commande, client_id, prix_commande) VALUES (:id_commande, :date_commande, :client_id, :prix_commande)');\r\n\r\n\t$req->execute(array(\r\n\t\t'id_commande'=>'',\r\n\t\t'date_commande'=>$date,\r\n\t\t'client_id'=>$id_client,\r\n\t\t'prix_commande'=>$prix_commande));\r\n\r\n}", "function BDDselect($sql, $param){\n $bdd = BDDopen();\n $req = $bdd->prepare($sql);\n if($req->execute($param) === FALSE){\n echo 'Errore de la requette';\n print_r($param);\n }\n return $req;\n}", "public static function read_SqlParams($param);", "function ajoue_proprietaire($nom,$CA,$debut_contrat,$fin_contrat)\r\n{ $BDD=ouverture_BDD_Intranet_Admin();\r\n\r\n if(exist($BDD,\"proprietaire\",\"nom\",$nom)){echo \"nom deja pris\";return;}\r\n\r\n $SQL=\"INSERT INTO `proprietaire` (`ID`, `nom`, `CA`, `debut_contrat`, `fin_contrat`) VALUES (NULL, '\".$nom.\"', '\".$CA.\"', '\".$debut_contrat.\"', '\".$fin_contrat.\"')\";\r\n\r\n $result = $BDD->query ($SQL);\r\n\r\n if (!$result)\r\n {echo \"<br>SQL : \".$SQL.\"<br>\";\r\n die('<br>Requête invalide ajoue_equipe : ' . mysql_error());}\r\n}", "function actionAdmin($idAdmin, $act, $log)\n{\n require(\"./modele/connexionBD.php\");\n $sql_ajt = \"INSERT INTO `administre`(`idAdmin`, `ActionAdmin`, `loginUser`)\n VALUES (:idA,:actionAdmin,:loginUser)\";\n try {\n $statement = $pdo->prepare($sql_ajt);\n $statement->bindParam(':idA', $idAdmin);\n $statement->bindParam(':actionAdmin', $act);\n $statement->bindParam(':loginUser', $log);\n $statement->execute();\n } catch (PDOException $e) {\n echo utf8_encode(\"Echec de select : \" . $e->getMessage() . \"\\n\");\n die();\n }\n}", "function ajouterUe($id, $nomUe,$libelleUe) {\n $query = 'insert into ue values(\"\",\"'.$nomUe.'\",\"'.$id.'\",\"'.$libelleUe.'\")';\n mysql_query($query) or die (\"Impossible d'inserer une UE\");\n\t\n}", "public function prepare_execute_add_up_del($_req, $_param = array()) {\n// var_dump($_param);\n $stmt = $this->base->prepare($_req);\n// echo \"<br>---------bdd--------<br> stmt <br>\";\n// var_dump($stmt);\n $stmt->execute($_param);\n }", "function ajouterCommande($idUser,$idAdmin,$montantCommande){\n require(\"./modele/connexionBD.php\");\n $sql_ajt = \"INSERT INTO `commande`(`EtatCommande`, `MontantCommande`, `DateCommande`,`idAdmin`, `idUtilisateur`) \n VALUES ('En cours',:montant,now(),:idAdmin,:idUser);\";\n try {\n $statement = $pdo->prepare($sql_ajt);\n $statement->bindParam(':montant', $montantCommande);\n $statement->bindParam(':idUser', $idUser);\n $statement->bindParam(':idAdmin',$idAdmin);\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $statement->execute();\n $commandeUser=commandeUserLast($idUser);\n return $commandeUser;\n } catch (PDOException $e) {\n echo utf8_encode(\"Echec de select : \" . $e->getMessage() . \"\\n\");\n die();\n }\n}", "function registra_noleggio($payload, $conn)\n {\n $restituita = 'N';\n $targa = $payload['targa'];\n $cf = $payload['cf'];\n $inizio = $payload['inizio'];\n $fine = $payload['fine'];\n $stmt = $conn->prepare('INSERT INTO noleggi(targa,cf, inizio, fine, restituita) VALUES (?,?,?,?,?)');\n if(!$stmt)\n echo $conn->error;\n $stmt->bind_param(\"sssss\", $targa, $cf, $inizio, $fine, $restituita);\n $stmt->execute();\n echo 'noleggio è stato inserito';\n }", "function ajoutPanierBd($idProd, $qteProd, $idUser)\n{\n require(\"./modele/connexionBD.php\");\n $sql_ajt = \"INSERT INTO `panier`(`idPanier`, `nbProduits`, `idUtilisateur`, `idProduit`) VALUES \n (null,:qteProd,:idUser,:idProd)\";\n try {\n $statement = $pdo->prepare($sql_ajt);\n $statement->bindParam(':qteProd', $qteProd);\n $statement->bindParam(':idUser', $idUser);\n $statement->bindParam(':idProd', $idProd);\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $statement->execute();\n return true;\n } catch (PDOException $e) {\n echo utf8_encode(\"Echec de select : \" . $e->getMessage() . \"\\n\");\n die();\n }\n}", "function insertUser($nom, $prenom, $villeId) {\n $bdd = coBdd();\n $req = $bdd->prepare('INSERT INTO utilisateur (nom, prenom, villeId) VALUES (:nom, :prenom, :ville)');\n $req->bindParam(\":nom\", $nom);\n $req->bindParam(\":prenom\", $prenom);\n $req->bindParam(\":ville\", $villeId);\n $req->execute();\n}", "function BDDquery($sql, $param){\n $bdd = BDDopen();\n $req = $bdd->prepare($sql);\n if($req->execute($param) == false){\n echo 'Error de la requette ';\n print_r($param);\n return -1;\n }\n return $req->rowCount();\n}", "function modifier($nom,$classe,$id){\n try{\n $link= connecter_db();\n $rp=$link->prepare(\"update etudiant set nom=? , classe=? where id=?\");\n $rp->execute([$nom,$classe,$id]);\n}catch(PDOException $e ){\ndie (\"erreur de modification de l'etudiant dans la base de donnees \".$e->getMessage());\n}\n}", "function AjouterUtilisateur($login, $password, $prof)\n{\n\tglobal $bdd;\n\t$req = $bdd->prepare('INSERT INTO UTILISATEUR(login, password, prof,) \n\t\tVALUES(:login, :password, :prof)');\n\t$req->execute(array(\n\t\t'login' => $login,\n\t\t'password' => $password,\n\t\t'prof' => $prof,\n\t));\n\t$req->closeCursor();\n}", "function add($nombre,$correo){\n\t\tglobal $conn;\n\t\t//$sql = \"INSERT INTO usuario (nombre,correo) VALUES ('$nombre','$correo')\";\n\t\t$stmt = $conn->prepare('INSERT INTO user (email,nombre) VALUES ( :email,:password)');\n\t\t//$stmt->bindParam(':nombre', $nombre);\n\t\t$stmt->bindParam(':email', $nombre);\n\t\t$stmt->bindParam(':password', $correo);\n\t\t$stmt->execute();\n\t\t//$conn->query($sql);\n\t}", "function creer_membre($num_licence, $nom, $prenom, $date_naissance, $mdp) {\n static $query = null;\n\n if ($query == null) {\n $query = connectDB()->prepare(\"INSERT INTO t_membres(num_licence, nom, prenom, date_naissance, mdp) \n VALUES (:num_licence, :nom, :prenom, :date_naissance, :mdp)\");\n }\n\n $query->execute([\n \"num_licence\" => $num_licence,\n \"nom\" => $nom,\n \"prenom\" => $prenom,\n \"date_naissance\" => $date_naissance,\n \"mdp\" => sha1($mdp)\n ]);\n}", "public static function Nueva_Muestra_Parametro($id_parametro, $num_muestra, $id_orden)\n {\n // Sentencia INSERT\n $comando = \"INSERT INTO ordenes_muestras_parametros (id_parametro, num_muestra, id_orden) VALUES( ?,?,? )\";\n\n // Preparar la sentencia\n $sentencia = Database::getInstance()->getDb()->prepare($comando);\n\n return $sentencia->execute(\n array(\n $id_parametro, \n $num_muestra,\n $id_orden \n )\n );\n\n }", "function insererLigneSQL($nomTable, $tabAsso)\r\n{\r\n // MAINTENANT JE PEUX CONSTRUIRE LA REQUETE SQL PREPAREE\r\n $requeteSQL =\r\n<<<CODESQL\r\n\r\nINSERT INTO $nomTable\r\n(nom, prenom, adresse, raison, numero, dateDeclaration) \r\nVALUES \r\n(:nom, :prenom, :adresse, :raison, :numero, :dateDeclaration) \r\n\r\nCODESQL;\r\n // ENSUITE, ON VA ENVOYER LA REQUETE SQL PREPAREE\r\n // CONNECTER A SQL\r\n \r\n // ETAPE1: CONNECTER PHP A SQL\r\n // ATTENTION: NE PAS OUBLIER DE CHANGER LA DATABASE...\r\n $pdo = new PDO(\"mysql:host=localhost;dbname=attestation;charset=utf8;\", \"root\", \"\");\r\n\r\n // ETAPE2a: ON ENVOIE LA REQUETE PREPAREE\r\n // PDOStatement EST UN CONTAINER QUI ENGLOBE LES RESULTATS DE LA REQUETE SQL\r\n $pdoStatement = $pdo->prepare($requeteSQL);\r\n\r\n // ETAPE2b: ON FOURNIT LES DONNEES EXTERIEURES A PART\r\n $pdoStatement->execute($tabAsso);\r\n\r\n // POUR DEBUG SQL SI BESOIN\r\n // https://www.php.net/manual/fr/pdostatement.debugdumpparams.php\r\n // ON ACTIVE CETTE LIGNE SI ON A BESOIN DE DEBUG LES REQUETES SQL...\r\n // => AFFICHE PLUS D'INFORMATIONS SUR LA REQUETE SQL ENTRE PHP ET SQL\r\n // $pdoStatement->debugDumpParams();\r\n\r\n}", "function edit($param) {\n extract($param);\n $sql = \"UPDATE operario SET fk_usuario='$id_usuario', nombres='$nombres', apellidos='$apellidos' WHERE fk_usuario='$id_usuario';\n UPDATE usuario SET id_usuario='$id_usuario', direccion='$direccion', telefonos='$telefonos', correos='$correos', contrasena='$contrasena' WHERE id_usuario = '$id_usuario'; \"; // <-- el ID de la fila asignado en el SELECT permite construir la condición de búsqueda del registro a modificar\n $conexion->getPDO()->exec($sql);\n echo $conexion->getEstado();\n }", "Public function set_requete($requete = null){\n\n\n\n\n }", "function ajouterArticle($id,$qteProduit){\r\n $idpanier=creationPanier();\r\n if($idpanier==false)\r\n {\r\n echo 'Probleme acces au panier.';\r\n die(); \r\n }\r\n\r\n echo 'debug1';\r\n //Connexion database\r\n try {\r\n $dbh = new PDO('mysql:host=localhost;dbname=retromathon', 'root', '');\r\n }\r\n catch( PDOException $Exception ) {\r\n echo $Exception->getMessage();\r\n die();\r\n }\r\n\r\n //Selection du id produit s'il existe dans le panier\r\n $req = \"SELECT * FROM selectionne WHERE REF_PANIER=\".$idpanier.\" AND REF_ART='\".$id.\"';\";\r\n $prep = $dbh->query($req);\r\n if($prep==false) //Erreur\r\n {\r\n echo 'Erreur Base de Donnees';\r\n die(); \r\n }\r\n $article = $prep->fetch();\r\n if(($article!=null)&&(count($article)!=0)) //Article existe\r\n {\r\n //On incremante la quantite\r\n $newQte=$article['QTE_CHOISI']+$qteProduit;\r\n $req = \"UPDATE selectionne SET QTE_CHOISI=\".$newQte.\" WHERE REF_PANIER=\".$idpanier.\" AND REF_ART='\".$id.\"';\";\r\n $prep = $dbh->exec($req);\r\n if($prep==0) //Erreur\r\n {\r\n echo 'Erreur Base de Donnees';\r\n die(); \r\n }\r\n }\r\n else //Article n'existe pas\r\n {\r\n //Ajout de l'article au panier\r\n $req = \"INSERT INTO selectionne (REF_ART, REF_PANIER,QTE_CHOISI) VALUES ('\".$id.\"',\".$idpanier.\",\".$qteProduit.\");\";\r\n $prep = $dbh->exec($req);\r\n if($prep==0) //Erreur\r\n {\r\n echo 'Erreur INSERT Base de Donnees';\r\n die(); \r\n }\r\n }\r\n}", "function p_modificar_parametro($cod_usuario,$cod_parametro,$val_parametro){\n\t\tif(!$cod_usuario)return false;\n\t\tglobal $db;\n\t\t\n\t\tif(!$val_parametro)$val_parametro = 0;\n\t\telse $val_parametro = 1;\n\n\t\t// primero consulta si existe\n\t\t$query = \"select count(*) as num_registros\t\n\t\t\t\t\t\t\tfrom \tparametro_x_usuario \n\t\t\t\t\t\t\twhere \tcod_usuario = $cod_usuario\n\t\t\t\t\t\t\tand\t\tcod_parametro = $cod_parametro\";\n\t\t$row = $db->consultar_registro($query);\n\t\t$num_registros = $row['num_registros'];\n\t\t\n\t\t// si existe algun dato lo actualiza\n\t\tif($num_registros > 0){\n\t\t\t$query = \"update parametro_x_usuario \n\t\t\t\t\t\tset val_parametro = $val_parametro \t\n\t\t\t\t\t\twhere cod_usuario = $cod_usuario\t \n\t\t\t\t\t\tand cod_parametro = $cod_parametro\";\n\n\t\t\t$db->consultar($query);\t\t\n\t\t}else{\n\t\t\t$query=\"insert into parametro_x_usuario \n\t\t\t\t\t(cod_usuario,cod_parametro,val_parametro)\n\t\t\t\t\tVALUES\n\t\t\t\t\t($cod_usuario,$cod_parametro,$val_parametro)\";\n\n\t\t\t$db->consultar($query);\t\t\n\t\t}\n\t\n\t\t// primero consulta si existe\n\t\t$query = \"select *\n\t\t\t\t\tfrom \tparametro_x_usuario \n\t\t\t\t\twhere \tcod_usuario = $cod_usuario\n\t\t\t\t\tand\t\tcod_parametro = $cod_parametro\";\n\t\t$row = $db->consultar_registro($query);\n\t\t$val_parametro = $row['val_parametro'];\n\n\t\treturn $val_parametro;\n\n\n\t}", "function modifier1($connexion,$nomTable,$nomClePrimaire,$valeurClePrimaire,$nomChampAModifier,$ValeurChampAModifier) { \n $req =$connexion -> query(\"UPDATE $nomTable SET $nomChampAModifier = '$ValeurChampAModifier' WHERE $nomClePrimaire = '$valeurClePrimaire'\");\n }", "function executerSQL($requete){\n global $dbhost,$dbusername,$dbpassword,$dbname;\n\n //Créer une connection mysql\n $connection = new sql($dbhost,$dbusername,$dbpassword,$dbname); //Connection à  la db\n $connection->setQuery($requete);\t\t\t \t//créeer la requete\n $requete = $connection->runQuery($connection->getQuery());\t//executer la requête\n\n return $requete;\n }", "function insert_details($db, $nom, $prenom, $email, $username, $password, $date_inscrit, $date_dern_conn, $admin)\n {\n $query = $db->prepare(\"\n \n INSERT INTO users(nom, prenom, email, username, password, date_inscrit, date_dern_conn, admin)\n \n VALUES(:nom, :prenom, :email, :username, :password, :date_inscrit, :date_dern_conn, :admin)\n \n \");\n\n $query->bindParam(\":nom\", $nom);\n $query->bindParam(\":prenom\", $prenom);\n $query->bindParam(\":email\", $email);\n $query->bindParam(\":username\", $username);\n $query->bindParam(\":password\", $password);\n $query->bindParam(\":date_inscrit\", $date_inscrit);\n $query->bindParam(\":date_dern_conn\", $date_dern_conn);\n $query->bindParam(\":admin\", $admin);\n\n return $query->execute();\n\n }", "public function insert_data($param)\n\t{\n\t\t$q_insert_user = \"INSERT INTO tb_users(\n\t\t\tuser_code,\n\t\t\tuser_name,\n\t\t\tuser_password,\n\t\t\tuser_status,\n\t\t\tcreate_date,\n\t\t\tupdate_date,\n\t\t\tadds_date )\n\t\tVALUES(\n\t\t\t:user_code,\n\t\t\t:user_name,\n\t\t\t:user_password,\n\t\t\t:user_status,\n\t\t\t:create_date,\n\t\t\t:update_date,\n\t\t\t:adds_date )\";\n\t\tDB::connect()->query($q_insert_user)->vars($param)->exec();\n\t}", "function SQLExecuterRequete($sql, array $arg) {\n try {\n $sth = SQLPreparerRequete($sql);\n $sth->setFetchMode(PDO::FETCH_ASSOC);\n foreach ($arg as $key => &$val) {\n $sth->bindParam($key, $val);\n }\n if (!$sth->execute()) {\n throw new Exception(\"La requete SQL a echouee\", 500);\n }\n } catch (Exception $e) {\n ob_end_clean();\n die('<!DOCTYPE html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>Arcade 2i</title><link rel=\"stylesheet\" type=\"text/css\" href=\"assets/css/bootstrap.css\"/><link rel=\"stylesheet\" type=\"text/css\" href=\"assets/css/style.css\"/><script src=\"https://code.jquery.com/jquery-2.2.3.min.js\"></script><script src=\"assets/js/bootstrap.js\"></script></head><body><div class=\"container\"><div class=\"row\"><div class=\"alert alert-danger\">Erreur lors de l\\'execution de la page : ' . $e->getMessage() . '</div></div></div></body></html>');\n }\n return $sth;\n}", "function modifier_avis($id_avis)\n {\n $db = config::getConnexion();\n try{\n $req=$db->prepare($sql);\n $req->execute();\n }\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\n}", "static public function mdlIngresarUsuario($tabla, $datos){\n\n $stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(nombres,apellidos,tipo_documento,documento,celular,email,profesion,tipo_vinculacion,cvlac,cargo,ficha,fecha_vinculacion,fecha_desvinculacion,estado_vinculacion,contrasena,id_programa,id_rol ) VALUES (:nombres,:apellidos,:tipo_documento,:documento,:celular,:email,:profesion,:tipo_vinculacion,:cvlac,:cargo,:ficha,:fecha_vinculacion,:fecha_desvinculacion,:estado_vinculacion,:contrasena,:id_programa,:id_rol)\");\n\n $p=null;\n if($datos[\"id_programa\"]==\"NULL\"){\n $p=null;\n }else{\n $p=$datos[\"id_programa\"];\n }\n\n $stmt->bindParam(\":nombres\", $datos[\"nombres\"], PDO::PARAM_STR);\n $stmt->bindParam(\":apellidos\", $datos[\"apellidos\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipo_documento\", $datos[\"tipo_documento\"], PDO::PARAM_STR);\n $stmt->bindParam(\":documento\", $datos[\"documento\"], PDO::PARAM_STR);\n $stmt->bindParam(\":celular\", $datos[\"celular\"], PDO::PARAM_STR);\n $stmt->bindParam(\":email\", $datos[\"email\"], PDO::PARAM_STR);\n $stmt->bindParam(\":profesion\", $datos[\"profesion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipo_vinculacion\", $datos[\"tipo_vinculacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cvlac\", $datos[\"cvlac\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cargo\", $datos[\"cargo\"], PDO::PARAM_STR);\n $stmt->bindParam(\":ficha\", $datos[\"ficha\"], PDO::PARAM_STR);\n $stmt->bindParam(\":fecha_vinculacion\", $datos[\"fecha_vinculacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":fecha_desvinculacion\", $datos[\"fecha_desvinculacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estado_vinculacion\", $datos[\"estado_vinculacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":contrasena\", $datos[\"contrasena\"], PDO::PARAM_STR);\n $stmt->bindParam(\":id_programa\", $p, PDO::PARAM_STR);\n $stmt->bindParam(\":id_rol\", $datos[\"id_rol\"], PDO::PARAM_STR);\n \n if($stmt->execute()){\n\n return \"ok\";\n\n }else{\n\n return \"error\";\n\n }\n\n $stmt->close();\n\n $stmt = null;\n\n }", "function insert($tabla, $campos, $valores){\n #se forma la instruccion SQL\n $q = 'INSERT INTO '.$tabla.' ('.$campos.') VALUES ('.$valores.')';\necho $q;\n $resultado = $this->consulta($q);\n \n if($resultado) return true;\n else return false;\n}", "function Bloquer($bloqueur,$bloque){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"INSERT INTO blocage VALUES(NULL,'$bloqueur','$bloque')\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\r\n\t\tmysqli_close($conn);\r\n\t\t}", "function inscription($pseudo,$mdp,$mail){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"INSERT INTO `utilisateur` (`pseudo`,`mdp`,`mail`,`status_utilisateur`) values (:pseudo,:mdp,:mail,FALSE);\");\n\t\t$req->execute(array(\n\t\t\t\t\t\t\t'pseudo'=>$pseudo,\n\t\t\t\t\t\t\t'mdp'=>$mdp,\n\t\t\t\t\t\t\t'mail'=>$mail));\n\t\t$req->closeCursor();\n\t}", "function ajouterPraticien($unNom, $unPrenom, $uneAdresse, $uneTel, $uneSpe, $unDepartement, $uneNotoriete, $unType, &$tabErr)\n {\n $idConnexion = connecterServeurBD();\n \n // Si la connexion au SGBD à réussi\n if ($idConnexion) \n {\n // sélectionner la base de donnée\n activerBD($idConnexion);\n \n // Vérifier que la référence saisie n'existe pas déja\n $requete=\"select * from praticien\";\n $requete=$requete.\" where PRA_NOM = '\".$unNom.\"';\"; \n $jeuResultat=mysql_query($requete,$idConnexion);\n $ligne=mysql_fetch_assoc($jeuResultat);\n echo\"test\",$requete;\n if($ligne)\n {\n $message=\"Echec de l'ajout : le praticien existe déjà !\";\n ajouterErreur($tabErr, $message);\n \n }\n else\n {\n // Créer la requête d'ajout \n $requete=\"insert into praticien\"\n .\"(PRA_NOM, PRA_PRENOM, PRA_ADRESSE, PRA_TEL, PRA_SPECIALITE_COMP, PRA_DEPARTEMENT, PRA_COEFNOTORIETE, TYP_CODE) values ('\"\n \n .$unNom.\"','\"\n .$unPrenom.\"','\"\n .$uneAdresse.\"','\"\n .$uneTel.\"','\"\n .$uneSpe.\"','\"\n .$unDepartement.\"','\"\n .$uneNotoriete.\"','\"\n .$unType.\"');\";\n // Lancer la requête d'ajout \n $ok= mysql_query($requete,$idConnexion);\n \n // Si la requête a réussi\n if ($ok)\n {\n \n $message = \"Le praticien a été correctement ajoutée\";\n ajouterErreur($tabErr, $message);\n echo \"test\",$message;\n }\n else\n {\n $message = \"Attention, l'ajout du praticien a échoué !!!\";\n ajouterErreur($tabErr, $message);\n } \n\n }\n \n }\n else\n {\n $message = \"problème à la connexion <br />\";\n ajouterErreur($tabErr, $message);\n }\n}", "function querySegui($utente_seguito){\r\n \r\n $sql = 'INSERT INTO seguaci_seguiti(utente_seguace, utente_seguito) ' .\r\n 'VALUES(' . \"'\" . $_SESSION['email_utente'] . \"'\" . ',' . $utente_seguito . ')';\r\n \r\n \r\n return $sql;\r\n \r\n}", "static function Insert($table,$param,$param_value){\n\t\t$sql=\"insert into $table($param) values($param_value)\";\n\t\t//echo $sql;\n mysql_query($sql);\n }", "public function __construct(&$param) {\r\n\t\t$this->param =& $param;\r\n\r\n\t\tif ($this->validite ()) {\r\n\t\t\t$action = $this->action ();\r\n\r\n\t\t\t//On régénère les vues indiquées\r\n\t\t\t$this->regenerer();\r\n\r\n\t\t\t//On met fin à la transaction\r\n\t\t\tQuery::fin();\r\n\t\t} else {\r\n\t\t\t$this->addMessage('Les donnnées passées ne sont pas valides ou sont incomplètes.');\r\n\t\t}\r\n\t}", "function ajoutProduit($nom, $prix, $categorie, $quantite, $desc, $idVendeur, $dataImg, $date)\n{\n\n require(\"./modele/connexionBD.php\");\n\n $sql_ajt = \"INSERT INTO `produit`(`idProduit`, `NomProduit`, `PrixProduit`, `QteProduit`, `Categorie`, `idVendeur`,`image`,`Description`,`DateTime`) \n VALUES (null,:nomP,:prixP,:qteP,:catP,:idV,:img,:decrit,:datetemps)\";\n try {\n $statement = $pdo->prepare($sql_ajt);\n $statement->bindParam(':nomP', $nom);\n $statement->bindParam(':prixP', $prix);\n $statement->bindParam(':qteP', $quantite);\n $statement->bindParam(':catP', $categorie);\n $statement->bindParam(':img', $dataImg);\n $statement->bindParam(':idV', $idVendeur);\n $statement->bindParam(':decrit', $desc);\n $statement->bindParam(':datetemps', $date);\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $statement->execute();\n return true;\n } catch (PDOException $e) {\n echo utf8_encode(\"Echec de select : \" . $e->getMessage() . \"\\n\");\n die();\n }\n}", "private function create_insert_sql($param) {\n $ques = array();\n foreach ($param as $key => $value) {\n $ques[] = '?';\n }\n\n return implode(', ', $ques);\n }", "function ajouterArticle($data){ \n global $connexion;\n $requete = $connexion -> prepare('\n INSERT INTO articles\n (title, created_at, modified_at, introduction, content, image_url, category_id) \n VALUES \n (:title, NOW(), NOW(), :introduction, :content, :image_url, :category_id)');\n $requete -> execute([\n ':title' => $data['title'],\n ':introduction' => $data['introduction'],\n ':content' => $data['content'],\n ':image_url' => $data['image_url'],\n ':category_id' => $data['category_id']\n ]);\n $idNewArticle = $connexion -> lastInsertId();\n return $idNewArticle;\n \n \n}", "function commentaire($data){\n global $connexion;\n $requete = $connexion -> prepare('\n INSERT INTO commentaires\n (title, content, logUser, created_at, article_id) \n VALUES \n (:title, :content, :logUser, NOW(), :article_id)');\n $requete -> execute([\n ':title' => $data['titreCom'],\n ':logUser' => $data['pseudo'],\n ':content' => $data['contentCom'],\n ':article_id' => $data['id_art']\n ]);\n \n header('location:article.php?id='.$data['id_art'].'');\n \n}", "function clonInscritos($T_INSCRITOS,$PROVINCIA, $CLAVE, $TOMO, $FOLIO)\n{\n global $mysqli;\n $TINS = $T_INSCRITOS;\n $query = new Query($mysqli, \"INSERT INTO \".$TINS.\" SELECT * FROM inscritostmp WHERE provincia=? and clave=? and tomo=? and folio=?\");\n $parametros = array('ssss', &$PROVINCIA, &$CLAVE, &$TOMO, &$FOLIO);\n $data = $query->getresults($parametros);\n return true;\n}", "public function sqlSetParam($Value,$ParamName='?'){\n\n if (is_scalar($Value)) {\n\n switch (gettype($Value)){\n\n case \"string\":\n\n // se nella stringa ci sono barre la funzione mysql_real_escape_string non funziona $Value = str_replace('\\\\','\\\\\\\\',$Value);\n // metto le slashes perche' su preg_replace me le interpreta e le elimina\n $Value = '\"'.(mysql_real_escape_string($Value,$this->hDatabase)).'\"';\n\n // se nel campo valore ci sono ? allora devono essere ignorati come markup per i parametri\n $Value = str_replace(\"?\",\"\\?\",$Value);\n\n $replaceString = $Value;\n\n break;\n\n break;\n case \"boolean\":\n ($Value) ? $replaceString=1 : $replaceString=0; \n break;\n case \"double\":\n //$v = localeconv();\n //$replaceString = $Value;\n $old = setlocale(LC_NUMERIC,0);\n setlocale(LC_NUMERIC,'en');\n //set settype($replaceString,'double');\n $replaceString = (string)$Value;\n #$decimal_point = ','; #$v[decimal_point]\n setlocale(LC_NUMERIC,$old);\n #$thousands_sep = '.'; #$v[thousands_sep]\n #$replaceString = str_replace($thousands_sep,'',$Value);\n #$replaceString = str_replace($decimal_point,'.',$replaceString);\n //settype($replaceString,'double'); Attenzione se il locale è italia allora crea \n break;\n default:\n $replaceString = ($Value);\n }\n } else if (is_array($Value)){\n\n if (!empty($Value)){\n\n foreach ($Value as $theValue){\n\n if (is_string($theValue)){\n\n $theValue = '\"'.(mysql_real_escape_string($theValue,$this->hDatabase)).'\"';\n // se nel campo valore ci sono ? allora devono essere ignorati come markup per i parametri\n $theValue = str_replace(\"?\",\"\\?\",$theValue);\n\n }\n\n $_replaceString[] = $theValue;\n\n }\n $replaceString = join(',',$_replaceString); \n } else {\n $replaceString = '';\n }\n } else if (is_null($Value)){\n $replaceString = \"NULL\"; \n } else if ($Value instanceof ISqlFunction) {\n\n $replaceString = (string)($Value);\n\n } else if ($Value instanceof ISqlStatement) {\n\n $replaceString = (string)($Value);\n\n }\n\n\n $prec = '';\n $pos = strpos($this->sqlQuery,'?');\n\n /* for($i = 0; $i < strlen($this->sqlQuery); $i++){\n if ($i>0){ $prec = $this->sqlQuery{$i-1}; }\n if ( ($prec!='\\\\') && ($this->sqlQuery{$i}=='?') ){\n $pos = $i;\n break;\n }\n }*/\n\n\n while ($pos!==false) {\n if (($pos>0) and ($this->sqlQuery{$pos-1}!='\\\\')) {\n $this->sqlQuery = substr_replace($this->sqlQuery,$replaceString,$pos,1);\n $pos = false;\n } else {\n $pos = strpos($this->sqlQuery,'?',$pos+1);\n }\n\n }\n\n /* if ($pos !== false){\n if (($pos>0) and ($this->sqlQuery{$pos-1}!='\\\\')) {\n $this->sqlQuery = substr_replace($this->sqlQuery,$replaceString,$pos,1);\n } else {\n\n }\n }*/\n\n }", "function dbquery() {\n\t\t\t$db = &func_get_arg(0);\n\t\t\t$zapytanie = &func_get_arg(1);\n\t\t\t$polecenie = $db->prepare($zapytanie);\n\t\t\tif( func_num_args() == 2 ){\n\t\t\t\t$polecenie->execute();\n\t\t\t\treturn $polecenie;\n\t\t\t}\n\n for($i = 2 ; $i < func_num_args(); $i++) {\n $polecenie->bindParam($i-1, func_get_arg($i), PDO::PARAM_STR );\n }\n\n $polecenie->execute();\n return $polecenie;\n\t \t}", "public static function Nuevo_Parametro($id_matriz_pdf, $clave, $parametro, $tiempo_cliente, $tiempo_analista, $id_tecnica_analitica, $id_metodo_inter, $precio, $lim_deteccion, $lim_cuantificacion, $lim_inf_trabajo, $lim_sup_trabajo, $unidades, $decimales, $id_analista, $id_area, $holding_time, $holding_time_express, $acreditacion, $nombre_corto, $volumen, $envase, $area, $impresion)\n {\n // Sentencia INSERT\n $comando = \"INSERT INTO parametros (id_matriz_pdf, clave, parametro, tiempo_cliente, tiempo_analista, id_tecnica_analitica, id_metodo_inter, precio, lim_deteccion, lim_cuantificacion, lim_inf_trabajo, lim_sup_trabajo, unidades, decimales, id_analista, id_area, holding_time, holding_time_express, acreditacion, nombre_corto, volumen, envase, area, ventas, impresion) VALUES( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,0,?)\";\n\n // Preparar la sentencia\n $sentencia = Database::getInstance()->getDb()->prepare($comando);\n\n return $sentencia->execute(\n array(\n $id_matriz_pdf, \n $clave,\n $parametro,\n $tiempo_cliente,\n $tiempo_analista,\n $id_tecnica_analitica,\n $id_metodo_inter,\n $precio,\n $lim_deteccion,\n $lim_cuantificacion,\n $lim_inf_trabajo,\n $lim_sup_trabajo,\n $unidades,\n $decimales,\n $id_analista,\n $id_area,\n $holding_time,\n $holding_time_express,\n $acreditacion,\n $nombre_corto,\n $volumen,\n $envase,\n $area,\n $impresion\n )\n );\n\n }", "public function inscription($mail, $nom, $prenom, $rue, $cp, $ville, $num, $mdp)\r\n\t{\r\n\t\t$req = \"INSERT INTO demandeurs VALUES ('$mail','$nom','$prenom','$rue','$cp','$ville','$num','$mdp')\";\r\n\t\t$res = PdoFredi::$monPdo->exec($req);\r\n\t}", "private function eseguiEsiste(string $sql, $value, $value2 = NULL)\n {\n try \n { \n $stmt = $this->db->prepare($sql); // a partire dalla stringa sql viene creato uno statement\n if (is_int($value))\n $stmt->bindValue(\":value\", (int) $value, PDO::PARAM_INT); // si associa l'intero al campo della query\n if (is_string($value))\n $stmt->bindValue(\":value\", $value, PDO::PARAM_STR); // si associa la stringa al campo della query\n if ($value2) // se il secondo valore e' stato inserito\n { \n if (is_int($value2))\n $stmt->bindValue(\":value2\", (int) $value2, PDO::PARAM_INT); // si associa l'intero al campo della query\n if (is_string($value2))\n $stmt->bindValue(\":value2\", $value2, PDO::PARAM_STR); // si associa la stringa al campo della query\n }\n $risultato = $stmt->execute(); // esegue lo statement\n \n $stmt->setFetchMode(PDO::FETCH_ASSOC); // i risultati del database verranno salvati in un array con indici le colonne della tabella\n \n if ($stmt->rowCount()) \n {\n $riga = $stmt->fetch();\n \n $this->__destruct(); // chiude la connessione\n \n return $riga['id'];\n }\n else\n {\n $this->__destruct(); // chiude la connessione\n \n return false;\n } \n }\n catch (PDOException $e)\n {\n $this->__destruct(); // chiude la connessione\n \n return FALSE; // ritorna false se ci sono errori\n }\n }", "protected function reemplazaParametro(){\n\t\t$vector=func_get_arg(0);\n\t\t$params=$this->dato;\n//\t\tprint_r($params);\n//\t\techo \"<br>\";\n\t\t$cant=sizeof($params);\n\t\t$accion=$vector[0];\n\t\tif (sizeof($params)!=0){\n\t\t\t$claves=array_keys($params);\n//\t\tfor($x=1;$x<$cant;$x++){\n\t\t\tforeach($claves as $clave){\n\t\t\t\t$str=\"#\".($clave).\"#\";\n\t\t\t\t$accion=str_replace($str,$params[$clave],$accion);\n\t\t\t}\n\t\t}\n\t\treturn $accion;\n\t}", "function RechercheLivre(&$connexion, $rechercherLivre)\n{\n\n $request = $connexion->prepare('SELECT *\n FROM livres, auteur, exemplaire, emprunt, implementation\n WHERE\n livres.ID_auteur = auteur.ID_auteur AND\n livres.ID_livre = implementation.ID_livre AND\n implementation.ID_exemplaire = exemplaire.ID_exemplaire AND\n exemplaire.ID_exemplaire = emprunt.ID_exemplaire AND\n livres.titre = :titre');\n\n $request->bindParam(':titre', $rechercherLivre);\n $request->execute();\n\n if($request->rowCount() == 0)\n {\n echo '<p>Le livre saisit n\\'est pas référencé dans la bibliothèque.</p>';\n echo '<p>Cliquer sur le lien ci-dessous pour ressaissir un livre :</p>';\n ?>\n <p><a href=\"RechercheLivre.php\">Saisir de nouveau un livre</a></p><?php\n }\n else\n {\n while($displayContent = $request->fetch(PDO::FETCH_ASSOC))\n {\n echo '<p>Voici tout les numéros d\\'exemplaire correspondant au livre ', $rechercherLivre, '</p>';\n echo '<p>Livre : ', $displayContent['titre'], '</p>';\n echo '<p>Numero d\\'exemplaire :', $displayContent['ID_exemplaire'], '</p>';\n echo '<p>Etat du livre : ', $displayContent['etat'], '</p>';\n }\n }\n}", "public function insert(){\n\t\t$parametro = func_get_args();\n\t\t$resultado = $this->execSql($this->INSERT,$parametro);\n//\t\t\tdie();\n\t\tif(!$resultado){\n\t\t\t$this->onError(\"COD_INSERT\",$this->INSERT);\n\t\t}\n\t\treturn $resultado;\n\t}", "public function guardarSolicitudes($param)\r\n {\r\n \r\n $this->db->insert(\"Solicitudes\");\r\n }", "function addUser ($username, $prenom, $nom, $hashMdp, $role, $statut)\n{\n $db = connect();\n\n $query = $db->prepare('INSERT INTO users (username, prenom, nom, password, role, statut) VALUES (?, ?, ?, ?, ?, ?)');\n $query->execute(array($username, $prenom, $nom, $hashMdp, $role, $statut));\n $query->closeCursor();\n}", "function insert($requete, $auto='n'){\r\n\t\t$message=\"\";\r\n\t\ttry{\r\n\t\t\t$resultats=$this->connexion->exec($requete);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(PDOException $e){\r\n\t\t\t$message=\"probleme pour executer cette requete $requete : \";\r\n\t\t\t$message=$message.$e->getMessage();\r\n\t\t\t//echo $message;\r\n\t\t}\r\n\t\tif ($auto=='o'){\r\n\t\t\t\t$tab = $this->connexion->query('SELECT LAST_INSERT_ID() as last_id');\r\n\t\t\t\t$tab1=$tab->fetchALL(PDO::FETCH_ASSOC);\r\n\t \t\t$last_id = $tab1[0];\r\n\t \t\treturn $last_id;\r\n\t \t}\r\n\r\n\t\treturn $message;\r\n\t}", "function modulocreat($name,$descripcion,$num_preguntas)\n {\n $conn = new mysqli(SERVER, USER, PASSWORD, DB);\n $sqluser = \"INSERT INTO tb_modulos(id_modulo, nombre_modulo,descripcion, cant_preguntas) VALUES (null,'\".$name.\"','\".$descripcion.\"','\".$num_preguntas.\"')\";\n //echo $sqluser;\n if ($conn->query($sqluser) === TRUE) {\n $repues = \"1\";\n }\n else{\n $repues = \"Error: \" . $sqluser . \"<br>\" . $conn->error;\n }\n return $repues;\n\n }", "function insertProduit($db,$model,$produitEvident,$marque,$descriptif,$prix){\n\n $sql=\"INSERT INTO produits (modele,produit_evident,marque,descriptif,prix) VALUES ('$model','$produitEvident','$marque','$descriptif','$prix');\";\n $request = mysqli_query($db,$sql) or die(mysqli_error($db));\n // si le produit est bien inséré, on renvoie son ID\n return ($request)? mysqli_insert_id($db) :false;\n}", "function AjouterLivres($connexion, $livre_Titre, $livre_DateParution, $livre_Genre, $prenomAuteur,\n $nomAuteur)\n{\n $numeroAuteur = 0;\n $numeroLivre = rand(0, 9999);\n $request = $connexion->prepare('SELECT ID_livre FROM livres WHERE ID_livre = :numero');\n $request->bindParam(\":numero\", $numeroLivre);\n $request->execute();\n\n if($request->fetchColumn()){\n header(\"Location:../ListeErreurs.php?numeroAleatoire_erreur\");\n }\n else{\n $request = $connexion->prepare('SELECT ID_auteur FROM auteur WHERE prenom = :prenom AND nom = :nom');\n $request->bindParam(':prenom', $prenomAuteur);\n $request->bindParam(':nom', $nomAuteur);\n $request->execute();\n if($request->fetchColumn()){\n $request->execute();\n while($display = $request->fetch())\n $numeroAuteur = $display[\"ID_auteur\"];\n }\n else{\n $insert = $connexion->prepare(\"INSERT INTO auteur(prenom, nom) VALUES(:prenom, :nom)\");\n $insert->bindParam(\":prenom\", $prenomAuteur);\n $insert->bindParam(\":nom\", $nomAuteur);\n $insert->execute();\n $request->execute();\n while($display = $request->fetch())\n $numeroAuteur = $display[\"ID_auteur\"];\n }\n $insert = $connexion->prepare(\"INSERT INTO livres(titre, date_parution, genre, ID_auteur) VALUES(:titre, :dateP, :genre, :auteur)\");\n $insert->bindParam(\":titre\", $livre_Titre);\n $insert->bindParam(\":dateP\", $livre_DateParution);\n $insert->bindParam(\":genre\", $livre_Genre);\n $insert->bindParam(\":auteur\", $numeroAuteur);\n $insert->execute();\n }\n}", "function Set_Partido($partido,$fecha,$hora,$lugar,$estado,$ronda)\n{\n $valor = insertar(sprintf(\"UPDATE tb_partidos \n SET fecha='%s', hora='%s', Estado='%d',Lugar='%d',numero_fecha='%d'\n WHERE id_partido='%d' \",escape($fecha),escape($hora),escape($estado),escape($lugar),escape($ronda),escape($partido)));\n return $valor;\n}", "public function agregar_InsumoAlm($datosInsumo){\n\n $stmt=$this->db->prepare(\"CALL INSERT_INSUMO(:nombre,:pc,:cantidad,:fv)\");\n $stmt->bindParam(':nombre', $nombre);\n $stmt->bindParam(':pc', $pc);\n $stmt->bindParam(':cantidad', $cantidad);\n $stmt->bindParam(':fv', $fv);\n\n\n\n $nombre=$datosInsumo['nombre'];\n $pc=$datosInsumo['pc'];\n $cantidad=$datosInsumo['cantidad'];\n $fv=$datosInsumo['fv'];\n $stmt->execute();\n $this->db=null; //cerrar conexión\n\n }", "function NouveauProfil($prenom,$nom,$pseudonyme,$mdp,$date,$sexe,$orientation){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"INSERT INTO allinformations VALUES ('$pseudonyme','$mdp','$nom','$prenom', '$date', '', '01', '$sexe', '$orientation', '1', '1', '0', '0', '0', '0', '', '', '', '', '', 'logo.jpg','logo2.png','logo3.jpg','0','1','0', NULL)\";\r\n\t\t//Les champs obligatoires sont remplis par défaut mais l'utilisateur peut directement les modifier dans ModifierMonProfil\r\n\t\t$ligne= mysqli_query($conn, $requete);\r\n\t\tmysqli_close($conn);\r\n\t\t}", "function ajouterSupport($nom, $type, $destination, $idProfesseur){\n\t$query='insert into support values(\"\",\"'.$nom.'\",\"'.$type.'\",\"'.$destination.'\")';\n\tmysql_query($query) or die(' Erreur d insertion de support'.$query.mysql_error());\n\tajoutProfSup($idProfesseur);\n}", "function modifier2($connexion,$nomTable,$nomClePrimaire1,$valeurClePrimaire1,$nomClePrimaire2,$valeurClePrimaire2,$nomChampAModifier,$ValeurChampAModifier) { \n $req =$connexion -> query(\"UPDATE $nomTable SET $nomChampAModifier = '$ValeurChampAModifier' WHERE $nomClePrimaire1 = '$valeurClePrimaire1' and $nomClePrimaire2 = '$valeurClePrimaire2' \");\n }", "function insertarRoles($descripcion,$activo) {\r\n$sql = \"insert into tbroles(idrol,descripcion,activo)\r\nvalues ('','\".($descripcion).\"',\".$activo.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "function insertarRoles($descripcion,$activo) {\r\n$sql = \"insert into tbroles(idrol,descripcion,activo)\r\nvalues ('','\".($descripcion).\"',\".$activo.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "function executeQuery($param,$id)\n {\n\n $consulta =\"SELECT $param from usuario where id='$id'\";\n if($resultado= $this->conexion->query($consulta)){ \n if ( $resultado->num_rows!=0 ) {\n while($fila= $resultado->fetch_assoc())\n {\n\n return $fila[\"$param\"] ;\n }//return $resultado->fetch_row();\n $resultado->close();\n }else\n { \n }\n $conexion->close();\n }\n\n }", "public static function Nueva_Muestra_Parametro_Version($id_parametro, $num_muestra, $id_orden, $version_informe)\n {\n // Sentencia INSERT\n $comando = \"INSERT INTO ordenes_muestras_parametros (id_parametro, num_muestra, id_orden, version_informe) VALUES( ?,?,?,? )\";\n\n // Preparar la sentencia\n $sentencia = Database::getInstance()->getDb()->prepare($comando);\n\n return $sentencia->execute(\n array(\n $id_parametro, \n $num_muestra,\n $id_orden,\n $version_informe\n )\n );\n\n }", "function DBParameter($param)\n\t{\n\t\tif (empty($this->settings[$param])) return false;\n\t\t$sql = $this->settings[$param][1];\n\t\treturn $this->_DBParameter($sql);\n\t}", "function conexion($nombre,$apellido,$email,$credit,$card,$cvv,$dat,$street,$city,$state,$zip\n ,$pais,$phone,$code)\n {\n//intente mientras\n try{\n $base=new PDO('mysql:host=localhost; dbname=registro','root','');// conexion a la base de datos\n $base->exec('SET CHARACTER SET UTF8');\n $sql ='insert into registro (nombre,apellido,email,credit,card,cvv,dat,street,city,state,zip,pais,phone,code)\n values(:nombre, :apellido, :email, :credit, :card, :cvv, :dat, :street, :city, :state, :zip, :pais, :phone, :code)';//insetando datos a la base de datos\n $resultado=$base->prepare($sql);\n $resultado->execute(array(':nombre'=>$nombre, ':apellido'=>$apellido, ':email'=>$email, ':credit'=>$credit\n , ':card'=>$card, ':cvv'=>$cvv, ':dat'=>$dat, ':street'=>$street, ':city'=>$city, ':state'=>$state, ':zip'=>$zip\n , ':pais'=>$pais, ':phone'=>$phone, ':code'=>$code));// guardar los datos en un arreglo\nif(empty($resultado)){\n echo \"Dato insertado\";\n\n}\n\n }catch(Exception $e){\n echo 'Error: '.$e->Getmessage();\n }\n\n }", "function SuperLiker($likeur,$like){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"INSERT INTO superjaime VALUES(NULL,'$likeur','$like')\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\r\n\t\tmysqli_close($conn);\r\n\t\t}", "public function parametreValide($id,$dateSortie,$lieu) {\n $em = $this->getDoctrine()->getManager();\n $saison = new Saison;\n $year = $saison->connaitreSaison();\n //on s'assure que les parametres n'ont pas ete changer a la main\n $saison = $em->getRepository('SC\\ActiviteBundle\\Entity\\Saison')->findOneByAnnee($year);\n $lieuObjet = $em->getRepository('SC\\ActiviteBundle\\Entity\\Lieu')->findOneByNomLieu($lieu);\n $activite = $em->getRepository('SC\\ActiviteBundle\\Entity\\Activite')->find($id);\n $sortie = $em->getRepository('SC\\ActiviteBundle\\Entity\\Sortie')->findOneBy(array('saison'=> $saison, 'activite'=>$activite,'dateSortie'=>$dateSortie)); \n \n if(is_null($activite) OR is_null($lieuObjet) OR is_null($sortie)) {\n return false;\n }\n else {\n return true;\n }\n }", "private function setParams($statement, $parameters = array()){\n\t\tforeach ($parameters as $key => $value) { ///percorrer as linhas rows\n\t\t\t$this->setParam($key,$value);///percorer as colunas ID\n\t\t}\n\t}", "public function registrar($_params){\n $sql = \"INSERT INTO `clientes`(`nombres`, `apellidos`, `email`, `clave`, `telefono`) \n VALUES (:nombres,:apellidos,:email,:clave,:telefono)\";\n\n $resultado = $this->cn->prepare($sql);\n\n $_array = array(\n \":nombres\" =>$_params['nombres'],\n \":apellidos\" =>$_params['apellidos'],\n \":email\" =>$_params['email'],\n \":clave\" =>$_params['clave'],\n \":telefono\" =>$_params['telefono'] \n );\n\n if($resultado->execute($_array))\n return $this->cn->lastInsertId(); \n\n return false;\n }", "public function buscar($param){\n //verEstructura($param);\n $where = \" true \";\n if ($param<>NULL){\n if (isset($param['idinscripcion']))\n $where.=\" and idinscripcion =\".$param['idinscripcion'];\n if (isset($param['cofecha']))\n $where.=\" and cofecha =\".$param['cofecha'];\n if (isset($param['idusuario']))\n $where.=\" and idusuario =\".$param['idusuario'];\n }\n $arreglo = inscripcion::listar($where);\n return $arreglo;\n }", "function aggiungiIndirizzo($pratica,$indirizzo){\n $dbh=new PDO(DSN);\n $schema=\"pe\";\n $params = Array(\"via\",\"civico\",\"interno\");\n foreach($params as $key){\n $data[$key]=($indirizzo[$key])?($indirizzo[$key]):(null);\n }\n $data[\"pratica\"]=$pratica;\n utils::debug(utils::debugDir.\"aggiungiIndirizzo.debug\", $data);\n $result=Array();\n $sql=\"INSERT INTO $schema.indirizzi(pratica,civico,interno,via) VALUES(:pratica,:civico,:interno,:via);\";\n $stmt=$dbh->prepare($sql);\n \n if (!$stmt->execute($data)){\n $errors=$stmt->errorInfo();\n utils::debug(utils::debugDir.\"error-aggiungiIndirizzo.debug\", $errors);\n }\n else{\n $idindirizzo=$dbh->lastInsertId(\"pe.soggetti_id_seq\");\n }\n \n if ($errors){\n //$dbh->rollBack();\n $result=Array(\"success\"=>\"-1\",\"message\"=>$errors[2]);\n }\n else{\n $result = Array(\"success\"=>1,\"message\"=>\"OK\",\"indirizzo\"=>$idindirizzo);\n }\n return $result;\n}", "private function addParameterInSql($sql, $paramName, $paramValue) {\n//\n// if (array_key_exists($parameter->name, $this->parameters)) {\n// $value = $this->parameters[$parameter->name];\n// } else {\n// $value = trim(str_replace($toReplace, \"\", $parameter->defaultValueExpression->content));\n// }\n\n $sql = str_replace(\"\\$P{\" . $paramName . \"}\", $paramValue, $sql);\n\n return $sql;\n }", "public function execSql(){\n\t\t$cant=func_num_args();\n\t\t$instSql=\"\";\n\t\t$instSql=$this->reemplazaParametro(func_get_args());\n//\t\techo \"<br>\".$instSql.\"<br>\";\n//\t\techo $this->tipodb.\"<br>\";\n//\t\t$this->registroLog($instSql,$_SESSION['PERMISO'][0],$_SESSION['PERMISO'][1]);\n\t\tswitch ($this->tipodb) {\n\t\t\tcase \"my\":\n\t\t\t\t$resultado=mysql_query($instSql,$this->conn);\n//echo mysql_errno().\"<br>\";\n\t\t\t\tbreak;\n\t\t\tcase \"pg\":\n\t\t\t\t$resultado=pg_query($this->conn,$instSql);\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $resultado;\n\t}", "function Signaler($signaleur,$signale,$motif){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"INSERT INTO signalement VALUES(NULL,'$signaleur','$signale','$motif')\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\r\n\t\tmysqli_close($conn);\r\n\t\t}", "private function insertNew() {\n $sth=NULL;\n $array=array();\n $query=\"INSERT INTO table_spectacles (libelle) VALUES (?)\";\n $sth=$this->dbh->prepare($query);\n $array=array($this->libelle);\n $sth->execute($array);\n $this->message=\"\\\"\".$this->getLibelle().\"\\\" enregistré !\";\n $this->blank();\n $this->test=1;\n }", "public static function add($entreprise){\n $con=new connexion();\n $resultat=$con->executeactualisation(\"insert into tblentreprise (id_entreprise,admin_id,nom,logo,ville_id,adresse_complete,etat,date_ajout,date_modifier)\n values('\" . $entreprise->ident . \"','\" . $entreprise->adminid . \"','\" . $entreprise->nom . \"','\" . $entreprise->logo . \"','\" . $entreprise->villeid . \"','\" . $entreprise->adressecomp . \"',1,NOW(),NOW())\");\n $con->closeconnexion();\n\n }", "function altaProducte($nom, $descripcio, $preu, $idUsuari){\n $conn=connexioBD();\n $sql=\"INSERT INTO productes (nom, descripcio, preu, usuari_id) VALUES ('$nom', '$descripcio', '$preu', $idUsuari)\";\n if (!$resultado =$conn->query($sql)){\n die(\"Error al darte de alta\".$conn->error);\n }else{\n $idProducte=$conn->insert_id;\n return $idProducte;\n }\n $conn->close();\n}", "function parametry($delete,$hidden,$poradi,$parametry,$jednotky,$akce,$idKarta) {\n\n\t// pracuje s parametry ve Vzoru produktoveho listu\n\t// $akce urcuje zda bude INSERT nebo UPDATE\n\t\n\t// odstranujeme\n\tif(!empty($delete)) {\n\t\n\t\treset($delete);\n\t\twhile ($pD = each($delete)) {\n\t\t\n\t\t\t$D = $pD['key'];\n\t\t\t\n\t\t\t// id id_karta nazev jednotka poradi\n\t\t\t$query = 'DELETE FROM '.T_PARAMETRY2.' WHERE id = '.$D.' LIMIT 1';\n\t\t\tmy_DB_QUERY($query,__LINE__,__FILE__);\n\t\t\t\n\t\t\tmy_OPTIMIZE_TABLE(T_PARAMETRY2);\n\t\t\t\n\t\t\t\n\t\t\tdeleteSymboly(\"SELECT img FROM \".T_PARAMETRY3.\" WHERE id_parametr = $D AND img != ''\");\n\t\t\t\n\t\t\t// id_parametr hodnota id_kp\n\t\t\t$query = 'DELETE FROM '.T_PARAMETRY3.' WHERE id_parametr = '.$D.'';\n\t\t\tmy_DB_QUERY($query,__LINE__,__FILE__);\n\t\t\t\n\t\t\tmy_OPTIMIZE_TABLE(T_PARAMETRY3);\n\t\t\n\t\t}\n\t\n\t}\n\t\n\t\n\t\n\t// zpracujeme parametry\n\tif(!empty($parametry)) {\n\t\t\n\t\t// aktualizujeme nebo pridavame\n\t\treset($parametry);\n\t\twhile ($p = each($parametry)) {\n\t\t\n\t\t\t$K = $p['key'];\n\t\t\t\n\t\t\tif(!empty($parametry[$K]) && empty($delete[$K])) {\n\t\t\t\n\t\t\t\t$hi = trim($hidden[$K]);\n\t\t\t\t$pa = addslashes(trim($parametry[$K]));\n\t\t\t\t$je = addslashes(trim($jednotky[$K]));\n\t\t\t\t$po = trim($poradi[$K]);\n\t\t\t\t\n\t\t\t\tif(empty($hi))$hi=0;\n\t\t\t\t\n\t\t\t\tif($akce == 'update') {\n\t\t\t\t\n\t\t\t\t\t// id id_karta nazev jednotka poradi\n\t\t\t\t\t$query = \"UPDATE \".T_PARAMETRY2.\" SET \n\t\t\t\t\tnazev = '$pa', \n\t\t\t\t\thidden = '$hi',\n\t\t\t\t\tjednotka = '$je', \n\t\t\t\t\tporadi = '$po' \n\t\t\t\t\tWHERE id = $K\";\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($akce == 'insert') {\n\t\t\t\t\n\t\t\t\t\t// id id_karta nazev jednotka poradi\n\t\t\t\t\t$query = \"INSERT INTO \".T_PARAMETRY2.\" VALUES(NULL,$idKarta,'$pa','$hi','$je','$po')\";\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tmy_DB_QUERY($query,__LINE__,__FILE__);\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t}\n\n}", "function insert_csv_param_aux($tabela, $data)\n { \n\n /**\n * Insere os dados na tabela \n * Inserts the data into the table\n */ \n $this->db->insert($tabela, $data); \n }", "function m_consulta($p_query){\n\t\t$this->m_seleBD();\n\t\t//echo \"<br><br>funcion m_consulta: \". $p_query .\"<br><br>\";\n\t\t$this->a_resuConsulta = mysql_query($p_query);\n\t\t//echo \"<br><br>resuConsulta: \". $this->a_resuConsulta .\"<br><br>\";\n\t\t$this->a_mensError=mysql_error();\t// si no hay error, se asigna cadena vacía a a_error\n\t\tif($this->a_mensError > \"\"){\n\t\t\t$this->a_mensError .= \" -> \" .$p_query;\n\t\t\t$this->a_bandError = true;\n\t\t}else{\n\t\t\t$this->a_bandError = false;\n\t\t\t$this->a_numRegistros = mysql_num_rows($this->a_resuConsulta);\n\t\t}\n\t}", "public function SqlValider(\\PDO $bdd) {\r\n try{\r\n $requete = $bdd->prepare('INSERT INTO articles (Etat) VALUES(2) where id = id.Article');\r\n $requete->execute();\r\n return array(\"result\"=>true,\"message\"=>$bdd->lastInsertId());\r\n }catch (\\Exception $e){\r\n return array(\"result\"=>false,\"message\"=>$e->getMessage());\r\n }\r\n }", "function red($nom,$pas)\n { \n $this->nombre = $nom;\n $this->clave = $pas; \n $this->consulta(); \n }", "public function buscar($param){\n $where = \" true \";\n /*if ($param<>NULL){\n if (isset($param['id']))\n $where.=\" and id =\".$param['id'];\n if (isset($param['descrip']))\n $where.=\" and descrip ='\".$param['descrip'].\"'\";\n }*/\n $arreglo = Menu::listar($where); \n return $arreglo;\n \n \n \n \n }", "function registerChild($id_resp,$nom,$prenom,$age){\n$co = connect_me();\n$query = \"INSERT INTO enfant(id_enfant,id_responsable,nom,prenom,age) VALUES (NULL,'\".$id_resp.\"','\".$nom.\"','\".$prenom.\"',\".$age.\")\";\n\tif($res =$co->query($query)){\n\t\t$msg= \"<p class='message'>L'enregistrement s'est bien passé. <a href='index.php'> Retour à l'accueil</a></p>\";\n\t\t//header(\"Location: settings.php?query_res=\".$msg.\"\");\n\t}else{\n\t\t$msg= \"<p class='message_error'>L'enregistrement s'est mal passé.<a href='index.php'> Retour à l'accueil</a></p>\";\n\t\t//header(\"Location: settings.php?query_res=\".$msg.\"\");\n\t}\n\t$co->close();\n}", "public static function registrarPelicula($idpelicula, $nombre, $direccion, $produccion, $guion, $musica, $pais, $ano, $estreno, $duracion, $idiomas, $productora, $distribucion, $presupuesto, $recaudacion, $generos, $argumento, $nombre_foto, $foto) {\n// . \"VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\"; //Estos parametros seran sustituidos mas adelante por valores.\n// $stmt = conexion::$conexion->prepare($query);\n//\n//\n// $stmt->bind_param(\"isssssssssssssssssb\", $idpelicula, $nombre, $direccion, $produccion, $guion, $musica, $pais, $ano, $estreno, $duracion, $idiomas, $productora, $distribucion, $presupuesto, $recaudacion, $selected, $argumento, $nombre_foto, $foto);\n//\n// /* Ejecución de la sentencia. */\n// $stmt->execute();\n $activa = 0;\n if ($foto != null) {\n $query = \"INSERT INTO pelicula (idpelicula, nombre, direccion, produccion, guion, musica, pais, ano, estreno, duracion, idiomas, productora, distribucion, presupuesto, recaudacion, argumento, nombre_foto, foto, activa) \"\n . \"VALUES ('$idpelicula','$nombre','$direccion','$produccion','$guion','$musica','$pais','$ano','$estreno','$duracion','$idiomas','$productora','$distribucion','$presupuesto','$recaudacion','$argumento','$nombre_foto','$foto','$activa')\"; //Estos parametros seran sustituidos mas adelante por valores.\n } else {\n $query = \"INSERT INTO pelicula (idpelicula, nombre, direccion, produccion, guion, musica, pais, ano, estreno, duracion, idiomas, productora, distribucion, presupuesto, recaudacion, argumento, nombre_foto, foto, activa) \"\n . \"VALUES ('$idpelicula','$nombre','$direccion','$produccion','$guion','$musica','$pais','$ano','$estreno','$duracion','$idiomas','$productora','$distribucion','$presupuesto','$recaudacion','$argumento',NULL,NULL,'$activa')\"; //Estos parametros seran sustituidos mas adelante por valores.\n }\n mysqli_query(conexion::$conexion, $query);\n\n\n\n //Que esta llena la lista de generos la recorremos y la guardamos en la \n // variable generos\n foreach ($generos as $selected) {\n $queryID = \"SELECT idpelicula FROM pelicula WHERE nombre = '\" . $nombre . \"'\";\n $queryGenero = \"INSERT INTO pelicula_genero (idpelicula, generos_idgeneros) \"\n . \"VALUES ((\" . $queryID . \"),'$selected')\"; //Estos parametros seran sustituidos mas adelante por valores.\n mysqli_query(conexion::$conexion, $queryGenero);\n }\n }", "function insertarContacto($conexion,$usuario) {\r\n\t\r\n\t// para ver si le llega algo o no:print_r($usuario);\r\n\ttry {\r\n\t\t$consulta = \"CALL INSERTAR_CONTACTO(:nombre, :ape1, :ape2, :corr, :asu, :men)\";\r\n\t\t$stmt=$conexion->prepare($consulta);\r\n\t\t$stmt->bindParam(':nombre',$usuario[\"Nombre\"]);\r\n\t\t$stmt->bindParam(':ape1',$usuario[\"PrimerApellido\"]);\r\n\t\t$stmt->bindParam(':ape2',$usuario[\"SegundoApellido\"]);\r\n\t\t$stmt->bindParam(':corr',$usuario[\"CorreoElectronico\"]);\r\n\t\t$stmt->bindParam(':asu',$usuario[\"Asunto\"]);\r\n\t\t$stmt->bindParam(':men',$usuario[\"Mensaje\"]);\r\n\t\t$stmt->execute();\r\n\t} catch (PDOException $e) {\r\n\t\t$_SESSION['excepcion'] = $e->GetMessage();\r\n\t\theader(\"Location: excepcion.php\");\r\n}\r\n}", "public function addtrajet(Trajet $trajet)\r\n{\r\n\t try\r\n {\r\n $stmt = $this->_db->prepare(\"INSERT INTO Trajet(Type,Num_Ville1,Num_Ville2,Date_aller,Date_retour,Heure_aller,Heure_retour,Prix,Nombre_place,ID_conducteur,Description) \r\n VALUES(:type, :num_ville1, :num_ville2, :date_aller, :date_retour, :heure_aller, :heure_retour, :prix, :nombre_place,:id_conducteur,:description)\");\r\n\t\t $stmt->bindValue(\":type\", $trajet->type());\r\n\t\t $stmt->bindValue(\":num_ville1\", $trajet->num_ville1());\r\n $stmt->bindValue(\":num_ville2\", $trajet->num_ville2());\r\n $stmt->bindValue(\":date_aller\",$trajet->date_aller()); \r\n\t\t $stmt->bindValue(\":date_retour\",$trajet->date_retour());\r\n $stmt->bindValue(\":heure_aller\", $trajet->heure_aller());\r\n $stmt->bindValue(\":heure_retour\",$trajet->heure_retour());\r\n\t\t $stmt->bindValue(\":prix\",$trajet->prix());\r\n\t\t $stmt->bindValue(\":nombre_place\",$trajet->nombre_place());\r\n\t\t $stmt->bindValue(\":id_conducteur\",$trajet->id_conducteur()); \r\n\t\t $stmt->bindValue(\":description\",$trajet->description()); \r\n $stmt->execute(); \r\n\t\t $trajet->hydrate(array('num_trajet' => $this->_db->lastInsertId()));\r\n \r\n return true; \r\n }\r\n catch(PDOException $e)\r\n {\r\n echo $e->getMessage();\r\n } \r\n }", "function optional_param($parname, $default=NULL, $type=PARAM_CLEAN,$errMsg=\"err_sql_injection\") {\n\n // detect_unchecked_vars addition\n global $CFG;\n if (!empty($CFG->detect_unchecked_vars)) {\n global $UNCHECKED_VARS;\n unset ($UNCHECKED_VARS->vars[$parname]);\n }\n\n if (isset($_POST[$parname])) { // POST has precedence\n $param = $_POST[$parname];\n } else if (isset($_GET[$parname])) {\n $param = $_GET[$parname];\n } else {\n return $default;\n }\n //pose un pb avec les parametres vide au d�part\n $tmpStr= clean_param($param, $type); //PP test final\n // rev 971 cas des parametres booleens (0 existe !)\n if ($tmpStr || $tmpStr===0)return $tmpStr;\n else return $default;\n}", "public function setcomida($nom,$des,$pre){\r\n\t\t if (!($insertar = $this->db->prepare(\"INSERT INTO comidas(`id_com`,`com_nom`,`com_des`,`com_pre`) VALUES (null,?,?,?)\"))) {\r\n\t\t\t\techo \"Falló la preparación: (\" . $mysqli->errno . \") \" . $mysqli->error;\r\n\t\t\t}\r\n\t\t\tif (!$insertar->bind_param(\"ssd\", $nom,$des,$pre)) {\r\n\t\t\t\techo \"Falló la vinculación de parámetros: (\" . $insertar->errno . \") \" . $insertar->error;\r\n\t\t\t}\r\n\r\n\t\t\tif (!$insertar->execute()) {\r\n\t\t\t\techo \"Falló la ejecución: (\" . $insertar->errno . \") \" . $insertar->error;\r\n\t\t\t}\r\n\t\t\tif ($insertar) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t \r\n\t\t\t\treturn \"error a guardar los datos\".mysqli_error($this->db=Conectar::conexion());\r\n\t\t\t}\r\n\t\t}", "function ajouter_user($nom, $prenom, $email, $password, $cle_d_activation, $actif, $newsletter){\n\n\t\t$bdd=connexion_BD('projetLion');\n\n\t\t //Ajout de l'utilisateur dans la table login_users\n\t\t$req = $bdd->prepare('INSERT INTO login_users(nom, prenom, email, password, cle_d_activation, actif, newsletter) VALUES(:nom, :prenom, :email, :password, :cle_d_activation, :actif, :newsletter)');\n\t\t$req->execute(array(\n\t\t\t'nom' => $nom,\n\t\t\t'prenom' => $prenom,\n\t\t\t'email' => $email,\n\t\t\t'password' => $password,\n\t\t\t'cle_d_activation' => $cle_d_activation,\n\t\t\t'actif' => $actif,\n\t\t\t'newsletter' => $newsletter\n\t\t\t));\n\n\t\t\n\t}", "function addFormaPago($db,$nombre,$porcentaje,$logo){\n $stmt = $db->prepare(\"INSERT INTO formaPago \n (nombre,porcentaje,logo) \n VALUES (:nombre, :porcentaje, :logo)\");\n $stmt->bindParam(':nombre', $nombre);\n $stmt->bindParam(':porcentaje', $porcentaje);\n $stmt->bindParam(':logo', $logo);\n $res = $stmt->execute();\n return $res;\n }", "function add_article($bdd, $articles) {\n $req = $bdd->prepare('INSERT INTO articles(name, description, price, poids, image, stock, for_sale, Categories_id) \n VALUES(:name, :description, :price, :poids, :image, :stock, :for_sale, :Categories_id)');\n $req->execute(array(\n 'name' => $articles[0],\n 'description' => $articles[1],\n 'price' => $articles[2],\n 'poids' => $articles[3],\n 'image' => $articles[4],\n 'stock' => $articles[5],\n 'for_sale' => $articles[6],\n 'Categories_id' => $articles[7]\n ));\n\n echo \"L'article \".$articles[0].\" a bien été ajouté !\";\n}", "public function InsertarMesaParametros()\n\t{\n\t\t\t$objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso();\n $consulta =$objetoAccesoDato->RetornarConsulta(\"INSERT into mesa (codigo,estado,usos)values(:codigo,:estado,:usos)\");\n $consulta->bindValue(':codigo', $this->codigo, PDO::PARAM_STR);\n $consulta->bindValue(':estado', $this->estado, PDO::PARAM_STR);\n $consulta->bindValue(':usos', $this->usos, PDO::PARAM_INT);\n $consulta->execute();\t\n return $objetoAccesoDato->RetornarUltimoIdInsertado();\n }", "function insertarPremios($premio,$aciertos) {\r\n$sql = \"insert into tbpremios(idpremio,premio,aciertos)\r\nvalues ('','\".($premio).\"',\".$aciertos.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "function check_parameter_insertion(){\r\n $error = false;\r\n if(!isset($_GET[\"codc\"]) || trim($_GET[\"codc\"])==''){\r\n //chiamo la funzione che stampa l'errore sui parametri\r\n print_insertion_error(\"Codice Ciclista\");\r\n $error = true;\r\n }\r\n if(!isset($_GET[\"namec\"]) || trim($_GET[\"namec\"])==''){\r\n //chiamo la funzione che stampa l'errore sui parametri\r\n print_insertion_error(\"Nome Ciclista\");\r\n $error = true;\r\n }\r\n if(!isset($_GET[\"cognomec\"]) || trim($_GET[\"cognomec\"])==''){\r\n //chiamo la funzione che stampa l'errore sui parametri\r\n print_insertion_error(\"Cognome Ciclista\");\r\n $error = true;\r\n }\r\n if(!isset($_GET[\"nazionalitàc\"]) || trim($_GET[\"nazionalitàc\"])==''){\r\n //chiamo la funzione che stampa l'errore sui parametri\r\n print_insertion_error(\"Nazionalità Ciclista\");\r\n $error = true;\r\n }\r\n if(!isset($_GET[\"cods\"]) || trim($_GET[\"cods\"])==''){\r\n //chiamo la funzione che stampa l'errore sui parametri\r\n print_insertion_error(\"Codice Squadra\");\r\n $error = true;\r\n }\r\n if(!isset($_GET[\"anno_nascita\"]) || trim($_GET[\"anno_nascita\"])==''){\r\n //chiamo la funzione che stampa l'errore sui parametri\r\n print_insertion_error(\"Anno nascita Ciclista\");\r\n $error = true;\r\n }\r\n if($error == true)\r\n die();\r\n}" ]
[ "0.6787047", "0.6716176", "0.66120815", "0.6558228", "0.6463732", "0.64106196", "0.63945293", "0.6261207", "0.6256679", "0.62245524", "0.6168608", "0.616723", "0.6163483", "0.6158854", "0.6152928", "0.6120314", "0.61108387", "0.6099912", "0.6080088", "0.6033315", "0.60232335", "0.6008183", "0.6001742", "0.6001737", "0.60003483", "0.5998935", "0.5992963", "0.5989574", "0.598795", "0.5983849", "0.59479135", "0.59458643", "0.59351283", "0.5917184", "0.59046406", "0.5896793", "0.5894802", "0.58889586", "0.5886584", "0.58796835", "0.5878257", "0.58753073", "0.58676666", "0.5863645", "0.58631", "0.58614695", "0.5858449", "0.5850811", "0.58460253", "0.5838447", "0.58358574", "0.5823741", "0.58222204", "0.58187723", "0.5815392", "0.5814754", "0.5810752", "0.58059454", "0.5795328", "0.5793813", "0.5790412", "0.5778939", "0.5770503", "0.57700616", "0.5740054", "0.5740054", "0.57233864", "0.5721803", "0.57135963", "0.57118917", "0.5708427", "0.57044923", "0.5704051", "0.56993043", "0.56989545", "0.56981105", "0.56961614", "0.5691991", "0.56918883", "0.5685617", "0.56840396", "0.5678245", "0.5677859", "0.5675037", "0.5670691", "0.566519", "0.56643975", "0.56495416", "0.56467235", "0.5646351", "0.56455445", "0.56427985", "0.56418604", "0.56377727", "0.56324315", "0.5630493", "0.5628097", "0.56278807", "0.5627044", "0.562533" ]
0.59324557
33
function supprimer supprime un enregistrement
function supprimer($id) { $data = array(); // Integration cles multiples if ($this->cleMultiple == 1) { // Verification de la structure de la cle if ($this->verifData == 1 && !$this->verifDonnees($id)) { return false; } $where = ""; foreach ($id as $key => $value) { if ($where != "") { $where .= " and "; } if (strlen(preg_replace("#[^A-Z]+#", "", $key) > 0)) { $cle = $this->quoteIdentifier . $key . $this->quoteIdentifier; } else { $cle = $key; } $where .= $cle . ' = :' . $key; $data[$key] = $value; } } else { /* * Verification de la cle unique */ if ($this->verifData == 1 && !is_numeric($id)) { return false; } if (strlen(preg_replace("#[^A-Z]+#", "", $this->cle) > 0)) { $cle = $this->quoteIdentifier . $this->cle . $this->quoteIdentifier; } else { $cle = $this->cle; } $where = $cle . '= :id'; $data['id'] = $id; } $sql = "delete from " . $this->table . " where " . $where; return $this->executeAsPrepared($sql, $data, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SupprimerProfil($pseudonyme){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"DELETE FROM allinformations WHERE Pseudo='$pseudonyme'\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\t\r\n\t\tmysqli_close($conn);\t\t\r\n\t\t}", "public function utilisateurSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Utilisateur\",\"idUtilisateur\",$id);// votre code ici\n\t}", "function supprimer1($connexion,$nomTable,$nomClePrimaire,$valeurClePrimaire) { \n $req =$connexion -> query(\"DELETE FROM $nomTable WHERE $nomClePrimaire = '$valeurClePrimaire'\");\n }", "public static function supprimer() {\n if(!UserModel::isConnected())\n Controller::goTo(\"\", \"\", \"Vous devez être connecté pour accéder à cette section.\");\n \n if(!UserModel::estAdmin())\n Controller::goTo(\"\", \"\", \"Vous n'avez pas les droits suffisants.\");\n \n // L'utilisateur a annulé\n if(isset($_POST['btnAnnuler']))\n Controller::goTo(\"ecs/index.php\", \"L'EC n'a pas été supprimé.\");\n \n // Le formulaire a été validé\n $data = [];\n if(isset($_POST['btnSupprimer'])) {\n if(!isset($_SESSION['current']['EC']))\n Controller::goTo(\"ecs/index.php\", \"L'EC n'a pas été supprimé.\");\n \n if(ECModel::delete($_SESSION['current']['EC']))\n Controller::goTo(\"ecs/index.php\", \"L'EC a été supprimé.\");\n else {\n WebPage::setCurrentErrorMsg(\"L'EC n'a pas été supprimé de la base de données.\");\n if(($data['EC'] = ECModel::read($_SESSION['current']['EC'])) === null)\n Controller::goTo(\"ecs/index.php\", \"\", \"Erreur lors de la récupération de l'EC.\");\n }\n }\n else {\n if(($data['EC'] = ECModel::read(intval($_POST['idSupp']))) == null)\n return Controller::goTo(\"ecs/index.php\", \"\", \"Erreur lors de la récupération de l'EC.\");\n $_SESSION['current']['EC'] = intval($_POST['idSupp']);\n }\n\n return Controller::push(\"Supprimer un EC\", \"./view/ecs/supprimer.php\", $data);\n }", "public function supprimerAction($id){\r\n $this->modele->getManager()->supprimer(\"enseignant\", $id);\r\n $this->listerAction();\r\n }", "public function societeSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Societe\",\"idSociete\",$id);// votre code ici\n\t}", "public function etatSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Etat\",\"idEtat\",$id);// votre code ici\n\t}", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "function remove_from_db()\n\t{\n\n\t\t// delete Signup\n\t\t$sql = sprintf(\"delete from Signup where SignupId = '%s'\", \n\t\t\tmysql_real_escape_string($this->SignupId));\n\t\t$result = mysql_query($sql);\n\t\tif (!$result)\n\t\t\treturn display_mysql_error ('Cannot execute query', $sql); \t\t\n\t\t\n\t}", "function supprimer2($connexion,$nomTable,$nomClePrimaire1,$valeurClePrimaire1,$nomClePrimaire2,$valeurClePrimaire2) { \n $req =$connexion -> query(\"DELETE FROM $nomTable WHERE $nomClePrimaire1 = '$valeurClePrimaire1' and $nomClePrimaire2 = '$valeurClePrimaire2' \");\n }", "function supprimerEtablissement ($connexion, $id) {\r\n\r\n $req = \"DELETE FROM Etablissement WHERE id=?\";\r\n $stmt = $connexion -> prepare ($req);\r\n $ok = $stmt -> execute (array ($id));\r\n return $ok;\r\n\r\n }", "public function demandeSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Demande\",\"idDemande\",$id);// votre code ici\n\t}", "function supprimerArticle($ID){\n if (creationEquipement() && !isVerrouille())\n {\n //Nous allons passer par un panier temporaire\n $tmp=array();\n $tmp['id'] = array();\n $tmp['type'] = array();\n $tmp['verrou'] = $_SESSION['equipement']['verrou'];\n\n $Nombreelement = count($_SESSION['equipement']['id']);\n \n for($i = 0; $i < $Nombreelement; $i++)\n {\n if ($_SESSION['equipement']['id'][$i] != $ID)\n { \n array_push( $tmp['id'],$_SESSION['equipement']['id'][$i]);\n array_push( $tmp['type'],$_SESSION['equipement']['type'][$i]);\n }\n \n }\n //On remplace le panier en session par notre panier temporaire à jour\n $_SESSION['equipement'] = $tmp;\n //On efface notre panier temporaire\n \n \n unset($tmp);\n header(\"location: equipement.phtml\");\n }\n else\n echo \"Un problème est survenu veuillez contacter l'administrateur du site.\";\n}", "function supprimerRecette($_idRecette){\n // suppression de la table des favoris des tilisateurs qui l'ot msie comme favoris\n supprimerFavoris($_idRecette);\n // suppression de tout les commentaires de la recette\n supprimerToutCommentaires($_idRecette);\n // suppression des ingrédients de la recette\n supprimerToutIngredients($_idRecette);\n // suppression de la recette\n $connexion= my_connect();\n $requette_recettes=\"DELETE FROM Recettes where Idrecette = $_idRecette\";\n $table_recettes_resultat = mysqli_query($connexion,$requette_recettes); \n if(!$table_recettes_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo\"message de mysqli:\".mysqli_error($connexion); \n }\n mysqli_close($connexion);\n }", "public function supprimer() {\n // delete query\n $query = \"DELETE FROM \" . $this->sNomTable . \" WHERE idContenuPanier = :idContenuPanier\";\n\n // prepare query\n $stmt = $this->oConnexion->prepare($query);\n\n // bind id of record to delete\n $stmt->bindParam(\":idContenuPanier\", $this->idContenuPanier);\n\n // execute query\n if ($stmt->execute()) {\n return true;\n }\n\n return false;\n }", "function supprimer($userID)\n{\n require('_connexionbdd.php');\n\n if ($userID != null) {\n $bdd = my_pdo_connexxionWeCon();\n $req = $bdd->prepare(\"DELETE FROM sousmembres WHERE identifiant = ?\");\n $req -> execute(array($userID));\n }\n}", "public function register_deactivation();", "final public function delete() {\n global $config; \n # Borrar el elemento de la base de datos\n $this->db->query(\"DELETE FROM guarderia_2 WHERE id_guarderia = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'sedes/&success=true');\n }", "public function undeleteAction(){\n\t}", "public function supprimer() {\n // delete query\n $query = \"DELETE FROM \" . $this->sNomTable . \" WHERE idContenuCommande = :idContenuCommande\";\n\n // prepare query\n $stmt = $this->oConnexion->prepare($query);\n\n // bind id of record to delete\n $stmt->bindParam(\":idContenuCommande\", $this->idContenuCommande);\n\n // execute query\n if ($stmt->execute()) {\n return true;\n }\n\n return false;\n }", "public function equipementSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Equipement\",\"idEquipement\",$id);// votre code ici\n\t}", "function suppr_tache($id_tache)\r\n{\r\n\tglobal $objet;\r\n\tif(droit_acces($objet[\"tache\"],$id_tache)>=2){\r\n\t\tsuppr_objet($objet[\"tache\"],$id_tache);\r\n\t\tdb_query(\"DELETE FROM gt_tache_responsable WHERE id_tache=\".db_format($id_tache));\r\n\t}\r\n}", "Public Function PermanentDelete()\n\t{\n\t\t$this->_db->delete('bevomedia_user', 'ID = ' . $this->id);\n\t\t$this->_db->delete('bevomedia_user_info', 'ID = ' . $this->id);\n\t}", "private function delete(){\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (empty ( $id )) return;\n\t\t// Check if there are permission to execute delete command.\n\t\t$result = $this->clsAccessPermission->toDelete();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to delete!\");\n\t\t\treturn;\n\t\t}\n\t\tif(!$this->objAccessCrud->delete($id)){\n\t\t\t$this->msg->setError (\"There was an issue to delete, because this register has some relation with another one!\");\n\t\t\treturn;\n\t\t}\n\t\t// Cleaner all class values.\n\t\t$this->objAccessCrud->setAccessCrud(null);\n\t\t// Cleaner session primary key.\n\t\t$_SESSION['PK']['ACCESSCRUD'] = null;\n\n\t\t$this->msg->setSuccess (\"Delete the record with success!\");\n\t\treturn;\n\t}", "function refuserRecette($_idRecette){\n // Supprimer la recette de la table Moderations\n $connexion = my_connect();\n $requette_recettes = \"DELETE FROM Moderations where Idmoderation = $_idRecette\";\n $table_recettes_resultat = mysqli_query($connexion,$requette_recettes); \n if(!$table_recettes_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo \"message de mysqli:\".mysqli_error($connexion); \n echo $requette_recettes;\n }\n // Supression de la recette de la table recette\n supprimerRecette($_idRecette);\n mysqli_close($connexion);\n}", "function supprimerArticle($Libelle_Produit) {\n if (isset($_SESSION['panier'])) {\n // Création du panier temporaire\n $tmp = array();\n $tmp['Id_Produit'] = array();\n $tmp['Libelle_Produit'] = array();\n $tmp['Prix'] = array();\n\n for ($i = 0; $i < count($_SESSION['panier']['Libelle_Produit']); $i++) {\n if ($_SESSION['panier']['Libelle_Produit'][$i] !== $Libelle_Produit) {\n array_push($tmp['Id_Produit'], $_SESSION['panier']['Id_Produit'][$i]);\n array_push($tmp['Libelle_Produit'], $_SESSION['panier']['Libelle_Produit'][$i]);\n array_push($tmp['Prix'], $_SESSION['panier']['Prix'][$i]);\n }\n }\n // On remplace notre panier session par le panier temp\n $_SESSION['panier'] = $tmp;\n // On efface le panier temporaire\n unset($tmp);\n } else {\n echo \"Un problème est survenu veuillez contacter l'administrateur du site.\";\n }\n}", "function unregister()\n {\n if (!$this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t// not logged in or not activated\n redirect('/auth/login/');\n\n } else {\n $this->form_validation->set_rules('password', 'Password', 'trim|required|xss_clean');\n\n $data['errors'] = array();\n\n if ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n if ($this->tank_auth->delete_user(\n $this->form_validation->set_value('password'))) {\t\t// success\n $this->_show_message($this->lang->line('auth_message_unregistered'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $errors = $this->tank_auth->get_error_message();\n foreach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n }\n }\n $this->load->view('auth/unregister_form', $data);\n }\n }", "function eliminar(){\n global $conexion, $data;\n $id = $data[\"id\"];\n $eliminado = $data[\"eliminado\"];\n $resultado = mysqli_query($conexion,\"UPDATE usuario SET usu_eliminado='$eliminado' WHERE usu_id='$id'\");\n echo validarError($conexion, true, $resultado);\n }", "public function interventionSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Intervention\",\"idIntervention\",$id);// votre code ici\n\t}", "public function eliminarUsuario(){\r\n $sql =\"DELETE FROM usuarios WHERE IdUsuario = '{$this->idUsuario}';\";\r\n $res = $this->conexion->setQuery($sql);\r\n return $res;\r\n}", "public function onRemove();", "function supprimerPanier()\n{\n\tunset($_SESSION['produits']);\n}", "public function possederSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Posseder\",\"idPosseder\",$id);// votre code ici\n\t}", "function eliminarRegistro($table,$camp,$dato){\n\t$q = \"DELETE FROM \".$table.\" WHERE \".$camp.\" = \".$dato;\n\t\n\tmysql_query($q);\n\n}", "function delete_form()\n\t{\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя изменить ID группы, попытайтесь снова\");\n\t\t}\n\n\t\tif ($this->ipsclass->input['id'] < 5)\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Вы не можете перемещать группы, которые используются в данный момент, но переименовать и отредактировать функции можно\");\n\t\t}\n\n\t\t$this->ipsclass->admin->page_title = \"Удаление пользовательской группы\";\n\n\t\t$this->ipsclass->admin->page_detail = \"Пожалуйста, убедитесь в том, что хотите удалить данную группу.\";\n\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as users', 'from' => 'members', 'where' => \"mgroup=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t$black_adder = $this->ipsclass->DB->fetch_row();\n\n\t\tif ($black_adder['users'] < 1)\n\t\t{\n\t\t\t$black_adder['users'] = 0;\n\t\t}\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as users', 'from' => 'members', 'where' => \"mgroup_others LIKE '%\".intval($this->ipsclass->input['id']).\"%'\" ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t$extra_group = $this->ipsclass->DB->fetch_row();\n\n\t\tif ($extra_group['users'] < 1)\n\t\t{\n\t\t\t$extra_group['users'] = 0;\n\t\t}\n\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'g_title', 'from' => 'groups', 'where' => \"g_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t$group = $this->ipsclass->DB->fetch_row();\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => \"g_id <> \".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t$mem_groups = array();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Leave out root admin group\n\t\t\t//-----------------------------------------\n\n\t\t\tif ( $this->ipsclass->vars['admin_group'] == $r['g_id'] )\n\t\t\t{\n\t\t\t\tif ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$mem_groups[] = array( $r['g_id'], $r['g_title'] );\n\t\t}\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dodelete' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'act' , 'group' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'id' , $this->ipsclass->input['id'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 4 => array( 'name' , $group['g_title'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 5 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\n\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Подтверждение перемещения: \".$group['g_title'] );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Количество пользователей в этой группе</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t \"<b>\".$black_adder['users'].\"</b>\",\n\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Количество пользователей с этой группой, как <u>вторичная</u> группа</b><br /><i>Эта вторичная группа будет удалена у этих пользователей.</i>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t \"<b>\".$extra_group['users'].\"</b>\",\n\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Переместить пользователей из этой группы в...</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_dropdown(\"to_id\", $mem_groups )\n\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form(\"Удалить эту группу\");\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t$this->ipsclass->admin->output();\n\t}", "function eliminarpermiso()\n {\n $oconexion = new conectar();\n //se establece conexión con la base de datos\n $conexion = $oconexion->conexion();\n //consulta para eliminar el registro\n $sql = \"UPDATE permiso SET eliminado=1 WHERE id_permiso=$this->id_permiso\";\n // $sql=\"DELETE FROM estudiante WHERE id=$this->id\";\n //se ejecuta la consulta\n $result = mysqli_query($conexion, $sql);\n return $result;\n }", "function supprime_pseudo ( $uid, $table ) {\n require ('config.php');\n mysql_connect ($db_server, $db_user, $db_pass);\n mysql_select_db($db);\n\n if ($table == 'tmp') {\n $sql = 'SELECT `ID` FROM `tbl_tmp_user`';\n $result = mysql_query($sql);\n } elseif ($table == 'user') {\n $sql = 'SELECT `ID` FROM `tbl_user`';\n $result = mysql_query($sql);\n } else {\n echo 'Erreur !';\n exit;\n }\n\n $num = mysql_numrows($result);\n\n $i = 0;\n while ($i < $num) {\n $db_uid = mysql_result ($result, $i, 'ID');\n if ($db_uid == $uid) {\n if ($table == 'tmp') {\n mysql_query(\"DELETE FROM `tbl_tmp_user` WHERE `ID` = '$db_uid'\");\n echo 'Supprimer';\n //mysql_close();\n exit;\n } else {\n mysql_query(\"DELETE FROM `tbl_user` WHERE `ID` = '$db_uid'\");\n echo 'Supprimer';\n //mysql_close();\n exit;\n }\n }\n $i++;\n }\n echo 'Introuvable';\n //mysql_close();\n}", "function removeRegistro($id) {\n GLOBAL $con;\n\n //busca info\n $querybusca = \"select * from kardexs where id='\" . $id . \"'\";\n $qry = mysql_query($querybusca);\n $linha = mysql_fetch_assoc($qry);\n\n //Apagua\n $query = \"delete from kardexs where id='\" . $id . \"'\";\n mysql_query($query, $con) or die(mysql_error());\n\n if (saldoExiste($linha['produto_id'], $linha['estoque_id'])) {\n //atualiza retirando saldo\n $saldoAtual = saldoByEstoque($linha['produto_id'], $linha['estoque_id']);\n if ($linha['sinal'] == '+') {\n $saldoAtual_acerto = $saldoAtual - $linha['qtd'];\n } else {\n $saldoAtual_acerto = $saldoAtual + $linha['qtd'];\n }\n\n\n saldo_atualiza($linha['produto_id'], $linha['estoque_id'], $saldoAtual_acerto);\n }\n}", "function supprimerTypeChambre ($connexion, $id) {\r\n\r\n $req = \"DELETE FROM TypeChambre WHERE id=?\";\r\n $stmt = $connexion -> prepare ($req);\r\n $ok = $stmt -> execute (array ($id));\r\n return $ok;\r\n\r\n }", "public function remove(){\n if(!empty($_POST['id'])){\n $val = new ValidaModel();\n $val->Idvalida=$_POST['id'];\n $val->del();\n }\n header('location: '.FOLDER_PATH.'/Valida');\n }", "function remove_existing(){\n $db = DB::connect(DB_CONNECTION_STRING);\n \n $sql = \"delete from user \n where postcode = \" . $db->quote($this->postcode) . \"\n and email = \" . $db->quote($this->email) .\"\n and user_id <> \" . $db->quote($this->user_id);\n $db->query($sql); \n }", "function supprAdmin($identifiant){\n\t$db = getDB();\n\t$query = $db->prepare(\"DELETE FROM Admin WHERE identifiant=?\");\n\t$query->execute(array($identifiant));\n\treturn true;\n}", "public function destroy()\n {\n $id=$this->seguridad->verificateInt($_REQUEST['delete_id']);\n $token = $_REQUEST['token'];\n $usuario = parent::showImgUser($id);\n if($id && $token)\n {\n if($usuario->img_usuario != 'assets/uploud/profile/default.svg')\n {\n unlink($usuario->img_usuario);\n }\n parent::deleteUser($id,$token);\n }\n }", "public function deleteRegister($suID): bool\n {\n }", "function SupprimerMessage($Utilisateur1,$Utilisateur2){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"DELETE FROM Messages WHERE ((mp_receveur='$Utilisateur1')||(mp_expediteur='$Utilisateur1'))&&((mp_receveur='$Utilisateur2')||(mp_expediteur='$Utilisateur2'))\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\t\r\n\t\tmysqli_close($conn);\r\n\t\t}", "function supprimer($id){\n try{\n $link= connecter_db();\n $rp=$link->prepare(\"delete from etudiant where id=?\");\n $rp->execute([$id]);\n}catch(PDOException $e ){\ndie (\"erreur de suppression de l'etudiant dans la base de donnees \".$e->getMessage());\n}\n}", "function eraseUserById($var)\n {\n $bdd = connexMedoo();\n $bdd->delete(\"utilisateurs\", [\n 'id' => $var\n ]);\n }", "function deletefinite($val1,$val2)\t// elimina la identificacion\n\t{\n $obj_Gurpo=new Conexion();\n $query=\"delete from fin where id_exp=$val1 and id_fin=$val2\";\n\t\t\t$obj_Gurpo->consulta($query); // ejecuta la consulta para borrar la identificacion\n\t\t\treturn '<div id=\"mensaje\"><p/><h4>Se Habilito el Expediente</h4></div>'; // retorna todos los registros afectados\n\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function supprimePanier()\n {\n\tif (isset($_SESSION['panier']))\n\t{\n unset($_SESSION['panier']);\n\t}\n}", "function eliminarUoFuncionario(){\r\n\t\t$this->objFunSeguridad=$this->create('MODUoFuncionario');\t\r\n\t\t$this->res=$this->objFunSeguridad->eliminarUoFuncionario($this->objParam);\r\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\r\n\t}", "public function equipementachatSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"EquipementAchat\",\"idEquipement\",$id);// votre code ici\n\t}", "function unite_personnes_supprimer_callback($form, &$form_state){\r\n if ($form_state['per_nums'] > 1) {\r\n $form_state['per_nums']--;\r\n }\r\n $form_state['rebuild'] = TRUE;\r\n}", "function suppMembre($id)\n\t{\n\n\t\t$this->db->where('id', $id);\n\t\t$this->db->delete('membres');\n\t}", "function accepterRecette($_idRecette){\n // Supprimer la recette de la table Moderations\n $connexion = my_connect();\n $requette_recettes = \"DELETE FROM Moderations where Idmoderation = $_idRecette\";\n $table_recettes_resultat = mysqli_query($connexion,$requette_recettes); \n if(!$table_recettes_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo \"message de mysqli:\".mysqli_error($connexion); \n echo $requette_recettes;\n }\n mysqli_close($connexion);\n}", "public function secteurSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Secteur\",\"idSecteur\",$id);// votre code ici\n\t}", "function unregister()\n\t{\n\t\tif (!$this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t// not logged in or not activated\n\t\t\tredirect('/auth/login/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('password', 'Password', 'trim|required|xss_clean');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif ($this->tank_auth->delete_user(\n\t\t\t\t\t\t$this->form_validation->set_value('password'))) {\t\t// success\n\t\t\t\t\t$this->_show_message($this->lang->line('auth_message_unregistered'));\n\n\t\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->load->view('auth/unregister_form', $data);\n\t\t}\n\t}", "function unregister()\n\t{\n\t\tif (!$this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t// not logged in or not activated\n\t\t\tredirect('/auth/login/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('password', 'Password', 'trim|required|xss_clean');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif ($this->tank_auth->delete_user(\n\t\t\t\t\t\t$this->form_validation->set_value('password'))) {\t\t// success\n\t\t\t\t\t$this->_show_message($this->lang->line('auth_message_unregistered'));\n\n\t\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->load->view('auth/unregister_form', $data);\n\t\t}\n\t}", "function del_compte()\r\n\t{\r\n\t\tglobal $nuked, $user, $language, $repertoire;\r\n\r\n\t\tif($user[1] >= \"1\")\r\n\t\t{\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_GALERY_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\r\n\t\t\tif ($rep = @opendir($repertoire.$user[0]))\r\n\t\t\t{\r\n\t\t\t\twhile ($file = readdir($rep)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif($file != \"..\") \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($file != \".\") \r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t@unlink($repertoire.$user[0].\"/\".$file);\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\t@rmdir($repertoire.$user[0]);\r\n\t\t\techo\"<div style=\\\"text-align: center;\\\"><br /><br /><b>\"._COMTPEDELETE.\"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\",3);\r\n\t\t}else{\r\n\t\t\techo\"\t<div style=\\\"text-align: center;\\\"><br /><br /><b>\" . _NOTACCES . \"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\", 3);\r\n\t\t}\r\n\t}", "function wbf_unite_personnes_supprimer_callback($form, &$form_state){\r\n if ($form_state['per_nums'] > 1) {\r\n $form_state['per_nums']--;\r\n }\r\n $form_state['rebuild'] = TRUE;\r\n}", "static function eliminar_instancia()\n\t{\n\t\tself::$instancia = null;\n\t}", "function exec_groupe_supprimer_dist() {\r\n\tif (!autoriser('voir', 'nom')) {\r\n\t\tinclude_spip('inc/minipres');\r\n\t\techo minipres();\r\n\t\texit;\r\n\t}\r\n\r\n\r\n\tsupprimer_groupe_func(_request('id_groupe'));\r\n}", "function supprimerArticle($id_produit){\n //Si le panier existe\n if (creating_cart())\n {\n //Nous allons passer par un panier temporaire\n $tmp=array();\n\t $tmp['id_produit'] = array();\n $tmp['nom_produit'] = array();\n $tmp['prix_produit'] = array();\n $tmp['qte_produit'] = array();\n $tmp['desc_produit'] = array();\n\t $tmp['img_produit'] = array();\n\t $tmp['ptsfid_produit'] = array();\n\n\n\n for($i = 0; $i < count($_SESSION['panier']['id_produit']); $i++)\n {\n if ($_SESSION['panier']['id_produit'][$i] !== $id_produit)\n {\n array_push( $tmp['id_produit'],$_SESSION['panier']['id_produit'][$i]);\n array_push( $tmp['nom_produit'],$_SESSION['panier']['nom_produit'][$i]);\n array_push( $tmp['prix_produit'],$_SESSION['panier']['prix_produit'][$i]);\n array_push( $tmp['qte_produit'],$_SESSION['panier']['qte_produit'][$i]);\n array_push( $tmp['desc_produit'],$_SESSION['panier']['desc_produit'][$i]);\n\t\t\tarray_push( $tmp['img_produit'],$_SESSION['panier']['img_produit'][$i]);\n\t\t\tarray_push( $tmp['ptsfid_produit'],$_SESSION['panier']['ptsfid_produit'][$i]);\n\n }\n\n }\n //On remplace le panier en session par notre panier temporaire à jour\n $_SESSION['panier'] = $tmp;\n //On efface notre panier temporaire\n unset($tmp);\n\t \theader(\"Location: panier.php\");\n\t\tdie();\n }\n else\n echo \"Un problème est survenu veuillez contacter l'administrateur du site.\";\n}", "public function deleteRegiuniById($remove){\n $sql = \"DELETE FROM regiune WHERE id = :id \";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':id', $remove);\n $result =$stmt->execute();\n if ($result) {\n $msg = '<div class=\"alert alert-success alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Success !</strong> Regiune șters cu succes!</div>';\n return $msg;\n }else{\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Error !</strong> Regiunea nu a fost șters!</div>';\n return $msg;\n }\n }", "function supprimerFavoris($_idRecette){\n // recherche de tout les référencement favoris\n $connexion= my_connect();\n $requette_favoris=\"DELETE FROM Favoris where Idrecette = $_idRecette\";\n $table_favoris_resultat = mysqli_query($connexion,$requette_favoris); \n if(!$table_favoris_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo \"message de mysqli:\".mysqli_error($connexion).\"<br>\";\n echo $requette_favoris;\n }\n mysqli_close($connexion);\n }", "public function remove() {\n\n // Updates DB (data & metadata)\n $this->attributes->removeAll($this->get(\"id\"));\n $this->db->delete(XCMS_Tables::TABLE_USERS, array(\n \"id\" => $this->get(\"id\")\n ));\n\n }", "public function removeMembre(){\n\n\t\t$user_id = Input::get('user_id');\n\n\t\t$redirectTo = ( $user_id != 0 ? 'admin/users/'.Input::get('user_id') : 'admin/adresses/'.Input::get('adresse_id') );\n\n\t\tif ( $this->adresse->removeMembre(Input::get('membre_id'),Input::get('adresse_id')) )\n\t\t{\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'Le membre a été supprimé')); \n }\n\n return Redirect::to($redirectTo)->with( array('status' => 'danger' , 'message' => 'Problème avec la suppression') );\t\t\t\n\t}", "function delLogin(){\n unlink($this->fHtaccess);\n }", "function delLogin(){\n unlink($this->fHtaccess);\n }", "public function unlinkAccount()\n {\n }", "function supprimer($IDSuppr){\n global $connexion;\n $requete = $connexion -> prepare('\n DELETE\n FROM articles\n WHERE id= :id');\n $requete -> execute([\n ':id' => $IDSuppr\n ]);\n\n header('location:index.php?');\n}", "function insert_unregister_user($id,$cellphone)\n {\n $query=$this->db->query(\"INSERT INTO xl_account(id,cellphone,register_user) VALUES ('{$id}','{$cellphone}',0)\");\n \n if ($this->db->affected_rows()>0) \n {\n return TRUE;\n }\n \n return FALSE;\n\n }", "public function achatSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Achat\",\"idEquipement\",$id);// votre code ici\n\t}", "function excluirPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"DELETE FROM pessoa WHERE id = '{$_POST[\"id\"]}'\";\r\n $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados\r\n $banco->close(); // Fecha o banco de dados\r\n voltarMenu(); // Volta para a pagina inicial da agenda\r\n}", "public function delete(){\n\t\t$sql = new Sql();\n\t\t$sql->query(\"DELETE FROM TB_USUARIOS WHERE idusuario=:ID\", array(\n\t\t\t':ID'=>$this->getIdusuario()\n\t\t));\n\n\t\t$this->setIdusuario(null);\n\t\t$this->setDeslogin(null);\n\t\t$this->setDessenha(null);\n\t\t$this->setDtcadastro(new DateTime());\n\t}", "public function deleteUsuario(){\n $conexion = new Database();\n\t\tif ($this->codigo){\n $sql = sprintf('DELETE FROM agenda_usuario WHERE usuario_id = %d',\n $this->codigo);\n $conexion->exec( $sql );\n }\n }", "static public function ctrBorrarUsuario(){\n\t\tif (isset($_POST['idUsuario'])) {\n\t\t\tif ($_POST['fotoUsuario'] != \"\") {\n\t\t\t\tunlink($_POST[\"fotoUsuario\"]);\n\t\t\t\trmdir('Views/img/usuarios/'.$_POST['usuario']);\n\t\t\t}\n\t\t$answer=adminph\\User::find($_POST['idUsuario']);\n\t\t$answer->delete();\n\t\t}\n\t}", "function supprimerEpreuve ($numE) {\n\t if (creepanier ()) {\n\t\t //Nous allons faire recours à un tableau temporaire\n\t\t$tmp = array ();\n\t\t$tmp['numE'] = array ();\n\t\t$tmp['forme'] = array();\n\t\t$tmp['nomE'] = array();\n\t\t$tmp['dateE'] = array();\n\t\t$tmp['categ'] = array();\n\t\t$tmp['prix'] = array ();\n\t\t$tmp['nbr'] = array();\n\t\tfor ($i = 0 ; $i < count ($_SESSION['panier']['numE']);$i ++) {\n\t\t\tif ($_SESSION['panier']['numE'][$i] !== $numE)\n\t\t\t{\n\t\t\t\tarray_push( $tmp['numE'],$_SESSION['panier']['numE'][$i]);\n\t\t\t\tarray_push( $tmp['forme'],$_SESSION['panier']['forme'][$i]);\n\t\t\t\tarray_push( $tmp['nomE'],$_SESSION['panier']['nomE'][$i]);\n\t\t\t\tarray_push( $tmp['dateE'],$_SESSION['panier']['dateE'][$i]);\n\t\t\t\tarray_push( $tmp['categ'],$_SESSION['panier']['categ'][$i]);\n\t\t\t\tarray_push( $tmp['prix'],$_SESSION['panier']['prix'][$i]);\n\t\t\t\tarray_push( $tmp['nbr'],$_SESSION['panier']['nbr'][$i]);\n\t\t\t}\n\t\t}\n\t\t//on affecte le contenu du panier temporaire dans notre panier principale\n\t\t$_SESSION['panier'] = $tmp;\n\t\t//On efface notre panier temporaire\n unset($tmp);\n\t } else {\n\t\t echo \"<p class=\\\"erreur\\\">Erreur réessyer ou contacter l'aministrateur</p>\";\n\t }\n }", "public function removeOneAction()\n\t{\n\t\t//vérification du statut d'admin\n\t\t$customersManager = new CustomersManager();\n\t\t$customer = $customersManager -> getLoginInfo();\n\t\tif (empty($customer) OR $customer['email'] != ADMIN_EMAIL)\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n\t\t\texit();\n\t\t}\n\n\t\t//sécurisation CSRF\n\t\tif(!array_key_exists('CSRFToken', $customer) OR !array_key_exists('CSRFToken', $_GET) OR $_GET['CSRFToken'] !== $customer['CSRFToken'])\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n exit();\n\t\t}\n\n\t\t//vérification des données reçues\n\t\tif (!isset($_GET) OR !isset($_GET['id']))\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n\t\t\texit();\n\t\t}\n\n\t\t//suppression du produit dans la BDD\n\t\t$id = $_GET['id'];\n\t\t$productsManager = new ProductsManager();\n\t\t$productRemoved = $productsManager -> removeOne($id);\n\t\tif ($productRemoved)\n\t\t{\n\t\t\t$_SESSION['alertMessages']['success'][] = 'Le produit a bien été supprimé.';\n\t\t\theader('Location: manageForm');\n\t\t\texit();\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$_SESSION['alertMessages']['error'][] = 'La suppression du produit a échoué.';\n\t\t\theader('Location: manageForm');\n\t\t\texit();\n\t\t}\n\t}", "function usun() {\n\t\t$baza = polacz_z_baza();\n\n\t\tif(!isset($_POST['student_id'])) {\n\t\t\techo \"Błędnie wywołany formularz<br>\";\n\t\t\treturn;\n\t\t}\n\t\t$zapytanie = \"DELETE FROM `studenci` WHERE `id` = \".$_POST['student_id'];\n\t\t$wynik = mysqli_query($baza, $zapytanie);\n\n\t\tif($wynik)\n\t\t\techo \"Student został usunięty z bazy<br>\";\n else \n\t\t\techo \"Błąd podczas próby usunięcia studenta z bazy (\".mysql_error().\")<br>\";\n\n\t\tzakoncz_polaczenie($baza);\n\t}", "public function delete(){\n \t\ttry{\n \t\t\t$db = DB::get();\n \t\t\t$sql = \"UPDATE t_\" . self::$Table . \" \n \t\t\t\t\tSET \" . self::$Table . \"_supprime='1' \n \t\t\t\t\tWHERE \" . self::$Table . \"_id = '\".$this->Id.\"' \";\n \t\t\n \t\t\t$result = $db->query($sql);\n \t\t}\n \t\tcatch(Exception $e){\n \t\t\tvar_dump($e->getMessage());\n \t\t}\n }", "public function supprimerPersonne($nump){\n $requete = $this->db->prepare(\n \"DELETE from personne where per_num='$nump';\");\n\n $retour=$requete->execute();\n return $retour;\n }", "function wbf_projet_personnes_supprimer_callback($form, &$form_state){\r\n if ($form_state['per_nums'] > 1) {\r\n $form_state['per_nums']--;\r\n }\r\n $form_state['rebuild'] = TRUE;\r\n}", "public function decopersonnel()\n {\n $this->session-> unset_userdata('admin','info','id');\n $this ->session->sess_destroy();\n $this->template->display('acceuil');\n }", "function eliminaRuta()\r\n\t{\r\n\t\t$query = \"DELETE FROM \" . self::TABLA . \" WHERE IdRuta = \".$this->IdRuta.\";\";\r\n\t\treturn parent::eliminaRegistro( $query);\r\n\t}", "function default_delete(){\n\tglobal $assign_list, $_CONFIG, $_SITE_ROOT, $mod;\n\tglobal $core, $clsModule, $clsButtonNav;\n\t$classTable = \"User\";\n\t$pkeyTable = \"id\";\n\t//################### CAN NOT MODIFY BELOW CODE ###################\n\t$clsTable = new $classTable();\n\t$pval = isset($_REQUEST[$pkeyTable])? $_REQUEST[$pkeyTable] : \"\";\n\tif ($pval!=\"\"){\n\t\t$clsTable->deleteOne($pval);\n\t\theader(\"location: ?$_SITE_ROOT&mod=$mod\");\n\t}\n\t$checkList = isset($_POST[\"checkList\"])? $_POST[\"checkList\"] : \"\";\n\tif (is_array($checkList)){\n\t\tforeach ($checkList as $key => $val){\n\t\t\t$clsTable->deleteOne($val);\n\t\t}\n\t\theader(\"location: ?$_SITE_ROOT&mod=$mod\");\n\t}\n\tunset($clsTable);\n}", "function Eliminar()\n{\n /**\n * Se crea una instanica a Concesion\n */\n $Concesion = new Titulo();\n /**\n * Se coloca el Id del acuifero a eliminar por medio del metodo SET\n */\n $Concesion->setId_titulo(filter_input(INPUT_GET, \"ID\"));\n /**\n * Se manda a llamar a la funcion de eliminar.\n */\n echo $Concesion->delete();\n}", "function delete() ;", "function delete() ;", "public function unemploy(){\n unset($this->staffId);\n unset($this->store);\n $connection = new Connection();\n $link = $connection->connect();\n $link->exec(\"DELETE FROM staff WHERE user_id = '$this->id'\");\n $connection = null;\n }", "public function eliminar()\n\t{\n\t\textract($_REQUEST);\n\t\t$db=new clasedb;\n\t\t$conex=$db->conectar();\n\t\t$sql=\"DELETE FROM asistencias WHERE id=\".$id_asistencias;\n\t\t\n\t$res=mysqli_query($conex,$sql);\n\t\tif ($res) {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\talert(\"Registro eliminado\");\n\t\t\t\t\twindow.location=\"ControlA.php?operacion=index\";\n\t\t\t\t</script>\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\talert(\"Registro no pudo ser eliminado, Vuelva a intentarlo!\");\n\t\t\t\t\twindow.location=\"ControlA.php?operacion=index\";\n\t\t\t\t</script>\n\t\t\t<?php\n\t\t}\n\t}", "public function delete(){\n\t\t\t$sql = new sql();\n\n\t\t\t$sql->query(\"DELETE FROM tb_usuarios WHERE idusuario= :ID\", array(\n\t\t\t\t\":ID\"=>$this->getIdusuario()\n\t\t\t));\n\n\t\t\t$this->setIdusuario(0);\n\t\t\t$this->setDeslogim(\"\");\n\t\t\t$this->setDessenha(\"\");\n\t\t\t$this->setDtcadastro(new DateTime());\n\t\t}", "function deleteUnsaveNode()\n {\n //vymaze az po 2 hodinach ak sa nezmeni stav\n $list = $this->getFluent()->where(\"status = 'not_in_system' AND add_date < ( NOW() - 60*2 )\")->fetchAll();\n\n if (!empty($list)) {\n\n foreach ($list as $l) {\n\n $this->delete($l['id_node']);\n\n $module_name = $this->context->getService('ModuleContainer')->fetch($l['id_type_module'])->service_name;\n\n $this->context->getService($module_name)->delete($l['id_node']);\n }\n }\n }", "function supprimer_page($page)\n{\n global $config_wri,$pdo;\n $page=$pdo->quote($page);\n $query=\"delete from pages_wiki where nom_page=$page\";\n $res=$pdo->query($query);\n if (!$res)\n return erreur(\"Requête SQL impossible à executer\",$query);\n\n return ok(\"Page supprimée et tout ses anciennes versions\");\n}", "function validate_user_deletion()\n{ }", "public function delete(){\n $db = Database::getInstance() ;\n $db->query(\"DELETE FROM canciones WHERE idcancion=:idcan ;\",\n [\":idcan\"=>$this->idcancion]) ;\t\t\t\t \n }", "public function unregister(): void;", "public function unregister(): void;" ]
[ "0.67501855", "0.67349136", "0.67154294", "0.67015517", "0.664455", "0.6640173", "0.65257466", "0.6487137", "0.6465688", "0.6445015", "0.63397443", "0.63339263", "0.63193506", "0.6311493", "0.6292144", "0.6289591", "0.62763715", "0.6273597", "0.6270154", "0.626064", "0.625921", "0.6253643", "0.62450534", "0.6213468", "0.62097037", "0.61954874", "0.6160707", "0.61122847", "0.6110245", "0.61082095", "0.6097058", "0.6084842", "0.6082609", "0.60814726", "0.607719", "0.607676", "0.6074558", "0.6073083", "0.6051638", "0.6045453", "0.6044191", "0.60423505", "0.6037462", "0.60234153", "0.6022385", "0.60211354", "0.6013481", "0.60124266", "0.60104114", "0.60104114", "0.60104114", "0.60104114", "0.6004", "0.60011363", "0.6000751", "0.59972304", "0.5978402", "0.59766567", "0.5973037", "0.5971219", "0.5971219", "0.596896", "0.596744", "0.596248", "0.59607667", "0.59590364", "0.59571594", "0.59552157", "0.59502906", "0.59475565", "0.5943532", "0.5943532", "0.59419227", "0.5936643", "0.5931", "0.5927746", "0.5927418", "0.5925594", "0.5922248", "0.5918997", "0.59067744", "0.590565", "0.5903578", "0.59035045", "0.59013957", "0.5889452", "0.5885461", "0.588487", "0.5883224", "0.58780575", "0.58774954", "0.58774954", "0.5876151", "0.587126", "0.5868048", "0.5860947", "0.58590204", "0.5852153", "0.5846755", "0.5845499", "0.5845499" ]
0.0
-1
function supprimerChamp Permet de supprimer un enregistrement identifie par une colonne autre que la cle
function supprimerChamp($id, $champ/*:int*/)/* :int */ { if (!is_numeric($id)) { return -1; } if ($id > 0) { if (strlen(preg_replace("#[^A-Z]+#", "", $champ) > 0)) { $cle = $this->quoteIdentifier . $champ . $this->quoteIdentifier; } else { $cle = $champ; } $sql = "delete from " . $this->table . " where " . $cle . "= :id"; $data["id"] = $id; return $this->executeAsPrepared($sql, $data, true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function supprimer($idCap)\n {\n $db=Db::getInstance();\n $req=$db->query(\"DELETE FROM capteur WHERE idCap='$idCap'\");\n }", "public function utilisateurSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Utilisateur\",\"idUtilisateur\",$id);// votre code ici\n\t}", "public function achatSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Achat\",\"idEquipement\",$id);// votre code ici\n\t}", "function SupprimerProfil($pseudonyme){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"DELETE FROM allinformations WHERE Pseudo='$pseudonyme'\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\t\r\n\t\tmysqli_close($conn);\t\t\r\n\t\t}", "function supprimerTypeChambre ($connexion, $id) {\r\n\r\n $req = \"DELETE FROM TypeChambre WHERE id=?\";\r\n $stmt = $connexion -> prepare ($req);\r\n $ok = $stmt -> execute (array ($id));\r\n return $ok;\r\n\r\n }", "public function supprimerPersonne($nump){\n $requete = $this->db->prepare(\n \"DELETE from personne where per_num='$nump';\");\n\n $retour=$requete->execute();\n return $retour;\n }", "public function supprimer($idproduit){\r\n\t\tunset($_SESSION['panier'][$idproduit]);\r\n\t}", "function supprimerPanier()\n{\n\tunset($_SESSION['produits']);\n}", "function supprimer1($connexion,$nomTable,$nomClePrimaire,$valeurClePrimaire) { \n $req =$connexion -> query(\"DELETE FROM $nomTable WHERE $nomClePrimaire = '$valeurClePrimaire'\");\n }", "public function etatSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Etat\",\"idEtat\",$id);// votre code ici\n\t}", "public function equipementachatSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"EquipementAchat\",\"idEquipement\",$id);// votre code ici\n\t}", "public function demandeSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Demande\",\"idDemande\",$id);// votre code ici\n\t}", "function vider_champs_extras($champs) {\r\n\tif (!is_array($champs)) \r\n\t\t$champs = array($champs);\r\n\t\t\r\n\t// on efface chaque champ trouve\r\n\tforeach ($champs as $c){ \r\n\t\tif ($table = table_objet_sql($c->table) and $c->champ and $c->sql) {\r\n\t\t\tsql_alter(\"TABLE $table DROP $c->champ\");\r\n\t\t}\r\n\t}\t\r\n}", "public function supprimer() {\n // delete query\n $query = \"DELETE FROM \" . $this->sNomTable . \" WHERE idContenuPanier = :idContenuPanier\";\n\n // prepare query\n $stmt = $this->oConnexion->prepare($query);\n\n // bind id of record to delete\n $stmt->bindParam(\":idContenuPanier\", $this->idContenuPanier);\n\n // execute query\n if ($stmt->execute()) {\n return true;\n }\n\n return false;\n }", "public function supprimmerPanier($numPanier)\n { $reqSupprimmerPanier = \"DELETE FROM panier WHERE numPanier = '$numPanier'\" ;\n mysqli_query($this->co, $reqSupprimmerPanier) or die(\"erreur suppression du panier dans la BD\") ;\n }", "function exec_groupe_supprimer_dist() {\r\n\tif (!autoriser('voir', 'nom')) {\r\n\t\tinclude_spip('inc/minipres');\r\n\t\techo minipres();\r\n\t\texit;\r\n\t}\r\n\r\n\r\n\tsupprimer_groupe_func(_request('id_groupe'));\r\n}", "function supprimer($userID)\n{\n require('_connexionbdd.php');\n\n if ($userID != null) {\n $bdd = my_pdo_connexxionWeCon();\n $req = $bdd->prepare(\"DELETE FROM sousmembres WHERE identifiant = ?\");\n $req -> execute(array($userID));\n }\n}", "function supprimePanier()\n {\n\tif (isset($_SESSION['panier']))\n\t{\n unset($_SESSION['panier']);\n\t}\n}", "public function societeSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Societe\",\"idSociete\",$id);// votre code ici\n\t}", "public function supprimerAction($id){\r\n $this->modele->getManager()->supprimer(\"enseignant\", $id);\r\n $this->listerAction();\r\n }", "public function secteurSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Secteur\",\"idSecteur\",$id);// votre code ici\n\t}", "function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_amphur\n\t\t\t\tWHERE amph_id=?\";\n\t\t$this->hr->query($sql, array($this->amph_id));\n\t}", "public function interventionSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Intervention\",\"idIntervention\",$id);// votre code ici\n\t}", "public function destroy(Chauffeur $chauffeur)\n {\n //\n }", "function supprimerArticle($Libelle_Produit) {\n if (isset($_SESSION['panier'])) {\n // Création du panier temporaire\n $tmp = array();\n $tmp['Id_Produit'] = array();\n $tmp['Libelle_Produit'] = array();\n $tmp['Prix'] = array();\n\n for ($i = 0; $i < count($_SESSION['panier']['Libelle_Produit']); $i++) {\n if ($_SESSION['panier']['Libelle_Produit'][$i] !== $Libelle_Produit) {\n array_push($tmp['Id_Produit'], $_SESSION['panier']['Id_Produit'][$i]);\n array_push($tmp['Libelle_Produit'], $_SESSION['panier']['Libelle_Produit'][$i]);\n array_push($tmp['Prix'], $_SESSION['panier']['Prix'][$i]);\n }\n }\n // On remplace notre panier session par le panier temp\n $_SESSION['panier'] = $tmp;\n // On efface le panier temporaire\n unset($tmp);\n } else {\n echo \"Un problème est survenu veuillez contacter l'administrateur du site.\";\n }\n}", "public function possederSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Posseder\",\"idPosseder\",$id);// votre code ici\n\t}", "function supprimerRecette($_idRecette){\n // suppression de la table des favoris des tilisateurs qui l'ot msie comme favoris\n supprimerFavoris($_idRecette);\n // suppression de tout les commentaires de la recette\n supprimerToutCommentaires($_idRecette);\n // suppression des ingrédients de la recette\n supprimerToutIngredients($_idRecette);\n // suppression de la recette\n $connexion= my_connect();\n $requette_recettes=\"DELETE FROM Recettes where Idrecette = $_idRecette\";\n $table_recettes_resultat = mysqli_query($connexion,$requette_recettes); \n if(!$table_recettes_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo\"message de mysqli:\".mysqli_error($connexion); \n }\n mysqli_close($connexion);\n }", "function supprimer2($connexion,$nomTable,$nomClePrimaire1,$valeurClePrimaire1,$nomClePrimaire2,$valeurClePrimaire2) { \n $req =$connexion -> query(\"DELETE FROM $nomTable WHERE $nomClePrimaire1 = '$valeurClePrimaire1' and $nomClePrimaire2 = '$valeurClePrimaire2' \");\n }", "public function destroy(ChucNang $chucNang)\n {\n //\n }", "public function supprimer() {\n // delete query\n $query = \"DELETE FROM \" . $this->sNomTable . \" WHERE idContenuCommande = :idContenuCommande\";\n\n // prepare query\n $stmt = $this->oConnexion->prepare($query);\n\n // bind id of record to delete\n $stmt->bindParam(\":idContenuCommande\", $this->idContenuCommande);\n\n // execute query\n if ($stmt->execute()) {\n return true;\n }\n\n return false;\n }", "public static function removeRegisterByID($idTour, $idPersonne) {\n\t\t$query = \"DELETE FROM `inscription` WHERE `idRandonnee` = '$idTour' AND `idPersonne`= '$idPersonne' \";\n\t\t\n\t\treturn MySqlConn::getInstance ()->executeQuery ( $query );\n\t}", "function eraseUserById($var)\n {\n $bdd = connexMedoo();\n $bdd->delete(\"utilisateurs\", [\n 'id' => $var\n ]);\n }", "function deleteTeachAcc($u_id, $merch_id){\r\n\tglobal $dbc;\r\n\t\r\n\t$query = 'DELETE FROM teach_req '.\r\n\t\t\t 'WHERE u_id = \\''. $u_id .'\\' '.\r\n\t\t\t 'AND merch_id = \\''. $merch_id .'\\';';\r\n\t\r\n\t$result = mysqli_query($dbc, $query);\r\n\tif(!$result){\r\n\t\tdie('Error - '. mysqli_errno($dbc));\r\n\t}\r\n\t\r\n}", "function supprimerEtablissement ($connexion, $id) {\r\n\r\n $req = \"DELETE FROM Etablissement WHERE id=?\";\r\n $stmt = $connexion -> prepare ($req);\r\n $ok = $stmt -> execute (array ($id));\r\n return $ok;\r\n\r\n }", "function supprimerArticle($ID){\n if (creationEquipement() && !isVerrouille())\n {\n //Nous allons passer par un panier temporaire\n $tmp=array();\n $tmp['id'] = array();\n $tmp['type'] = array();\n $tmp['verrou'] = $_SESSION['equipement']['verrou'];\n\n $Nombreelement = count($_SESSION['equipement']['id']);\n \n for($i = 0; $i < $Nombreelement; $i++)\n {\n if ($_SESSION['equipement']['id'][$i] != $ID)\n { \n array_push( $tmp['id'],$_SESSION['equipement']['id'][$i]);\n array_push( $tmp['type'],$_SESSION['equipement']['type'][$i]);\n }\n \n }\n //On remplace le panier en session par notre panier temporaire à jour\n $_SESSION['equipement'] = $tmp;\n //On efface notre panier temporaire\n \n \n unset($tmp);\n header(\"location: equipement.phtml\");\n }\n else\n echo \"Un problème est survenu veuillez contacter l'administrateur du site.\";\n}", "function suppMembre($id)\n\t{\n\n\t\t$this->db->where('id', $id);\n\t\t$this->db->delete('membres');\n\t}", "function supprimerCommentaire($_idCommentaire){\n $connexion= my_connect();\n $requette_commentaire=\"DELETE FROM Commentaires where Idcommentaire = $_idCommentaire\";\n $table_commentaire_resultat = mysqli_query($connexion,$requette_commentaire); \n if(!$table_commentaire_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo\"message de mysqli:\".mysqli_error($connexion); \n }\n mysqli_close($connexion);\n }", "public static function supprimer() {\n if(!UserModel::isConnected())\n Controller::goTo(\"\", \"\", \"Vous devez être connecté pour accéder à cette section.\");\n \n if(!UserModel::estAdmin())\n Controller::goTo(\"\", \"\", \"Vous n'avez pas les droits suffisants.\");\n \n // L'utilisateur a annulé\n if(isset($_POST['btnAnnuler']))\n Controller::goTo(\"ecs/index.php\", \"L'EC n'a pas été supprimé.\");\n \n // Le formulaire a été validé\n $data = [];\n if(isset($_POST['btnSupprimer'])) {\n if(!isset($_SESSION['current']['EC']))\n Controller::goTo(\"ecs/index.php\", \"L'EC n'a pas été supprimé.\");\n \n if(ECModel::delete($_SESSION['current']['EC']))\n Controller::goTo(\"ecs/index.php\", \"L'EC a été supprimé.\");\n else {\n WebPage::setCurrentErrorMsg(\"L'EC n'a pas été supprimé de la base de données.\");\n if(($data['EC'] = ECModel::read($_SESSION['current']['EC'])) === null)\n Controller::goTo(\"ecs/index.php\", \"\", \"Erreur lors de la récupération de l'EC.\");\n }\n }\n else {\n if(($data['EC'] = ECModel::read(intval($_POST['idSupp']))) == null)\n return Controller::goTo(\"ecs/index.php\", \"\", \"Erreur lors de la récupération de l'EC.\");\n $_SESSION['current']['EC'] = intval($_POST['idSupp']);\n }\n\n return Controller::push(\"Supprimer un EC\", \"./view/ecs/supprimer.php\", $data);\n }", "function supprimerProduit($code) {\n\t // echo \"<p> supprimer $code </p>\";\n\t \n\t /* on verifie si le produit est dans le panier */\n\t if ( isset($this->lignes[$code]) ) {\n\t /* il y est, donc on retrouve la ligne de panier */\n\t $lp = $this->lignes[$code] ;\n\t \n\t /* on supprime 1 de la quantite */\n\t $lp->qte = $lp->qte - 1 ; \n\t \n\t // echo \"<p> nouvelle qte : \" . $lp->qte . \"</p>\" ;\n\t \n\t /* si qte<1, on supprime toute la ligne du tableau */\n\t if ( $lp->qte < 1) {\n\t unset($this->lignes[$code]);\n\t // echo \"<p> produit $code supprime \" . count($this->lignes) . \"</p>\";\n\t \n\t /* on enleve un produit de nbProduits */\n\t $this->nbProduits = $this->nbProduits - 1;\n\t }\n\t }\t \n\t }", "function supprimer($IDSuppr){\n global $connexion;\n $requete = $connexion -> prepare('\n DELETE\n FROM articles\n WHERE id= :id');\n $requete -> execute([\n ':id' => $IDSuppr\n ]);\n\n header('location:index.php?');\n}", "function supprimerEpreuve ($numE) {\n\t if (creepanier ()) {\n\t\t //Nous allons faire recours à un tableau temporaire\n\t\t$tmp = array ();\n\t\t$tmp['numE'] = array ();\n\t\t$tmp['forme'] = array();\n\t\t$tmp['nomE'] = array();\n\t\t$tmp['dateE'] = array();\n\t\t$tmp['categ'] = array();\n\t\t$tmp['prix'] = array ();\n\t\t$tmp['nbr'] = array();\n\t\tfor ($i = 0 ; $i < count ($_SESSION['panier']['numE']);$i ++) {\n\t\t\tif ($_SESSION['panier']['numE'][$i] !== $numE)\n\t\t\t{\n\t\t\t\tarray_push( $tmp['numE'],$_SESSION['panier']['numE'][$i]);\n\t\t\t\tarray_push( $tmp['forme'],$_SESSION['panier']['forme'][$i]);\n\t\t\t\tarray_push( $tmp['nomE'],$_SESSION['panier']['nomE'][$i]);\n\t\t\t\tarray_push( $tmp['dateE'],$_SESSION['panier']['dateE'][$i]);\n\t\t\t\tarray_push( $tmp['categ'],$_SESSION['panier']['categ'][$i]);\n\t\t\t\tarray_push( $tmp['prix'],$_SESSION['panier']['prix'][$i]);\n\t\t\t\tarray_push( $tmp['nbr'],$_SESSION['panier']['nbr'][$i]);\n\t\t\t}\n\t\t}\n\t\t//on affecte le contenu du panier temporaire dans notre panier principale\n\t\t$_SESSION['panier'] = $tmp;\n\t\t//On efface notre panier temporaire\n unset($tmp);\n\t } else {\n\t\t echo \"<p class=\\\"erreur\\\">Erreur réessyer ou contacter l'aministrateur</p>\";\n\t }\n }", "function delLogin(){\n unlink($this->fHtaccess);\n }", "function delLogin(){\n unlink($this->fHtaccess);\n }", "public function decopersonnel()\n {\n $this->session-> unset_userdata('admin','info','id');\n $this ->session->sess_destroy();\n $this->template->display('acceuil');\n }", "public function destroy(CompteUtilisateur $compteUtilisateur)\n {\n //\n }", "public function delete()\n {\n //recuperation des informations pour la suppression d'une matière\n $data = $this->request->data;\n $id_planing = (int)$data['id_planing'] ?? null;\n \n if (empty($id_planing)) {\n $this->_return('Veillez spécifier l\\'identifiant du programme à supprimer', false);\n }\n\n if (true === $this->model->exist('id_planing', (int)$data['id_planing'], 'Presences')) {\n $this->_return('impossible de supprimer ce planing car il comporte encore des presences ', false);\n }\n\n try {\n $this->model->remove($id_planing);\n $this->_return('La matière a étè supprimer avec succès', true);\n //code...\n } catch (Exception $e) {\n $this->_exception($e);\n }\n }", "function SupprimerMessage($Utilisateur1,$Utilisateur2){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"DELETE FROM Messages WHERE ((mp_receveur='$Utilisateur1')||(mp_expediteur='$Utilisateur1'))&&((mp_receveur='$Utilisateur2')||(mp_expediteur='$Utilisateur2'))\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\t\r\n\t\tmysqli_close($conn);\r\n\t\t}", "function suppr_tache($id_tache)\r\n{\r\n\tglobal $objet;\r\n\tif(droit_acces($objet[\"tache\"],$id_tache)>=2){\r\n\t\tsuppr_objet($objet[\"tache\"],$id_tache);\r\n\t\tdb_query(\"DELETE FROM gt_tache_responsable WHERE id_tache=\".db_format($id_tache));\r\n\t}\r\n}", "public function delete($machucdanh){\n\t\tglobal $db;\n\t\tmysqli_query($db,\"delete from chucdanh where machucdanh=$machucdanh; \");\n\t}", "public function equipementSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Equipement\",\"idEquipement\",$id);// votre code ici\n\t}", "function unsetCita($fecha, $hora){\n\t\t\n\t\t$resultado = conectar()->query( \"SELECT * FROM citas WHERE fecha LIKE '$fecha' AND hora LIKE '$hora'\");\n\t\tif($resultado->num_rows == 1){\n\t\t\tconectar()->query(\"DELETE FROM citas WHERE fecha = '$fecha' AND hora = '$hora'\");\n\t\t\techo \"<script>alert('Se ha eliminado la cita!');document.location.reload();</script>\";\n\t\t}\n\t}", "function eliminar_chapa($id)\n {\n $con = new DBmanejador;\n \tif($con->conectar()==true)\n \t{\n\t\t \t $consulta= \"delete from tchapas where chapa_id=('\".$id.\"')\";\n\t\t\t\t $resultado=mysql_query($consulta) or die('La consulta fall&oacute;: ' . mysql_error());\n\n\t\t\t\t if (!$resultado) return false;\n\t\t\t\t else return true;\n \t}\n }", "public function supprime($fichier) {\n\t\t$CODE_RETOUR = false;\n\t\tif ($this->verifie_connexion ()) {\n\t\t\t$CODE_RETOUR = ftp_delete ( $this->conn_id, $fichier );\n\t\t}\n\t\t\n\t\treturn $CODE_RETOUR;\n\t}", "public static function supprimerbyid_noeud($noeuds_id)\n {\n $db=Db::getInstance();\n $req=$db->query(\"DELETE FROM capteur WHERE noeuds_id='$noeuds_id'\");\n }", "public function removeMembre(){\n\n\t\t$user_id = Input::get('user_id');\n\n\t\t$redirectTo = ( $user_id != 0 ? 'admin/users/'.Input::get('user_id') : 'admin/adresses/'.Input::get('adresse_id') );\n\n\t\tif ( $this->adresse->removeMembre(Input::get('membre_id'),Input::get('adresse_id')) )\n\t\t{\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'Le membre a été supprimé')); \n }\n\n return Redirect::to($redirectTo)->with( array('status' => 'danger' , 'message' => 'Problème avec la suppression') );\t\t\t\n\t}", "function db_removeAuthEntry($auth_id)\n{\n $auth_id = db_esc($auth_id);\n db_run(\"DELETE FROM \".TBL_AUTH.\" WHERE auth_id='$auth_id'\");\n}", "function supprime_pseudo ( $uid, $table ) {\n require ('config.php');\n mysql_connect ($db_server, $db_user, $db_pass);\n mysql_select_db($db);\n\n if ($table == 'tmp') {\n $sql = 'SELECT `ID` FROM `tbl_tmp_user`';\n $result = mysql_query($sql);\n } elseif ($table == 'user') {\n $sql = 'SELECT `ID` FROM `tbl_user`';\n $result = mysql_query($sql);\n } else {\n echo 'Erreur !';\n exit;\n }\n\n $num = mysql_numrows($result);\n\n $i = 0;\n while ($i < $num) {\n $db_uid = mysql_result ($result, $i, 'ID');\n if ($db_uid == $uid) {\n if ($table == 'tmp') {\n mysql_query(\"DELETE FROM `tbl_tmp_user` WHERE `ID` = '$db_uid'\");\n echo 'Supprimer';\n //mysql_close();\n exit;\n } else {\n mysql_query(\"DELETE FROM `tbl_user` WHERE `ID` = '$db_uid'\");\n echo 'Supprimer';\n //mysql_close();\n exit;\n }\n }\n $i++;\n }\n echo 'Introuvable';\n //mysql_close();\n}", "public function destroy(PhieuChi $phieuChi)\n {\n //\n }", "function wbf_projet_sous_traitants_supprimer_callback($form, &$form_state){\r\n if ($form_state['str_nums'] > 1) {\r\n $form_state['str_nums']--;\r\n }\r\n $form_state['rebuild'] = TRUE;\r\n}", "function supprimerFavoris($_idRecette){\n // recherche de tout les référencement favoris\n $connexion= my_connect();\n $requette_favoris=\"DELETE FROM Favoris where Idrecette = $_idRecette\";\n $table_favoris_resultat = mysqli_query($connexion,$requette_favoris); \n if(!$table_favoris_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo \"message de mysqli:\".mysqli_error($connexion).\"<br>\";\n echo $requette_favoris;\n }\n mysqli_close($connexion);\n }", "public function eraseSms($tableau){\n if(is_array($tableau)){\n $this->sms = array_diff($this->sms, $tableau);\n }else{\n $this->sms = array_splice($this->sms, \n array_search($tableau, $this->sms), 1);\n }\n\n /*if(is_array($tableau))\n {\n $this->sms = array_values(\n array_diff_key($this->sms, array_flip($tableau))\n );\n } else {\n array_splice($this->sms, $tableau, 1);\n }*/\n }", "public function eraseSms($tableau){\n if(is_array($tableau)){\n $this->sms = array_diff($this->sms, $tableau);\n }else{\n $this->sms = array_splice($this->sms, \n array_search($tableau, $this->sms), 1);\n }\n\n /*if(is_array($tableau))\n {\n $this->sms = array_values(\n array_diff_key($this->sms, array_flip($tableau))\n );\n } else {\n array_splice($this->sms, $tableau, 1);\n }*/\n }", "function eliminarRegistro($table,$camp,$dato){\n\t$q = \"DELETE FROM \".$table.\" WHERE \".$camp.\" = \".$dato;\n\t\n\tmysql_query($q);\n\n}", "public function achatModifierUn($id,$achat)\n\t{\n\t\tGestion::modifier($achat);// votre code ici\n\t}", "function eliminarTipoDeMatricula($id){\n \t$pdo = DatabaseCao::connect();\n mysql_query(\"DELETE FROM ca_tipo_matricula WHERE id = ? ;\");\n $sql = \"DELETE FROM ca_tipo_matricula WHERE id = ?\";\n $q = $pdo->prepare($sql);\n $q->execute(array($id));\n DatabaseCao::disconnect();\n }", "public function removePerm($aid){\n\t\t//$arr=array('uid'=>$uid,'rid'=>$rid);\n\t\t$this->db->delete('user_admin',array('ID'=>$aid));\n\t}", "function autoriser_document_supprimer($faire, $type, $id, $qui, $opt){\r\n\tif (!intval($id)\r\n\t\tOR !$qui['id_auteur']\r\n\t\tOR !autoriser('ecrire','','',$qui))\r\n\t\treturn false;\r\n\t// ne pas considerer le document parent\r\n\t// (cas des vignettes ou autre document annexe rattache a un document)\r\n\tif (sql_countsel('spip_documents_liens', \"objet!='document' AND id_document=\".intval($id)))\r\n\t\treturn false;\r\n\r\n\treturn autoriser('modifier','document',$id,$qui,$opt);\r\n}", "function supprimer($id){\n try{\n $link= connecter_db();\n $rp=$link->prepare(\"delete from etudiant where id=?\");\n $rp->execute([$id]);\n}catch(PDOException $e ){\ndie (\"erreur de suppression de l'etudiant dans la base de donnees \".$e->getMessage());\n}\n}", "function del_compte()\r\n\t{\r\n\t\tglobal $nuked, $user, $language, $repertoire;\r\n\r\n\t\tif($user[1] >= \"1\")\r\n\t\t{\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_GALERY_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\r\n\t\t\tif ($rep = @opendir($repertoire.$user[0]))\r\n\t\t\t{\r\n\t\t\t\twhile ($file = readdir($rep)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif($file != \"..\") \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($file != \".\") \r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t@unlink($repertoire.$user[0].\"/\".$file);\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\t@rmdir($repertoire.$user[0]);\r\n\t\t\techo\"<div style=\\\"text-align: center;\\\"><br /><br /><b>\"._COMTPEDELETE.\"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\",3);\r\n\t\t}else{\r\n\t\t\techo\"\t<div style=\\\"text-align: center;\\\"><br /><br /><b>\" . _NOTACCES . \"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\", 3);\r\n\t\t}\r\n\t}", "function delLogin(){\r\n\t\tunlink($this->fHtaccess);\r\n\t}", "public function undeleteAction(){\n\t}", "public function clearUserCohorts(int $uid)\n {\n DB::connection('moodle')->table('cohort_members')->where('userid', $uid)->delete();\n }", "public function unsetPassword(){\n\t\t$this->password = null;\n\t}", "function supprAdmin($identifiant){\n\t$db = getDB();\n\t$query = $db->prepare(\"DELETE FROM Admin WHERE identifiant=?\");\n\t$query->execute(array($identifiant));\n\treturn true;\n}", "public function equipementlocationSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"EquipementLocation\",\"idEquipement\",$id);// votre code ici\n\t}", "public function destroy(Fichier $fichier)\n {\n //\n }", "public function removeSpecialisation(){\n\n\t\t$user_id = Input::get('user_id');\n\t\t\n\t\t$redirectTo = ( $user_id != 0 ? 'admin/users/'.$user_id : 'admin/adresses/'.Input::get('adresse_id') );\n\n\t\t$this->adresse->removeSpecialisation(Input::get('specialisation_id'),Input::get('adresse_id'));\n\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'La spécialisation a été supprimé'));\n\n\t}", "function cinotif_desabonner_auteur($objet, $id_objet='') {\n\t$return = '';\n\t$id_auteur = cinotif_id_auteur();\n\t$id_abonne = cinotif_id_abonne($id_auteur, '');\n\t\n\tif ($objet AND $id_abonne){\n\t\tif ($objet=='site') {\n\t\t\t$where = \"id_abonne=\".$id_abonne;\n\t\t} else {\n\t\t\t$tableau_id_evenement = cinotif_ids_evenement($objet, $id_objet);\t\t\t\t\n\t\t\t$in = sql_in('id_evenement',$tableau_id_evenement);\n\t\t\t$where = \"id_abonne=\".$id_abonne.\" AND \".$in;\n\t\t}\n\t\t\n\t\t$return = sql_delete(\"spip_cinotif_abonnements\", $where);\n\t\tcinotif_suppr_evenements_sans_abonnement();\t\t\n\t\tcinotif_suppr_abonnes_sans_abonnement();\n\t}\n\n\treturn $return;\n}", "public function unsetUid(): void\n {\n $this->uid = [];\n }", "function projet_sous_traitants_supprimer_callback($form, &$form_state){\r\n if ($form_state['str_nums'] > 1) {\r\n $form_state['str_nums']--;\r\n }\r\n $form_state['rebuild'] = TRUE;\r\n}", "public function removeSe($host)\n {\n unset($this->se[$host]);\n }", "public function removeMutira(){\n $this->validaAutenticacao();\n\n $tweet = Conteiner::getModel('Mutira');\n $tweet->__set('mutira', $_POST['mutira']);\n $tweet->__set('id_usuario', $_SESSION['id']);\n \n\n $tweet->removeMutira();\n\n //header('Location: /timeline');\n\n }", "function disconnect_user() {\n\tunset( $_SESSION['GHOME'] );\n\tunset( $_SESSION['GHOME_CUSER'] );\n}", "public function destroy(Etudiant $etudiant)\n {\n // On ne supprime jamais dans une base de donnée\n }", "public function supprimerAction(Auteur $auteur)\n\t{\n\t\treturn $this->supprimer($auteur);\n\t}", "function removeuserfromteam(){\n $this->auth(COMP_ADM_LEVEL);\n $key_id = $this->uri->segment(3);\n $team_id = $this->uri->segment(4);\n $contest_id = $this->uri->segment(5);\n $this->m_key->removeUserByKeyId($key_id);\n $this->teamedit($team_id);\n }", "function delete(){\n\t\t$sql = \"DELETE FROM `tours` WHERE `id`='\".addslashes($this->id).\"'\";\n\n\t\t$this->connection->send_query($sql);\n\t}", "public static function clearSpecial($cadena){\n\t\t$cadena = htmlentities($cadena);\n\t\t$cadena = preg_replace('/\\&(.)[^;]*;/', '\\\\1', $cadena);\n\t\t$cadena = preg_replace(\"([^A-Za-z0-9_])\",\"\", $cadena);\n\n\t\treturn $cadena;\n\t}", "public function destroy(FamilleProduit $familleProduit)\n {\n //\n }", "function removeSid() {\n\t\t$tbl = 'settings';\n\t\t$cols = $this->getColsByTable($tbl);\n\t\t$sid = $this->findColumn($cols, 'sid');\n\t\t\n\t\tif ( $sid !== false ) {\n\t\t\t$this->db->query(\"ALTER TABLE `\". $this->tablepre . $tbl .\"` DROP COLUMN `sid`\");\n\t\t}\n\t}", "function supprimerArticle($id_produit){\n //Si le panier existe\n if (creating_cart())\n {\n //Nous allons passer par un panier temporaire\n $tmp=array();\n\t $tmp['id_produit'] = array();\n $tmp['nom_produit'] = array();\n $tmp['prix_produit'] = array();\n $tmp['qte_produit'] = array();\n $tmp['desc_produit'] = array();\n\t $tmp['img_produit'] = array();\n\t $tmp['ptsfid_produit'] = array();\n\n\n\n for($i = 0; $i < count($_SESSION['panier']['id_produit']); $i++)\n {\n if ($_SESSION['panier']['id_produit'][$i] !== $id_produit)\n {\n array_push( $tmp['id_produit'],$_SESSION['panier']['id_produit'][$i]);\n array_push( $tmp['nom_produit'],$_SESSION['panier']['nom_produit'][$i]);\n array_push( $tmp['prix_produit'],$_SESSION['panier']['prix_produit'][$i]);\n array_push( $tmp['qte_produit'],$_SESSION['panier']['qte_produit'][$i]);\n array_push( $tmp['desc_produit'],$_SESSION['panier']['desc_produit'][$i]);\n\t\t\tarray_push( $tmp['img_produit'],$_SESSION['panier']['img_produit'][$i]);\n\t\t\tarray_push( $tmp['ptsfid_produit'],$_SESSION['panier']['ptsfid_produit'][$i]);\n\n }\n\n }\n //On remplace le panier en session par notre panier temporaire à jour\n $_SESSION['panier'] = $tmp;\n //On efface notre panier temporaire\n unset($tmp);\n\t \theader(\"Location: panier.php\");\n\t\tdie();\n }\n else\n echo \"Un problème est survenu veuillez contacter l'administrateur du site.\";\n}", "public function Delete($_param)\n {\n // Składnia zapytania.\n $q = \"DELETE FROM `czysty-las-database`.`users` WHERE `users`.`Id` = \".$_param;\n $ins = mysql_query($q); // Wysłanie zapytania.\n }", "public function unemploy(){\n unset($this->staffId);\n unset($this->store);\n $connection = new Connection();\n $link = $connection->connect();\n $link->exec(\"DELETE FROM staff WHERE user_id = '$this->id'\");\n $connection = null;\n }", "function refuserRecette($_idRecette){\n // Supprimer la recette de la table Moderations\n $connexion = my_connect();\n $requette_recettes = \"DELETE FROM Moderations where Idmoderation = $_idRecette\";\n $table_recettes_resultat = mysqli_query($connexion,$requette_recettes); \n if(!$table_recettes_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo \"message de mysqli:\".mysqli_error($connexion); \n echo $requette_recettes;\n }\n // Supression de la recette de la table recette\n supprimerRecette($_idRecette);\n mysqli_close($connexion);\n}", "public function uninstall()\r\n {\r\n Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'clubmembre');\r\n\r\n return parent::uninstall();\r\n }", "function hapus_user($id){\n\t\tmysql_query(\"DELETE FROM users where id ='$id'\");\n\t}", "function elimina_record($id){\n\n $mysqli = connetti();\n\n $sql = \"DELETE FROM spesa WHERE id =\" . $id;\n\n //var_dump($sql); die();\n\n $mysqli->query($sql);\n chiudi_connessione($mysqli);\n}", "function setDelete(){\n\t\t$msg\t= \"===========\\tELIMINADO LA CUENTA \" . $this->mNumeroCuenta . \"\\r\\n\";\n\t\t$cuenta\t= $this->mNumeroCuenta;\n\t\t$socio\t= $this->mSocioTitular;\n\t\t$xQL\t= new MQL();\n\t\t\t//Cuenta\n\t\t\t$SQLDCuenta \t= \"DELETE FROM captacion_cuentas WHERE numero_cuenta = $cuenta AND numero_socio = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDCuenta);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t Eliminando la Cuenta (\" . $x[\"info\"] . \")\\r\\n\";\n\t\t\t}\n\t\t\t//Firma\n\t\t\t/*$SQLDFirma \t= \"DELETE FROM socios_firmas WHERE numero_de_cuenta = $cuenta \";\n\t\t\t$x = my_query($SQLDFirma);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\tEliminando las Firmas (\" . $x[\"info\"] . \")\\r\\n\";\n\t\t\t}*/\n\t\t\t//sdpm\n\t\t\t$SQLD_SDPM \t= \"DELETE FROM captacion_sdpm_historico WHERE cuenta = $cuenta \";\n\t\t\t$x = $xQL->setRawQuery($SQLD_SDPM);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t//Movimientos\n\t\t\t$SQLDOpes\t= \"DELETE FROM operaciones_mvtos WHERE docto_afectado = $cuenta AND socio_afectado = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDOpes);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t$SQLDRecs\t= \"DELETE FROM operaciones_recibos WHERE docto_afectado = $cuenta AND numero_socio = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDRecs);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t//Actualizar el Credito Relacionado\n\t\t\t$SQLDCC\t= \"UPDATE creditos_solicitud\n\t\t\t\t\t\tSET contrato_corriente_relacionado = \" . CTA_GLOBAL_CORRIENTE . \"\n\t\t\t\t\t\tWHERE contrato_corriente_relacionado = $cuenta \";\n\t\t\t$x = $xQL->setRawQuery($SQLDCC);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\tActualizando Creditos Relacionados (\" . $x[\"info\"] . \") \\r\\n\";\n\t\t\t}\n\t\treturn $msg;\n\t}", "static public function ctrBorrarUsuario(){\n\t\tif (isset($_POST['idUsuario'])) {\n\t\t\tif ($_POST['fotoUsuario'] != \"\") {\n\t\t\t\tunlink($_POST[\"fotoUsuario\"]);\n\t\t\t\trmdir('Views/img/usuarios/'.$_POST['usuario']);\n\t\t\t}\n\t\t$answer=adminph\\User::find($_POST['idUsuario']);\n\t\t$answer->delete();\n\t\t}\n\t}", "public function delete_chap($id_chap) {\n\t\tChapsCModel::delete_chap($id_chap);\n\t\treturn redirect()->back()->with('success','Xóa chap thành công');\n\t}" ]
[ "0.64927775", "0.63430005", "0.6254979", "0.6187984", "0.6181398", "0.61012393", "0.6072676", "0.60558987", "0.5995538", "0.599159", "0.5923159", "0.58786565", "0.5829311", "0.5828058", "0.58172363", "0.57914466", "0.57854885", "0.5768103", "0.5740354", "0.5728266", "0.57168114", "0.5709888", "0.5684478", "0.5682927", "0.56817913", "0.5668389", "0.56650966", "0.5647393", "0.5634518", "0.56150085", "0.5601378", "0.5589671", "0.5559107", "0.5555837", "0.55419374", "0.5526307", "0.5506386", "0.55037266", "0.54875994", "0.54865354", "0.5479336", "0.5458791", "0.5458791", "0.5447817", "0.54452807", "0.5430477", "0.5425534", "0.5415134", "0.54100835", "0.5391351", "0.53899634", "0.53821206", "0.5377108", "0.53653276", "0.5360134", "0.53421134", "0.53347", "0.53338027", "0.53214794", "0.5310157", "0.5306032", "0.5306032", "0.5305731", "0.53013605", "0.5300748", "0.52838814", "0.52536315", "0.5252963", "0.52528083", "0.52487653", "0.5246212", "0.5227177", "0.5223172", "0.5202992", "0.5195307", "0.51935655", "0.5181372", "0.5172791", "0.5170676", "0.5168295", "0.5167474", "0.51643676", "0.51600796", "0.5144931", "0.51443315", "0.51375186", "0.5137492", "0.51331455", "0.5128961", "0.51261413", "0.5121984", "0.51205635", "0.51156783", "0.5108327", "0.5107939", "0.50882775", "0.5087906", "0.50765413", "0.5075802", "0.50720084" ]
0.6899274
0
Fonction permettant de renvoyer la liste des enregistrements a partir de la cle du parent
function getListFromParent($parentId, $order = "") { if ($parentId > 0 && !empty($this->parentAttrib)) { $sql = "select * from " . $this->table; /* * Preparation du where */ if (strlen(preg_replace("#[^A-Z]+#", "", $this->parentAttrib)) > 0) { $cle = $this->quoteIdentifier . $this->parentAttrib . $this->quoteIdentifier; } else { $cle = $this->parentAttrib; } $sql .= " where " . $cle . " = :parentId"; $data["parentId"] = $parentId; if (strlen($order) > 0) { $sql .= " order by :order"; $data["order"] = $order; } return $this->getListeParamAsPrepared($sql, $data); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _onAdd($parent) {\r\n\t\t/* Intentionally empty */\r\n\t}", "private function cacheGetRestoreRelations(fapitng_FormBase $parent) {\n foreach ($parent->children as $element) {\n $element->form = $this;\n $element->form = $parent;\n $this->cacheGetRestoreRelations($element);\n }\n }", "public function enfantsAction()\n {\n $parent = $this->getUser();\n $form = $this->createForm(EnfantsParentType::class,$parent);\n\n $request = $this->getRequest();\n if ($request->isMethod(\"POST\"))\n {\n $form->handleRequest($request);\n if ($form->isValid()) {\n $this->getDoctrine()->getEntityManager()->flush();\n $this->get('session')->getFlashBag()->add('success', 'Les modifications ont bien été enregistrées.');\n return $this->redirect($this->generateUrl('reglages_enfants_parent'));\n }\n }\n return array(\n 'parent' => $parent,\n 'form' => $form->createView()\n );\n }", "function getListe() {\n\t\t$parents = $this->getParents();\n\t\t$keys_parents = array_keys($parents);\n\t\t\n\t\tforeach ($keys_parents as $key) {\n\t\t\tif (strpos($key, 'lis') !== false) {\n\t\t\t\treturn $parents[$key];\n\t\t\t}\n\t\t}\n\t\tdie(\"Aucune Liste n'a été trouvée pour ce pseudo/email/ip !\");\n\t}", "protected function registerElementsToBeDeleted() {}", "function GetObjectList($parent) {\r\n $ids = IPS_GetChildrenIDs($parent);\r\n foreach($ids as $id)\r\n {\r\n $ids = array_merge($ids, GetObjectList($id));\r\n }\r\n return $ids;\r\n}", "public function updateExtList() {}", "function remove_from_parent()\n {\n foreach ($this->plugins as $name => $obj) {\n $this->updateServicesVars($name);\n if ($this->plugins[$name]->initially_was_account) {\n if (isset($this->plugins[$name]->krb_host_key) && $this->plugins[$name]->krb_host_key instanceof krbHostKeys) {\n $this->plugins[$name]->krb_host_key->remove_from_parent_by_prefix($this->plugins[$name]->krb_service_prefix);\n }\n $this->plugins[$name]->remove_from_parent();\n }\n }\n }", "function rec_empresa_list(){\n\t\t}", "function enregistrerMembreJuryEpreuve(){\n $this->vue->titre='';\n $this->informations();\n $tableMembresJuryEpreuve=new Zoraux_Modeles_MembreJuryEpreuve();\n $tableMembresJuryEpreuve->supprimerMembreJuryEpreuve($_POST['epreuve_id']);\n foreach($_POST['professeur_id'] as $membreJury_id){\n $membreJuryEpreuve=$tableMembresJuryEpreuve->newMembreJuryEpreuve();\n $membreJuryEpreuve->epreuve_id=$_POST['epreuve_id'];\n $membreJuryEpreuve->membreJury_id=$membreJury_id;\n $membreJuryEpreuve->enregistrer();\n }\n foreach($_POST['professionnel_id'] as $membreJury_id){\n $membreJuryEpreuve=$tableMembresJuryEpreuve->newMembreJuryEpreuve();\n $membreJuryEpreuve->epreuve_id=$_POST['epreuve_id'];\n $membreJuryEpreuve->membreJury_id=$membreJury_id;\n $membreJuryEpreuve->enregistrer();\n }\n }", "function retourneListeAdministrateurs(){\n\tglobal $connexion; // on définie la variables globale de connection dans la fonction\n\t\n\t$utilisateurs = array();\n\t$requete = $connexion->query(\"SELECT * FROM utilisateur WHERE type='1' OR type='2'\");\n\t$requete->setFetchMode(PDO::FETCH_OBJ);\n\twhile($enregistrement = $requete->fetch()){\n\t\t$utilisateurs[] = $enregistrement; // on ajoute à $utilisateurs[n+1] un objet utilisateur\n\t}\n\treturn $utilisateurs;\n}", "function remove_from_parent()\n {\n /* Cancel if there's nothing to do here */\n if (!$this->initially_was_account){\n return;\n }\n \n /* include global link_info */\n $ldap= $this->config->get_ldap_link();\n\n /* Remove and write to LDAP */\n plugin::remove_from_parent();\n\n /* Zero arrays */\n $this->attrs['scalixEmailAddress']= array();\n\n /* Unset fake boolean attributes from entry */\n foreach ($this->fakeBooleanAttributes as $val){\n $this->attrs[\"$val\"]= array();\n }\n\n /*unset scalixScalixObject*/\n $this->attrs['scalixScalixObject']=array();\n\n @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,$this->attributes, \"Save\");\n $ldap->cd($this->dn);\n $ldap->modify($this->attrs);\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));\n }\n\n /* Optionally execute a command after we're done */\n $this->handle_post_events(\"remove\");\n }", "public static function _register()\n {\n self::assignElements([], parent::NAME);\n self::assignAttributes([]);\n }", "public static function _register()\n {\n self::assignElements([], parent::NAME);\n self::assignAttributes([]);\n }", "public static function _register()\n {\n self::assignElements([], parent::NAME);\n self::assignAttributes([]);\n }", "public static function _register()\n {\n self::assignElements([], parent::NAME);\n self::assignAttributes([]);\n }", "public static function _register()\n {\n self::assignElements([], parent::NAME);\n self::assignAttributes([]);\n }", "public static function _register()\n {\n self::assignElements([], parent::NAME);\n self::assignAttributes([]);\n }", "public static function _register()\n {\n self::assignElements([], parent::NAME);\n self::assignAttributes([]);\n }", "public static function _register()\n {\n self::assignElements([], parent::NAME);\n self::assignAttributes([]);\n }", "public static function _register()\n {\n self::assignElements([], parent::NAME);\n self::assignAttributes([]);\n }", "public static function _register()\n {\n self::assignElements([], parent::NAME);\n self::assignAttributes([]);\n }", "public static function _register()\n {\n self::assignElements([], parent::NAME);\n self::assignAttributes([]);\n }", "public static function _register()\n {\n self::assignElements([], parent::NAME);\n self::assignAttributes([]);\n }", "public function afficherAll()\n {\n }", "public function getParents() {}", "public function parentList()\n {\n return output($this->UserDetails->where([\"roleId\"=>$this->getUserRoleId('parent')])->read(),'success','SM001','',\"\");\n }", "public function afterFind()\n\t{\n\t\t// {\n\t\t\t// $this->subsidy_expiration = null;\n\t\t// }\n\t\t\n\t\t$this->subsidyLevelArray = $this->getSubsidyLevelArray();\n\t\t\n\t\t$this->reference_subsidy_id_reference_id = $this->reference_subsidy_id.'-'.$this->reference_subsidy_type;\n\t\t\n\t\treturn parent::afterFind();\n\t}", "public function findAllByParent($parent)\n {\n }", "private function getChildrenIds(){\n if ($this->myChildrenType===null) $this->myChildrenIds = null;\n else $this->myChildrenIds = $this->_db->getChildrenIds($this->myId);\n }", "public function save() {\n foreach($this->getMenuItems() as $item){\n $item->setMenu($this);\n $item->save();\n }\n parent::save();\n }", "public function providerParents()\n {\n \treturn array(\n \t\tarray('Util_Model_Abstract'),\n\t \tarray('Zend_Cache'),\n\t \tarray('Util_Model_Interface')\n \t);\n }", "function getChildren() {\n foreach ( $this->parents as $parent ) {\n $this->children[$parent->name()]=array();\n foreach ( $this->items as $item ) {\n if ( $item->parent_id() == $parent->id() ) {\n $this->children[$parent->name()][]=$item;\n }\n }\n }\n }", "public function itemList() {\n $entityId = $this->request->data['entity_id'];\n $instituteId = $this->request->data['institute_id'];\n $courseId = $this->request->data['course_id'];\n $batchId = $this->request->data['batch_id'];\n\n $this->TraineeInfo->recursive = 0;\n $conditions = array('TraineeInfo.entity_id' => $entityId,\n 'TraineeInfo.training_institute_id' => $instituteId,\n 'TraineeInfo.course_info_id' => $courseId,\n 'TraineeInfo.batch_info_id' => $batchId,\n 'TraineeInfo.enrollment_status' => 0);\n $this->set('traineeRegistereds', $this->Paginator->paginate(null, $conditions));\n }", "public function getListeAdministrateurs() {\n\t\n\t\t$this->log->debug(\"Usager::getListeAdministrateurs() Début \");\n\t\t$trouve = false;\n\t\t$listeUsagers = array();\n\t\n\t\ttry {\n\t\t\t$sql = \"SELECT \" . $this->listeChamps . \" from tusager where role = ?\";\n\t\t\t$sth = $this->dbh->prepare($sql);\n\t\t\t$rows = $sth->execute(array(Usager::ROLE_ADMINISTRATEUR));\n\t\n\t\t\t// Vérifier qu'on a trouvé au moins un usager\n\t\t\tif ($sth->rowCount() == 0) {\n\t\t\t\t$this->log->info(\"Aucun utilisateur à approuver\");\n\t\t\t} else {\n\t\t\t\t// Récupérer les informations pour l'usager\n\t\t\t\t$result = $sth->fetchAll();\n\t\t\t\t\t\n\t\t\t\tforeach($result as $row) {\n\t\n\t\t\t\t\t$u = new Usager($this->log, $this->dbh);\n\t\t\t\t\t$cles = array_keys($row);\n\t\n\t\t\t\t\tforeach ($cles as $cle) {\n\t\n\t\t\t\t\t\t// Obtenir chaque champ\n\t\t\t\t\t\tif (! is_numeric($cle) ) {\n\t\t\t\t\t\t\t$u->donnees[$cle] = $row[$cle];\n\t\t\t\t\t\t\t//echo \"[Récupérer de la bd] Cle : '$cle' Valeur = '\" . $row[$cle] . \"'\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t// Ajouter à la liste\n\t\t\t\t\tarray_push($listeUsagers, $u);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\tErreur::erreurFatal('018', \"Usager::getListeAdministrateurs() - Erreur technique détectée : '\" . $e->getMessage() . $e->getTraceAsString() . \"'\", $this->log);\n\t\t}\n\t\n\t\t// Terminé\n\t\t$this->log->debug(\"Usager::getListeAdministrateurs() Fin\");\n\t\treturn $listeUsagers;\n\t}", "function appendChildren () {\n $this->menu[]=new Marker('start');\n foreach ( $this->items as $item ) {\n if ( $item->parent_id() == $this->current->id() ) {\n $this->menu[]=$item;\n }\n }\n $check=end($this->menu);\n if ( $check->isStart() )\n array_pop($this->menu);\n else\n $this->menu[]=new Marker('end');\n }", "public static function menu(){\n $sql = \"select * from pageweb where id_parent = 1 AND menu = 1 ORDER BY ordre\";\n $parents = DB::get_sql_tab($sql);\n for($i=0;$i<count($parents);$i++) {\n $sql2 = \"select * from pageweb where id_parent = '\".$parents[$i][\"id\"].\"'AND menu = 1\";\n $enfants = DB::get_sql_tab($sql2);\n $parents[$i][\"enfants\"] = $enfants;\n }\n return $parents;\n }", "function add_children(){\n\t\t\t\t\t//if the array has a parent add it to the parents child array\n\t\tforeach ($this->nodes as $node){\n\t\t\tif($node->parent!=-1){\n\t\t\t\tif(isset($this->nodes[$node->parent])){\n\t\t\t\t\t$parent=$this->nodes[$node->parent];\n\t\t\t\t\t$parent->add_child($node->id);\n\t\t\t\t}else{\n\t\t\t\t\tprint_error('nonode','socialwiki');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function &getSubModules()\n{\n if(count($this->SubModules) == 0){\n $this->loadSubModules();\n }\n return $this->SubModules;\n}", "function procMenuAdminAllActList()\n\t{\n\t\t$oModuleModel = getModel('module');\n\t\t$installed_module_list = $oModuleModel->getModulesXmlInfo();\n\t\tif(is_array($installed_module_list))\n\t\t{\n\t\t\t$currentLang = Context::getLangType();\n\t\t\t$menuList = array();\n\t\t\tforeach($installed_module_list AS $key=>$value)\n\t\t\t{\n\t\t\t\t$info = $oModuleModel->getModuleActionXml($value->module);\n\t\t\t\tif($info->menu) $menuList[$value->module] = $info->menu;\n\t\t\t\tunset($info->menu);\n\t\t\t}\n\t\t}\n\t\t$this->add('menuList', $menuList);\n\t}", "function prepareData(){\n $this->ref = array();\n foreach($this->getIterator() as $junk=>$item){\n // current values\n $id = $item[$this->id_field];\n \n // save item\n $this->items[$id] = $item;\n \n // save relation\n if(isset($item[$this->parent_id_field])) {\n $this->ref[$item[$this->parent_id_field]][] = $id;\n } else {\n $this->ref[undefined][] = $id;\n }\n }\n }", "public function get_parents(){\n\t\treturn $this->master->parent_list_construct();\n\t}", "function unserializeChildren()\r\n {\r\n reset($this->components->items);\r\n while (list($k,$v)=each($this->components->items))\r\n {\r\n $v->unserialize();\r\n }\r\n }", "public function register()\n {\n return [T_PARENT];\n }", "function retourneListeUtilisateur(){\n\tglobal $connexion; // on définie la variables globale de connection dans la fonction\n\t\n\t$utilisateurs = array();\n\t$requete = $connexion->query(\"SELECT * FROM utilisateur\");\n\t$requete->setFetchMode(PDO::FETCH_OBJ);\n\twhile($enregistrement = $requete->fetch()){\n\t\t$utilisateurs[] = $enregistrement; // on ajoute à $utilisateurs[n+1] un objet utilisateur\n\t}\n\treturn $utilisateurs;\n}", "protected function afterAdd() {\n\t}", "public function afterDelete()\n {\n foreach (static::find()->where(['parent_id' => $this->id])->all() as $item) {\n $item->delete();\n }\n }", "public function afterSave() {\n parent::afterSave();\n // remove old athletes\n $this->compileAthletesToNotify();\n foreach ($this->athletes as $athlete) {\n if (!in_array($athlete->primaryKey, $this->formAthletes)) {\n $this->removeAthlete($athlete);\n }\n }\n // add new athletes\n if (!is_array($this->formAthletes)) {\n $this->formAthletes = array($this->formAthletes);\n }\n foreach ($this->formAthletes as $formAthleteID) {\n $formAthlete = User::model()->findByPk($formAthleteID);\n if (!in_array($formAthlete, $this->athletes)) {\n $this->addAthlete($formAthlete);\n }\n }\n $this->notifyRemainingAthletes();\n $this->notifyClubAdmin();\n $this->refresh();\n }", "public function liste__() {\n\n // lecture des informations\n $this->db->select(\"rgl_id,rgl_reference,rgl_date,rgl_montant,rgl_type,vtr_type,rgl_cheque,rgl_banque,rgl_client,ctc_nom\",false);\n $this->db->join('v_types_reglements','vtr_id=rgl_type','left');\n $this->db->join('t_contacts','ctc_id=rgl_client','left');\n $this->db->where('rgl_inactif is null');\n $this->db->order_by(\"rgl_date desc\");\n $this->db->order_by(\"rgl_id desc\");\n $query = $this->db->get_compiled_select('t_reglements');\n //log_message('DEBUG', 'M_reglements '.$query);\n $q = $this->db->query($query);\n if ($q->num_rows() > 0) {\n $result = $q->result();\n foreach($result as $r) {\n $query = $this->db->where('ipu_reglement',$r->rgl_id)\n ->where('ipu_inactif is null')\n ->select('ipu_facture,fac_reference,ipu_avoir,avr_reference')\n ->join('t_factures','fac_id=ipu_facture','left')\n ->join('t_avoirs','avr_id=ipu_avoir','left')\n ->get_compiled_select('t_imputations');\n //log_message('DEBUG', 'M_reglements '.$query);\n $q = $this->db->query($query);\n $pieces = '';\n $sep = '';\n foreach ($q->result() as $p) {\n $pieces .= $sep;\n if ($p->fac_reference != '') {\n $pieces .= anchor_popup('factures/detail2/'.$p->ipu_facture,$p->fac_reference);\n }\n else if ($p->avr_reference != '') {\n $pieces .= anchor_popup('avoirs/detail2/'.$p->ipu_avoir,$p->avr_reference);\n }\n $sep = '<br />';\n }\n $r->pieces = $pieces;\n if ( $pieces!='' )\n log_message('DEBUG', 'M_reglements ipu_reglement:'.$r->rgl_id.' pieces:'.$pieces);\n }\n return $result;\n }\n else {\n return array();\n }\n }", "public function getList()\n {\n return parent::getList();\n }", "public function liste() {\n // Charger la vue liste compteur\n $this->loadView('liste', 'content');\n // Lire les compteurs à partir de la bd et formater\n //$reglements = $this->em->selectAll('reglement');\n //$reglements = $this->em->getRefined($reglements);\n $liste = $this->em->selectAll('facture');\n $html = '';\n foreach ($liste as $key => $entity) {\n $state = 'impayée';\n if ($entity->getPaye()) {\n $state = 'payée';\n }\n $consommation = $this->em->selectById('consommation', $entity->getId());\n $compteur = $this->em->selectById('compteur', $consommation->getIdCompteur());\n $html .= '<tr>';\n $html .= '<td>' . $entity->getId() . '</td>';\n $html .= '<td><a href=\"reglements/facture/' . $entity->getNumero() . '\">' . $entity->getNumero() . '</a></td>';\n $html .= '<td>' . $compteur->getNumero() . '</td>';\n $html .= '<td>' . $consommation->getQuantiteChiffre() . ' litres</td>';\n $html .= '<td>' . $entity->getMontant() . ' FCFA</td>';\n $html .= '<td>' . $state . '</td>';\n $html .= '</tr>';\n }\n // Ajouter les compteurs à la vue\n $this->loadHtml($html, 'list');\n }", "function serializeChildren()\r\n {\r\n //Calls children's serialize recursively\r\n reset($this->components->items);\r\n while (list($k,$v)=each($this->components->items))\r\n {\r\n $v->serialize();\r\n }\r\n }", "public function getList() {\n\t\treturn parent::get();\n\t}", "protected function childEntities()\n {\n return null;\n }", "public function reloadItems();", "public function addAction(){\n\t\t$this->assign('roots', $this->roots);\n\t\t$this->assign('parents', $this->parents);\n\t}", "private function parent_list_construct($item=array()){#\n\t\tif (!is_a($this->master,\"elem\")){\n\t\t\treturn $item;\n\t\t}\n\t\tarray_push($item,$this->master);\n\t\treturn $this->master->parent_list_construct($item);\n\t}", "private final function addResponseUsergroups($parent)\n {\n $groups = $this->snowman->getLoginUser()->getCUser()->getGroups();\n $parent->groups = array();\n foreach ($groups as $group) {\n $parent->groups[] = $group;\n }\n }", "public static function _register()\n {\n self::assignElements([\n 'CategorySiteID' => [],\n 'CategoryParent' => ['cardinality' => '0..*'],\n 'LevelLimit' => ['type' => 'int'],\n 'ViewAllNodes' => ['type' => 'bool']\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "function shiftList() {\n\t\t$rest = array_splice($this->galleysToUpdate, \\dfm\\processor::maxUpdatesAtOnce);\n\t\t$ids = array_map(function($item) {\n\t\t\treturn $item->galley->getId();\n\t\t}, $rest);\n\t\t$this->continue = array(\n\t\t\t'galleyIds' => $ids,\n\t\t\t'updateFrontpages' => $this->updateFrontpages\n\t\t);\n\t}", "public function parentOf($parent){\n\t\t/*$parents = func_get_args();\n\t\tforeach($parents as $parent){\n\t\t\tif(!in_array($parent, $this->_parentOf)){\n\t\t\t\t$this->_parentOf[] = $parent;\n\t\t\t}\n\t\t}*/\n\t}", "function clsRecordGenList($RelativePath, & $Parent)\n {\n\n global $FileName;\n global $CCSLocales;\n global $DefaultDateFormat;\n $this->Visible = true;\n $this->Parent = & $Parent;\n $this->RelativePath = $RelativePath;\n $this->Errors = new clsErrors();\n $this->ErrorBlock = \"Record GenList/Error\";\n $this->DataSource = new clsGenListDataSource($this);\n $this->ds = & $this->DataSource;\n $this->InsertAllowed = true;\n if($this->Visible)\n {\n $this->ComponentName = \"GenList\";\n $this->Attributes = new clsAttributes($this->ComponentName . \":\");\n $CCSForm = explode(\":\", CCGetFromGet(\"ccsForm\", \"\"), 2);\n if(sizeof($CCSForm) == 1)\n $CCSForm[1] = \"\";\n list($FormName, $FormMethod) = $CCSForm;\n $this->EditMode = ($FormMethod == \"Edit\");\n $this->FormEnctype = \"application/x-www-form-urlencoded\";\n $this->FormSubmitted = ($FormName == $this->ComponentName);\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\n $this->Button_Generar = new clsButton(\"Button_Generar\", $Method, $this);\n $this->MesGenCorte = new clsControl(ccsListBox, \"MesGenCorte\", \"Mes Reporte\", ccsInteger, \"\", CCGetRequestParam(\"MesGenCorte\", $Method, NULL), $this);\n $this->MesGenCorte->DSType = dsTable;\n $this->MesGenCorte->DataSource = new clsDBcnDisenio();\n $this->MesGenCorte->ds = & $this->MesGenCorte->DataSource;\n $this->MesGenCorte->DataSource->SQL = \"SELECT * \\n\" .\n\"FROM mc_c_mes {SQL_Where} {SQL_OrderBy}\";\n list($this->MesGenCorte->BoundColumn, $this->MesGenCorte->TextColumn, $this->MesGenCorte->DBFormat) = array(\"IdMes\", \"Mes\", \"\");\n $this->AnioGenCorte = new clsControl(ccsListBox, \"AnioGenCorte\", \"Anioreporte\", ccsInteger, \"\", CCGetRequestParam(\"AnioGenCorte\", $Method, NULL), $this);\n $this->AnioGenCorte->DSType = dsTable;\n $this->AnioGenCorte->DataSource = new clsDBcnDisenio();\n $this->AnioGenCorte->ds = & $this->AnioGenCorte->DataSource;\n $this->AnioGenCorte->DataSource->SQL = \"SELECT * \\n\" .\n\"FROM mc_c_anio {SQL_Where} {SQL_OrderBy}\";\n list($this->AnioGenCorte->BoundColumn, $this->AnioGenCorte->TextColumn, $this->AnioGenCorte->DBFormat) = array(\"Ano\", \"Ano\", \"\");\n $this->AnioGenCorte->DataSource->Parameters[\"expr84\"] = 2013;\n $this->AnioGenCorte->DataSource->wp = new clsSQLParameters();\n $this->AnioGenCorte->DataSource->wp->AddParameter(\"1\", \"expr84\", ccsInteger, \"\", \"\", $this->AnioGenCorte->DataSource->Parameters[\"expr84\"], \"\", false);\n $this->AnioGenCorte->DataSource->wp->Criterion[1] = $this->AnioGenCorte->DataSource->wp->Operation(opGreaterThan, \"[Ano]\", $this->AnioGenCorte->DataSource->wp->GetDBValue(\"1\"), $this->AnioGenCorte->DataSource->ToSQL($this->AnioGenCorte->DataSource->wp->GetDBValue(\"1\"), ccsInteger),false);\n $this->AnioGenCorte->DataSource->Where = \n $this->AnioGenCorte->DataSource->wp->Criterion[1];\n $this->Genproveedor = new clsControl(ccsListBox, \"Genproveedor\", \"Genproveedor\", ccsText, \"\", CCGetRequestParam(\"Genproveedor\", $Method, NULL), $this);\n $this->Genproveedor->DSType = dsTable;\n $this->Genproveedor->DataSource = new clsDBcnDisenio();\n $this->Genproveedor->ds = & $this->Genproveedor->DataSource;\n $this->Genproveedor->DataSource->SQL = \"SELECT id_proveedor, nombre \\n\" .\n\"FROM mc_c_proveedor {SQL_Where} {SQL_OrderBy}\";\n list($this->Genproveedor->BoundColumn, $this->Genproveedor->TextColumn, $this->Genproveedor->DBFormat) = array(\"id_proveedor\", \"nombre\", \"\");\n if(!$this->FormSubmitted) {\n if(!is_array($this->MesGenCorte->Value) && !strlen($this->MesGenCorte->Value) && $this->MesGenCorte->Value !== false)\n $this->MesGenCorte->SetText(date('m'));\n if(!is_array($this->AnioGenCorte->Value) && !strlen($this->AnioGenCorte->Value) && $this->AnioGenCorte->Value !== false)\n $this->AnioGenCorte->SetText(2015);\n }\n }\n }", "public function children (){\n\t\treturn array();\n\t}", "protected function addTreePathOwnerToParents(): void\n {\n foreach ($this->getTreePathParents() as $treePath) {\n $this->saveTreePathModel(\n $treePath->parent_id,\n $this->owner->id,\n $this->owner->getAttribute($this->ownerParentIdAttribute),\n $treePath->parent_level,\n $treePath->child_level + 1\n );\n }\n }", "public function afterInsert(): void\n {\n if ($this->owner->getAttribute($this->ownerParentIdAttribute)) {\n $this->addTreePathOwnerToParents();\n }\n $this->addTreePathOwnerToOwner();\n }", "function PListaGrupo() {\n\t\t$this->listas\t= array();\n\t}", "public function providerParents()\n {\n \treturn array(\n \t\tarray('Util_Db_Abstract'),\n\t \tarray('Util_Db_Interface')\n \t);\n }", "public function suprAffectation()\n {\n //sécurité :\n $action = 'deleteFolderInformation';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n //on réccupère l'id à supr (clée primaire)\n $id = $this->request->getGetAttribute('id');\n //ajout d'une entrée dans le fichier de log\n $data = DossierManager::getAffectationByClef($id);\n $auth = AuthenticationManager::getInstance();\n $username = $auth->getMatricule();\n $type = 'affectationCaserne';\n self::logDeletedInformation($data, $username, $type);\n //on supprime (retourne le matricule)\n $matricule = DossierManager::suprAffectationById($id);\n //on réaffiche le dossier actualisé\n $dossier = DossierManager::getOneFromId($matricule);\n $prez = self::afficheDossierComplet($dossier);\n $this->response->setPart('contenu', $prez);\n } else{\n header(\"location: index.php\");\n die($error);\n }\n }", "protected function ancestorsBeforeSave()\r\n {\r\n if (empty($this->type)) {\r\n $this->type = $this->__type;\r\n }\r\n \r\n if (empty($this->parent) || $this->parent == \"null\")\r\n {\r\n $this->parent = null;\r\n } else {\r\n $this->parent = new \\MongoId((string) $this->parent);\r\n }\r\n \r\n $this->path = $this->ancestorsGeneratePath( $this->slug, $this->parent );\r\n \r\n if (empty($this->ancestors) && !empty($this->parent))\r\n {\r\n $parent_title = null;\r\n $parent_slug = null;\r\n $parent_path = null;\r\n $parent_ancestors = array();\r\n \r\n $parent = (new static)->setState('filter.id', $this->parent)->getItem();\r\n if (!empty($parent->title))\r\n {\r\n $parent_title = $parent->title;\r\n }\r\n if (!empty($parent->slug))\r\n {\r\n $parent_slug = $parent->slug;\r\n }\r\n if (!empty($parent->path))\r\n {\r\n $parent_path = $parent->path;\r\n }\r\n if (!empty($parent->ancestors))\r\n {\r\n $parent_ancestors = $parent->ancestors;\r\n }\r\n \r\n $this->ancestors = $parent_ancestors;\r\n $this->ancestors[] = array(\r\n 'id' => $this->parent,\r\n 'slug' => $parent_slug,\r\n 'title' => $parent_title\r\n );\r\n }\r\n \r\n if (empty($this->parent) || $this->parent == \"null\")\r\n {\r\n $this->ancestors = array();\r\n }\r\n \r\n return parent::beforeSave();\r\n }", "public function afterUpdate(): void\n {\n if ($this->oldParentId != $this->owner->getAttribute($this->ownerParentIdAttribute)) {\n $this->rebuildTreePath();\n }\n }", "private function liste() {\n\t\t$this->_ctrlLivre = new ControleurLivre();\n\n\t\t// modifie livre\n\t\tif(isset($_SESSION['error_livre_modifie'])) unset($_SESSION['error_livre_modifie']);\n\t\tif(isset($_POST['modifie_livre'])){\n\t\t\t\t$id = Utils::getPost('id_livre_m');\n\t\t\t\t$titre = Utils::getPost('nom_livre_m');\n\t\t\t\t$annee = Utils::getPost('annee_livre_m');\n\t\t\t\t$auteur = Utils::getPost('auteur_livre_m');\n\t\t\t\t$resume = Utils::getPost('resume_livre_m');\n\t\t\t\tif ($id && $titre && $annee && $auteur && $resume) {\n\t\t\t\t\t$id = Utils::filtreForte($id);\n\t\t\t\t\t$annee = Utils::filtreForte($annee);\n\t\t\t\t\t$annee = intval($annee);\n\t\t\t\t\t$titre = Utils::filtreForte($titre);\n\t\t\t\t\t$auteur = Utils::filtreForte($auteur);\n\t\t\t\t\t$resume = Utils::filtreForte($resume);\n\t\t\t\t\t\tif (strlen($annee) > 2 && strlen($titre) > 2 && strlen($resume) > 2) {\n\t\t\t\t\t\t\t$this->_ctrlLivre->modifieLivre($id, $annee, $titre, $auteur, $resume);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_livre_modifie'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=mlivre&id=\".$id);\n\t\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t\t}\n\t\t\t}\n\n\t\t// cree livre\n\t\tif(isset($_SESSION['error_livre_cree'])) unset($_SESSION['error_livre_cree']);\n\t\tif(isset($_POST['cree_livre'])){\n\t\t\t\t$titre = Utils::getPost('nom_livre');\n\t\t\t\t$annee = Utils::getPost('annee_livre');\n\t\t\t\t$auteur = Utils::getPost('auteur_livre');\n\t\t\t\t$resume = Utils::getPost('resume_livre');\n\t\t\t\tif ($titre && $annee && $auteur && $resume) {\n\t\t\t\t\t$annee = Utils::filtreForte($annee);\n\t\t\t\t\t$annee = intval($annee);\n\t\t\t\t\t$titre = Utils::filtreForte($titre);\n\t\t\t\t\t$auteur = Utils::filtreForte($auteur);\n\t\t\t\t\t$resume = Utils::filtreForte($resume);\n\t\t\t\t\t\tif (strlen($annee) > 2 && strlen($titre) > 2 && strlen($resume) > 2) {\n\t\t\t\t\t\t\t$this->_ctrlLivre->creeLivre($annee, $titre, $auteur, $resume);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_livre_cree'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=ajoutuser\");\n\t\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t$filtreArray = ['titre', 'annee', 'nom_auteur'];\n\t\t$ordreArray = ['ASC', 'DESC'];\n\t\t\tif(Utils::getGet('filtre')&& Utils::getGet('ordre')) {\n\t\t\t\t\t\t\t$filtre = Utils::getGet('filtre');\n\t\t\t\t\t\t\t$ordre = Utils::getGet('ordre');\n\t\t\t\t\t\t\tif (!$filtre || !in_array($filtre, $filtreArray)) { \n\t\t\t\t\t\t\t\tthrow new Exception('Tri invalide !!!'); }\n\t\t\t\t\t\t\t\telseif (!$ordre || !in_array($ordre, $ordreArray)) { \n\t\t\t\t\t\t\t\t\tthrow new Exception('Ordre invalide !!!'); } \n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t$this->_ctrlLivre->livreListe($filtre,$ordre); \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { $this->_ctrlLivre->livreListe(); }\n\t}", "public function getParents();", "function Forms_arbre_inserer_donnee($id_form,$id_parent,$position=\"fils_cadet\",$c=NULL){\n\tif (!$id_parent>0){\n\t\tif ($res = spip_query(\"SELECT id_donnee FROM spip_forms_donnees WHERE id_form=\"._q($id_form).\" AND statut!='poubelle' LIMIT 0,1\")\n\t\t AND spip_num_rows($res)==0){\n\t\t // pas d'elements existants, c'est la racine, on l'insere toujours\n\t\t\tif ($position=='fils_aine' OR $position=='fils_cadet'){\n\t\t\t\tspip_log(\"Insertion impossible dans un arbre pour un fils sans pere dans table $id_form\");\n\t\t\t\treturn array(0,_L(\"Insertion impossible dans un arbre pour un fils sans pere dans table $id_form\"));\n\t\t\t}\n\t\t\t// premiere insertion\n\t\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>0,'bgch'=>1,'bdte'=>2));\n\t\t}\n\t\telse {\n\t\t\t// Insertion d'un collateral : il faut preciser le 'parent' !\n\t\t\tspip_log(\"Insertion impossible dans un arbre pour un collatéral sans precision du parent dans table $id_form\");\n\t\t\treturn array(0,_L(\"Insertion impossible dans un arbre pour un collatéral sans precision du parent dans table $id_form\"));\n\t\t}\n\t}\n\t// Le parent existe toujours ?\n\t$res = spip_query(\"SELECT * FROM spip_forms_donnees WHERE id_form=\"._q($id_form).\" AND id_donnee=\"._q($id_parent).\" AND statut!='poubelle'\");\n\tif (!($rowp = spip_fetch_array($res))){\n\t\tspip_log(\"Insertion impossible, le parent $id_parent n'existe plus dans table $id_form\");\n\t\treturn array(0,_L(\"Insertion impossible, le parent $id_parent n'existe plus dans table $id_form\"));\n\t}\n\t\n\t// insertion d'un pere\n\tif ($position == 'pere'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>\"._q($rowp['bdte']).\" AND bgch<=\"._q($rowp['bdte']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+2,bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bgch>\"._q($rowp['bdte']))\n\t\t\t// Decalalage ensemble vise vers le bas\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+1,bdte=bdte+1,niveau=niveau+1 WHERE id_form=\"._q($id_form).\" AND bgch>=\"._q($rowp['bgch']).\" AND bdte<=\"._q($rowp['bdte']))\n\t\t)\n\t\t\t// Insertion du nouveau pere\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau'],'bgch'=>$rowp['bgch'],'bdte'=>$rowp['bdte']+2));\n\t}\n\t// Insertion d'un grand frere\n\telseif ($position == 'grand_frere'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>\"._q($rowp['bgch']).\" AND bgch<\"._q($rowp['bgch']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET id_form=\"._q($id_form).\" AND bgch=bgch+2,bdte=bdte+2 WHERE bgch>=\"._q($rowp['bgch']))\n\t\t )\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau'],'bgch'=>$rowp['bgch'],'bdte'=>$rowp['bgch']+1));\n\t}\n\t// Insertion d'un petit frere\n\telseif ($position == 'petit_frere'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>\"._q($rowp['bdte']).\" AND bgch<\"._q($rowp['bdte']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+2,bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bgch>=\"._q($rowp['bdte']))\n\t\t )\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau'],'bgch'=>$rowp['bdte']+1,'bdte'=>$rowp['bdte']+2));\n\t}\n\t// Insertion d'un fils aine\n\telseif ($position == 'fils_aine'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>\"._q($rowp['bgch']).\" AND bgch<=\"._q($rowp['bgch']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+2,bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bgch>\"._q($rowp['bgch']))\n\t\t )\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau']+1,'bgch'=>$rowp['bgch']+1,'bdte'=>$rowp['bgch']+2));\n\t}\n\t// Insertion d'un fils aine\n\telseif ($position == 'fils_cadet'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>=\"._q($rowp['bdte']).\" AND bgch<=\"._q($rowp['bdte']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+2,bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bgch>\"._q($rowp['bdte']))\n\t\t )\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau']+1,'bgch'=>$rowp['bdte'],'bdte'=>$rowp['bdte']+1));\n\t}\n\tspip_log(\"Operation inconnue insertion en position $position dans table $id_form\");\n\treturn array(0,_L(\"Operation inconnue insertion en position $position dans table $id_form\"));\n}", "public function populateParentFromSortedByParentIdList() {\n for ($i = 0; $i < sizeof($this->nodeList); $i++) {\n $node = $this->nodeList[$i];\n// echo \"<br>Text: \".$node->getText();\n $this->insertNode($node);\n }\n }", "public function afterHook()\n\t{\n\t\t$session = JFactory::getSession();\n\n\t\t$arrMenuSwapped = $session->get('arrMenuSwapped', null, 'jtransport');\n\n\t\tforeach ($arrMenuSwapped as $item)\n\t\t{\n\t\t\t$objTable = JTable::getInstance('menu', 'JTable', array('dbo' => $this->_db));\n\n\t\t\t$objTable->load($item['new_id']);\n\n\t\t\t$objTable->parent_id = JTransportHelper::lookupNewId('arrMenu', $item['old_parent_id']);\n\n\t\t\t$objTable->setLocation($objTable->parent_id, 'last-child');\n\n\t\t\tif (!$objTable->store())\n\t\t\t{\n\t\t\t\techo JError::raiseError(500, $objTable->getError());\n\t\t\t}\n\t\t}\n\n\t\treturn parent::afterHook();\n\t}", "function suppr_tache_dossier($id_dossier)\r\n{\r\n\tglobal $objet;\r\n\tif(droit_acces($objet[\"tache_dossier\"],$id_dossier)==3 && $id_dossier>1)\r\n\t{\r\n\t\t// on créé la liste des dossiers & on supprime chaque dossier\r\n\t\t$liste_dossiers_suppr = arborescence($objet[\"tache_dossier\"], $id_dossier, \"tous\");\r\n\t\tforeach($liste_dossiers_suppr as $infos_dossier)\r\n\t\t{\r\n\t\t\t// On supprime chaque tache du dossier puis le dossier en question\r\n\t\t\t$liste_taches = db_tableau(\"SELECT * FROM gt_tache WHERE id_dossier='\".$infos_dossier[\"id_dossier\"].\"'\");\r\n\t\t\tforeach($liste_taches as $infos_tache)\t\t{ suppr_tache($infos_tache[\"id_tache\"]); }\r\n\t\t\tsuppr_objet($objet[\"tache_dossier\"], $infos_dossier[\"id_dossier\"]);\r\n\t\t}\r\n\t}\r\n}", "public function listarParaUnir() {\n\t\t//de sesion, falta cambiar\n\t\t$_SESSION[\"nomCon\"] = $_GET[\"NombreCon\"];\n\t\t$juradoL = $this -> JuradoMapper -> findAllPro();\n\n\t\t$this -> view -> setVariable(\"jurado\", $juradoL);\n\t\t//falta agregar la vista, no se continuar\n\t\t$this -> view -> render(\"jurado\", \"listarUnir\");\n\t\t//falta cambiar\n\t}", "public function admin_getParents() {\n\t\tif (empty($this->request->data[$this->modelClass]['menu_id'])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->set('json', $this->{$this->modelClass}->getParents($this->request->data[$this->modelClass]['menu_id']));\n\t}", "private function setParentChildrenClass() {\n $tmp_schemedata = $this->schemedata;\n \n // replace parents with primary key.\n foreach($this->schemedata as $index => $class) {\n $parents = array();\n $see = array();\n foreach ($class['parents'] as $parent=>$cols) {\n foreach($tmp_schemedata as $tmp_class) {\n if ($tmp_class['table'] == $parent) {\n $tmp = $tmp_class['pkFields'];\n $tmp_cols = $cols;\n $tmp2 = array();\n foreach ($tmp as $key=>$val) {\n $key = array_shift($tmp_cols);\n $tmp2[$key] = $val;\n }\n $parents[$tmp_class['name']] = $tmp2;\n $see[] = $tmp_class['name'];\n }\n }\n }\n $this->schemedata[$index]['parents'] = $parents;\n $this->schemedata[$index]['see'] = $see;\n }\n\n // children\n foreach($this->schemedata as $index => $class) {\n foreach ($class['parents'] as $parent=>$cols) {\n foreach($tmp_schemedata as $tmp_class) {\n if ($tmp_class['table'] == $this->schemedata[$parent]['table']) {\n if ($class['type'] != 'TO' AND $class['type'] != 'TS' AND $class['type'] != 'TB') {\n $tmp = $class['parents']; // children's parent def\n $tmp2 = array();\n foreach ($tmp as $key=>$val) {\n if($key == $tmp_class['name']) {\n $tmp2 = $val;\n }\n }\n if($class['name']) {\n $this->schemedata[$tmp_class['name']]['children'][$class['name']] = $tmp2;\n $this->schemedata[$tmp_class['name']]['see'][] = $class['name'];\n } else {\n $this->schemedata[$tmp_class['name']]['children'][$index] = $tmp2;\n }\n }\n }\n }\n }\n }\n\n // relationships\n foreach($this->schemedata as $class) {\n if ($class['type'] == 'TO' OR $class['type'] == 'TS' OR $class['type'] == 'TB') {\n foreach ($class['parents'] as $parent=>$pkFields) {\n if(!isset($this->schemedata[$parent]['relationships'])) {\n $this->schemedata[$parent]['relationships'] = array();\n }\n // add parent to another parent list getter\n foreach ($class['parents'] as $p=>$fs) {\n if ($parent != $p) {\n $type = 'List';\n $mname = '';\n foreach($fs as $k => $v) {\n $name = $k;\n }\n foreach($class['params'] as $param) {\n if($name == $param['name']) {\n $type = ($param['pair']=='N')?'List':'Class';\n break;\n }\n }\n\n $this->schemedata[$parent]['relationships'][$p]= array(\n 'table' => $class['table'],\n 'myFields' => $pkFields,\n 'fields' => $fs,\n 'type' => $type\n );\n }\n }\n }\n }\n }\n\n // rewrite relation key for parents, children and relations\n foreach($this->schemedata as $key => $class) {\n // parent\n foreach($class['parents'] as $k1 => $values) {\n foreach($values as $k2 => $value) {\n foreach($class['params'] as $param) {\n if($param['name']==$k2) {\n unset($this->schemedata[$key]['parents'][$k1][$k2]);\n $this->schemedata[$key]['parents'][$k1][$param['mname']] = $value;\n break;\n }\n }\n }\n }\n // children\n foreach($class['children'] as $k1 => $values) {\n foreach($values as $k2 => $value) {\n foreach($class['params'] as $param) {\n if($param['name']==$value) {\n $this->schemedata[$key]['children'][$k1][$k2] = $param['mname'];\n break;\n }\n }\n }\n }\n // relations\n if(isset($class['relationships'])) {\n foreach($class['relationships'] as $k1 => $values) {\n foreach($values['myFields'] as $k2 => $value) {\n foreach($class['params'] as $param) {\n if($param['name']==$value) {\n $this->schemedata[$key]['relationships'][$k1]['myFields'][$k2] = $param['mname'];\n break;\n }\n }\n }\n foreach($values['fields'] as $k2 => $value) {\n foreach($class['params'] as $param) {\n if($param['name']==$value) {\n $this->schemedata[$key]['relationships'][$k1]['fields'][$k2] = $param['mname'];\n break;\n }\n }\n }\n }\n }\n }\n }", "public function update($parent)\n {\n }", "function registerChild($id_resp,$nom,$prenom,$age){\n$co = connect_me();\n$query = \"INSERT INTO enfant(id_enfant,id_responsable,nom,prenom,age) VALUES (NULL,'\".$id_resp.\"','\".$nom.\"','\".$prenom.\"',\".$age.\")\";\n\tif($res =$co->query($query)){\n\t\t$msg= \"<p class='message'>L'enregistrement s'est bien passé. <a href='index.php'> Retour à l'accueil</a></p>\";\n\t\t//header(\"Location: settings.php?query_res=\".$msg.\"\");\n\t}else{\n\t\t$msg= \"<p class='message_error'>L'enregistrement s'est mal passé.<a href='index.php'> Retour à l'accueil</a></p>\";\n\t\t//header(\"Location: settings.php?query_res=\".$msg.\"\");\n\t}\n\t$co->close();\n}", "public function __clone()\n\t{\n\t\t$this->children=[];\n\t}", "public function listaVisitantes(){\n \n }", "abstract public function reregister_menu_items();", "protected function deleteChildren() {}", "public static function cleanAllLists() {\r\n \tself::$list=array();\r\n }", "public function parentAccountList(){\n \n $parent= \\DB::table('tbl_parent_account')\n \n ->lists('PARENT_NAME','PARENT_ACCOUNT_ID');\n return $parent;\n \n \n \n }", "public function setParent(Registry $parent) {\n\t\t$this->parent = $parent;\n\t}", "function maquetacioItemsAgendaHoudini($model, $columna, $nomCaixa, $tipusCaixa, $ordre, $estilCaixa, $estilLlistat, $estilElement, $id_registre, $id_newsletter, $registre, $pathEditora)\n{\n global $CONFIG_URLBASE , $CONFIG_URLUPLOADIM; \n $parametres = '<input type=\"hidden\" name=\"newsletter['.htmlspecialchars($model).']['.htmlspecialchars($columna).']['.htmlspecialchars($nomCaixa).']['.htmlspecialchars($tipusCaixa).'][]['.htmlspecialchars($estilCaixa).']['.htmlspecialchars($estilLlistat).']['.htmlspecialchars($estilElement).']\" value=\"'.htmlspecialchars($id_registre).'\" />';\n \n $registre['ORIGEN'] = '<h4><a href=\"'.$CONFIG_URLBASE . $pathEditora . $registre['ID'] . '/' . $registre['URL_TITOL'] . '\" rel=\"external\" style=\"text-decoration:none;\">'.$registre['TITOL'].'</a></h4>';\n $imatge = $registre['IMATGE1'] != '' ? '<img src=\"' . $CONFIG_URLUPLOADIM . $registre['IMATGE1'] . '\" style=\"width: 159px;\" class=\"left\"/>' : '';\n \n return '<li id=\"ageh_reg' . $id_registre . '\" class=\"box removable stylable '.$estilElement.'\">\n\t\t\t'.$parametres.'\n\t\t\t<div class=\"spacer clearfix\">\n\t\t\t ' . $imatge . '\n\t\t\t\t'.$registre['ORIGEN'].'\n\t\t\t\t'.$registre['RESUM'].'\n\t\t\t</div>\n\t\t</li>';\n}", "function _make_relation($parents)\n {\n if(count($parents)<1)\n return array();\n $children = array();\n // first pass - collect children\n $field_parent_id =$this->field_parent_id ;\n foreach ($parents as $t)\n {\n $pt = $t->$field_parent_id ;\n $list = @$children[$pt] ? $children[$pt] : array();\n array_push($list, $t);\n $children[$pt] = $list;\n\n }\n //echo \"<br>---list Child----<br>\";\n //print_r($children);\n return $children;\n }", "public function appendNavigation(){\n\t\t\t$nav = $this->getNavigationArray();\n\n\t\t\t/**\n\t\t\t * Immediately before displaying the admin navigation. Provided with the\n\t\t\t * navigation array. Manipulating it will alter the navigation for all pages.\n\t\t\t *\n\t\t\t * @delegate NavigationPreRender\n\t\t\t * @param string $context\n\t\t\t * '/backend/'\n\t\t\t * @param array $nav\n\t\t\t * An associative array of the current navigation, passed by reference\n\t\t\t */\n\t\t\tSymphony::ExtensionManager()->notifyMembers('NavigationPreRender', '/backend/', array('navigation' => &$nav));\n\n\t\t\t$xNav = new XMLElement('ul');\n\t\t\t$xNav->setAttribute('id', 'nav');\n\n\t\t\tforeach($nav as $n){\n\t\t\t\tif($n['visible'] == 'no') continue;\n\n\t\t\t\t$can_access = false;\n\n\t\t\t\tif(!isset($n['limit']) || $n['limit'] == 'author')\n\t\t\t\t\t$can_access = true;\n\n\t\t\t\telseif($n['limit'] == 'developer' && Administration::instance()->Author->isDeveloper())\n\t\t\t\t\t$can_access = true;\n\n\t\t\t\telseif($n['limit'] == 'primary' && Administration::instance()->Author->isPrimaryAccount())\n\t\t\t\t\t$can_access = true;\n\n\t\t\t\tif($can_access) {\n\t\t\t\t\t$xGroup = new XMLElement('li', $n['name']);\n\t\t\t\t\tif(isset($n['class']) && trim($n['name']) != '') $xGroup->setAttribute('class', $n['class']);\n\n\t\t\t\t\t$hasChildren = false;\n\t\t\t\t\t$xChildren = new XMLElement('ul');\n\n\t\t\t\t\tif(is_array($n['children']) && !empty($n['children'])){\n\t\t\t\t\t\tforeach($n['children'] as $c){\n\t\t\t\t\t\t\tif($c['visible'] == 'no') continue;\n\n\t\t\t\t\t\t\t$can_access_child = false;\n\n\t\t\t\t\t\t\tif(!isset($c['limit']) || $c['limit'] == 'author')\n\t\t\t\t\t\t\t\t$can_access_child = true;\n\n\t\t\t\t\t\t\telseif($c['limit'] == 'developer' && Administration::instance()->Author->isDeveloper())\n\t\t\t\t\t\t\t\t$can_access_child = true;\n\n\t\t\t\t\t\t\telseif($c['limit'] == 'primary' && Administration::instance()->Author->isPrimaryAccount())\n\t\t\t\t\t\t\t\t$can_access_child = true;\n\n\t\t\t\t\t\t\tif($can_access_child) {\n\t\t\t\t\t\t\t\t$xChild = new XMLElement('li');\n\t\t\t\t\t\t\t\t$xChild->appendChild(\n\t\t\t\t\t\t\t\t\tWidget::Anchor($c['name'], SYMPHONY_URL . $c['link'])\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$xChildren->appendChild($xChild);\n\t\t\t\t\t\t\t\t$hasChildren = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif($hasChildren){\n\t\t\t\t\t\t\t$xGroup->appendChild($xChildren);\n\t\t\t\t\t\t\t$xNav->appendChild($xGroup);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->Header->appendChild($xNav);\n\t\t\tAdministration::instance()->Profiler->sample('Navigation Built', PROFILE_LAP);\n\t\t}", "function _set_decendants ($parent, $to_add)\n {\n $parent = $parent ? $parent : 0;\n \n if (isset($this->data[ $parent ]['descendants']))\n {\n $this->data[ $parent ]['descendants'] = array_merge($this->data[ $parent ]['descendants'],$to_add);\n }\n else\n {\n $this->data[ $parent ]['descendants'] = $to_add;\n }\n\n if (isset($this->data[ $parent ]['parent']))\n {\n // One up the tree\n $this->_set_decendants($this->data[ $parent ]['parent'], $to_add);\n }\n }", "abstract public function sellToListManagement();", "function adiHijo($lista) {\n\t\t$this->listas[] = $lista;\n\t}", "public function getSubdivisionList();", "function newItemAfter()\r\n\t{\r\n\t\t$this->content_obj->newItemAfter();\r\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\r\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\r\n\t}", "public function getInspectionChildUsers()\n {\n return $this->belongsToMany(User::class, 'inspection_mo_mapping', 'parent_id', 'child_id');\n }", "function set_items() { \n\n\t\t$this->items = $this->get_items();\n\n\t}", "public function update($parent)\n\t{\n\t}", "public function getChilds();", "public function getParentInspectionUsers()\n {\n return $this->belongsToMany(User::class, 'inspection_mo_mapping', 'child_id', 'parent_id');\n }" ]
[ "0.6259412", "0.5795286", "0.57643694", "0.55632037", "0.5517061", "0.55131096", "0.5490413", "0.54757196", "0.5467054", "0.5456927", "0.5337148", "0.53076184", "0.5280329", "0.5280329", "0.5280329", "0.5280329", "0.5280329", "0.5280329", "0.5280329", "0.5280329", "0.5280329", "0.5280329", "0.5280329", "0.5280329", "0.52370965", "0.52339727", "0.52130854", "0.52051854", "0.5189082", "0.5183876", "0.5135842", "0.51327664", "0.5125919", "0.51109743", "0.51043636", "0.50933003", "0.50834674", "0.5078496", "0.5065868", "0.50599533", "0.5056419", "0.5049767", "0.5030898", "0.5027241", "0.501433", "0.5003697", "0.49801597", "0.49733737", "0.49649504", "0.49634945", "0.49608743", "0.4946819", "0.4940194", "0.49361387", "0.49356785", "0.49206194", "0.49205092", "0.4918647", "0.4905437", "0.48977035", "0.4888765", "0.48793465", "0.48745844", "0.4871211", "0.4870432", "0.4867266", "0.4843452", "0.4838636", "0.48315182", "0.48304352", "0.48303396", "0.483022", "0.48254055", "0.48233557", "0.48201638", "0.4812873", "0.48073798", "0.48064268", "0.4803234", "0.48028412", "0.47996858", "0.47991386", "0.47964066", "0.47944322", "0.4792982", "0.4787309", "0.47850028", "0.47700682", "0.4763905", "0.4760092", "0.47592422", "0.47585708", "0.4757381", "0.4748193", "0.47410202", "0.4741012", "0.47392288", "0.47384578", "0.47356507", "0.47355217", "0.4734344" ]
0.0
-1
function utilDatesDBVersLocale transforme les dates d'un tableau (format SGBD) en date locale pour l'affichage
function utilDatesDBVersLocale($data) { foreach ($data as $key => $value) { if (is_array($value)) { /* * Traitement recursif */ $data[$key] = $this->utilDatesDBVersLocale($value); } else { if (!empty($this->colonnes[$key]) && ($this->colonnes[$key]["type"] == 2 || $this->colonnes[$key]["type"] == 3) && !empty($value)) { /* * Formatage de la date */ $data[$key] = $this->formatDateDBversLocal($value, $this->colonnes[$key]["type"]); } } } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function utilDatesLocaleVersDB($data)\n {\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n /*\n * Traitement recursif\n */\n $data[$key] = $this->utilDatesDBVersLocale($value);\n } else {\n if (($this->colonnes[$key][\"type\"] == 2 || $this->colonnes[$key][\"type\"] == 3) && strlen($value) > 0) {\n /*\n * Formatage de la date\n */\n $data[$key] = $this->formatDateLocaleVersDB($value, $this->colonnes[$key][\"type\"]);\n }\n }\n }\n\n return $data;\n }", "function formatDatesVersLocal($data)\n {\n return $this->utilDatesDBVersLocale($data);\n }", "function mysql2date($format, $date, $translate = \\true)\n {\n }", "function frdate($date1)\n{\n setlocale(LC_TIME, \"fr_FR.UTF-8\");\n $date2 = strftime(\"%A %d %b %Y\", strtotime($date1));\n return $date2;\n}", "function frdate($date1)\n{\n setlocale(LC_TIME, \"fr_FR.UTF-8\");\n $date2 = strftime(\"%A %d %b %Y\", strtotime($date1));\n return $date2;\n}", "function date_sql2en($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"-\", $date);\r\n\t\t\t$date_fr = $date[1].\"/\".$date[2].\"/\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_fr = \"\";\r\n\t\t}\r\n\t\treturn $date_fr;\r\n\t}", "function formatDateLocaleVersDB($date, $type = 2)\n {\n $date = ltrim($date);\n $date = rtrim($date);\n /*\n * Separation de la date et de l'heure\n */\n $temp = @explode(\" \", $date);\n $date = $temp[0];\n $heure = $temp[1];\n $j = 0;\n do {\n $test = @strpos($date, $this->sepValide[$j]);\n if ($test === false) {\n $j++;\n }\n } while ($j < count($this->sepValide) && ($test === false));\n $separateurLocal = $this->sepValide[$j];\n $temp = @explode($separateurLocal, $date);\n /*\n * Assignation des champs\n */\n switch ($this->formatDate) {\n case 0:\n $annee = $temp[0];\n $mois = $temp[1];\n $jour = $temp[2];\n break;\n case 1:\n $annee = $temp[2];\n $mois = $temp[1];\n $jour = $temp[0];\n break;\n case 2:\n $annee = $temp[2];\n $mois = $temp[0];\n $jour = $temp[1];\n break;\n }\n /*\n * Prise en compte de l'annee par defaut\n */\n if ($annee == \"\") {\n $annee = date(\"Y\");\n }\n\n if ($annee < 100) {\n if ($annee <= $this->dateMini) {\n $annee = \"20\" . $annee;\n } else {\n $annee = \"19\" . $annee;\n }\n }\n\n $date = $annee . $this->separateurDB . $mois . $this->separateurDB . $jour;\n /*\n * Reintegration de l'heure le cas echeant\n */\n if ($type == 3) {\n $date .= \" \" . $heure;\n }\n return $date;\n }", "function date_sql2fr($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"-\", $date);\r\n\t\t\t$date_fr = $date[2].\"/\".$date[1].\"/\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_fr = \"\";\r\n\t\t}\r\n\t\treturn $date_fr;\r\n\t}", "function convertDate_Amj_string($date) \n{\n\tsetlocale (LC_TIME, 'fr_FR','fra'); \n\treturn strftime(\"%A %d %B %Y\", strtotime($date)); \n}", "function dateToFrench($date, $format) \n{\n $english_days = array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday');\n $french_days = array('lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche');\n $english_months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\n $french_months = array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre');\n return str_replace($english_months, $french_months, str_replace($english_days, $french_days, date($format, strtotime($date) ) ) );\n}", "private function convert_date_db_format($date)\n {\n $str_date = strtotime($date);\n $db_date = date('Y-m-d', $str_date);\n return $db_date;\n }", "function french_to_english_date($date, $format='Y-m-d') {\n\tif(\\DateTime::createFromFormat('d/m/Y', $date)) {\n\t\treturn \\DateTime::createFromFormat('d/m/Y', $date)->format($format);\n\t}\n\treturn null;\n}", "function dateToDB($date) {\n\tglobal $config;\n\treturn date($config['db_date_format'], strtotime($date));\t\n}", "function translate_date_to_ro($date_eng)\n{\n $days_of_week = ['Mon' => 'Luni,', 'Tue' => 'Marti,', 'Wed' => 'Miercuri,', 'Thu' => 'Joi,', 'Fri' => 'Vineri,', 'Sat' => 'Sambata,', 'Sun' => 'Duminica,'];\n $months_of_year = ['01' => 'Ian', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'Mai', '06' => 'Iun', '07' => 'Iul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Noi', '12' => 'Dec'];\n $date_eng = explode(\" \", $date_eng);\n $date_eng[0] = $days_of_week[$date_eng[0]];\n $date_eng[2] = $months_of_year[$date_eng[2]];\n $date_ro = implode(\" \", $date_eng);\n//print_r($date_ro);\n return $date_ro;\n}", "function getBanglaDate($date) {\r\n\r\n$engArray = array (\r\n1,2,3,4,5,6,7,8,9,0, 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'am', 'pm', 'th', 'st', 'rd', 'th', 'Sat', 'Sun', 'Mon', 'Tue', 'Tues', 'Wed', 'Thurs', 'Thu', 'Fri', 'Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'\r\n);\r\n$bangArray = array (\r\n\t'১','২','৩','৪','৫','৬','৭','৮','৯','০',\r\n\t'জানুয়ারি', 'ফেব্রুয়ারি', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর',\r\n\t'সকাল', 'দুপুর', '-এ', '-এ', '-এ', '-এ', 'শনি', 'রবি', 'সোম', 'মঙ্গল', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'বৃহস্পতি', 'শুক্র', 'শনিবার', 'রবিবার',\r\n\t'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার'\r\n);\r\n\r\n\t$converted = str_replace($engArray, $bangArray, $date);\r\n \treturn $converted;\r\n}", "public function convertDateToDB($_date) {\n\t\tif(ereg(\"^([0-9]{1,2})-([0-9]{1,2})-([0-9]{4}).*$\",\n\t\t\t$_date, $_arrdt) !== false) {\n\t\t\treturn sprintf(\"%04.4d-%02.2d-%02.2d\",\n\t\t\t\t$_arrdt[3], $_arrdt[2], $_arrdt[1]);\n\t\t\t}\n\t\treturn false;\n\t}", "function english_to_french_date($date, $format='d/m/Y') {\n\tif(\\DateTime::createFromFormat('Y-m-d', $date)) {\n\t\treturn \\DateTime::createFromFormat('Y-m-d', $date)->format($format);\n\t}\n\treturn null;\n}", "function ConvertToSqlDate($date)\n {\n if($date != \"\")\n return $this->app->String->Convert($date,\"%3.%2.%1\",\"%1-%2-%3\");\n }", "public static function dateToString($date, $format = self::DATE_LONG, $separator = '/', $lang=0,$weekdays = false, $cap = false)\r\n {\r\n $strDate = $date;\r\n $formatByLang = array(\r\n self::DATE_FULL => array(\r\n 'fr' => array(\r\n 'format' => \"Le %s %s %s %s\",\r\n 'values'=> array('day','dayDate', 'monthName', 'year')),\r\n 'en' => array('format' => \"%s %s %s\",\r\n 'values'=> array('monthName', 'dayDate', 'daySuffix', 'year')),\r\n 'es' => array('format' => \"%s de %s de %s\",\r\n 'values'=> array('day','dayDate', 'monthName', 'year'))\r\n ),\r\n self::DATE_LONG => array(\r\n 'fr' => array(\r\n 'format' => \"%s %s %s\",\r\n 'values'=> array('dayDate', 'monthName', 'year')),\r\n 'en' => array('format' => \"%s, %s %s%s, %s\",\r\n 'values'=> array('day', 'monthName', 'dayDate', 'daySuffix', 'year')),\r\n 'es' => array('format' => \"%s, el %s de %s de %s\",\r\n 'values'=> array('day','dayDate', 'monthName', 'year'))\r\n ),\r\n self::DATE_SHORT => array(\r\n 'fr' => array(\r\n 'format' => \"%s %s %s\",\r\n 'values'=> array('dayDate', 'monthName', 'year')),\r\n 'en' => array('format' => \"%s %s %s\",\r\n 'values'=> array('dayDate', 'monthName', 'year')),\r\n 'es' => array('format' => \"%s, el %s de %s de %s\",\r\n 'values'=> array('day','dayDate', 'monthName', 'year'))\r\n ),\r\n self::DATE_LONG_NO_DAY => array(\r\n 'format' => \"%s %s\",\r\n 'values' => array('monthName', 'year')\r\n ),\r\n self::DATE_NUM => array(\r\n 'format' => \"%d{$separator}%d{$separator}%d\",\r\n 'values' => array('dayDate','month', 'year')\r\n ),\r\n self::DATE_SQL => array(\r\n 'format' => \"%d-%d-%d\",\r\n 'values' => array('year', 'month', 'dayDate')\r\n ),\r\n self::DATE_NUM_USA => array(\r\n 'format' => \"%d{$separator}%d{$separator}%d\",\r\n 'values' => array('month', 'dayDate', 'year')\r\n ),\r\n self::DATE_NUM_SHORT_YEAR => array(\r\n 'format' => \"%d{$separator}%d{$separator}%d\",\r\n 'values' => array('dayDate','month', 'yearShort')\r\n ),\r\n self::DATE_MONTH_YEAR => array(\r\n 'format' => \"%s %d\",\r\n 'values' => array('monthName', 'year')\r\n ),\r\n );\r\n if (!empty($date))\r\n {\r\n if($lang==0)\r\n {\r\n $suffixLang = Zend_Registry::get('languageSuffix');\r\n $locale = self::getLocalForLanguage(Zend_Registry::get(\"languageID\"));\r\n }\r\n else\r\n {\r\n $suffixLang = Cible_FunctionsGeneral::getLanguageSuffix($lang);\r\n $locale = self::getLocalForLanguage($lang);\r\n }\r\n if(is_string($date))\r\n $date = new Zend_Date($date, null, $locale);\r\n\r\n $day = $date->get(Zend_Date::WEEKDAY);\r\n $daySuffix = $date->get(Zend_Date::DAY_SUFFIX);\r\n $dayDate = $date->get(Zend_Date::DAY);\r\n $month = $date->get(Zend_Date::MONTH);\r\n $monthName = $date->get(Zend_Date::MONTH_NAME);\r\n $year = $date->get(Zend_Date::YEAR);\r\n $yearShort = $date->get(Zend_Date::YEAR);\r\n switch($format)\r\n {\r\n case self::DATE_FULL :\r\n case self::DATE_SHORT :\r\n case self::DATE_LONG :\r\n if ($format == self::DATE_SHORT)\r\n $monthName = $date->get(Zend_Date::MONTH_NAME_SHORT);\r\n if(strpos($dayDate,'0')==0)\r\n $dayDate = str_replace(\"0\", \"\", $dayDate);\r\n\r\n $formatStr = $formatByLang[$format][$suffixLang]['format'];\r\n foreach ($formatByLang[$format][$suffixLang]['values'] as $value)\r\n $arguments[] = $$value;\r\n $strDate = vsprintf($formatStr, $arguments);\r\n if($suffixLang == 'fr')\r\n {\r\n if($dayDate=='1')\r\n $strDate = str_replace(\"1 \", \"1<sup>er</sup> \", $strDate);\r\n }\r\n\r\n break;\r\n case self::DATE_MONTH_YEAR : // ex: Juin 2011\r\n $formatStr = $formatByLang[$format]['format'];\r\n foreach ($formatByLang[$format]['values'] as $value)\r\n $arguments[] = $$value;\r\n $strDate = ucfirst(vsprintf($formatStr, $arguments));\r\n break;\r\n default :\r\n $formatStr = $formatByLang[$format]['format'];\r\n foreach ($formatByLang[$format]['values'] as $value)\r\n $arguments[] = $$value;\r\n $strDate = vsprintf($formatStr, $arguments);\r\n break;\r\n\r\n }\r\n\r\n if($cap==true)\r\n $strDate = strtoupper($strDate);\r\n }\r\n\r\n return $strDate;\r\n }", "function convertDate_Amj_jmA($date)\n{\n\tsetlocale (LC_TIME, 'fr_FR','fra'); \n\treturn strftime(\"%d/%m/%Y\", strtotime($date)); \n}", "function non_breaking_date() {\r\n\t\t$english_months_array = array(\r\n\t\t// month => variations\r\n\t\t'January' => array('Jan.', 'Jan'),\r\n\t\t'February' => array('Feb.', 'Feb'),\r\n\t\t'March' => array('Mar.', 'Mar'),\r\n\t\t'April' => array('Apr.', 'Apr'),\r\n\t\t'May' => array(),\r\n\t\t'June' => array('Jun.', 'Jun'),\r\n\t\t'July' => array('Jul.', 'Jul'),\r\n\t\t'August' => array('Aug.', 'Aug'),\r\n\t\t'September' => array('Sept.', 'Sept'),\r\n\t\t'October' => array('Oct.', 'Oct'),\r\n\t\t'November' => array('Nov.', 'Nov'),\r\n\t\t'December' => array('Dec.', 'Dec'),\r\n\t\t);\r\n\t\t$french_months_array = array(\r\n\t\t// month => variations\r\n\t\t'janvier' => array('jan.', 'jan'),\r\n\t\t'février' => array('fév.', 'fév', 'f&#233;vrier', 'f&#233;v.', 'f&#233;v', 'f&#xe9;vrier', 'f&#xe9;v.', 'f&#xe9;v', 'f&eacute;vrier', 'f&eacute;v.', 'f&eacute;v'),\r\n\t\t'mars' => array('mar.', 'mar'),\r\n\t\t'avril' => array('avr.', 'avr'),\r\n\t\t'mai' => array(),\r\n\t\t'juin' => array(),\r\n\t\t'juillet' => array('juil.', 'juil'),\r\n\t\t'août' => array('ao&#251;t', 'ao&#xfb;t', 'ao&ucirc;t'),\r\n\t\t'septembre' => array('sept.', 'sept'),\r\n\t\t'octobre' => array('oct.', 'oct'),\r\n\t\t'novembre' => array('nov.', 'nov'),\r\n\t\t'décembre' => array('déc.', 'déc', 'd&#233;cembre', 'd&#233;c.', 'd&#233;c', 'd&#xe9;cembre', 'd&#xe9;c.', 'd&#xe9;c', 'd&eacute;cembre', 'd&eacute;c.', 'd&eacute;c'),\r\n\t\t);\r\n\t\t$english_seasons_array = array(\r\n\t\t'Spring',\r\n\t\t'Summer',\r\n\t\t'Fall',\r\n\t\t'Winter',\r\n\t\t);\r\n\t\t$french_seasons_array = array(\r\n\t\t'printemps',\r\n\t\t'été', '&#233;t&#233;', '&#xe9;t&#xe9;', '&eacute;t&eacute;',\r\n\t\t'automne',\r\n\t\t'hiver',\r\n\t\t);\r\n\t\t$time_periods_array = array();\r\n\t\tforeach($english_months_array as $month => $variations_array) {\r\n\t\t\t$time_periods_array[] = $month;\r\n\t\t\tforeach($variations_array as $variation) {\r\n\t\t\t\t$time_periods_array[] = $variation;\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($french_months_array as $month => $variations_array) {\r\n\t\t\t$time_periods_array[] = $month;\r\n\t\t\tforeach($variations_array as $variation) {\r\n\t\t\t\t$time_periods_array[] = $variation;\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($english_seasons_array as $season) {\r\n\t\t\t$time_periods_array[] = $season;\r\n\t\t}\r\n\t\tforeach($french_seasons_array as $season) {\r\n\t\t\t$time_periods_array[] = $season;\r\n\t\t}\r\n\t\tif($this->config['non_breaking_type'] === 'noWrap') {\r\n\t\t\tif(ReTidy::is_clf2()) {\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,2},*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span class=\"noWrap\">$1 $3 $5</span>', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span class=\"noWrap\">$1 $3 $5</span>', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,4},*)/is', '<span class=\"noWrap\">$1 $3</span>', $this->code, -1, $c);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)/is', '<span class=\"noWrap\">$1 $3</span>', $this->code, -1, $d);\r\n\t\t\t} else {\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,2},*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $3 $5</span>', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $3 $5</span>', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,4},*)/is', '<span style=\"white-space: nowrap;\">$1 $3</span>', $this->code, -1, $c);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)/is', '<span style=\"white-space: nowrap;\">$1 $3</span>', $this->code, -1, $d);\r\n\t\t\t}\r\n\t\t} else { // default to nbsp\r\n\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,2},*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '$1&nbsp;$3&nbsp;$5', $this->code, -1, $a);\r\n\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '$1&nbsp;$3&nbsp;$5', $this->code, -1, $b);\r\n\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,4},*)/is', '$1&nbsp;$3', $this->code, -1, $c);\r\n\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)/is', '$1&nbsp;$3', $this->code, -1, $d);\r\n\t\t\t\r\n\t\t}\r\n\t\tif(ReTidy::is_clf2()) {\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2&ndash;$4&ndash;$6</span>$7', $this->code, -1, $e);\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2&nbsp;$4&nbsp;&ndash;&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2$3$4$5$6</span>$7', $this->code, -1, $e);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2&nbsp;$4&nbsp;$6&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t} else {\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2&ndash;$4&ndash;$6</span>$7', $this->code, -1, $e);\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2&nbsp;$4&nbsp;&ndash;&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2$3$4$5$6</span>$7', $this->code, -1, $e);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2&nbsp;$4&nbsp;$6&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t}\r\n\t\t//$this->logMsgIf(\"non_breaking_year_range\", $count);\r\n\t\t$count = $a + $b + $c + $d + $e + $f;\r\n\t\t//var_dump($a, $b, $c, $d, $e, $f);\r\n\t\t$this->logMsgIf(\"non_breaking_date\", $count);\r\n\t}", "function date2mysql($date)\r\n\t{\r\n\t\tif($date != \"\")\r\n\t\t{\r\n\t\t@list($jour,$mois,$annee)=explode('/',$date);\t\t\t\t//récupération des différentes valeurs en utilisant les / comme séparateurs\r\n \t\treturn @date('Y-m-d',mktime(0,0,0,$mois,$jour,$annee));\t\t//retour de la date modifié au bon format grace à un mktime\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\treturn $date;\r\n \t\t}\r\n\t}", "function sky_date_french($format, $timestamp = null, $echo = null)\n{\n $param_D = array('', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam', 'Dim');\n $param_l = array('', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi', 'Dimanche');\n $param_F = array('', 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');\n $param_M = array('', 'Jan', 'Fév', 'Mar', 'Avr', 'Mai', 'Jun', 'Jul', 'Aoû', 'Sep', 'Oct', 'Nov', 'Déc');\n $return = '';\n if (is_null($timestamp)) {\n $timestamp = mktime();\n }\n for ($i = 0, $len = strlen($format); $i < $len; $i++) {\n switch ($format[$i]) {\n case '\\\\': // fix.slashes\n $i++;\n $return .= isset($format[$i]) ? $format[$i] : '';\n break;\n case 'D':\n $return .= $param_D[date('N', $timestamp)];\n break;\n case 'l':\n $return .= $param_l[date('N', $timestamp)];\n break;\n case 'F':\n $return .= $param_F[date('n', $timestamp)];\n break;\n case 'M':\n $return .= $param_M[date('n', $timestamp)];\n break;\n default:\n $return .= date($format[$i], $timestamp);\n break;\n }\n }\n if (is_null($echo)) {\n return $return;\n } else {\n echo $return;\n }\n}", "function datum($db_date) {\r\n return strftime('%d.%m.%Y', strtotime($db_date));\r\n }", "public function dateViewHelperFormatsDateLocalizedDataProvider() {}", "function uiToDBdate() {\r\n\r\n\t\t$month = (int) substr($this->date, -10, 2);\r\n\t\t$day = (int) substr($this->date, -7, 2);\r\n\t\t$year = (int) substr($this->date, -4, 4);\r\n\r\n\t\t$formattedDate = $year . \"-\" . $month . \"-\" . $day;\r\n\r\n\t\t$this->date = $formattedDate;\r\n\t}", "function date_format_translated($format, $timestamp) {\n\tglobal $translation;\n\t\n\t$day_name_short = array($translation['tstat_su'], $translation['tstat_mo'], $translation['tstat_tu'], $translation['tstat_we'], $translation['tstat_th'], $translation['tstat_fr'], $translation['tstat_sa']);\n\t$day_name_full = array($translation['tstat_full_su'], $translation['tstat_full_mo'], $translation['tstat_full_tu'], $translation['tstat_full_we'], $translation['tstat_full_th'], $translation['tstat_full_fr'], $translation['tstat_full_sa']);\n\t$month_name_short = array($translation['tstat_jan'], $translation['tstat_feb'], $translation['tstat_mar'], $translation['tstat_apr'], $translation['tstat_may'], $translation['tstat_jun'],\n \t\t\t\t\t $translation['tstat_jul'], $translation['tstat_aug'], $translation['tstat_sep'], $translation['tstat_oct'], $translation['tstat_nov'], $translation['tstat_dec']);\n\t$month_name_full = array($translation['tstat_full_jan'], $translation['tstat_full_feb'], $translation['tstat_full_mar'], $translation['tstat_full_apr'], $translation['tstat_full_may'], $translation['tstat_full_jun'],\n \t\t\t\t\t $translation['tstat_full_jul'], $translation['tstat_full_aug'], $translation['tstat_full_sep'], $translation['tstat_full_oct'], $translation['tstat_full_nov'], $translation['tstat_full_dec']);\n \t\t\t\t\t \n // Loop char by char through php date format string, cacth the ones which need translating\n//--- PHP 4 :-)--------------------------------\nif(!function_exists('str_split')){\n function str_split($str,$split_lengt=1){\n\n $cnt = strlen($str);\n\n for ($i=0;$i<$cnt;$i+=$split_lengt)\n $rslt[]= substr($str,$i,$split_lengt); \n \n return $rslt;\n }\n} \n//----------------------------------------------\n\t$result = \"\";\n\t$format_chars = str_split($format, 1);\n\tforeach ($format_chars as $format_char) {\n\t\tif ($format_char == \"l\") {\n\t\t\t$day_index = date(\"w\", $timestamp);\n\t\t\t$result = $result . $day_name_full[$day_index];\n\t\t} else if ($format_char == \"D\") {\n\t\t\t$day_index = date(\"w\", $timestamp);\n\t\t\t$result = $result . $day_name_short[$day_index];\n\t\t} else if ($format_char == \"F\") {\n\t\t\t$month_index = date(\"n\", $timestamp) - 1;\n\t\t\t$result = $result . $month_name_full[$month_index];\n\t\t} else if ($format_char == \"M\") {\n\t\t\t$month_index = date(\"n\", $timestamp) - 1;\n\t\t\t$result = $result . $month_name_short[$month_index];\n\t\t} else {\n\t\t\t$result = $result . date($format_char, $timestamp);\n\t\t}\n\t}\n\t\n\treturn $result;\n}", "function formatFechaBD($value){\n\t$partes = explode(\"-\", $value);\n\t$value = $partes[2].\"-\".$partes[1].\"-\".$partes[0];\n\treturn $value;\n}", "function local_to_iso($date,$date_format)\n{\n $list_date=explode (\"-\",$date);\n if ($date_format=='fr')\n {\n $date=$list_date[2].'-'.$list_date[1].'-'.$list_date[0];\n }\n elseif ($date_format=='en')\n $date=$list_date[2].'-'.$list_date[0].'-'.$list_date[1];\n return $date;\n}", "function local_to_iso($date,$date_format)\n{\n $list_date=explode (\"-\",$date);\n if ($date_format=='fr')\n {\n $date=$list_date[2].'-'.$list_date[1].'-'.$list_date[0];\n }\n elseif ($date_format=='en')\n $date=$list_date[2].'-'.$list_date[0].'-'.$list_date[1];\n return $date;\n}", "function date_en2sql($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"/\", $date);\r\n\t\t\t$date_sql = $date[2].\"-\".$date[0].\"-\".$date[1];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_sql = \"\";\r\n\t\t}\r\n\t\treturn $date_sql;\r\n\t}", "function verifVadsTransDate($dateData) {\n if ( $dateData == \"ERRORDATE\") {\n return '<p style=\"margin-top:1px;\">Erreur verifVadsTransDate()</p>';\n } else {\n return strftime('%d/%m/%Y',strtotime($dateData)); //convert date Us YYYYMMJJ to Fr JJ/MM/YYYY\n }\n }", "function brToSqlDate($date) {\n $date = explode('/',$date);\n return $date[2] . '-' . $date[1] . '-' . $date[0];\n}", "function date_fr($date_saisie){\n @list ($jour , $mois , $an) = split(\"[-./]\",$date_saisie);\n //inverse la date\n return($an.\"-\".$mois.\"-\".$jour);\n \n}", "function persian_date_utf($format, $timestamp='') {\n\n if($timestamp==''){\n $timestamp = mktime();\n }\n\n $g_d=date('j', $timestamp);\n $g_m=date('n', $timestamp);\n $g_y=date('Y', $timestamp);\n\n list($jy, $jm, $jd, $j_all_days) = g2p($g_y, $g_m, $g_d);\n\n $j_days_in_month = array(0, 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n $leap = 0;\n if ($g_m>1 && (($g_y%4==0 && $g_y%100!=0) || ($g_y%400==0))){\n $j_days_in_month[12]++;\n $leap = 1;\n }\n\n $j_month_name = array('', 'فروردین', 'اردیبهشت', 'خرداد', 'تیر',\n 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند');\n $j_week_name = array('Saturday' => 'شنبه',\n 'Sunday' => 'یک شنبه',\n 'Monday' => 'دوشنبه',\n 'Tuesday' => 'سه شنبه',\n 'Wednesday' => 'چهارشنبه',\n 'Thursday' => 'پنج شنبه',\n 'Friday' => 'جمعه',\n 'Sat' => 'ش',\n 'Sun' => 'ی',\n 'Mon' => 'د',\n 'Tue' => 'س',\n 'Wed' => 'چ',\n 'Thu' => 'پ',\n 'Fri' => 'ج');\n $j_week_number = array('Sat' => '1',\n 'Sun' => '2',\n 'Mon' => '3',\n 'Tue' => '4',\n 'Wed' => '5',\n 'Thu' => '6',\n 'Fri' => '7');\n\n // calculate string\n $output_str='';\n\n for ($i=0; $i<strlen($format); $i++){\n\n if($format[$i]!='\\\\'){\n switch($format[$i]){\n case 'd':\n if($jd<10) $output_str.='0'.$jd; else $output_str.=$jd;\n break;\n case 'j':\n $output_str.=$jd;\n break;\n case 'D':\n case 'S':\n $output_str.=$j_week_name[date('D', $timestamp)];\n break;\n case 'l':\n $output_str.=$j_week_name[date('l', $timestamp)];\n break;\n case 'w':\n case 'N':\n $output_str.=$j_week_number[date('D', $timestamp)];\n break;\n case 'z':\n $output_str.=sprintf('%03d', $j_all_days);\n break;\n case 'W':\n $output_str.=floor(($j_all_days+1)/7);\n break;\n case 'F':\n case 'M':\n $output_str.=$j_month_name[$jm];\n break;\n case 'm':\n if($jm<10) $output_str.='0'.$jm; else $output_str.=$jm;\n break;\n case 'n':\n $output_str.=$jm;\n break;\n case 't':\n $output_str.=$j_days_in_month[$jm];\n break;\n case 'L':\n $output_str.=$leap;\n break;\n case 'o':\n case 'Y':\n $output_str.=$jy;\n break;\n case 'y':\n $output_str.=$jy-(floor($jy/100)*100);\n break;\n case 'a':\n case 'A':\n if(date('a', $timestamp)=='pm') $output_str.='بعد از ظهر'; else $output_str.='قبل از ظهر';\n break;\n case 'B':\n $output_str.=date('B', $timestamp);\n break;\n case 'g':\n $output_str.=date('g', $timestamp);\n break;\n case 'G':\n $output_str.=date('G', $timestamp);\n break;\n case 'h':\n $output_str.=date('h', $timestamp);\n break;\n case 'H':\n $output_str.=date('H', $timestamp);\n break;\n case 'i':\n $output_str.=date('i', $timestamp);\n break;\n case 's':\n $output_str.=date('s', $timestamp);\n break;\n case 'e':\n $output_str.=date('e', $timestamp);\n break;\n case 'I':\n $output_str.=date('I', $timestamp);\n break;\n case 'O':\n $output_str.=date('O', $timestamp);\n break;\n case 'Z':\n $output_str.=date('Z', $timestamp);\n break;\n case 'c':\n $output_str.=persian_date_utf('d-m-Y\\TH:i:sO', $timestamp);\n break;\n case 'r':\n $output_str.=persian_date_utf('D، j F Y H:i:s O', $timestamp);\n break;\n case 'U':\n $output_str.=date('U', $timestamp);\n break;\n default:\n $output_str.=$format[$i];\n break;\n }\n } else {\n $i++;\n $output_str.=$format[$i];\n }\n }\n\n return $output_str;\n}", "function dateToDBDate($date)\n\t{\n\n\t\tif (is_numeric($date))\n\t\t{\n\t\t\treturn date('Y-m-d', $date);\n\t\t}\n\t\telse if (preg_match('/\\d{2}\\.\\d{2}\\.\\d{4}/', $date))\n\t\t{\n\t\t\t$arDate = explode('.', $date);\n\n\t\t\treturn $arDate[2].'-'.$arDate[1].'-'.$arDate[0];\n\t\t}\n\t\telse if (strtotime($date) > 0)\n\t\t{\n\t\t\treturn date('Y-m-d', strtotime($date));\n\t\t}\n\n\t\treturn '0000-00-00';\n\n\t}", "function russian_date() {\n\t\t$date = explode(\".\", date(\"d.m.Y\"));\n\t\tswitch ($date[1]) {\n\t\tcase 1: $m ='января'; break;\n\t\tcase 2: $m ='февраля'; break;\n\t\tcase 3: $m ='марта'; break;\n\t\tcase 4: $m ='апреля'; break;\n\t\tcase 5: $m ='мая'; break;\n\t\tcase 6: $m ='июня'; break;\n\t\tcase 7: $m ='июля'; break;\n\t\tcase 8: $m ='августа'; break;\n\t\tcase 9: $m ='сентября'; break;\n\t\tcase 10: $m ='октября'; break;\n\t\tcase 11: $m ='ноября'; break;\n\t\tcase 12: $m ='декабря'; break;\n\t}\n\t\techo $date[0].'&nbsp;'.$m.'&nbsp;'.$date[2];\n\t}", "public function afterFind(){\n // Format dates based on the locale\n foreach($this->metadata->tableSchema->columns as $columnName => $column){\n if ($column->dbType == 'date'){\n $aux= CDateTimeParser::parse($this->$columnName,\"yyyy-MM-dd\");\n $this->$columnName = ($aux != null )?date('d/m/Y',$aux ):null;\n }elseif ($column->dbType == 'datetime'){\n $aux= CDateTimeParser::parse($this->$columnName,\"yyyy-MM-dd HH:mm:ss\");\n $this->$columnName = ($aux != null )?date('d/m/Y H:i:s',$aux ):null;\n }\n }\n }", "function format_data_in($string_date)\n{\n // $formatted_date = \"DATE_FORMAT($db_date_column, '%a, %e %b %Y ')\";\n $temp = strtotime($string_date);\n $date = date('Y-m-d', $temp);\n $date = DateTime::createFromFormat('D, j M Y', $temp)->format('Y-m-d');\n print_r($date);\n return $date;\n}", "private function _format_date_mysql($fecha) {\n if ($fecha != \"\") {\n $date = explode('-', $fecha);\n if (count($date) === 3) {//valida que vengan los 3 datos separados por / array.length = 3\n if (checkdate($date[1], $date[2], $date[0])) {//mm/d/a\n //int $month , int $day , int $year\n //09/20/2018\n return $date[0] . '-' . $date[1] . '-' . $date[2]; //aa-mm-d\n } else {\n return FALSE;\n }\n } else {\n return FALSE;\n }\n } else {\n return FALSE;\n }\n }", "public function getDate4Database2($date=null){\n\t\treturn date_format($this->createDate($date),\"Y-m-d\");\n\t}", "function convertDate_jmA_Amj($date)\r\n{\r\n\tsetlocale (LC_TIME, 'en_EN','en');\r\n\treturn strftime(\"%Y-%m-%d\", strtotime($date));\r\n}", "function convertdateanglais($date){\n\t$ladate=explode('-',$date);\n\t$jour=$ladate[2];\n\t$moi=$ladate[1];\n\t$anne=$ladate[0];\n\t$madate=date(\"d/m/Y\", mktime(0, 0, 0, $moi, $jour, $anne));\n\treturn $madate;\n}", "function Fecha_estandar($IngresoFecha){\t\n$date = date_create($IngresoFecha);\nreturn date_format($date, 'd-m-Y');\n}", "public function __construct(){\n Date::setLocale('es');\n }", "function fecha2mysql($fecha) {\n $fecha = split(\"/\", $fecha);\n $dia = $fecha[0];\n $mes = $fecha[1];\n $anyo = $fecha[2];\n return \"$anyo-$mes-$dia\";\n}", "function fechaES($fecha){\r\n\t\t\t\t $mes = array(\r\n\t\t\t\t 'January' => 'Enero',\r\n\t\t\t\t 'February' => 'Febrero',\r\n\t\t\t\t 'March' => 'Marzo',\r\n\t\t\t\t 'April' => 'Abril',\r\n\t\t\t\t 'May' => 'Mayo',\r\n\t\t\t\t 'June' => 'Junio',\r\n\t\t\t\t 'July' => 'Julio',\r\n\t\t\t\t 'August' => 'Agosto',\r\n\t\t\t\t 'September' => 'Septiembre',\r\n\t\t\t\t 'October' => 'Octubre',\r\n\t\t\t\t 'November' => 'Noviembre',\r\n\t\t\t\t 'December' => 'Diciembre'\r\n\t\t\t\t );\r\n\r\n\t\t\t\t return strtr($fecha, $mes);\r\n\t\t\t\t}", "protected function dateFormatDatabase()\n {\n return $this->dateFormat('mysql');\n }", "function formatDate($date, $format = '%d %B %Y') {\n setlocale(LC_ALL, 'fr.utf-8');\n\n return strftime($format, strtotime($date));\n}", "function convert_date_to_kh_date($date_string, $splitted_by = '.')\n{\n if (odm_language_manager()->get_current_language() == 'km') {\n $splitted_date = explode($splitted_by, $date_string);\n $joined_date = '';\n if (count($splitted_date) > 1) {\n if (strlen($date_string) == 7) {\n $month_year = $splitted_date;\n if ($month_year[0] != '00') {\n $joined_date .= ' ខែ'.convert_to_kh_month($month_year[0]);\n }\n if ($month_year[1] != '0000') {\n $joined_date .= ' ឆ្នាំ'.convert_to_kh_number($month_year[1]);\n }\n } else {\n $day_month_year = $splitted_date;\n if ($day_month_year[0] != '00') {\n $joined_date .= 'ថ្ងៃទី '.convert_to_kh_number($day_month_year[0]);\n }\n if ($day_month_year[1] != '00') {\n $joined_date .= ' ខែ'.convert_to_kh_month($day_month_year[1]);\n }\n if ($day_month_year[2] != '0000') {\n $joined_date .= ' ឆ្នាំ'.convert_to_kh_number($day_month_year[2]);\n }\n }\n } else {\n if (strlen($date_string) == 4) {\n $joined_date = ' ឆ្នាំ'.convert_to_kh_number($date_string);\n }\n }\n\n return $joined_date;\n } else {\n $return_date = date('d F Y', strtotime($date_string));\n\n return $my_date;\n }\n}", "function internationalDate($todate)\n\t{\n\t\t$myDate=date_create($todate);\n\t\treturn date_format($myDate, \"m/d/y\");\n\t}", "function date_fr2sql($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"/\", $date);\r\n\t\t\t$date_sql = $date[2].\"-\".$date[1].\"-\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_sql = \"\";\r\n\t\t}\r\n\t\treturn $date_sql;\r\n\t}", "function validar_fecha_stock($fechaStock)\n{\n //$fecha = date('d-m-Y');\n $fecha = date('d/m/Y');\n //$fecha = strftime($fecha);\n\n if ($fecha == $fechaStock) {\n return true;\n }\n\n return false;\n}", "function orderfecha_bd($fecha){\n\t$dia = substr($fecha,0,2);\n\t$mes = substr($fecha,3,2);\n\t$año = substr($fecha,6,4);\n\t$fecha = $año.'-'.$mes.'-'.$dia;\n\treturn $fecha;\n\t}", "function dateElementFromEnglish($locale,$text,$strfTimeformat) {\n\t$saveLocale = setlocale(LC_TIME,0);setlocale(LC_TIME,$locale);\n\t$translation = strftime($strfTimeformat,strtotime($text));\n\tsetlocale(LC_TIME,$saveLocale);\n\treturn $translation;\n}", "function format_data_out_db($db_date_column)\n{\n $formatted_date = \"DATE_FORMAT($db_date_column, '%a %d %m %Y') \";\n return $formatted_date;\n}", "protected function convertDateUser()\n{\n$jour = substr($this->getDateUtilisateur(), 0, 2);\n$mois= substr($this->getDateUtilisateur(), 3, 2);\n$annee= substr($this->getDateUtilisateur(), 6, 4);\n$dateSys = $annee.\"-\".$mois.\"-\".$jour;\nreturn $dateSys;\n}", "public static function getDateFormats()\n {\n return array( 'm/d/y' => 'mm/dd/yy', 'd/m/y' => 'dd/mm/yy' );\n }", "function conv_date($f, $date, $sep = '/') {\n $fmt = '';\n if ($f == '1') { // normal to mysql\n $date = explode('/', $date);\n $fmt = (count($date) == 3) ? $date[2] . '-' . $date[1] . '-' . $date[0] : '';\n } else { // mysql to normal\n $date = explode(' ', $date);\n $date = explode('-', $date[0]);\n $fmt = (count($date) == 3) ? $date[2] . $sep . $date[1] . $sep . $date[0] : '';\n }\n return $fmt;\n}", "function dates_interconv( $date_format1, $date_format2, $date_str )\n {\n $base_struc = split('[/.-]', $date_format1);\n $date_str_parts = split('[/.-]', $date_str );\n \n //print_r( $base_struc ); echo \"<br>\";\n //print_r( $date_str_parts ); echo \"<br>\";\n \n $date_elements = array();\n \n $p_keys = array_keys( $base_struc );\n foreach ( $p_keys as $p_key )\n {\n if ( !empty( $date_str_parts[$p_key] ))\n {\n $date_elements[$base_struc[$p_key]] = $date_str_parts[$p_key];\n }\n else\n return false;\n }\n \n $dummy_ts = mktime( 0,0,0, $date_elements['m'],$date_elements['d'],$date_elements['Y']);\n \n return date( $date_format2, $dummy_ts );\n }", "function format_date($date, $format = 'd', $culture = null, $charset = null)\n{\n return formatDate($date, null, 'd', $format);\n}", "public function mswConvertMySQLDate($sql) {\n $split = explode('-',$sql);\n switch ($this->settings->jsDateFormat) {\n case 'DD-MM-YYYY':\n return $split[2].'-'.$split[1].'-'.$split[0];\n break;\n case 'DD/MM/YYYY':\n return $split[2].'/'.$split[1].'/'.$split[0]; \n break;\n case 'YYYY-MM-DD':\n return $sql;\n break;\n case 'YYYY/MM/DD':\n return str_replace('-','/',$sql);\n break;\n case 'MM-DD-YYYY':\n return $split[1].'-'.$split[2].'-'.$split[0]; \n break;\n case 'MM/DD/YYYY':\n return $split[1].'/'.$split[2].'/'.$split[0];\n break;\n }\n}", "function sc_date_format($date){\n\t$CI =& get_instance();\n\tif($CI->session->userdata('locale') =='uk'){\n\t\treturn date('d/m/Y', $date);\n\t}else{\n\t\treturn date('m/d/Y', $date);\n\t}\n}", "function date_conv($dateString) {\n\t$newDateString = \"00/00/0000\";\n\t\n\t// remover aspas simples e duplas\n\t$dateString = str_replace(\"'\",\"\",$dateString);\n\t$dateString = str_replace(\"\\\"\",\"\",$dateString);\n\t//se estiver no formato normal \tdd/mm/YYYY\n\tif( strlen($dateString) == 10 &&\n\t\tsubstr($dateString,2,1)=='/' &&\n\t\tsubstr($dateString,5,1)=='/') {\n\t\t$date = explode(\"/\",$dateString);\n\t\t$newDateString = $date[2].\"-\".$date[1].\"-\".$date[0];\n\t}\n\t//se estiver no formato do banco YYYY-mm-dd\n\telseif( strlen($dateString) == 10 &&\n\t\t\tsubstr($dateString,4,1)=='-' &&\n\t\t\tsubstr($dateString,7,1)=='-') {\n\t\t$date = explode(\"-\",$dateString);\n\t\t$newDateString = $date[2].\"/\".$date[1].\"/\".$date[0];\n\t}\n\treturn $newDateString;\n}", "protected function _convertDates (&$model, $data=array(), $to='mysql') {\r\n\t\t\r\n\t\tif (empty($data)) {\r\n\t\t\treturn $data;\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($data as $key => $value) {\r\n\t\t\tforeach ($value as $model_alias => $fields) {\r\n\t\t\t\tforeach ($fields as $field => $field_value) {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!empty($model->_schema[$field]['type']) && \r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t$model->_schema[$field]['type'] == 'date' || \r\n\t\t\t\t\t\t\t$model->_schema[$field]['type'] == 'datetime'\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\t$date_format = ($model->_schema[$field]['type'] == 'date') ? 'Y-m-d' : 'Y-m-d H:i:s';\r\n\t\t\t\t\t\t$data[$key][$model_alias][$field] = ($to == 'mysql') ? date($date_format, $field_value) : strtotime($field_value);\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\r\n\t\treturn $data;\r\n\t\t\r\n\t}", "protected function cnew_convert_date_to_db( $date ) {\r\n $current_date = DateTime::createFromFormat('d/m/Y', $date );\r\n return $current_date ? $current_date->format('Y-m-d') : $current_date;\r\n }", "function toSqlDate($shortDate)\n {\n $date_elements = explode(\"-\", $shortDate);\n $display_date = $date_elements[2] . \"-\" . $date_elements[1] . \"-\" . $date_elements[0];\n return $display_date;\n }", "function DBDate($d)\r\n\t{\r\n\t\t// note that we are limited to 1970 to 2038\r\n\t\treturn date($this->fmtDate,$d);\r\n\t}", "function tous_auteurs_date_passage() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\r\n\t// fixer le nombre de ligne du tableau (tranche)\r\n\t$fl = $GLOBALS['actijour']['nbl_aut'];\r\n\r\n\t// recup $vl dans URL\r\n\t$dl = intval(_request('vl'));\r\n\t$dl = ($dl + 0);\r\n\t// valeur de tranche affichꥍ\r\n\t$nba1 = $dl + 1;\r\n\r\n\t$p_st = _request('st');\r\n\tif (!$p_st) {\r\n\t\t$where_st = \"statut IN ('0minirezo','1comite','6forum')\";\r\n\t\t$p_st = 'tous';\r\n\t} else {\r\n\t\t$where_st = \"statut = \" . _q($p_st);\r\n\t}\r\n\r\n\t$q = sql_select(\"SQL_CALC_FOUND_ROWS id_auteur, statut, nom,\r\n\t\t\t\t\t\tDATE_FORMAT(en_ligne,'%d/%m/%y %H:%i') AS vu \"\r\n\t\t. \"FROM spip_auteurs \"\r\n\t\t. \"WHERE $where_st \"\r\n\t\t. \"ORDER BY en_ligne DESC,nom \"\r\n\t\t. \"LIMIT $dl,$fl\"\r\n\t);\r\n\r\n\t// recup nombre total d'entrees\r\n\t$nl = sql_select(\"FOUND_ROWS()\");\r\n\t$found = @sql_fetch($nl);\r\n\t$nb_auteurs = $found['FOUND_ROWS()'];\r\n\r\n\t$ifond = 0;\r\n\r\n\t$aff = '';\r\n\r\n\t# onglet select statut\r\n\t$lst_statut = array('tous', '0minirezo', '1comite', '6forum');\r\n\t$script = _request('exec');\r\n\r\n\t$aff .= debut_onglet();\r\n\tforeach ($lst_statut as $statut) {\r\n\t\t$aff .= onglet(_T('actijour:onglet_connect_' . $statut),\r\n\t\t\tgenerer_url_ecrire($script, 'st=' . ($statut == 'tous' ? '' : $statut)),\r\n\t\t\t$statut,\r\n\t\t\t($p_st == $statut ? $statut : ''), '');\r\n\t}\r\n\t$aff .= fin_onglet();\r\n\r\n\r\n\t# tableau\r\n\t#\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n\r\n\t$aff .= \"<table align='center' border='0' cellpadding='2' cellspacing='0' width='100%'>\\n\"\r\n\t\t. \"<tr><td colspan='3' class='verdana3 bold'>\" . _T('actijour:tous_date_connections')\r\n\t\t. \"</td></tr>\";\r\n\t# Tranches\r\n\t$aff .= \"<tr><td colspan='3' class='verdana3 bold'>\";\r\n\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t. tranches_liste_art($nba1, $nb_auteurs, $fl)\r\n\t\t. \"\\n</div>\\n\";\r\n\t$aff .= \"</td></tr>\";\r\n\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$ifond = $ifond ^ 1;\r\n\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\r\n\t\t$aff .= \"<tr bgcolor='$couleur'>\"\r\n\t\t\t. \"<td width='5%'>\\n\"\r\n\t\t\t. bonhomme_statut($row) . \"</td>\\n\"\r\n\t\t\t. \"<td width='75%'>\"\r\n\t\t\t. \"<a class='verdana2 bold' href='\" . generer_url_ecrire(\"auteur_infos\", \"id_auteur=\" . $row['id_auteur']) . \"'>\"\r\n\t\t\t. entites_html($row['nom']) . \"</a>\\n\"\r\n\t\t\t. \"<td width='20%'>\\n\"\r\n\t\t\t. \"<div align='right' class='verdana1'>\" . $row['vu'] . \"</div>\\n\"\r\n\t\t\t. \"</td></tr>\\n\";\r\n\r\n\t}\r\n\t$aff .= \"</table>\\n\\n\";\r\n\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "function localize_date($date, $location = 'en_EN') {\r\n if (strlen($date) == 10) {\r\n\r\n $date_array = explode('-', $date);\r\n\r\n if (substr($location, 0, 2) == 'fr' OR substr($location, 0, 2) == 'de' OR substr($location, 0, 2) == 'es') {\r\n return $date_array[2] . '.' . $date_array[1] . '.' . $date_array[0];\r\n } elseif (substr($location, 0, 2) == 'en') {\r\n return $date;\r\n }\r\n }\r\n\r\n return $date;\r\n}", "function DateToIndo($date) {\r\n // variabel BulanIndo merupakan variabel array yang menyimpan nama-nama bulan\r\n $BulanIndo = array(\"Januari\", \"Februari\", \"Maret\",\r\n \"April\", \"Mei\", \"Juni\",\r\n \"Juli\", \"Agustus\", \"September\",\r\n \"Oktober\", \"November\", \"Desember\");\r\n $tahun = substr($date, 0, 4); // memisahkan format tahun menggunakan substring\r\n $bulan = substr($date, 5, 2); // memisahkan format bulan menggunakan substring\r\n $tgl = substr($date, 8, 2); // memisahkan format tanggal menggunakan substring\r\n $zzesult = $tgl . \" \" . $BulanIndo[(int)$bulan-1] . \" \". $tahun;\r\n return($zzesult);\r\n }", "function date_mois_fr($mois, $suffix = '')\n\t{\n\t\t$liste_mois = array('01' => 'janvier', '02' => 'fevrier', '03' => 'mars' , '04' => 'avril', '05' => 'mai', '06' => 'juin', '07' => 'juillet', '08' => 'aout', '09' => 'septembre', '10' => 'octobre', '11' => 'novembre', '12' => 'décembre' );\n\t\t$liste_cour = array('01' => 'jan', '02' => 'fev', '03' => 'mar' , '04' => 'avr', '05' => 'mai', '06' => 'juin', '07' => 'juil', '08' => 'aou', '09' => 'sept', '10' => 'oct', '11' => 'nov', '12' => 'déc' );\n\n\t\tif(array_key_exists($mois, $liste_mois))\n\t\t{\n\t\t\t$date['full'] = $liste_mois[$mois];\n\t\t\t$date['court'] = $liste_cour[$mois].$suffix;\n\n\t\t\treturn $date;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "function formatDateDBversLocal($date, $type = 2)\n {\n /*\n * Suppression des espaces, tabulations et autres caracteres indesirables presents en debut et fin de chaine\n */\n $date = ltrim($date);\n $date = rtrim($date);\n $temp = @explode(\" \", $date);\n $date = $temp[0];\n $heure = $temp[1];\n $temp = @explode($this->separateurDB, $date);\n /*\n * Reformatage de la date\n */\n\n switch ($this->formatDate) {\n case 0:\n $date = $temp[0] . $this->separateurLocal . $temp[1] . $this->separateurLocal . $temp[2];\n break;\n case 1:\n $date = $temp[2] . $this->separateurLocal . $temp[1] . $this->separateurLocal . $temp[0];\n break;\n case 2:\n $date = $temp[1] . $this->separateurLocal . $temp[2] . $this->separateurLocal . $temp[0];\n break;\n }\n\n if ($type == 3) {\n /*\n * Reincorporation de l'heure\n */\n $date .= \" \" . $heure;\n }\n return ($date);\n }", "function format_date($format, $timestamp, $timezone, $lang = LANG_NO)\n{\n\tglobal $_date_translations, $_default_date_translations, $_lang;\n\t\n\t$translations = $_default_date_translations;\n\tif (is_valid_lang($lang) && $lang != $_lang)\n\t{\n\t\t$lang_code = get_lang_code($lang);\n\t\tif (!isset($_date_translations[$lang_code]))\n\t\t{\n\t\t\t$_date_translations[$lang_code] = include(__DIR__ . '/languages/' . $lang_code . '/date.php');\n\t\t}\n\t\t$translations = $_date_translations[$lang_code];\n\t}\n\n\tdate_default_timezone_set($timezone);\n\t$row = date($format, $timestamp);\n\tforeach ($translations as $eng => $localized)\n\t{\n\t\t$row = str_replace($eng, $localized, $row);\n\t}\n\treturn $row;\n}", "function getF_gasto()\n {\n if (!isset($this->df_gasto) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n $oConverter = new core\\ConverterDate('date', $this->df_gasto);\n return $oConverter->fromPg();\n }", "function diaMesAno($data1) {\n\t$myDateTime = DateTime::createFromFormat('Y-m-d', $data1);\n\t$convertida = $myDateTime->format('d/m/Y');\n\treturn ($convertida);\n}", "function dateToMySQL ($dateSource, $date) {\n\t$dateOUT = \"\";\n\t$dateSource = strtolower($dateSource);\n\t// Replace '/' by '-' from original date. This allow me use \"sscanf($date,\"%d %d %d\")\"\n\t$date = str_ireplace(\"/\", \"-\", $date);\n\tif ($date != \"\") {\n\t\tif ($dateSource == \"yyyymmdd\")\n\t\t\tlist($year, $month, $day) = sscanf($date,\"%d %d %d\");\n\t\tif ($dateSource == \"ddmmyyyy\")\n\t\t\tlist($day, $month, $year) = sscanf($date,\"%d %d %d\");\n\t\tif ($dateSource == \"yyyyddmm\")\n\t\t\tlist($year, $day, $month) = sscanf($date,\"%d %d %d\");\n\t\tif ($dateSource == \"mmyyyydd\")\n\t\t\tlist($month, $year, $day) = sscanf($date,\"%d %d %d\");\n\t\tif ($dateSource == \"\") {\n\t\t\t// Autodetect mode [Supported modes: (YYYYMMDD) Or (DDMMYYYY)]\n\t\t\tlist($day, $month, $year) = sscanf($date,\"%d %d %d\");\n\t\t\tif (strlen($year) <= 3) {\n\t\t\t\tlist($year, $month, $day) = sscanf($date,\"%d %d %d\");\n\t\t\t}\n\t\t}\n\t\t$dateOUT = sprintf (\"%04d-%02d-%02d\", abs($year), abs($month), abs($day));\n\t}\n\treturn ($dateOUT);\n}", "function nl_date( $sql_date ) {\n\t\n\t$timestamp = strtotime($sql_date); //UNIX TIMESTAMP OF SQL DATE\n\t$now = time(); //UNIX TIMESTAMP OF NOW\n\t\n\t\n\t//sees if the thing is on TODAY's date\n\t$format_today_compare = strftime(\"%b %e\", $now);\n\t$format_date_compare = strftime(\"%b %e\", $timestamp);\n\t\n\t$tomorrow = mktime(0,0,0,date(\"m\"),date(\"d\")+1,date(\"Y\"));\n\t\n\tif ($format_today_compare == $format_date_compare) { //IS IT TODAY\n\t\t$formatteddate = \"TONIGHT\";\n\t}\n\telse if (strftime (\"%b %e\", $tomorrow) == strftime (\"%b %e\", $timestamp)) { //IS IT TOMORROW\n\t\t$formatteddate = \"TOMORROW\";\n\t} else if ( $timestamp - $now < 432000 && $timestamp - $now > 0) { //IS IT THIS WEEK?\n\t\t//then it's within a week\n\t\t$format = \"%A\";\n\t\t$formatteddate = strftime ($format, $timestamp);\n\t} else {\n\t\t//then it's over a week\n\t\t$format = \"%a, %b %e\";\n\t\t$formatteddate = strftime ($format, $timestamp);\n\t}\n\t\n\treturn strtoupper($formatteddate);\n\t\n}", "public function getAllDate($datoDesde,$datoHasta){\n $sql = \"SELECT Id, Proveedor, Concepto, FORMAT(Monto, 2) AS Monto, Revisado, DATE_FORMAT(FechaSolicitud,'%d/%m/%Y') AS FechaSolicitud, AutorizadoPago, DATE_FORMAT(FechaAutorizado,'%d/%m/%Y') AS FechaAutorizado, estado, Comentario, ComentarioCapt, DATE_FORMAT(FechaPago,'%d/%m/%Y') AS FechaPago From \" .self::$tablename. \" WHERE FechaSolicitud BETWEEN '{$datoDesde}' AND '{$datoHasta}' ORDER BY Id DESC\";\n return Executor::doit($sql);\n }", "function yourls_date_i18n( $dateformatstring, $timestamp = false ) {\n /**\n * @var YOURLS_Locale_Formats $yourls_locale_formats\n */\n\tglobal $yourls_locale_formats;\n\tif( !isset( $yourls_locale_formats ) )\n\t\t$yourls_locale_formats = new YOURLS_Locale_Formats();\n\n\tif ( false === $timestamp ) {\n $timestamp = yourls_get_timestamp( time() );\n\t}\n\n\t// store original value for language with untypical grammars\n\t$req_format = $dateformatstring;\n\n\t/**\n\t * Replace the date format characters with their translatation, if found\n\t * Example:\n\t * 'l d F Y' gets replaced with '\\L\\u\\n\\d\\i d \\M\\a\\i Y' in French\n\t * We deliberately don't deal with 'I', 'O', 'P', 'T', 'Z' and 'e' in date format (timezones)\n\t */\n\tif ( ( !empty( $yourls_locale_formats->month ) ) && ( !empty( $yourls_locale_formats->weekday ) ) ) {\n\t\t$datemonth = $yourls_locale_formats->get_month( date( 'm', $timestamp ) );\n\t\t$datemonth_abbrev = $yourls_locale_formats->get_month_abbrev( $datemonth );\n\t\t$dateweekday = $yourls_locale_formats->get_weekday( date( 'w', $timestamp ) );\n\t\t$dateweekday_abbrev = $yourls_locale_formats->get_weekday_abbrev( $dateweekday );\n\t\t$datemeridiem = $yourls_locale_formats->get_meridiem( date( 'a', $timestamp ) );\n\t\t$datemeridiem_capital = $yourls_locale_formats->get_meridiem( date( 'A', $timestamp ) );\n\n\t\t$dateformatstring = ' '.$dateformatstring;\n\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])D/\", \"\\\\1\" . yourls_backslashit( $dateweekday_abbrev ), $dateformatstring );\n\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])F/\", \"\\\\1\" . yourls_backslashit( $datemonth ), $dateformatstring );\n\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])l/\", \"\\\\1\" . yourls_backslashit( $dateweekday ), $dateformatstring );\n\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])M/\", \"\\\\1\" . yourls_backslashit( $datemonth_abbrev ), $dateformatstring );\n\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])a/\", \"\\\\1\" . yourls_backslashit( $datemeridiem ), $dateformatstring );\n\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])A/\", \"\\\\1\" . yourls_backslashit( $datemeridiem_capital ), $dateformatstring );\n\n\t\t$dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 );\n\t}\n\n\t$date = date( $dateformatstring, $timestamp );\n\n\t// Allow plugins to redo this entirely for languages with untypical grammars\n\treturn yourls_apply_filter('date_i18n', $date, $req_format, $timestamp);\n}", "static function convert_dateFrEn($date) {\r\n $tab = explode('-', $date);\r\n $result = $tab['0'] . \"-\" . $tab['1'] . \"-\" . $tab['2'];\r\n return $result;\r\n }", "function ConvertDate($mysqlDate)\n {\n if($mysqlDate != \"\")\n return $this->app->String->Convert($mysqlDate,\"%1-%2-%3\",\"%3.%2.%1\");\n }", "private function return_dates($dados)\n {\n\n $var_month = $dados[0]->mes;\n $var_year = $dados[0]->ano;\n $var_dayOfWeek = $dados[0]->dia_encontro;\n $var_counting_days = cal_days_in_month(CAL_GREGORIAN, $var_month, $var_year); //days of month\n\n $dini = mktime(0,0,0,$var_month,1,$var_year);\n $dfim = mktime(0,0,0,$var_month,$var_counting_days,$var_year);\n\n $return_d = array();\n\n while($dini <= $dfim) //Enquanto uma data for inferior a outra\n {\n $dt = date(\"d/m/Y\",$dini); //Convertendo a data no formato dia/mes/ano\n $diasemana = date(\"w\", $dini);\n\n if($diasemana == $var_dayOfWeek)\n { // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n array_push($return_d, $dt);\n }\n\n $dini += 86400; // Adicionando mais 1 dia (em segundos) na data inicial\n }\n\n //Segundo dia encontro\n $var_month = $dados[0]->mes;\n $var_year = $dados[0]->ano;\n $var_dayOfWeek = $dados[0]->segundo_dia_encontro;\n $var_counting_days = cal_days_in_month(CAL_GREGORIAN, $var_month, $var_year); //days of month\n\n $dini = mktime(0,0,0,$var_month,1,$var_year);\n $dfim = mktime(0,0,0,$var_month,$var_counting_days,$var_year);\n\n $bPrimeiro = false;\n\n while($dini <= $dfim) //Enquanto uma data for inferior a outra\n {\n $dt = date(\"d/m/Y\",$dini); //Convertendo a data no formato dia/mes/ano\n $diasemana = date(\"w\", $dini);\n\n if($diasemana == $var_dayOfWeek)\n { // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n\n if ($bPrimeiro==false) {\n array_push($return_d, \"\");\n array_push($return_d, \" Segundo Dia Encontro \");\n }\n\n array_push($return_d, $dt);\n $bPrimeiro=true;\n }\n\n $dini += 86400; // Adicionando mais 1 dia (em segundos) na data inicial\n }\n\n array_push($return_d, \"\");\n array_push($return_d, \" Encontro Avulso (Criar Novo) \");\n\n //Verifica se houve encontro avulso para a celula / mes / ano\n $dt_encontro_avulso = $this->buscar_data_avulsa($dados[0]->celulas_id, $var_month, $var_year);\n\n if ($dt_encontro_avulso!=null) {\n array_push($return_d, \"\");\n array_push($return_d, \" Houve Encontro Avulso : \");\n\n foreach ($dt_encontro_avulso as $item) {\n array_push($return_d, date(\"d/m/Y\", strtotime($item->data_encontro)));\n }\n }\n\n return ($return_d);\n\n }", "function toSqlDateFromSlashes($shortDate)\n {\n // *nb* with short year i.e. 08, 09 etc. This only good to 22nd century. Fix it before then ;-)\n $date_elements = explode(\"/\", $shortDate);\n $display_date = $date_elements[2] . \"-\" . $date_elements[1] . \"-\" . $date_elements[0];\n return $display_date;\n }", "public static function dateDB(){\n\t\t$day = date('d');\n\t\t$month = date('m');\n\t\t$year = date('Y');\n\n\t\t$date = $year.\"-\".$month.\"-\".$day;\n\n\t\treturn ($date);\n\t}", "function setFechaNoSQL($FE_FechaNac)\n\t{\n\t\t$partes = explode(\"-\", $FE_FechaNac);\n\t\t$FE_FechaNac = $partes[2].'/'.$partes[1].'/'.$partes[0];\n\t\treturn $FE_FechaNac;\n\t}", "function MTD_RECIBIR_DATOS_DB ($vp_arreglo_datos)\n {\n \t \t \t\t \t\t \n }", "public function convert_date_db($created_date){\n\t\tif(($created_date != '') && ($created_date != '0000-00-00') && ($created_date != '0000-00-00 00:00:00')){\n\t\t\t$c_d = date('Y-m-d', strtotime($created_date));\n\t\t\treturn $c_d;\n\t\t}\n\t}", "function french_to_english_datetime($datetime, $format='Y-m-d H:i:s') {\n\tif(\\DateTime::createFromFormat('d/m/Y H:i:s', $datetime)) {\n\t\treturn \\DateTime::createFromFormat('d/m/Y H:i:s', $datetime)->format($format);\n\t}\n\treturn null;\n}", "static function mysqlToFullDate($mydsqlDate) {\r\n\t\t$date = strtotime($mydsqlDate);\r\n\t\treturn date(__('d.m.Y'), $date);\r\n\t}", "static function convert_dateFr($date) {\r\n $tab = explode('-', $date);\r\n $result = $tab['0'] . \" \" . Functions::get_mois($tab['1']) . \" \" . $tab['2'];\r\n return $result;\r\n }", "public function getDateDebut();", "function sqlToDate($sql){\n \treturn substr($sql, 8, 2) . \"/\" . substr($sql, 5, 2) . \"/\" . substr($sql, 0, 4);\n }", "function formatFechaES($value){\n\t$partes=explode(\"-\", $value);\n\t$value = $partes[2].\"-\".$partes[1].\"-\".$partes[0];\n\treturn $value;\n}", "function date_mysql_fr($date){\n if ($date != \"0000-00-00\" && $date != \"\" && $date != null){\n $my_date = Datetime::createFromFormat('Y-m-d', $date)->format('d/m/Y');\n return $my_date;\n } else {\n return null;\n }\n}", "public static function FormatDateToSql($date){\n return date(\"Y-m-d\", strtotime(str_replace('/','-',$date)));\n }", "function persian_strftime_utf($format, $timestamp='') {\n\n if($timestamp==''){\n $timestamp = mktime();\n }\n\n $g_d=date('j', $timestamp);\n $g_m=date('n', $timestamp);\n $g_y=date('Y', $timestamp);\n\n list($jy, $jm, $jd, $j_all_days) = g2p($g_y, $g_m, $g_d);\n\n $j_month_name = array('', 'فروردین', 'اردیبهشت', 'خرداد', 'تیر',\n 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند');\n $j_week_name = array('Saturday' => 'شنبه',\n 'Sunday' => 'یک شنبه',\n 'Monday' => 'دوشنبه',\n 'Tuesday' => 'سه شنبه',\n 'Wednesday' => 'چهارشنبه',\n 'Thursday' => 'پنج شنبه',\n 'Friday' => 'جمعه',\n 'Sat' => 'ش',\n 'Sun' => 'ی',\n 'Mon' => 'د',\n 'Tue' => 'س',\n 'Wed' => 'چ',\n 'Thu' => 'پ',\n 'Fri' => 'ج');\n $j_week_number = array('Sat' => '1',\n 'Sun' => '2',\n 'Mon' => '3',\n 'Tue' => '4',\n 'Wed' => '5',\n 'Thu' => '6',\n 'Fri' => '7');\n\n // calculate string\n $output_str='';\n\n for ($i=0; $i<strlen($format); $i++){\n\n if($format[$i]=='%'){\n $i++;\n switch($format[$i]){\n case 'a':\n $output_str.=$j_week_name[date('D', $timestamp)];\n break;\n case 'A':\n $output_str.=$j_week_name[date('l', $timestamp)];\n break;\n case 'b':\n case 'B':\n case 'h':\n $output_str.=$j_month_name[$jm];\n break;\n case 'c':\n $output_str.=persian_strftime_utf('%y/%m/%d %I:%M:%S', $timestamp);\n break;\n case 'C':\n $output_str.=floor($jy/100);\n break;\n case 'd':\n if($jd<10) $output_str.='0'.$jd; else $output_str.=$jd;\n break;\n case 'D':\n $output_str.=$jy.'/'.$jm.'/'.$jd;\n break;\n case 'e':\n if($jd<10) $output_str.=' '.$jd; else $output_str.=$jd;\n break;\n case 'H':\n $output_str.=date('H', $timestamp);\n break;\n case 'I':\n $output_str.=date('h', $timestamp);\n break;\n case 'j':\n $output_str.=sprintf('%03d', $j_all_days);\n break;\n case 'm':\n if($jm<10) $output_str.='0'.$jm; else $output_str.=$jm;\n break;\n case 'M':\n $output_str.=date('i', $timestamp);\n break;\n case 'n':\n $output_str.=\"\\n\";\n break;\n case 'r':\n case 'p':\n if(date('a',$timestamp)=='pm') $output_str.='بعد از ظهر'; else $output_str.='قبل از ظهر';\n break;\n case 'R':\n $output_str.=strftime('%R', $timestamp);\n break;\n case 'S':\n $output_str.=date('s', $timestamp);\n break;\n case 't':\n $output_str.=\"\\t\";\n break;\n case 'U':\n case 'V':\n case 'W':\n $output_str.=sprintf('%02d', floor(($j_all_days+1)/7));\n break;\n case 'u':\n case 'w':\n $output_str.=$j_week_number[date('D', $timestamp)];\n break;\n case 'x':\n $output_str.=persian_strftime_utf('%y/%m/%d', $timestamp);\n break;\n case 'X':\n $output_str.=persian_strftime_utf('%I:%M:%S', $timestamp);\n break;\n case 'g':\n case 'y':\n $output_str.=$jy-(floor($jy/100)*100);\n break;\n case 'G':\n case 'Y':\n $output_str.=$jy;\n break;\n case 'z':\n case 'Z':\n $output_str.=strftime('%z', $timestamp);\n break;\n case '%':\n $output_str.='%';\n break;\n }\n }else{\n $output_str.=$format[$i];\n }\n }\n\n return $output_str;\n}", "function convertMysqlDate($date) {\n $date = str_replace('/', '-', $date);\n $result = $date;\n if(!empty($date)) {\n $arr = explode('-', $date);\n if(checkdate($arr[1], $arr[0], $arr[2])) {\n $result = \"$arr[2]-$arr[1]-$arr[0]\";\n }\n }\n return $result;\n }", "function str2DBDT($str)\n{\n $intTime = strtotime($str);\n if ($intTime === false)\n return NULL;\n return date(\"Y-m-d H:i:s\", $intTime);\n}", "function mysql_to_date($date=false, $separador=\"-\") { //YYYY-mm-dd => dd-mm-YYYY\n if (!$date) return false;\n else if ($date == '0000-00-00') return '';\n else return date(\"d\".$separador.\"m\".$separador.\"Y\",strtotime($date));\n}" ]
[ "0.7196374", "0.6710283", "0.64596957", "0.63078535", "0.63078535", "0.62078726", "0.6106267", "0.6033717", "0.593848", "0.59157395", "0.59153837", "0.5863876", "0.57893354", "0.5734847", "0.57185125", "0.5688356", "0.5673291", "0.56178266", "0.5613018", "0.56121105", "0.55502254", "0.5542434", "0.552172", "0.55184865", "0.5499796", "0.54944277", "0.5476904", "0.5472997", "0.54703283", "0.54703283", "0.54659307", "0.5463765", "0.54614806", "0.5417894", "0.54155505", "0.5371032", "0.53710055", "0.5357985", "0.53299856", "0.5315923", "0.5312447", "0.52972627", "0.52961326", "0.5285937", "0.52782816", "0.5271714", "0.5263945", "0.5254715", "0.52503365", "0.5239827", "0.52378684", "0.5227614", "0.52187586", "0.5215449", "0.5211214", "0.5193389", "0.51725787", "0.516667", "0.5165561", "0.5163106", "0.51512337", "0.51469606", "0.5136365", "0.51354414", "0.5131142", "0.51303536", "0.512764", "0.511455", "0.51133716", "0.51115704", "0.51093525", "0.5108702", "0.5104347", "0.50990313", "0.50944906", "0.5076615", "0.50710213", "0.5070905", "0.50689006", "0.5067021", "0.50659746", "0.5062983", "0.5062049", "0.50509834", "0.5048054", "0.50410223", "0.50390065", "0.503652", "0.5020876", "0.5018682", "0.5014997", "0.500953", "0.50094205", "0.5007373", "0.5006088", "0.5004253", "0.49997318", "0.4996514", "0.49947384", "0.49877205" ]
0.7308947
0
function utilDatesLocaleVersDB transforme les dates du tableau (selon le type $this>types, en format utilisable par le SGBD
function utilDatesLocaleVersDB($data) { foreach ($data as $key => $value) { if (is_array($value)) { /* * Traitement recursif */ $data[$key] = $this->utilDatesDBVersLocale($value); } else { if (($this->colonnes[$key]["type"] == 2 || $this->colonnes[$key]["type"] == 3) && strlen($value) > 0) { /* * Formatage de la date */ $data[$key] = $this->formatDateLocaleVersDB($value, $this->colonnes[$key]["type"]); } } } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function utilDatesDBVersLocale($data)\n {\n foreach ($data as $key => $value) {\n\n if (is_array($value)) {\n /*\n * Traitement recursif\n */\n $data[$key] = $this->utilDatesDBVersLocale($value);\n } else {\n if (!empty($this->colonnes[$key]) && ($this->colonnes[$key][\"type\"] == 2 || $this->colonnes[$key][\"type\"] == 3) && !empty($value)) {\n /*\n * Formatage de la date\n */\n $data[$key] = $this->formatDateDBversLocal($value, $this->colonnes[$key][\"type\"]);\n }\n }\n\n }\n\n return $data;\n }", "function formatDateLocaleVersDB($date, $type = 2)\n {\n $date = ltrim($date);\n $date = rtrim($date);\n /*\n * Separation de la date et de l'heure\n */\n $temp = @explode(\" \", $date);\n $date = $temp[0];\n $heure = $temp[1];\n $j = 0;\n do {\n $test = @strpos($date, $this->sepValide[$j]);\n if ($test === false) {\n $j++;\n }\n } while ($j < count($this->sepValide) && ($test === false));\n $separateurLocal = $this->sepValide[$j];\n $temp = @explode($separateurLocal, $date);\n /*\n * Assignation des champs\n */\n switch ($this->formatDate) {\n case 0:\n $annee = $temp[0];\n $mois = $temp[1];\n $jour = $temp[2];\n break;\n case 1:\n $annee = $temp[2];\n $mois = $temp[1];\n $jour = $temp[0];\n break;\n case 2:\n $annee = $temp[2];\n $mois = $temp[0];\n $jour = $temp[1];\n break;\n }\n /*\n * Prise en compte de l'annee par defaut\n */\n if ($annee == \"\") {\n $annee = date(\"Y\");\n }\n\n if ($annee < 100) {\n if ($annee <= $this->dateMini) {\n $annee = \"20\" . $annee;\n } else {\n $annee = \"19\" . $annee;\n }\n }\n\n $date = $annee . $this->separateurDB . $mois . $this->separateurDB . $jour;\n /*\n * Reintegration de l'heure le cas echeant\n */\n if ($type == 3) {\n $date .= \" \" . $heure;\n }\n return $date;\n }", "function formatDatesVersLocal($data)\n {\n return $this->utilDatesDBVersLocale($data);\n }", "function mysql2date($format, $date, $translate = \\true)\n {\n }", "function formatDateDBversLocal($date, $type = 2)\n {\n /*\n * Suppression des espaces, tabulations et autres caracteres indesirables presents en debut et fin de chaine\n */\n $date = ltrim($date);\n $date = rtrim($date);\n $temp = @explode(\" \", $date);\n $date = $temp[0];\n $heure = $temp[1];\n $temp = @explode($this->separateurDB, $date);\n /*\n * Reformatage de la date\n */\n\n switch ($this->formatDate) {\n case 0:\n $date = $temp[0] . $this->separateurLocal . $temp[1] . $this->separateurLocal . $temp[2];\n break;\n case 1:\n $date = $temp[2] . $this->separateurLocal . $temp[1] . $this->separateurLocal . $temp[0];\n break;\n case 2:\n $date = $temp[1] . $this->separateurLocal . $temp[2] . $this->separateurLocal . $temp[0];\n break;\n }\n\n if ($type == 3) {\n /*\n * Reincorporation de l'heure\n */\n $date .= \" \" . $heure;\n }\n return ($date);\n }", "public function afterFind(){\n // Format dates based on the locale\n foreach($this->metadata->tableSchema->columns as $columnName => $column){\n if ($column->dbType == 'date'){\n $aux= CDateTimeParser::parse($this->$columnName,\"yyyy-MM-dd\");\n $this->$columnName = ($aux != null )?date('d/m/Y',$aux ):null;\n }elseif ($column->dbType == 'datetime'){\n $aux= CDateTimeParser::parse($this->$columnName,\"yyyy-MM-dd HH:mm:ss\");\n $this->$columnName = ($aux != null )?date('d/m/Y H:i:s',$aux ):null;\n }\n }\n }", "protected function _convertDates (&$model, $data=array(), $to='mysql') {\r\n\t\t\r\n\t\tif (empty($data)) {\r\n\t\t\treturn $data;\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($data as $key => $value) {\r\n\t\t\tforeach ($value as $model_alias => $fields) {\r\n\t\t\t\tforeach ($fields as $field => $field_value) {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!empty($model->_schema[$field]['type']) && \r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t$model->_schema[$field]['type'] == 'date' || \r\n\t\t\t\t\t\t\t$model->_schema[$field]['type'] == 'datetime'\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\t$date_format = ($model->_schema[$field]['type'] == 'date') ? 'Y-m-d' : 'Y-m-d H:i:s';\r\n\t\t\t\t\t\t$data[$key][$model_alias][$field] = ($to == 'mysql') ? date($date_format, $field_value) : strtotime($field_value);\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\r\n\t\treturn $data;\r\n\t\t\r\n\t}", "protected function beforeValidate ()\n {\n //$this->tglrevisimodul = date ('Y-m-d', strtotime($this->tglrevisimodul));\n $format = new MyFormatter();\n //$this->tglrevisimodul = $format->formatDateTimeForDb($this->tglrevisimodul);\n foreach($this->metadata->tableSchema->columns as $columnName => $column){\n if ($column->dbType == 'date')\n {\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }\n else if ($column->dbType == 'timestamp without time zone')\n {\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n } \n }\n\n return parent::beforeValidate ();\n }", "protected function beforeValidate ()\n {\n //$this->tglrevisimodul = date ('Y-m-d', strtotime($this->tglrevisimodul));\n $format = new MyFormatter();\n //$this->tglrevisimodul = $format->formatDateTimeForDb($this->tglrevisimodul);\n foreach($this->metadata->tableSchema->columns as $columnName => $column){\n if ($column->dbType == 'date')\n {\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }\n else if ( $column->dbType == 'timestamp without time zone')\n {\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }\n }\n\n return parent::beforeValidate ();\n }", "public function dateViewHelperFormatsDateLocalizedDataProvider() {}", "function uiToDBdate() {\r\n\r\n\t\t$month = (int) substr($this->date, -10, 2);\r\n\t\t$day = (int) substr($this->date, -7, 2);\r\n\t\t$year = (int) substr($this->date, -4, 4);\r\n\r\n\t\t$formattedDate = $year . \"-\" . $month . \"-\" . $day;\r\n\r\n\t\t$this->date = $formattedDate;\r\n\t}", "public function buscarDatosDeCodigo($lote, $suc){\n $db = new My();\n $my = new My();\n $datos = array();\n $query = \"SELECT a.codigo AS Codigo,l.lote,CONCAT( a.descrip, '-', p.nombre_color) AS Descrip , s.suc, s.cantidad AS Stock, s.estado_venta,a.um AS UM,l.ancho AS Ancho,l.gramaje AS Gramaje,l.tara AS Tara,l.padre AS Padre,s.ubicacion AS U_ubic,\n l.img AS Img, l.kg_desc AS U_kg_desc,h.fecha_hora AS entDate\n\n FROM articulos a INNER JOIN lotes l ON a.codigo = l.codigo INNER JOIN stock s ON l.codigo = s.codigo AND l.lote = s.lote \n INNER JOIN pantone p ON l.pantone = p.pantone INNER JOIN historial h ON l.codigo = h.codigo AND l.lote = h.lote\n WHERE s.cantidad > 0 AND s.suc = '$suc' AND l.lote ='$lote' GROUP BY lote ORDER BY h.fecha_hora ASC LIMIT 1\";\n \n $my->Query($query);\n if($my->NextRecord()){\n $datos = $my->Record;\n if(count($datos)){\n $datos = array_map(\"utf8_encode\",$datos);\n // print_r($datos);\n \n $rem = \"SELECT CONCAT(fecha_cierre,' ',hora_cierre) AS fecha_ingreso FROM nota_remision n, nota_rem_det d WHERE n.n_nro = d.n_nro AND lote = '$lote' AND n.estado = 'Cerrada' AND n.suc_d = '$suc'\";\n \n $db->Query($rem);\n if($db->NumRows() > 0){ \n $db->NextRecord();\n $fecha_ingreso = $db->Record['fecha_ingreso'];\n $datos['entDate'] = $fecha_ingreso;\n }\n // Buscar si esta en una Remision Abierta o En Proceso\n $rem2 = \"SELECT n.n_nro, n.suc_d FROM nota_remision n, nota_rem_det d WHERE n.n_nro = d.n_nro AND lote = '$lote' AND n.estado != 'Cerrada' AND n.suc = '$suc'\";\n \n $db->Query($rem2);\n if($db->NumRows() > 0){ \n $db->NextRecord();\n $n_nro = $db->Record['n_nro'];\n $destino = $db->Record['suc_d'];\n $datos['NroRemision'] = $n_nro;\n $datos['Destino'] = $destino;\n $datos['Mensaje']=\"En Remision\";\n }else{\n $datos['Mensaje']=\"Ok\"; \n }\n \n }\n echo json_encode($datos);\n }else{\n echo '{\"Mensaje\":\"Error: Codigo no encontrado!\"}';\n } \n $my->Close();\n }", "public function rangesToDates(){\n //Rangos::\n }", "public function getAllDate($datoDesde,$datoHasta){\n $sql = \"SELECT Id, Proveedor, Concepto, FORMAT(Monto, 2) AS Monto, Revisado, DATE_FORMAT(FechaSolicitud,'%d/%m/%Y') AS FechaSolicitud, AutorizadoPago, DATE_FORMAT(FechaAutorizado,'%d/%m/%Y') AS FechaAutorizado, estado, Comentario, ComentarioCapt, DATE_FORMAT(FechaPago,'%d/%m/%Y') AS FechaPago From \" .self::$tablename. \" WHERE FechaSolicitud BETWEEN '{$datoDesde}' AND '{$datoHasta}' ORDER BY Id DESC\";\n return Executor::doit($sql);\n }", "function datum($db_date) {\r\n return strftime('%d.%m.%Y', strtotime($db_date));\r\n }", "function tridate(){\r\n $sql=\"SELECT * FROM livraison ORDER BY date ASC\";\r\n$db = config::getConnexion();\r\n try{\r\n $liste=$db->query($sql);\r\n return $liste;\r\n }\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n } \r\n}", "function date_sql2en($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"-\", $date);\r\n\t\t\t$date_fr = $date[1].\"/\".$date[2].\"/\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_fr = \"\";\r\n\t\t}\r\n\t\treturn $date_fr;\r\n\t}", "function ConvertToSqlDate($date)\n {\n if($date != \"\")\n return $this->app->String->Convert($date,\"%3.%2.%1\",\"%1-%2-%3\");\n }", "private function convert_date_db_format($date)\n {\n $str_date = strtotime($date);\n $db_date = date('Y-m-d', $str_date);\n return $db_date;\n }", "function dateToDB($date) {\n\tglobal $config;\n\treturn date($config['db_date_format'], strtotime($date));\t\n}", "function date2mysql($date)\r\n\t{\r\n\t\tif($date != \"\")\r\n\t\t{\r\n\t\t@list($jour,$mois,$annee)=explode('/',$date);\t\t\t\t//récupération des différentes valeurs en utilisant les / comme séparateurs\r\n \t\treturn @date('Y-m-d',mktime(0,0,0,$mois,$jour,$annee));\t\t//retour de la date modifié au bon format grace à un mktime\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\treturn $date;\r\n \t\t}\r\n\t}", "public function getDates()\n {\n $this->getFields()->each(function ($field) {\n if ($field instanceof FieldTypeDateInterface) {\n $this->dates[] = $field->getDBKey();\n }\n });\n\n if ($this->hasField(static::CREATED_AT) and $this->hasField(static::UPDATED_AT)) {\n $this->timestamps = true;\n }\n\n return parent::getDates();\n }", "protected function dateFormatDatabase()\n {\n return $this->dateFormat('mysql');\n }", "public function convertDateToDB($_date) {\n\t\tif(ereg(\"^([0-9]{1,2})-([0-9]{1,2})-([0-9]{4}).*$\",\n\t\t\t$_date, $_arrdt) !== false) {\n\t\t\treturn sprintf(\"%04.4d-%02.2d-%02.2d\",\n\t\t\t\t$_arrdt[3], $_arrdt[2], $_arrdt[1]);\n\t\t\t}\n\t\treturn false;\n\t}", "function Dates()\n {\n if (empty($this->Dates))\n {\n $this->Dates=\n $this->DatesObj()->Sql_Select_Hashes\n (\n array\n (\n \"Unit\" => $this->Unit(\"ID\"),\n \"Event\" => $this->Event(\"ID\"),\n )\n );\n\n foreach (array_keys($this->Dates) as $did)\n {\n $this->Dates[ $did ][ \"Text\" ]=$this->MyTime_Sort2Date($this->Dates[ $did ][ \"Name\" ]);\n }\n }\n\n return $this->Dates;\n }", "function verifVadsTransDate($dateData) {\n if ( $dateData == \"ERRORDATE\") {\n return '<p style=\"margin-top:1px;\">Erreur verifVadsTransDate()</p>';\n } else {\n return strftime('%d/%m/%Y',strtotime($dateData)); //convert date Us YYYYMMJJ to Fr JJ/MM/YYYY\n }\n }", "public function getDateDebut();", "public static function getDateFormats()\n {\n return array( 'm/d/y' => 'mm/dd/yy', 'd/m/y' => 'dd/mm/yy' );\n }", "public function getDateFormatter();", "function date_sql2fr($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"-\", $date);\r\n\t\t\t$date_fr = $date[2].\"/\".$date[1].\"/\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_fr = \"\";\r\n\t\t}\r\n\t\treturn $date_fr;\r\n\t}", "private function return_dates($dados)\n {\n\n $var_month = $dados[0]->mes;\n $var_year = $dados[0]->ano;\n $var_dayOfWeek = $dados[0]->dia_encontro;\n $var_counting_days = cal_days_in_month(CAL_GREGORIAN, $var_month, $var_year); //days of month\n\n $dini = mktime(0,0,0,$var_month,1,$var_year);\n $dfim = mktime(0,0,0,$var_month,$var_counting_days,$var_year);\n\n $return_d = array();\n\n while($dini <= $dfim) //Enquanto uma data for inferior a outra\n {\n $dt = date(\"d/m/Y\",$dini); //Convertendo a data no formato dia/mes/ano\n $diasemana = date(\"w\", $dini);\n\n if($diasemana == $var_dayOfWeek)\n { // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n array_push($return_d, $dt);\n }\n\n $dini += 86400; // Adicionando mais 1 dia (em segundos) na data inicial\n }\n\n //Segundo dia encontro\n $var_month = $dados[0]->mes;\n $var_year = $dados[0]->ano;\n $var_dayOfWeek = $dados[0]->segundo_dia_encontro;\n $var_counting_days = cal_days_in_month(CAL_GREGORIAN, $var_month, $var_year); //days of month\n\n $dini = mktime(0,0,0,$var_month,1,$var_year);\n $dfim = mktime(0,0,0,$var_month,$var_counting_days,$var_year);\n\n $bPrimeiro = false;\n\n while($dini <= $dfim) //Enquanto uma data for inferior a outra\n {\n $dt = date(\"d/m/Y\",$dini); //Convertendo a data no formato dia/mes/ano\n $diasemana = date(\"w\", $dini);\n\n if($diasemana == $var_dayOfWeek)\n { // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n\n if ($bPrimeiro==false) {\n array_push($return_d, \"\");\n array_push($return_d, \" Segundo Dia Encontro \");\n }\n\n array_push($return_d, $dt);\n $bPrimeiro=true;\n }\n\n $dini += 86400; // Adicionando mais 1 dia (em segundos) na data inicial\n }\n\n array_push($return_d, \"\");\n array_push($return_d, \" Encontro Avulso (Criar Novo) \");\n\n //Verifica se houve encontro avulso para a celula / mes / ano\n $dt_encontro_avulso = $this->buscar_data_avulsa($dados[0]->celulas_id, $var_month, $var_year);\n\n if ($dt_encontro_avulso!=null) {\n array_push($return_d, \"\");\n array_push($return_d, \" Houve Encontro Avulso : \");\n\n foreach ($dt_encontro_avulso as $item) {\n array_push($return_d, date(\"d/m/Y\", strtotime($item->data_encontro)));\n }\n }\n\n return ($return_d);\n\n }", "function translate_date_to_ro($date_eng)\n{\n $days_of_week = ['Mon' => 'Luni,', 'Tue' => 'Marti,', 'Wed' => 'Miercuri,', 'Thu' => 'Joi,', 'Fri' => 'Vineri,', 'Sat' => 'Sambata,', 'Sun' => 'Duminica,'];\n $months_of_year = ['01' => 'Ian', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'Mai', '06' => 'Iun', '07' => 'Iul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Noi', '12' => 'Dec'];\n $date_eng = explode(\" \", $date_eng);\n $date_eng[0] = $days_of_week[$date_eng[0]];\n $date_eng[2] = $months_of_year[$date_eng[2]];\n $date_ro = implode(\" \", $date_eng);\n//print_r($date_ro);\n return $date_ro;\n}", "function format_dates_for_db($formdata, $field_list)\n{\n\t$new_formdata = $formdata;\n\t\n\tforeach($field_list AS $key)\n\t{\n\t\t$field_key = explode('*', $key);\n\t\tif(array_key_exists($field_key[0], $formdata)){\n\t\t\tif(!empty($field_key[1]) && $field_key[1] == 'EXT'){\n\t\t\t\t$new_formdata[$field_key[0]] = date('Y-m-d H:i:s', strtotime($formdata[$field_key[0]]));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_formdata[$field_key[0]] = date('Y-m-d', strtotime($formdata[$field_key[0]]));\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $new_formdata;\n}", "public function getDate4Database2($date=null){\n\t\treturn date_format($this->createDate($date),\"Y-m-d\");\n\t}", "function tous_auteurs_date_passage() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\r\n\t// fixer le nombre de ligne du tableau (tranche)\r\n\t$fl = $GLOBALS['actijour']['nbl_aut'];\r\n\r\n\t// recup $vl dans URL\r\n\t$dl = intval(_request('vl'));\r\n\t$dl = ($dl + 0);\r\n\t// valeur de tranche affichꥍ\r\n\t$nba1 = $dl + 1;\r\n\r\n\t$p_st = _request('st');\r\n\tif (!$p_st) {\r\n\t\t$where_st = \"statut IN ('0minirezo','1comite','6forum')\";\r\n\t\t$p_st = 'tous';\r\n\t} else {\r\n\t\t$where_st = \"statut = \" . _q($p_st);\r\n\t}\r\n\r\n\t$q = sql_select(\"SQL_CALC_FOUND_ROWS id_auteur, statut, nom,\r\n\t\t\t\t\t\tDATE_FORMAT(en_ligne,'%d/%m/%y %H:%i') AS vu \"\r\n\t\t. \"FROM spip_auteurs \"\r\n\t\t. \"WHERE $where_st \"\r\n\t\t. \"ORDER BY en_ligne DESC,nom \"\r\n\t\t. \"LIMIT $dl,$fl\"\r\n\t);\r\n\r\n\t// recup nombre total d'entrees\r\n\t$nl = sql_select(\"FOUND_ROWS()\");\r\n\t$found = @sql_fetch($nl);\r\n\t$nb_auteurs = $found['FOUND_ROWS()'];\r\n\r\n\t$ifond = 0;\r\n\r\n\t$aff = '';\r\n\r\n\t# onglet select statut\r\n\t$lst_statut = array('tous', '0minirezo', '1comite', '6forum');\r\n\t$script = _request('exec');\r\n\r\n\t$aff .= debut_onglet();\r\n\tforeach ($lst_statut as $statut) {\r\n\t\t$aff .= onglet(_T('actijour:onglet_connect_' . $statut),\r\n\t\t\tgenerer_url_ecrire($script, 'st=' . ($statut == 'tous' ? '' : $statut)),\r\n\t\t\t$statut,\r\n\t\t\t($p_st == $statut ? $statut : ''), '');\r\n\t}\r\n\t$aff .= fin_onglet();\r\n\r\n\r\n\t# tableau\r\n\t#\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n\r\n\t$aff .= \"<table align='center' border='0' cellpadding='2' cellspacing='0' width='100%'>\\n\"\r\n\t\t. \"<tr><td colspan='3' class='verdana3 bold'>\" . _T('actijour:tous_date_connections')\r\n\t\t. \"</td></tr>\";\r\n\t# Tranches\r\n\t$aff .= \"<tr><td colspan='3' class='verdana3 bold'>\";\r\n\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t. tranches_liste_art($nba1, $nb_auteurs, $fl)\r\n\t\t. \"\\n</div>\\n\";\r\n\t$aff .= \"</td></tr>\";\r\n\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$ifond = $ifond ^ 1;\r\n\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\r\n\t\t$aff .= \"<tr bgcolor='$couleur'>\"\r\n\t\t\t. \"<td width='5%'>\\n\"\r\n\t\t\t. bonhomme_statut($row) . \"</td>\\n\"\r\n\t\t\t. \"<td width='75%'>\"\r\n\t\t\t. \"<a class='verdana2 bold' href='\" . generer_url_ecrire(\"auteur_infos\", \"id_auteur=\" . $row['id_auteur']) . \"'>\"\r\n\t\t\t. entites_html($row['nom']) . \"</a>\\n\"\r\n\t\t\t. \"<td width='20%'>\\n\"\r\n\t\t\t. \"<div align='right' class='verdana1'>\" . $row['vu'] . \"</div>\\n\"\r\n\t\t\t. \"</td></tr>\\n\";\r\n\r\n\t}\r\n\t$aff .= \"</table>\\n\\n\";\r\n\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "function getF_gasto()\n {\n if (!isset($this->df_gasto) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n $oConverter = new core\\ConverterDate('date', $this->df_gasto);\n return $oConverter->fromPg();\n }", "function non_breaking_date() {\r\n\t\t$english_months_array = array(\r\n\t\t// month => variations\r\n\t\t'January' => array('Jan.', 'Jan'),\r\n\t\t'February' => array('Feb.', 'Feb'),\r\n\t\t'March' => array('Mar.', 'Mar'),\r\n\t\t'April' => array('Apr.', 'Apr'),\r\n\t\t'May' => array(),\r\n\t\t'June' => array('Jun.', 'Jun'),\r\n\t\t'July' => array('Jul.', 'Jul'),\r\n\t\t'August' => array('Aug.', 'Aug'),\r\n\t\t'September' => array('Sept.', 'Sept'),\r\n\t\t'October' => array('Oct.', 'Oct'),\r\n\t\t'November' => array('Nov.', 'Nov'),\r\n\t\t'December' => array('Dec.', 'Dec'),\r\n\t\t);\r\n\t\t$french_months_array = array(\r\n\t\t// month => variations\r\n\t\t'janvier' => array('jan.', 'jan'),\r\n\t\t'février' => array('fév.', 'fév', 'f&#233;vrier', 'f&#233;v.', 'f&#233;v', 'f&#xe9;vrier', 'f&#xe9;v.', 'f&#xe9;v', 'f&eacute;vrier', 'f&eacute;v.', 'f&eacute;v'),\r\n\t\t'mars' => array('mar.', 'mar'),\r\n\t\t'avril' => array('avr.', 'avr'),\r\n\t\t'mai' => array(),\r\n\t\t'juin' => array(),\r\n\t\t'juillet' => array('juil.', 'juil'),\r\n\t\t'août' => array('ao&#251;t', 'ao&#xfb;t', 'ao&ucirc;t'),\r\n\t\t'septembre' => array('sept.', 'sept'),\r\n\t\t'octobre' => array('oct.', 'oct'),\r\n\t\t'novembre' => array('nov.', 'nov'),\r\n\t\t'décembre' => array('déc.', 'déc', 'd&#233;cembre', 'd&#233;c.', 'd&#233;c', 'd&#xe9;cembre', 'd&#xe9;c.', 'd&#xe9;c', 'd&eacute;cembre', 'd&eacute;c.', 'd&eacute;c'),\r\n\t\t);\r\n\t\t$english_seasons_array = array(\r\n\t\t'Spring',\r\n\t\t'Summer',\r\n\t\t'Fall',\r\n\t\t'Winter',\r\n\t\t);\r\n\t\t$french_seasons_array = array(\r\n\t\t'printemps',\r\n\t\t'été', '&#233;t&#233;', '&#xe9;t&#xe9;', '&eacute;t&eacute;',\r\n\t\t'automne',\r\n\t\t'hiver',\r\n\t\t);\r\n\t\t$time_periods_array = array();\r\n\t\tforeach($english_months_array as $month => $variations_array) {\r\n\t\t\t$time_periods_array[] = $month;\r\n\t\t\tforeach($variations_array as $variation) {\r\n\t\t\t\t$time_periods_array[] = $variation;\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($french_months_array as $month => $variations_array) {\r\n\t\t\t$time_periods_array[] = $month;\r\n\t\t\tforeach($variations_array as $variation) {\r\n\t\t\t\t$time_periods_array[] = $variation;\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($english_seasons_array as $season) {\r\n\t\t\t$time_periods_array[] = $season;\r\n\t\t}\r\n\t\tforeach($french_seasons_array as $season) {\r\n\t\t\t$time_periods_array[] = $season;\r\n\t\t}\r\n\t\tif($this->config['non_breaking_type'] === 'noWrap') {\r\n\t\t\tif(ReTidy::is_clf2()) {\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,2},*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span class=\"noWrap\">$1 $3 $5</span>', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span class=\"noWrap\">$1 $3 $5</span>', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,4},*)/is', '<span class=\"noWrap\">$1 $3</span>', $this->code, -1, $c);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)/is', '<span class=\"noWrap\">$1 $3</span>', $this->code, -1, $d);\r\n\t\t\t} else {\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,2},*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $3 $5</span>', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $3 $5</span>', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,4},*)/is', '<span style=\"white-space: nowrap;\">$1 $3</span>', $this->code, -1, $c);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)/is', '<span style=\"white-space: nowrap;\">$1 $3</span>', $this->code, -1, $d);\r\n\t\t\t}\r\n\t\t} else { // default to nbsp\r\n\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,2},*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '$1&nbsp;$3&nbsp;$5', $this->code, -1, $a);\r\n\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '$1&nbsp;$3&nbsp;$5', $this->code, -1, $b);\r\n\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,4},*)/is', '$1&nbsp;$3', $this->code, -1, $c);\r\n\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)/is', '$1&nbsp;$3', $this->code, -1, $d);\r\n\t\t\t\r\n\t\t}\r\n\t\tif(ReTidy::is_clf2()) {\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2&ndash;$4&ndash;$6</span>$7', $this->code, -1, $e);\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2&nbsp;$4&nbsp;&ndash;&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2$3$4$5$6</span>$7', $this->code, -1, $e);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2&nbsp;$4&nbsp;$6&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t} else {\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2&ndash;$4&ndash;$6</span>$7', $this->code, -1, $e);\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2&nbsp;$4&nbsp;&ndash;&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2$3$4$5$6</span>$7', $this->code, -1, $e);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2&nbsp;$4&nbsp;$6&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t}\r\n\t\t//$this->logMsgIf(\"non_breaking_year_range\", $count);\r\n\t\t$count = $a + $b + $c + $d + $e + $f;\r\n\t\t//var_dump($a, $b, $c, $d, $e, $f);\r\n\t\t$this->logMsgIf(\"non_breaking_date\", $count);\r\n\t}", "private function process_dates($args) {\n\t\t\t$date_format = explode ( '|' , $args['_date_format'] );\n\t\t\t$date_order = $date_format[0];\n\t\t\t$date_picture = $date_format[1];\n\t\t\t$date_fields = explode ( ',' , $args['_date_fields'] );\n\t\t\t$date = array();\n\t\t\tdate_default_timezone_set('UTC');\n\t\t\t$text_date_field = substr ($date_order, 0, 1) === 't';\n\t\t\n\t\t\tforeach ( $date_fields as $date_field ) {\n\t\t\t\tif ($text_date_field) {\n\t\t\t\t\t// date sent as a string\n\t\t\t\t\t$date_divider = substr ($date_order, 1, 1);\n\t\t\t\t\t$date_split = explode ($date_divider, $args[$date_field]);\n\t\t\t\t\tfor ($i = 0; $i < 3 ; $i++) {\n\t\t\t\t\t\t$date[substr ( $date_order, $i + 2, 1)] = $date_split[$i];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// date sent as an array\n\t\t\t\t\tfor ($i = 0; $i < count($args[$date_field]) ; $i++) {\n\t\t\t\t\t\t$date[substr ( $date_order, $i, 1)] = $args[$date_field][$i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$args[$date_field] = date ( $date_picture, mktime(0, 0, 0, $date[\"m\"], $date[\"d\"], $date[\"y\"]));\n\t\t\t\t\t// See http://php.net/manual/en/function.date.php and\n\t\t\t\t\t// http://php.net/manual/en/function.mktime.php\n\t\t\t}\n\t\t\treturn $args;\n\t\t}", "public function stdWrap_dateDataProvider() {}", "function MTD_RECIBIR_DATOS_DB ($vp_arreglo_datos)\n {\n \t \t \t\t \t\t \n }", "public static function neo_search_date(int $type,$arg1,$arg2 = null)\r\n\t{\r\n\r\n\t\t$type_format = array('failed' => true);\r\n\r\n\t\tswitch ($type)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tcase Search::BETWEEN_DATES:\r\n\r\n\t\t\t\tif(true)//Regex::validate(Regex::DATE,$arg1) && Regex::validate(Regex::DATE,$arg2))\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = \"SELECT * FROM photos p WHERE date BETWEEN :keyOne AND :keyTwo\";\r\n\r\n\t\t\t\t\t$data = array(':keyOne' => $arg1,':keyTwo' => $arg2);\r\n\r\n\t\t\t\t\t$type_format['failed'] = false;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$type_format = array('failed' => true, 'error' => \"Argument format invalid\");\r\n\t\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase Search::DATE: \r\n\t\t\t\t\r\n\t\t\t\tif(true)//Regex::validate(Regex::DATE,$arg1))\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = \"SELECT * FROM photos p WHERE date = :key\"; \r\n\t\t\t\t\t$data = array(':key' => $arg1);\r\n\r\n\t\t\t\t\t$type_format['failed'] = false;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$type_format = array('failed' => true, 'error' => \"Argument format invalid\");\r\n\t\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase Search::BEFORE_DATE: \r\n\t\t\t\t\r\n\t\t\t\tif(true)//Regex::validate(Regex::DATE,$arg1))\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = \"SELECT * FROM photos p WHERE date < :key\"; \t\t\t\t\t\r\n\t\t\t\t\t$data = array(':key' => $arg1);\r\n\r\n\t\t\t\t\t$type_format['failed'] = false;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$type_format = array('failed' => true, 'error' => \"Argument format invalid\");\r\n\t\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase Search::AFTER_DATE: \r\n\r\n\t\t\t\tif(true)//Regex::validate(Regex::DATE,$arg1))\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = \"SELECT * FROM photos p WHERE date>:key\"; \t\t\t\t\t\r\n\t\t\t\t\t$data = array(':key' => $arg1);\r\n\r\n\t\t\t\t\t$type_format['failed'] = false;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$type_format = array('failed' => true, 'error' => \"Argument format invalid\");\r\n\t\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\t\t\t\r\n\r\n\t\t\tdefault:\r\n\t\t\t\t\r\n\t\t\t\treturn array('failed' => true,'error' => 'please make sure the value that you entered is defined as a constant in the core/Enumeration/Search class.');\r\n\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif($type_format['failed'] == false)\r\n\t\t{\r\n\r\n\t\t\t$photos = Request::execute($sql,$data,true);\r\n\r\n\t \t\tif($photos != null)\r\n\t \t\t{\r\n\t \t\t\t$list_photos = [];\r\n\r\n\t\t\t\tforeach ($photos as $photo)\r\n\t\t\t\t{\r\n\t\t\t\t\t$list_photos[] = new Photo($photo['id'],$photo['title'],$photo['name'],$photo['date'],\r\n\t\t\t\t\t\t\t\t\t\t\t $photo['description'],$photo['file'],$photo['owner']);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn array('failed' => false,'objects' => $list_photos, 'error' => '');\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn array('failed' => true, 'error' => 'Aucune photo ne correspond a votre recherche');\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $type_format;\r\n\t\t}\r\n\r\n\t}", "private function _date_format($results) {\n\t\tif ( $this->date_format) {\n\n\t\t\t$date_cols = $this->date_cols;\n\t\t\tif (!in_array($this->date_column, $this->date_cols)) {\n\t\t\t\t$date_cols[] = $this->date_column;\n\t\t\t}\n\n\t\t\tforeach ($results as &$r) {\n\t\t\t\tforeach ($date_cols as $key) {\n\t\t\t\t\tif (isset($r[$key]) && !empty($r[$key])) {\n\t\t\t\t\t\t$date = date_create($r[$key]);\n\t\t\t\t\t\t$r[$key] = date_format($date, $this->date_format);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $results;\n\t}", "public function adaptaFechas($resultados){\n\n foreach($resultados as $resultado ){\n $fecha=Carbon::createFromFormat('Y-m-d H:i:s', $resultado->fecha);\n $resultado->fecha=$fecha->format('d/m/Y');\n }\n\n }", "public function getDates()\n {\n $sql = $this->tableGateway->getSql();\n $select = $sql->select();\n\n $select->columns(array('date'));\n $select->group('date');\n $select->where('TIMESTAMP(`date`,`to`) > NOW()');\n //$select->order('date ASC');\n $select->limit(10);\n $statement = $sql->prepareStatementForSqlObject($select);\n\n return $statement->execute();\n }", "function date_format_translated($format, $timestamp) {\n\tglobal $translation;\n\t\n\t$day_name_short = array($translation['tstat_su'], $translation['tstat_mo'], $translation['tstat_tu'], $translation['tstat_we'], $translation['tstat_th'], $translation['tstat_fr'], $translation['tstat_sa']);\n\t$day_name_full = array($translation['tstat_full_su'], $translation['tstat_full_mo'], $translation['tstat_full_tu'], $translation['tstat_full_we'], $translation['tstat_full_th'], $translation['tstat_full_fr'], $translation['tstat_full_sa']);\n\t$month_name_short = array($translation['tstat_jan'], $translation['tstat_feb'], $translation['tstat_mar'], $translation['tstat_apr'], $translation['tstat_may'], $translation['tstat_jun'],\n \t\t\t\t\t $translation['tstat_jul'], $translation['tstat_aug'], $translation['tstat_sep'], $translation['tstat_oct'], $translation['tstat_nov'], $translation['tstat_dec']);\n\t$month_name_full = array($translation['tstat_full_jan'], $translation['tstat_full_feb'], $translation['tstat_full_mar'], $translation['tstat_full_apr'], $translation['tstat_full_may'], $translation['tstat_full_jun'],\n \t\t\t\t\t $translation['tstat_full_jul'], $translation['tstat_full_aug'], $translation['tstat_full_sep'], $translation['tstat_full_oct'], $translation['tstat_full_nov'], $translation['tstat_full_dec']);\n \t\t\t\t\t \n // Loop char by char through php date format string, cacth the ones which need translating\n//--- PHP 4 :-)--------------------------------\nif(!function_exists('str_split')){\n function str_split($str,$split_lengt=1){\n\n $cnt = strlen($str);\n\n for ($i=0;$i<$cnt;$i+=$split_lengt)\n $rslt[]= substr($str,$i,$split_lengt); \n \n return $rslt;\n }\n} \n//----------------------------------------------\n\t$result = \"\";\n\t$format_chars = str_split($format, 1);\n\tforeach ($format_chars as $format_char) {\n\t\tif ($format_char == \"l\") {\n\t\t\t$day_index = date(\"w\", $timestamp);\n\t\t\t$result = $result . $day_name_full[$day_index];\n\t\t} else if ($format_char == \"D\") {\n\t\t\t$day_index = date(\"w\", $timestamp);\n\t\t\t$result = $result . $day_name_short[$day_index];\n\t\t} else if ($format_char == \"F\") {\n\t\t\t$month_index = date(\"n\", $timestamp) - 1;\n\t\t\t$result = $result . $month_name_full[$month_index];\n\t\t} else if ($format_char == \"M\") {\n\t\t\t$month_index = date(\"n\", $timestamp) - 1;\n\t\t\t$result = $result . $month_name_short[$month_index];\n\t\t} else {\n\t\t\t$result = $result . date($format_char, $timestamp);\n\t\t}\n\t}\n\t\n\treturn $result;\n}", "public function save_dates() {\n\t\t// Nothing to do here.\n\t}", "public function lista_busca_registros_fecha($fecha_inicial, $fecha_final){\n\n $conectar= parent::conexion();\n\n \n $date_inicial = $_POST[\"fecha_inicial\"];\n $date = str_replace('/', '-', $date_inicial);\n $fecha_inicial = date(\"Y-m-d\", strtotime($date));\n \n $date_final = $_POST[\"fecha_final\"];\n $date = str_replace('/', '-', $date_final);\n $fecha_final = date(\"Y-m-d\", strtotime($date));\n\n \n \n $sql= \"SELECT * FROM compras WHERE fecha_compra>=? and fecha_compra<=? \";\n\n\n\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1,$fecha_inicial);\n $sql->bindValue(2,$fecha_final);\n $sql->execute();\n return $result = $sql->fetchAll(PDO::FETCH_ASSOC);\n\n }", "function fetch_datebetwine_paiement_filtre()\n\t{\n\t $output = '';\n\t $query = '';\n\t $total;\n\t $jour1 =$this->input->post('jour1');\n\t $jour2 =$this->input->post('jour2');\n\t if($jour1 > $jour2)\n\t {\n\t $data = $this->crud_model->fetch_data_paiement_date($jour2, $jour1);\n\t $total = $this->crud_model->fetch_sum_data_paiement_date($jour2, $jour1);\n\t }\n\t else{\n\t $data = $this->crud_model->fetch_data_paiement_date($jour1, $jour2);\n\t $total = $this->crud_model->fetch_sum_data_paiement_date($jour1, $jour2);\n\t }\n\n\t $money = $this->crud_model->fetch_data_paiement_date_montant($jour1, $jour2);\n\t \n\n\t $pdf_link ='<a class=\"btn btn-outline-warning pull-right mt-2 mb-2\" \n\t href=\"'.base_url().'admin/pdf_liste_facture/'.$jour1.'/'.$jour2.' \"><i class=\"fa fa-print mr-1\"></i> PDF</a>';\n\t \n\t $output .= '\n\n\t <div align=\"right\" class=\"pull-right mb-2\">\n\t \n\t '.$pdf_link.'\n\t </div>\n\t \n\t <table class=\"table-striped table-bordered nk-tb-list nk-tb-ulist dataTable no-footer\" data-auto-responsive=\"true\" id=\"user_data\" role=\"grid\" aria-describedby=\"DataTables_Table_1_info\">\n\t <theader>\n\t <tr>\n\t <th width=\"5%\">Selectionner</th>\n\t <th width=\"5%\">Avatar</th>\n\t <th width=\"20%\">Nom complet</th>\n\t <th width=\"15%\">Rencontre</th>\n\t <th width=\"10%\">Statut</th>\n\t <th width=\"20%\">Jour</th>\n\t <th width=\"5%\">Heure</th>\n\t <th width=\"10%\">Place</th>\n\n\t <th width=\"10%\">Imprimer</th>\n\t \n\t \n\t </tr>\n\t <theader>\n\t <tbody>\n\t ';\n\t foreach($data->result() as $row)\n\t {\n\t if ($row->etat_reservation ==0) {\n\n\n\t $link = '<a href=\"tel:'.$row->telephone.'\" class=\"text-primary\"><i class=\"fa fa-phone\"></i></a>\n\t <input type=\"checkbox\" name=\"tel\" value=\"'.$row->telephone.'\" class=\"tels mr-1 delete_checkbox\">\n\t &nbsp;\n\t <a href=\"javascript:void(0);\" idreservation=\"'.$row->idreservation.'\" class=\"btn btn-dark btn-sm btn-circle valider\"><i class=\"fa fa-check text-white\"></i> </a>\n\t \n\t ';\n\n\t $etat_reservation = '\n\t \n\t <a type=\"button\" href=\"'.base_url().'admin/pdf_billet/'.$row->codeReservation.'\" class=\"btn btn-primary btn-circle btn-sm print\"><i class=\"fa fa-print\"></i></a>\n\t ';\n\t }\n\t else{\n\t $etat_reservation = '\n\t \n\t <a type=\"button\" href=\"'.base_url().'admin/pdf_billet/'.$row->codeReservation.'\" class=\"btn btn-primary btn-circle btn-sm print\"><i class=\"fa fa-print\"></i></a>\n\t ';\n\n\t $link = '<a href=\"tel:'.$row->telephone.'\" class=\"text-primary\"><i class=\"fa fa-phone\"></i></a>\n\t <input type=\"checkbox\" name=\"tel\" value=\"'.$row->telephone.'\" class=\"tels mr-1 delete_checkbox\">\n\t &nbsp;\n\t <a href=\"javascript:void(0);\" idreservation=\"'.$row->idreservation.'\" class=\"btn btn-success btn-circle btn-sm\"><i class=\"fa fa-check text-white\"></i></a>\n\t ';\n\t }\n\t \n\n\t $etat ='<span class=\"badge badge-warning\"><i class=\"fa fa-user\"></i> Client </span>';\n\n\n\t $email = '<a href=\"mailto:'.$row->email.'\" class=\"text-primary\"><i class=\"fa fa-google mr-1\"></i> '.$row->email.'</a>\n\t \n\t ';\n\n\t \n\t $output .= '\n\t <tr>\n\t <td>'.$link.'</td>\n\t <td><img src=\"'.base_url().'upload/photo/'.$row->image.'\" class=\"table-user-thumb\" style=\"border-radius: 50%; width: 50px; height: 30px;\" /></td>\n\n\t <td>'.substr($row->first_name.' '.$row->last_name, 0,20).'...</td>\n\n\t <td>'.$row->nomMatch.'</td>\n\t <td>'.$etat.'</td>\n\t <td>'.nl2br(substr(date(DATE_RFC822, strtotime($row->jour)), 0, 23)).'</td>\n\t <td>'.$row->heure.'</td>\n\n\t <td>'.$row->nomStade.' <br>'.$row->nomPlace.'</td>\n\n\t <td>'.$etat_reservation.'</td>\n\t \n\t </tr>\n\t ';\n\n\t }\n\n\t $output .='\n\t <tr>\n\t <td colspan=\"8\">Montant total </td>\n\t <td><h4>'.$total.'$</h4></td>\n\t \n\t </tr>\n\t \n\t ';\n\t $output .= '\n\t <tbody>\n\t <tfooter>\n\t <tr>\n\t <th width=\"5%\">Selectionner</th>\n\t <th width=\"5%\">Avatar</th>\n\t <th width=\"20%\">Nom complet</th>\n\t <th width=\"15%\">Rencontre</th>\n\t <th width=\"10%\">Statut</th>\n\t <th width=\"20%\">Jour</th>\n\t <th width=\"5%\">Heure</th>\n\t <th width=\"10%\">Place</th>\n\n\t <th width=\"10%\">Action</th>\n\t \n\t \n\t </tr>\n\t <tfooter>\n\t </table>';\n\t echo $output;\n\t}", "public function migrateDateDataProvider()\n {\n return [\n [['20120111235330', '20120116183504'], '20120118', '20120116183504', 'Failed to migrate all migrations when migrate to date is later than all the migrations'],\n [['20120111235330', '20120116183504'], '20120115', '20120111235330', 'Failed to migrate 1 migration when the migrate to date is between 2 migrations'],\n [['20120111235330', '20120116183504'], '20120111235330', '20120111235330', 'Failed to migrate 1 migration when the migrate to date is one of the migrations'],\n [['20120111235330', '20120116183504'], '20110115', null, 'Failed to migrate 0 migrations when the migrate to date is before all the migrations'],\n ];\n }", "function s_d_salarii_platit()\n{\n // selecteaza datele platite deja din salarii\n $submission_date = format_data_out_db('submission_date');\n $query_sal = \"SELECT DISTINCT $submission_date AS date_db\n FROM cozagro_db.work_days \n WHERE work_days.deleted = 0 AND completed = 0\n ORDER BY submission_date DESC \";\n $result_sal = Database::getInstance()->getConnection()->query($query_sal);\n if (!$result_sal) {\n die(\"Nu s-a reusit conexiunea la DB selectarea salariilor platite\" . Database::getInstance()->getConnection()->error);\n }\n $salary = [];\n while ($sal = $result_sal->fetch_assoc()) {\n $salary[] = [remove_day_from_date_and_format($sal['date_db']), translate_date_to_ro($sal['date_db'])];\n }\n $result_sal->free_result();\n return $salary;\n}", "public function checkDateWithStrtotimeValuesDataProvider() {}", "function _format_date($row, &$params)\n\t{\n\t\t//Get needed timestamps and format\n\t\t$yesterday_stamp\t= mktime(0, 0, 0, date(\"m\") , date(\"d\")-1, date(\"Y\"));\n\t\t$yesterday \t\t\t= strftime(\"%Y-%m-%d\", $yesterday_stamp);\n\t\t$today_stamp\t\t= mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\"));\n\t\t$today \t\t\t\t= date('Y-m-d');\n\t\t$tomorrow_stamp \t= mktime(0, 0, 0, date(\"m\") , date(\"d\")+1, date(\"Y\"));\n\t\t$tomorrow \t\t\t= strftime(\"%Y-%m-%d\", $tomorrow_stamp);\n\t\t\n\t\t$dates_stamp\t\t= strtotime($row->dates);\n\t\t$enddates_stamp\t\t= $row->enddates ? strtotime($row->enddates) : null;\n\n\t\t//if datemethod show day difference\n\t\tif($params->get('datemethod', 1) == 2) {\n\t\t\t//check if today or tomorrow\n\t\t\tif($row->dates == $today) {\n\t\t\t\t$result = JText::_( 'TODAY' );\n\t\t\t} elseif($row->dates == $tomorrow) {\n\t\t\t\t$result = JText::_( 'TOMORROW' );\n\t\t\t} elseif($row->dates == $yesterday) {\n\t\t\t\t$result = JText::_( 'YESTERDAY' );\n\t\t\t\n\t\t\t//This one isn't very different from the DAYS AGO output but it seems \n\t\t\t//adequate to use a different language string here.\n\t\t\t//\n\t\t\t//the event has an enddate and it's earlier than yesterday\n\t\t\t} elseif($row->enddates && $enddates_stamp < $yesterday_stamp) {\n\t\t\t\t$days = round( ($today_stamp - $enddates_stamp) / 86400 );\n\t\t\t\t$result = JText::sprintf( 'ENDED DAYS AGO', $days );\n\t\t\t\t\n\t\t\t//the event has an enddate and it's later than today but the startdate is earlier than today\n\t\t\t//means a currently running event \n\t\t\t} elseif($row->enddates && $enddates_stamp > $today_stamp && $dates_stamp < $today_stamp) {\n\t\t\t\t$days = round( ($today_stamp - $dates_stamp) / 86400 );\n\t\t\t\t$result = JText::sprintf( 'STARTED DAYS AGO', $days );\n\t\t\t\t\n\t\t\t//the events date is earlier than yesterday\n\t\t\t} elseif($dates_stamp < $yesterday_stamp) {\n\t\t\t\t$days = round( ($today_stamp - $dates_stamp) / 86400 );\n\t\t\t\t$result = JText::sprintf( 'DAYS AGO', $days );\n\t\t\t\t\n\t\t\t//the events date is later than tomorrow\n\t\t\t} elseif($dates_stamp > $tomorrow_stamp) {\n\t\t\t\t$days = round( ($dates_stamp - $today_stamp) / 86400 );\n\t\t\t\t$result = JText::sprintf( 'DAYS AHEAD', $days );\n\t\t\t}\n\t\t} else {\n\t\t\t//single day event\n\t\t\t$date = strftime($params->get('formatdate', '%d.%m.%Y'), strtotime( $row->dates.' '.$row->times ));\n\t\t\t$result = JText::sprintf('ON DATE', $date);\n\t\t\t\n\t\t\t//Upcoming multidayevent (From 16.10.2008 Until 18.08.2008)\n\t\t\tif($dates_stamp > $tomorrow_stamp && $enddates_stamp) {\n\t\t\t\t$startdate = strftime($params->get('formatdate', '%d.%m.%Y'), strtotime( $row->dates.' '.$row->times ));\n\t\t\t\t$enddate = strftime($params->get('formatdate', '%d.%m.%Y'), strtotime( $row->enddates.' '.$row->endtimes ));\n\t\t\t\t$result = JText::sprintf('FROM UNTIL', $startdate, $enddate);\n\t\t\t}\n\t\t\t\n\t\t\t//current multidayevent (Until 18.08.2008)\n\t\t\tif( $row->enddates && $enddates_stamp > $today_stamp && $dates_stamp < $today_stamp ) {\n\t\t\t\t//format date\n\t\t\t\t$result = strftime($params->get('formatdate', '%d.%m.%Y'), strtotime( $row->enddates.' '.$row->endtimes ));\n\t\t\t\t$result = JText::sprintf('UNTIL', $result);\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn $result;\n\t}", "private function changeDateFormat($val,$format){\n \n if($val != \"\" && count($this->dbConfigs) > 0){\n switch ($this->dbConfigs['driver']){\n case \"mysql\":\n if($format == \"date\"){\n $val = date(\"Y-m-d\", strtotime($val));\n }\n elseif($format == \"datetime\"){\n $val = date(\"Y-m-d H:i:s\", strtotime($val));\n }\n break;\n case \"sqlsrv\":\n if($format == \"date\"){\n $val = date(\"Y-m-d\",strtotime($val));\n }\n elseif($format == \"datetime\"){\n $val = date(\"Y-m-d H:i:s\",strtotime($val));\n }\n break;\n }\n return $val;\n }\n }", "function date_en2sql($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"/\", $date);\r\n\t\t\t$date_sql = $date[2].\"-\".$date[0].\"-\".$date[1];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_sql = \"\";\r\n\t\t}\r\n\t\treturn $date_sql;\r\n\t}", "function dates_interconv( $date_format1, $date_format2, $date_str )\n {\n $base_struc = split('[/.-]', $date_format1);\n $date_str_parts = split('[/.-]', $date_str );\n \n //print_r( $base_struc ); echo \"<br>\";\n //print_r( $date_str_parts ); echo \"<br>\";\n \n $date_elements = array();\n \n $p_keys = array_keys( $base_struc );\n foreach ( $p_keys as $p_key )\n {\n if ( !empty( $date_str_parts[$p_key] ))\n {\n $date_elements[$base_struc[$p_key]] = $date_str_parts[$p_key];\n }\n else\n return false;\n }\n \n $dummy_ts = mktime( 0,0,0, $date_elements['m'],$date_elements['d'],$date_elements['Y']);\n \n return date( $date_format2, $dummy_ts );\n }", "public function __construct(){\n Date::setLocale('es');\n }", "private static function getDates($date_type = 'year', $format = false, array $post_types) {\n $display_format = ($format) ? $format : self::dateFormat('display', $date_type);\n $compare_format = self::dateFormat('compare', $date_type);\n\n $post_status = 'publish';\n $posts = get_posts(array('numberposts' => 1000, 'post_type' => $post_types, 'post_status' => $post_status));\n\n $previous_value = \"\";\n $dates = array();\n\n foreach($posts as $post) {\n $post_date = strtotime($post->post_date);\n $current_display = date_i18n($display_format, $post_date);\n $current_value = date($compare_format, $post_date);\n if ($previous_value != $current_value) {\n $dates[$current_value] = $current_display;\n }\n $previous_value = $current_value;\n\n }\n return $dates;\n }", "public function mswConvertMySQLDate($sql) {\n $split = explode('-',$sql);\n switch ($this->settings->jsDateFormat) {\n case 'DD-MM-YYYY':\n return $split[2].'-'.$split[1].'-'.$split[0];\n break;\n case 'DD/MM/YYYY':\n return $split[2].'/'.$split[1].'/'.$split[0]; \n break;\n case 'YYYY-MM-DD':\n return $sql;\n break;\n case 'YYYY/MM/DD':\n return str_replace('-','/',$sql);\n break;\n case 'MM-DD-YYYY':\n return $split[1].'-'.$split[2].'-'.$split[0]; \n break;\n case 'MM/DD/YYYY':\n return $split[1].'/'.$split[2].'/'.$split[0];\n break;\n }\n}", "public function setDateDuJour()\n{\n$this->setDateSysteme(date(\"Y-m-d\"));\n$this->setDateUtilisateur(date(\"d/m/Y\"));\n}", "public function convertDates(&$results) {\n\t\tif (is_array($results)) {\n\t\t\tforeach($results as &$row) {\n\t\t\t\t$this->convertDates($row);\n\t\t\t}\n\t\t} elseif (is_a($results, 'MongoDate')) {\n\t\t\t$results = date('Y-M-d h:i:s', $results->sec);\n\t\t}\n\t}", "function russian_date() {\n\t\t$date = explode(\".\", date(\"d.m.Y\"));\n\t\tswitch ($date[1]) {\n\t\tcase 1: $m ='января'; break;\n\t\tcase 2: $m ='февраля'; break;\n\t\tcase 3: $m ='марта'; break;\n\t\tcase 4: $m ='апреля'; break;\n\t\tcase 5: $m ='мая'; break;\n\t\tcase 6: $m ='июня'; break;\n\t\tcase 7: $m ='июля'; break;\n\t\tcase 8: $m ='августа'; break;\n\t\tcase 9: $m ='сентября'; break;\n\t\tcase 10: $m ='октября'; break;\n\t\tcase 11: $m ='ноября'; break;\n\t\tcase 12: $m ='декабря'; break;\n\t}\n\t\techo $date[0].'&nbsp;'.$m.'&nbsp;'.$date[2];\n\t}", "public static function dateToString($date, $format = self::DATE_LONG, $separator = '/', $lang=0,$weekdays = false, $cap = false)\r\n {\r\n $strDate = $date;\r\n $formatByLang = array(\r\n self::DATE_FULL => array(\r\n 'fr' => array(\r\n 'format' => \"Le %s %s %s %s\",\r\n 'values'=> array('day','dayDate', 'monthName', 'year')),\r\n 'en' => array('format' => \"%s %s %s\",\r\n 'values'=> array('monthName', 'dayDate', 'daySuffix', 'year')),\r\n 'es' => array('format' => \"%s de %s de %s\",\r\n 'values'=> array('day','dayDate', 'monthName', 'year'))\r\n ),\r\n self::DATE_LONG => array(\r\n 'fr' => array(\r\n 'format' => \"%s %s %s\",\r\n 'values'=> array('dayDate', 'monthName', 'year')),\r\n 'en' => array('format' => \"%s, %s %s%s, %s\",\r\n 'values'=> array('day', 'monthName', 'dayDate', 'daySuffix', 'year')),\r\n 'es' => array('format' => \"%s, el %s de %s de %s\",\r\n 'values'=> array('day','dayDate', 'monthName', 'year'))\r\n ),\r\n self::DATE_SHORT => array(\r\n 'fr' => array(\r\n 'format' => \"%s %s %s\",\r\n 'values'=> array('dayDate', 'monthName', 'year')),\r\n 'en' => array('format' => \"%s %s %s\",\r\n 'values'=> array('dayDate', 'monthName', 'year')),\r\n 'es' => array('format' => \"%s, el %s de %s de %s\",\r\n 'values'=> array('day','dayDate', 'monthName', 'year'))\r\n ),\r\n self::DATE_LONG_NO_DAY => array(\r\n 'format' => \"%s %s\",\r\n 'values' => array('monthName', 'year')\r\n ),\r\n self::DATE_NUM => array(\r\n 'format' => \"%d{$separator}%d{$separator}%d\",\r\n 'values' => array('dayDate','month', 'year')\r\n ),\r\n self::DATE_SQL => array(\r\n 'format' => \"%d-%d-%d\",\r\n 'values' => array('year', 'month', 'dayDate')\r\n ),\r\n self::DATE_NUM_USA => array(\r\n 'format' => \"%d{$separator}%d{$separator}%d\",\r\n 'values' => array('month', 'dayDate', 'year')\r\n ),\r\n self::DATE_NUM_SHORT_YEAR => array(\r\n 'format' => \"%d{$separator}%d{$separator}%d\",\r\n 'values' => array('dayDate','month', 'yearShort')\r\n ),\r\n self::DATE_MONTH_YEAR => array(\r\n 'format' => \"%s %d\",\r\n 'values' => array('monthName', 'year')\r\n ),\r\n );\r\n if (!empty($date))\r\n {\r\n if($lang==0)\r\n {\r\n $suffixLang = Zend_Registry::get('languageSuffix');\r\n $locale = self::getLocalForLanguage(Zend_Registry::get(\"languageID\"));\r\n }\r\n else\r\n {\r\n $suffixLang = Cible_FunctionsGeneral::getLanguageSuffix($lang);\r\n $locale = self::getLocalForLanguage($lang);\r\n }\r\n if(is_string($date))\r\n $date = new Zend_Date($date, null, $locale);\r\n\r\n $day = $date->get(Zend_Date::WEEKDAY);\r\n $daySuffix = $date->get(Zend_Date::DAY_SUFFIX);\r\n $dayDate = $date->get(Zend_Date::DAY);\r\n $month = $date->get(Zend_Date::MONTH);\r\n $monthName = $date->get(Zend_Date::MONTH_NAME);\r\n $year = $date->get(Zend_Date::YEAR);\r\n $yearShort = $date->get(Zend_Date::YEAR);\r\n switch($format)\r\n {\r\n case self::DATE_FULL :\r\n case self::DATE_SHORT :\r\n case self::DATE_LONG :\r\n if ($format == self::DATE_SHORT)\r\n $monthName = $date->get(Zend_Date::MONTH_NAME_SHORT);\r\n if(strpos($dayDate,'0')==0)\r\n $dayDate = str_replace(\"0\", \"\", $dayDate);\r\n\r\n $formatStr = $formatByLang[$format][$suffixLang]['format'];\r\n foreach ($formatByLang[$format][$suffixLang]['values'] as $value)\r\n $arguments[] = $$value;\r\n $strDate = vsprintf($formatStr, $arguments);\r\n if($suffixLang == 'fr')\r\n {\r\n if($dayDate=='1')\r\n $strDate = str_replace(\"1 \", \"1<sup>er</sup> \", $strDate);\r\n }\r\n\r\n break;\r\n case self::DATE_MONTH_YEAR : // ex: Juin 2011\r\n $formatStr = $formatByLang[$format]['format'];\r\n foreach ($formatByLang[$format]['values'] as $value)\r\n $arguments[] = $$value;\r\n $strDate = ucfirst(vsprintf($formatStr, $arguments));\r\n break;\r\n default :\r\n $formatStr = $formatByLang[$format]['format'];\r\n foreach ($formatByLang[$format]['values'] as $value)\r\n $arguments[] = $$value;\r\n $strDate = vsprintf($formatStr, $arguments);\r\n break;\r\n\r\n }\r\n\r\n if($cap==true)\r\n $strDate = strtoupper($strDate);\r\n }\r\n\r\n return $strDate;\r\n }", "function DateToIndo($date) {\r\n // variabel BulanIndo merupakan variabel array yang menyimpan nama-nama bulan\r\n $BulanIndo = array(\"Januari\", \"Februari\", \"Maret\",\r\n \"April\", \"Mei\", \"Juni\",\r\n \"Juli\", \"Agustus\", \"September\",\r\n \"Oktober\", \"November\", \"Desember\");\r\n $tahun = substr($date, 0, 4); // memisahkan format tahun menggunakan substring\r\n $bulan = substr($date, 5, 2); // memisahkan format bulan menggunakan substring\r\n $tgl = substr($date, 8, 2); // memisahkan format tanggal menggunakan substring\r\n $zzesult = $tgl . \" \" . $BulanIndo[(int)$bulan-1] . \" \". $tahun;\r\n return($zzesult);\r\n }", "public static function trataData($data,$formato=\"completo\")\n\t{\n\t\t//$date1 = new Zend_Date('2013-03-11 02:26:51', null, 'pt_br');\r\n\t\tif($formato == \"completo\"){\n\t\t\t$date = new Zend_Date($data, null, 'pt_br');\r\n\t\t\treturn $date;\n\t\t}\n\t\telse if($formato == \"normal\"){\n\t\t\t$date = new Zend_Date($data);\r\n\t\t\treturn $date->get('dd/MM/YYYY');\n\t\t}\n\t\telse if($formato == \"portal\"){\r\n\t\t\t$date = new Zend_Date($data);\r\n\t\t\treturn $date->get('dd'). \" \". ucfirst(substr($date->get('MMMM'), 0, 3)) .\" \".$date->get('YYYY');\r\n\t\t}\n\t}", "public function getDados()\n {\n $aLinhas = array();\n\n /**\n * montamos as datas, e processamos o balancete de verificação\n */\n $oDaoPeriodo = db_utils::getDao(\"periodo\");\n $sSqlDadosPeriodo = $oDaoPeriodo->sql_query_file($this->iCodigoPeriodo);\n $rsPeriodo = db_query($sSqlDadosPeriodo);\n $oDadosPerido = db_utils::fieldsMemory($rsPeriodo, 0);\n $sDataInicial = \"{$this->iAnoUsu}-01-01\";\n $iUltimoDiaMes = cal_days_in_month(CAL_GREGORIAN, $oDadosPerido->o114_mesfinal, $this->iAnoUsu);\n $sDataFinal = \"{$this->iAnoUsu}-{$oDadosPerido->o114_mesfinal}-{$iUltimoDiaMes}\";\n $sWherePlano = \" c61_instit in ({$this->getInstituicoes()}) \";\n /**\n * processa o balancete de verificação\n */\n $rsPlano = db_planocontassaldo_matriz($this->iAnoUsu,\n $sDataInicial,\n $sDataFinal,\n false,\n $sWherePlano,\n '',\n 'true',\n 'true');\n\n $iTotalLinhasPlano = pg_num_rows($rsPlano);\n /**\n * percorremos a slinhas cadastradas no relatorio, e adicionamos os valores cadastrados manualmente.\n */\n $aLinhasRelatorio = $this->oRelatorioLegal->getLinhasCompleto();\n for ($iLinha = 1; $iLinha <= count($aLinhasRelatorio); $iLinha++) {\n\n $aLinhasRelatorio[$iLinha]->setPeriodo($this->iCodigoPeriodo);\n $aColunasRelatorio = $aLinhasRelatorio[$iLinha]->getCols($this->iCodigoPeriodo);\n $aColunaslinha = array();\n $oLinha = new stdClass();\n $oLinha->totalizar = $aLinhasRelatorio[$iLinha]->isTotalizador();\n $oLinha->descricao = $aLinhasRelatorio[$iLinha]->getDescricaoLinha();\n $oLinha->colunas = $aColunasRelatorio;\n $oLinha->nivellinha = $aLinhasRelatorio[$iLinha]->getNivel();\n foreach ($aColunasRelatorio as $oColuna) {\n\n $oLinha->{$oColuna->o115_nomecoluna} = 0;\n if ( !$aLinhasRelatorio[$iLinha]->isTotalizador() ) {\n $oColuna->o116_formula = '';\n }\n }\n\n if (!$aLinhasRelatorio[$iLinha]->isTotalizador()) {\n\n $aValoresColunasLinhas = $aLinhasRelatorio[$iLinha]->getValoresColunas(null, null, $this->getInstituicoes(),\n $this->iAnoUsu);\n\n $aParametros = $aLinhasRelatorio[$iLinha]->getParametros($this->iAnoUsu, $this->getInstituicoes());\n foreach($aValoresColunasLinhas as $oValor) {\n foreach ($oValor->colunas as $oColuna) {\n $oLinha->{$oColuna->o115_nomecoluna} += $oColuna->o117_valor;\n }\n }\n\n /**\n * verificamos se a a conta cadastrada existe no balancete, e somamos o valor encontrado na linha\n */\n for ($i = 0; $i < $iTotalLinhasPlano; $i++) {\n\n $oResultado = db_utils::fieldsMemory($rsPlano, $i);\n\n\n $oParametro = $aParametros;\n\n foreach ($oParametro->contas as $oConta) {\n\n $oVerificacao = $aLinhasRelatorio[$iLinha]->match($oConta, $oParametro->orcamento, $oResultado, 3);\n\n if ($oVerificacao->match) {\n\n $this->buscarInscricaoEBaixa($oResultado, $iLinha, $sDataInicial, $sDataFinal);\n\n if ( $oVerificacao->exclusao ) {\n\n $oResultado->saldo_anterior *= -1;\n $oResultado->saldo_anterior_debito *= -1;\n $oResultado->saldo_anterior_credito *= -1;\n $oResultado->saldo_final *= -1;\n }\n\n $oLinha->sd_ex_ant += $oResultado->saldo_anterior;\n $oLinha->inscricao += $oResultado->saldo_anterior_credito;\n $oLinha->baixa += $oResultado->saldo_anterior_debito;\n $oLinha->sd_ex_seg += $oResultado->saldo_final;\n }\n }\n }\n }\n $aLinhas[$iLinha] = $oLinha;\n }\n\n unset($aLinhasRelatorio);\n\n /**\n * calcula os totalizadores do relatório, aplicando as formulas.\n */\n foreach ($aLinhas as $oLinha) {\n\n if ($oLinha->totalizar) {\n\n foreach ($oLinha->colunas as $iColuna => $oColuna) {\n\n if (trim($oColuna->o116_formula) != \"\") {\n\n $sFormulaOriginal = ($oColuna->o116_formula);\n $sFormula = $this->oRelatorioLegal->parseFormula('aLinhas', $sFormulaOriginal, $iColuna, $aLinhas);\n $evaluate = \"\\$oLinha->{$oColuna->o115_nomecoluna} = {$sFormula};\";\n ob_start();\n eval($evaluate);\n $sRetorno = ob_get_contents();\n ob_clean();\n if (strpos(strtolower($sRetorno), \"parse error\") > 0 || strpos(strtolower($sRetorno), \"undefined\" > 0)) {\n $sMsg = \"Linha {$iLinha} com erro no cadastro da formula<br>{$oColuna->o116_formula}\";\n throw new Exception($sMsg);\n\n }\n }\n }\n }\n }\n\n return $aLinhas;\n }", "function brToSqlDate($date) {\n $date = explode('/',$date);\n return $date[2] . '-' . $date[1] . '-' . $date[0];\n}", "function DBFormat($targetDB){\n //translates to\n switch ($targetDB){\n case 'MSSQL':\n $this->dataTypes = array(\n 'bool' => 'bit',\n 'tinyint' => 'int',\n 'int' => 'int',\n 'varchar(5)' => 'nvarchar(5)',\n 'varchar(10)' => 'nvarchar(10)',\n 'varchar(15)' => 'nvarchar(15)',\n 'varchar(20)' => 'nvarchar(20)',\n 'varchar(25)' => 'nvarchar(25)',\n 'varchar(30)' => 'nvarchar(30)',\n 'varchar(50)' => 'nvarchar(50)',\n 'varchar(75)' => 'nvarchar(75)',\n 'varchar(128)' => 'nvarchar(128)',\n 'varchar(255)' => 'nvarchar(255)',\n 'date' => 'shortdatetime',\n 'time' => 'shortdatetime',\n 'datetime' => 'datetime',\n 'text' => 'ntext',\n 'money' => 'money',\n 'decimal(2)' => 'decimal(12,2)',\n 'longdecimal(6)' => 'decimal(24,6)',\n 'float' => 'float'\n );\n $this->flags = array(\n 'not null' => 'NOT NULL',\n 'unsigned' => '', //nothing corresponding\n 'auto_increment' => 'IDENTITY (1,1)'\n );\n $this->PKDeclaration = \"CONSTRAINT PK_$tableName PRIMARY KEY\";\n //$ixStyle = \"separate\";\n break;\n default: //such as MySQL\n $this->dataTypes = array(\n 'bool' => 'bool',\n 'int' => 'int',\n 'tinyint' => 'tinyint',\n 'bigint' => 'bigint',\n 'varchar(5)' => 'varchar(5)',\n 'varchar(10)' => 'varchar(10)',\n 'varchar(15)' => 'varchar(15)',\n 'varchar(20)' => 'varchar(20)',\n 'varchar(25)' => 'varchar(25)',\n 'varchar(30)' => 'varchar(30)',\n 'varchar(50)' => 'varchar(50)',\n 'varchar(75)' => 'varchar(75)',\n 'varchar(128)' => 'varchar(128)',\n 'varchar(255)' => 'varchar(255)',\n 'date' => 'date',\n 'time' => 'time',\n 'datetime' => 'datetime',\n 'text' => 'text',\n 'money' => 'decimal(12,4)',\n 'decimal(2)' => 'decimal(12,2)',\n 'longdecimal(6)' => 'decimal(24,6)',\n 'float' => 'float'\n );\n $this->flags = array(\n 'not null' => 'not null',\n 'unsigned' => 'unsigned',\n 'auto_increment' => 'auto_increment'\n );\n $this->PKDeclaration = \"PRIMARY KEY\";\n break;\n }\n }", "private function _format_date_mysql($fecha) {\n if ($fecha != \"\") {\n $date = explode('-', $fecha);\n if (count($date) === 3) {//valida que vengan los 3 datos separados por / array.length = 3\n if (checkdate($date[1], $date[2], $date[0])) {//mm/d/a\n //int $month , int $day , int $year\n //09/20/2018\n return $date[0] . '-' . $date[1] . '-' . $date[2]; //aa-mm-d\n } else {\n return FALSE;\n }\n } else {\n return FALSE;\n }\n } else {\n return FALSE;\n }\n }", "protected function _convert_date($date)\n {\n }", "function dbToUIdate() {\r\n\t\t\r\n\t\t$year = substr($this->event_date_time, -19, 4);\r\n\t\t$month = substr($this->event_date_time, -14, 2);\r\n\t\t$day = substr($this->event_date_time, -11, 2);\r\n\r\n\t\t$this->date = $month . \"/\" . $day . \"/\" . $year;\r\n\t\r\n\t}", "public function get ($db_period_dic)\n {\n $beg = $this->begin;\n $end = $this->end;\n $format = 'Y-m-d';\n echo \"\\n\\n[DATES] From \".date($format,$beg).\" to \".date($format,$end).\" period dates.\\n\";\n $format = 'Ymd H:i'; // Required format for SQL\n $stack = array();\n\n foreach ($db_period_dic as $db_slug => $period)\n {\n $stack[$db_slug] = [];\n foreach ($period as $id => $p)\n {\n $add = false;\n $_beg = strtotime($p['fechainicio']);\n $_end = strtotime($p['fechafin']);\n\n // Include all period with matching dates\n if ($beg >= $_beg && $beg <= $_end\n || $end >= $_beg && $end <= $_end)\n $add = true;\n\n // Add it to stack\n if ($add)\n $stack[$db_slug][$id] = [\n 'begin' => date($format, $_beg),\n 'end' => date($format, $_end),\n ];\n }\n\n // Select for each db the first begin and the last end dates.\n $_keys = array_keys($stack[$db_slug]);\n if (count($_keys) >= 2)\n {\n $stack[$db_slug] = array(\n 'begin' => isset($stack[$db_slug][$_keys[0]]['begin'])?$stack[$db_slug][$_keys[0]]['begin']:null,\n 'end' => isset($stack[$db_slug][$_keys[count($_keys)-1]]['end'])?$stack[$db_slug][$_keys[count($_keys)-1]]['end']:null,\n );\n }\n $stack[$db_slug] = array_merge([], ['begin' => null, 'end' => null], $stack[$db_slug]);\n }\n return $stack;\n }", "protected function convertDateUser()\n{\n$jour = substr($this->getDateUtilisateur(), 0, 2);\n$mois= substr($this->getDateUtilisateur(), 3, 2);\n$annee= substr($this->getDateUtilisateur(), 6, 4);\n$dateSys = $annee.\"-\".$mois.\"-\".$jour;\nreturn $dateSys;\n}", "function getBanglaDate($date) {\r\n\r\n$engArray = array (\r\n1,2,3,4,5,6,7,8,9,0, 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'am', 'pm', 'th', 'st', 'rd', 'th', 'Sat', 'Sun', 'Mon', 'Tue', 'Tues', 'Wed', 'Thurs', 'Thu', 'Fri', 'Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'\r\n);\r\n$bangArray = array (\r\n\t'১','২','৩','৪','৫','৬','৭','৮','৯','০',\r\n\t'জানুয়ারি', 'ফেব্রুয়ারি', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর',\r\n\t'সকাল', 'দুপুর', '-এ', '-এ', '-এ', '-এ', 'শনি', 'রবি', 'সোম', 'মঙ্গল', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'বৃহস্পতি', 'শুক্র', 'শনিবার', 'রবিবার',\r\n\t'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার'\r\n);\r\n\r\n\t$converted = str_replace($engArray, $bangArray, $date);\r\n \treturn $converted;\r\n}", "function dateToDBDate($date)\n\t{\n\n\t\tif (is_numeric($date))\n\t\t{\n\t\t\treturn date('Y-m-d', $date);\n\t\t}\n\t\telse if (preg_match('/\\d{2}\\.\\d{2}\\.\\d{4}/', $date))\n\t\t{\n\t\t\t$arDate = explode('.', $date);\n\n\t\t\treturn $arDate[2].'-'.$arDate[1].'-'.$arDate[0];\n\t\t}\n\t\telse if (strtotime($date) > 0)\n\t\t{\n\t\t\treturn date('Y-m-d', strtotime($date));\n\t\t}\n\n\t\treturn '0000-00-00';\n\n\t}", "function liste_evenements($id_agenda, $T_debut_periode, $T_fin_periode, $journee_order_by=true, $type_sortie=\"lecture\")\r\n{\r\n\t////\tPériode simple : début dans la période || fin dans la période || debut < periode < fin\r\n\t$date_debut\t\t= strftime(\"%Y-%m-%d %H:%M:00\", $T_debut_periode);\r\n\t$date_fin\t\t= strftime(\"%Y-%m-%d %H:%M:59\", $T_fin_periode);\r\n\t$sql_periode\t= \"((T1.date_debut between '\".$date_debut.\"' and '\".$date_fin.\"') OR (T1.date_fin between '\".$date_debut.\"' and '\".$date_fin.\"') OR (T1.date_debut < '\".$date_debut.\"' and T1.date_fin > '\".$date_fin.\"'))\";\r\n\t////\tPériodicité des événements : type périodicité spécifié && debut déjà commencé && fin pas spécifié/arrivé && date pas dans les exceptions && périodicité jour/semaine/mois/annee\r\n\t$period_date_fin = strftime(\"%Y-%m-%d\", $T_fin_periode);\r\n\t$date_ymd\t\t= strftime(\"%Y-%m-%d\", $T_debut_periode);\r\n\t$jour_semaine\t= str_replace(\"0\",\"7\",strftime(\"%w\",$T_debut_periode)); // de 1 à 7 (lundi à dimanche)\r\n\t$mois\t\t\t= strftime(\"%m\",$T_debut_periode); // mois de l'annee en numérique => 01 à 12\r\n\t$jour_mois\t\t= strftime(\"%d\",$T_debut_periode); // jour du mois en numérique => 01 à 31\r\n\t$jour_annee\t\t= strftime(\"%m-%d\", $T_debut_periode);\r\n\t$periodicite\t= \"(T1.periodicite_type is not null AND T1.date_debut<'\".$date_debut.\"' AND (T1.period_date_fin is null or '\".$period_date_fin.\"'<=T1.period_date_fin) AND (T1.period_date_exception is null or period_date_exception not like '%\".$date_ymd.\"%') AND ((T1.periodicite_type='jour_semaine' and T1.periodicite_valeurs like '%\".$jour_semaine.\"%') OR (T1.periodicite_type='jour_mois' and T1.periodicite_valeurs like '%\".$jour_mois.\"%') OR (T1.periodicite_type='mois' and T1.periodicite_valeurs like '%\".$mois.\"%' and DATE_FORMAT(T1.date_debut,'%d')='\".$jour_mois.\"') OR (T1.periodicite_type='annee' and DATE_FORMAT(T1.date_debut,'%m-%d')='\".$jour_annee.\"')))\";\r\n\t////\tRécupère la liste des evenements ($order_by_sql==\"heure_debut\" si on récup les évenements d'1 jour, pour pouvoir bien intégrer les evenements récurents)\r\n\t$order_by_sql = ($journee_order_by==true) ? \"DATE_FORMAT(T1.date_debut,'%H')\" : \"T1.date_debut\";\r\n\t$liste_evenements_tmp = db_tableau(\"SELECT T1.* FROM gt_agenda_evenement T1, gt_agenda_jointure_evenement T2 WHERE T1.id_evenement=T2.id_evenement AND T2.id_agenda='\".intval($id_agenda).\")' AND T2.confirme='1' AND (\".$sql_periode.\" OR \".$periodicite.\") ORDER BY \".$order_by_sql.\" asc\");\r\n\r\n\t////\tCree le tableau de sortie (en ajoutant le droit d'accès, masquant les libellés si besoin, etc.)\r\n\tglobal $objet;\r\n\t$liste_evenements = array();\r\n\tforeach($liste_evenements_tmp as $key_evt => $evt_tmp)\r\n\t{\r\n\t\t$droit_acces = droit_acces($objet[\"evenement\"], $evt_tmp, false);\r\n\t\tif($type_sortie==\"tout\" || ($type_sortie==\"lecture\" && $droit_acces>0))\r\n\t\t{\r\n\t\t\t// Ajoute l'evenement au tableau de sortie avec son droit d'accès\r\n\t\t\t$liste_evenements[$key_evt] = $evt_tmp;\r\n\t\t\t$liste_evenements[$key_evt][\"droit_acces\"] = $droit_acces;\r\n\t\t\t// masque les détails si besoin : \"evt public mais détails masqués\"\r\n\t\t\tif($type_sortie==\"lecture\") $liste_evenements[$key_evt] = masque_details_evt($liste_evenements[$key_evt]);\r\n\t\t}\r\n\t}\r\n\treturn $liste_evenements;\r\n}", "function dateToFrench($date, $format) \n{\n $english_days = array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday');\n $french_days = array('lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche');\n $english_months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\n $french_months = array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre');\n return str_replace($english_months, $french_months, str_replace($english_days, $french_days, date($format, strtotime($date) ) ) );\n}", "public function getDate($date=null)\n {\n if ($date != null && is_array($this->livres) && count($this->livres)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE date = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$date]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId($d['id']);\n$this->setTitre($d['titre']);\n$this->setDescription($d['description']);\n$this->setDate($d['date']);\n$this->setClivres_id($d['clivres_id']);\n$this->setAuteur($d['auteur']);\n$this->setPhoto($d['photo']);\n$this->setChemin($d['chemin']);\n$this->livres =$data; \n return $this;\n }\n \n } else {\n return $this->date;\n }\n \n }", "function getDateSQLstmnt(string $coloum, array $arr, string $compare_name, string $type = NULL)\n {\n $compare = $arr[$compare_name];\n $start = (isset($arr['start'])) ? $arr['start'] : \"\";\n $end = (isset($arr['to'])) ? $arr['to'] : \"\";\n\n switch ($compare) {\n case 'Exact': \n return (is_numeric($start)) ? \"$coloum = $start\" : \"$coloum = '$start'\"; \n break;\n case 'LessThan': \n return (is_numeric($start)) ? \"$coloum < $start\" : \"$coloum < '$start'\"; \n break;\n case 'LessEqualThan': \n return (is_numeric($start)) ? \"$coloum <= $start\" : \"$coloum <= '$start'\"; \n break;\n case 'MoreThan': \n return (is_numeric($start)) ? \"$coloum > $start\" : \"$coloum > '$start'\"; \n break;\n case 'MoreEqualThan': \n return (is_numeric($start)) ? \"$coloum >= $start\" : \"$coloum >= '$start'\"; \n break;\n case 'None': \n return \"\"; \n break;\n case 'Between': \n switch($type){\n case 'Number': return \"$coloum between $start and $end\"; break;\n case 'Date': return \"Date($coloum) between '$start' and '$end'\"; break;\n }\n break;\n case 'coloumn_notequal_month':\n return \"MONTH($start) != MONTH($end)\"; \n break;\n }\n }", "function setDateForRapport($idsRoy){\n \t\t\n //récupère les royalty pour les livres sélectionnés\n $sql = \"SELECT \n COUNT(DISTINCT r.id_royalty) nbRoy\n ,SUM(v.montant_livre) rMtVente, SUM(v.nombre) unit, v.type typeVente\n ,SUM(r.montant_livre) rMtRoy\n ,MIN(r.taxe_taux) taux, MIN(r.taxe_deduction) deduction, MIN(r.pourcentage) pc\n ,l.id_livre, l.titre_en, l.titre_fr, l.titre_es\n ,c.type typeContrat\n ,com.id_comite, com.titre_fr, com.titre_en, com.titre_es\n FROM iste_royalty r \n INNER JOIN iste_vente v ON v.id_vente = r.id_vente\n INNER JOIN iste_isbn i ON i.id_isbn = v.id_isbn\n INNER JOIN iste_livre l ON l.id_livre = i.id_livre\n INNER JOIN iste_comitexlivre cl ON cl.id_livre = l.id_livre\n INNER JOIN iste_auteurxcontrat ac ON ac.id_auteurxcontrat = r.id_auteurxcontrat AND ac.id_comite = cl.id_comite\n INNER JOIN iste_comite com ON c.id_comite = ac.id_comite\n INNER JOIN iste_contrat c ON c.id_contrat = ac.id_contrat\n WHERE r.id_royalty IN (\".$idsRoy.\")\n GROUP BY com.id_comite\";\n //echo $sql;\n $stmt = $this->_db->query($sql);\n \n return $stmt->fetchAll(); \n \n }", "public function beforeSave() {\n foreach ($this->dateFields as $item) {\n $this->data[$this->name][$item] = $this->_date4Db($this->data[$this->name][$item]);\n }\n return parent::beforeSave();\n }", "public function convertDataGRBSCostsDate($data)\n {\n $result = array();\n foreach ($data as $key => $values) {\n if (is_array($values)) {\n $result[$key] = array(\n //'naimenovanie_grbs' => iconv('CP1251', 'UTF-8', $values['naimenovanie_grbs']),\n 'sum_plan' => $values['sum_plan'],\n 'sum_actual' => $values['sum_actual'],\n 'grbs' => $values['grbs']\n );\n } else {\n $result[$key] = $values;\n }\n }\n\n return json_encode($result);\n }", "public function checkDateWithTypo3DateSyntaxDataProvider() {}", "function datetime_sql2fr($datetime)\r\n\t{\r\n\t\tif (!empty($datetime))\r\n\t\t{\r\n\t\t\t$datetime = explode(\" \", $datetime);\r\n\t\t\t$date_fr = self::date_sql2fr($datetime[0]);\r\n\t\t\t$time_fr = $datetime[1];\r\n\t\t\t$datetime_fr = array(\"date\" => $date_fr, \"time\" => $time_fr);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$datetime_fr = \"\";\r\n\t\t}\r\n\t\treturn $datetime_fr;\r\n\t}", "public static function getDateFormats() {\n $settings = self::getSettings();\n \n $dateformats = array();\n $dateformats[$settings->language] = json_decode($settings->dateformat, true);\n \n $translations = self::getTranslations();\n foreach($translations as $language => $df) {\n $dateformats[$language] = $df;\n }\n return $dateformats;\n }", "public static function getDateFilterTypes()\n\t{\n\t\t$dateFilters = Array('custom' => array('label' => 'LBL_CUSTOM'),\n\t\t\t'prevfy' => array('label' => 'LBL_PREVIOUS_FY'),\n\t\t\t'thisfy' => array('label' => 'LBL_CURRENT_FY'),\n\t\t\t'nextfy' => array('label' => 'LBL_NEXT_FY'),\n\t\t\t'prevfq' => array('label' => 'LBL_PREVIOUS_FQ'),\n\t\t\t'thisfq' => array('label' => 'LBL_CURRENT_FQ'),\n\t\t\t'nextfq' => array('label' => 'LBL_NEXT_FQ'),\n\t\t\t'yesterday' => array('label' => 'LBL_YESTERDAY'),\n\t\t\t'today' => array('label' => 'LBL_TODAY'),\n\t\t\t'tomorrow' => array('label' => 'LBL_TOMORROW'),\n\t\t\t'lastweek' => array('label' => 'LBL_LAST_WEEK'),\n\t\t\t'thisweek' => array('label' => 'LBL_CURRENT_WEEK'),\n\t\t\t'nextweek' => array('label' => 'LBL_NEXT_WEEK'),\n\t\t\t'lastmonth' => array('label' => 'LBL_LAST_MONTH'),\n\t\t\t'thismonth' => array('label' => 'LBL_CURRENT_MONTH'),\n\t\t\t'nextmonth' => array('label' => 'LBL_NEXT_MONTH'),\n\t\t\t'last7days' => array('label' => 'LBL_LAST_7_DAYS'),\n\t\t\t'last15days' => array('label' => 'LBL_LAST_15_DAYS'),\n\t\t\t'last30days' => array('label' => 'LBL_LAST_30_DAYS'),\n\t\t\t'last60days' => array('label' => 'LBL_LAST_60_DAYS'),\n\t\t\t'last90days' => array('label' => 'LBL_LAST_90_DAYS'),\n\t\t\t'last120days' => array('label' => 'LBL_LAST_120_DAYS'),\n\t\t\t'next15days' => array('label' => 'LBL_NEXT_15_DAYS'),\n\t\t\t'next30days' => array('label' => 'LBL_NEXT_30_DAYS'),\n\t\t\t'next60days' => array('label' => 'LBL_NEXT_60_DAYS'),\n\t\t\t'next90days' => array('label' => 'LBL_NEXT_90_DAYS'),\n\t\t\t'next120days' => array('label' => 'LBL_NEXT_120_DAYS')\n\t\t);\n\t\tforeach ($dateFilters as $filterType => $filterDetails) {\n\t\t\t$dateValues = \\DateTimeRange::getDateRangeByType($filterType);\n\t\t\t$dateFilters[$filterType]['startdate'] = $dateValues[0];\n\t\t\t$dateFilters[$filterType]['enddate'] = $dateValues[1];\n\t\t}\n\t\treturn $dateFilters;\n\t}", "function frdate($date1)\n{\n setlocale(LC_TIME, \"fr_FR.UTF-8\");\n $date2 = strftime(\"%A %d %b %Y\", strtotime($date1));\n return $date2;\n}", "function frdate($date1)\n{\n setlocale(LC_TIME, \"fr_FR.UTF-8\");\n $date2 = strftime(\"%A %d %b %Y\", strtotime($date1));\n return $date2;\n}", "function list_day_work($date)\n{\n Database::getInstance()->getConnection()->real_escape_string($date);\n // Scoate id_urile din zilele lucrate dupa data\n $row = [];\n $query = \"SELECT wd.id, angajati.surname, angajati.name, loc_activitate.locatie, wd.comment FROM cozagro_db.work_days wd\n INNER JOIN cozagro_db.angajati angajati ON wd.id_angajat=angajati.id \n INNER JOIN cozagro_db.loc_activitate loc_activitate ON wd.id_loc_activitate=loc_activitate.id \n WHERE DATE_FORMAT(submission_date, '%d - %c - %Y') = '$date' AND wd.deleted='0'\n ORDER BY angajati.surname ASC \";\n $result = Database::getInstance()->getConnection()->query($query);\n if (!$result) {\n die(\"Errore la extragere pentru zilele de lucru in function.php\" . Database::getInstance()->getConnection()->error);\n };\n\n $i = 0;\n while ($dates = $result->fetch_assoc()) {\n\n $row[$i] = [\"id_work_days\" => $dates['id'],\n \"nume\" => $dates['surname'] . \" \" . $dates['name'],\n \"loc_activitate\" => $dates['locatie'],\n \"comment\" => $dates['comment']];\n\n //Identifica numele angajatului dupa ID\n\n $i++;\n }\n $result->free_result();\n return $row;\n}", "public function format_date_text($date,$b_date_only=false,$force_user_language='')\n {\n global $Ccontroller_main;\n global $GLOBAL_DAYS;\n global $GLOBAL_MONTHS;\n \n if($force_user_language!='')\n {\n $user_language = $force_user_language;\n }\n else\n {\n $user_language = $Ccontroller_main->get_m_user_language();\n }\n \n //YESTERDAY\n if(!$b_date_only && date(\"Y-m-d\", strtotime(\"yesterday\")) == date(\"Y-m-d\",strtotime($date)))\n {\n \n switch($user_language)\n {\n case 'FR': \n $date = 'Hier';\n break;\n case 'EN': \n $date = 'Yesterday';\n break;\n } \n }\n \n //TODAY\n else if(!$b_date_only && date(\"Y-m-d\") == date(\"Y-m-d\",strtotime($date)))\n {\n $Cdate_time = new Cmydatetime($date, new DateTimeZone('EUROPE/Paris'));\n $Cdate_time_now = new Cmydatetime(\"now\", new DateTimeZone('EUROPE/Paris'));\n $interval = $Cdate_time->diff($Cdate_time_now);\n //echo $Cdate_time_now->format('H i s').':'.$Cdate_time->format('H i s').'<br>';\n switch($user_language)\n {\n case 'FR':\n if($interval->H>0){$date = $interval->format('Il y a %h heure(s), %i minute(s)');}\n else if($interval->i>0){$date = $interval->format('Il y a %i minute(s)');}\n else {$date = $interval->format('Il y a %s seconde(s)');}\n break;\n case 'EN': \n if($interval->H>0){$date = $interval->format('%h hour(s), %i minute(s) ago');}\n else if($interval->i>0){$date = $interval->format('%i minute(s) ago');}\n else {$date = $interval->format('%s second(s) ago');} \n break;\n } \n }\n \n //OTHER DATE\n else\n {\n $Cdate_time = new Cmydatetime($date, new DateTimeZone('EUROPE/Paris'));\n $date ='';\n\n switch($user_language)\n {\n case 'FR': \n $date = $GLOBAL_DAYS[$Cdate_time->format('N')]['fr'].' '.$Cdate_time->format('d').' '.$GLOBAL_MONTHS[$Cdate_time->format('n')]['fr'].' '.$Cdate_time->format('Y');\n break;\n case 'EN': \n $date = $GLOBAL_DAYS[$Cdate_time->format('N')]['en'].', '.$GLOBAL_MONTHS[$Cdate_time->format('n')]['en'].' '.$Cdate_time->format('d').' '.$Cdate_time->format('Y');\n break;\n } \n }\n \n return $date;\n }", "private function handleDates()\n {\n if ( ! $this->dates) {\n return;\n }\n\n foreach ($this->dates as $field) {\n $value = $this->data[$field];\n\n if (empty($value)) {\n // No value provided\n continue;\n }\n\n $isConverted = isset($this->convertedDates[$field]) ? $this->convertedDates[$field] : false;\n\n if ($isConverted) {\n // This values is already converted\n // Prevent double conversion\n continue;\n }\n\n try {\n if (is_string($value) && isset($this->data['timezone'])) {\n // Use provided timezone field\n // Build full DateTime object\n $value = new \\DateTime($value, new \\DateTimeZone($this->data['timezone']));\n }\n\n if ($value instanceof \\DateTime) {\n // Explicitly convert to UTC\n $value->setTimezone(new \\DateTimeZone('UTC'));\n\n // Use correct format\n $this->data[$field] = $value->format('Y-m-d H:i:s');\n continue;\n }\n }\n catch(\\Exception $e) {\n // Convert all exceptions into our ValidationException\n }\n\n // No timezone field and not a DateTime object\n throw new ValidationException('You must either provide `timezone` field, or a DateTime object for a date field');\n }\n }", "function agenda_date_debut_liste($date, $affichage_debut = 'date_jour') {\n\tswitch ($affichage_debut) {\n\t\tcase 'date_jour':\n\t\t\tbreak;\n\t\tcase 'date_veille':\n\t\t\t$date = agenda_jourdecal($date, -1);\n\t\t\tbreak;\n\t\tcase 'debut_semaine':\n\t\t\t$t = strtotime($date);\n\t\t\t$date = agenda_jourdecal($date, -(date('N', $t)-1));\n\t\t\tbreak;\n\t\tcase 'debut_semaine_prec':\n\t\t\t$t = strtotime($date);\n\t\t\t$date = agenda_jourdecal($date, -(date('N', $t)-1+7));\n\t\t\tbreak;\n\t\tcase 'debut_mois':\n\t\t\t$t = strtotime($date);\n\t\t\t$date = agenda_jourdecal($date, -(date('j', $t)-1));\n\t\t\tbreak;\n\t\tcase 'debut_mois_prec':\n\t\t\t$t = strtotime($date);\n\t\t\t$date = agenda_jourdecal($date, -(date('j', $t)-1)); // debut de mois\n\t\t\t$date = agenda_moisdecal($date, -1); // precedent\n\t\t\tbreak;\n\t\tcase 'debut_mois_1':\n\t\tcase 'debut_mois_2':\n\t\tcase 'debut_mois_3':\n\t\tcase 'debut_mois_4':\n\t\tcase 'debut_mois_5':\n\t\tcase 'debut_mois_6':\n\t\tcase 'debut_mois_7':\n\t\tcase 'debut_mois_8':\n\t\tcase 'debut_mois_9':\n\t\tcase 'debut_mois_10':\n\t\tcase 'debut_mois_11':\n\t\tcase 'debut_mois_12':\n\t\t\t$t = strtotime($date);\n\t\t\t$mdebut = intval(substr($affichage_debut, strlen('debut_mois_')));\n\t\t\t$mcourant = date('n', $t);\n\t\t\t$offset = ($mcourant-$mdebut+12)%12;\n\t\t\t$date = agenda_jourdecal($date, -(date('j', $t)-1)); // debut de mois\n\t\t\t$date = agenda_moisdecal($date, -$offset);\n\t\t\tbreak;\n\t}\n\treturn $date;\n}", "public function column_date($post)\n {\n }", "private function compare_with_date()\n {\n }", "public function column_date($post)\n {\n }", "private function _selectFechas()\n {\n \t$mes = $this->currentYear.'-'.$this->currentMonth;\n\n \t$q = (new Query())->select([\"extract(day from $this->fecha) as \".$this->pre.\"fecha\", \"$this->link as link\"])\n \t->distinct($this->fecha)->from($this->tabla)\n \t->andFilterWhere([\"to_char($this->fecha, 'YYYY-mm')\" => $mes]);\n \tif ($this->where) $q->andFilterWhere($this->where);\n\n \treturn $q->all();\n\n }", "public function dateProvider()\n {\n return array(\n array('2017-03-21', null, null),\n array('2017-01-01', null, array('name' => 'Jour de l\\'an')),\n array('2017-04-17', null, array('name' => 'Lundi de Pâques')),\n array('2017-05-01', null, array('name' => 'Premier Mai')),\n array('2017-05-09', null, null),\n array('2019-05-09', null, array('name' => 'Journée de l\\'Europe')),\n array('2017-05-25', null, array('name' => 'Ascension')),\n array('2017-06-05', null, array('name' => 'Lundi de Pentecôte')),\n array('2017-06-23', null, array('name' => 'Jour de la célébration de l\\'anniversaire du Grand-Duc')),\n array('2017-08-15', null, array('name' => 'Assomption')),\n array('2017-11-01', null, array('name' => 'Toussaint')),\n array('2017-12-25', null, array('name' => 'Premier jour de Noël')),\n );\n }", "public function historiqueTransfert($datedeb, $datefin, $agence)\n {\n try{\n $date1 = $datedeb;\n $date2 = $datefin;\n $agency = $agence;\n $inclu =\"\";\n if($agency!=0)\n {\n $inclu.=\" AND agence.rowid =:agency\";\n }else{\n $inclu.=\" \";\n }\n\n\n $query_rq_historique = \"SELECT u.date_tranfert,u.num_transac,u.num_transac,u.code,CONCAT(u.prenom_sender, ' ', u.nom_sender) as sender, CONCAT(u.prenom_receiver, ' ', u.nom_receiver) as receiver,u.montant,u.statut, a.label,u.refound,u.idtransfert \n FROM tranfert as u \n LEFT JOIN agence as a ON u.agencesender = a.rowid \n WHERE DATE(u.date_tranfert) >= :date1 \n AND DATE(u.date_tranfert) <= :date2 \".$inclu.\"\";\n\n $historique = $this->getConnexion()->prepare($query_rq_historique);\n $historique->bindParam(\"date1\", $date1);\n $historique->bindParam(\"date2\", $date2);\n if($agency!=0) $historique->bindParam(\"agency\", $agency);\n $historique->execute();\n $rs_historique= $historique->fetchAll();\n return $rs_historique;\n }\n catch (PDOException $e){\n echo -2;\n }\n\n }", "public function refreshDpersDatumsFromVertrag($persnr,$vertragID){\n //Debug::fireLog(\"refreshDpersDatumsFromVertrag persnr=\".$persnr.\",vertragID=\".$vertragID);\n\n $refreshDpersDatums = FALSE;\n\n if($persnr===NULL){\n $sql = \"select persnr from \".self::TABLE_DPERSVERTRAG.\" where id=$vertragID\";\n $res = $this->db->query($sql);\n $row = $res->fetch();\n $persnr = $row['persnr'];\n }\n \n // zjistim aktualni hodnotu eintritt\n $sql = \"select \".self::TABLE_DPERS.\".eintritt,\".self::TABLE_DPERS.\".austritt\";\n $sql.= \" ,dobaurcita,zkusebni_doba_dobaurcita\";\n $sql.= \" from \".self::TABLE_DPERS;\n $sql.= \" join \".self::TABLE_DPERSDETAIL.\" on \".self::TABLE_DPERSDETAIL.\".persnr=\".self::TABLE_DPERS.\".persnr\";\n $sql.= \" where \".self::TABLE_DPERS.\".persnr='$persnr'\";\n $res = $this->db->query($sql);\n if(count($res)>0){\n $row = $res->fetch();\n $dpersEintritt = $row['eintritt'];\n $dpersAustritt = $row['austritt'];\n $dpersBefristet = $row['dobaurcita'];\n $dpersProbezeit = $row['zkusebni_doba_dobaurcita'];\n Debug::fireLog(\"refreshDpersDatumsFromVertrag dperseintritt=\".$dpersEintritt.\",dpersaustritt=\".$dpersAustritt.\",dpersbefristet=\".$dpersBefristet.\",dpersprobezeit=\".$dpersProbezeit);\n }\n else\n return $refreshDpersDatums;\n\n // vyberu radek s poslednim eintrittem ktery znaci pocatek smlouvy z archivu\n $sql = \"select max(eintritt) as eintritt from \".self::TABLE_DPERSVERTRAG.\" where persnr='$persnr' and vertrag_anfang<>0\";\n $res = $this->db->query($sql);\n if(count($res)>0){\n // porovnam s aktualni hodnotou v eintritt v dpers\n $row = $res->fetch();\n $vertragEintritt = $row['eintritt'];\n if($dpersEintritt!=$vertragEintritt){\n $this->updateDpersFieldProPersNr($persnr, 'eintritt', $vertragEintritt);\n $refreshDpersDatums = TRUE;\n }\n }\n\n // a jeste jednou vyberu radek s poslednim eintrittem z archivu, tentokrat i hodnoty pro austritt, befristet a probezeit\n $sql = \"select eintritt,austritt,befristet,probezeit,vertrag_anfang from \".self::TABLE_DPERSVERTRAG.\" where persnr='$persnr' order by eintritt desc\";\n $res = $this->db->query($sql);\n if(count($res)>0){\n // porovnam s aktualni hodnotou v eintritt v dpers\n $row = $res->fetch();\n $vertragEintritt = $row['eintritt'];\n $vertragAustritt = $row['austritt'];\n $vertragBefristet = $row['befristet'];\n $vertragProbezeit = $row['probezeit'];\n $vertragAnfang = $row['vertrag_anfang'];\n\n if(($dpersEintritt!=$vertragEintritt)&&($vertragAnfang!=0)){\n $this->updateDpersFieldProPersNr($persnr, 'eintritt', $vertragEintritt);\n $refreshDpersDatums = TRUE;\n }\n\n if($dpersAustritt!=$vertragAustritt){\n $this->updateDpersFieldProPersNr($persnr, 'austritt', $vertragAustritt);\n $refreshDpersDatums = TRUE;\n }\n\n if($dpersProbezeit!=$vertragProbezeit){\n $this->updateDpersDetailFieldProPersNr($persnr, 'zkusebni_doba_dobaurcita', $vertragProbezeit);\n $refreshDpersDatums = TRUE;\n }\n\n if($dpersBefristet!=$vertragBefristet){\n $this->updateDpersDetailFieldProPersNr($persnr, 'dobaurcita', $vertragBefristet);\n $refreshDpersDatums = TRUE;\n }\n }\n\n return $refreshDpersDatums;\n //\n}", "function get_reptransban_ventas($fecha1, $fecha2, $usuario_id)\r {\r if($usuario_id == 0){\r $cadusuario = \"\";\r }else{\r $cadusuario = \" and v.usuario_id = \".$usuario_id.\" \";\r }\r $egresos = $this->db->query(\"\r select \r concat(v.venta_fecha, ' ', v.venta_hora) as fecha, concat('Venta(TRANS. BANCARIA) N°: ', v.venta_id, ', ', if(f.factura_numero>0, concat('Fact.: ',f.factura_numero, ', '),''), 'Cliente: ', c.cliente_nombre) as detalle,\r v.venta_total as ingreso, 0 as egreso,\r 0 as utilidad, 22 as tipo\r from\r venta v\r left join cliente c on v.cliente_id = c.cliente_id\r left join factura f on v.venta_id = f.venta_id\r where\r date(v.venta_fecha) >= '\".$fecha1.\"'\r and date(v.venta_fecha) <= '\".$fecha2.\"'\r and v.forma_id = 3\r \".$cadusuario.\" \r order by v.venta_fecha desc, v.venta_hora desc\r \")->result_array();\r \r return $egresos;\r }", "function DateToIndo($date) {\n\t // variabel BulanIndo merupakan variabel array yang menyimpan nama-nama bulan\n\t\t$BulanIndo = array(\"Januari\", \"Februari\", \"Maret\",\n\t \"April\", \"Mei\", \"Juni\",\n\t \"Juli\", \"Agustus\", \"September\",\n\t \"Oktober\", \"November\", \"Desember\");\n\t\t$tahun = substr($date, 0, 4); // memisahkan format tahun menggunakan substring\n\t\t$bulan = substr($date, 5, 2); // memisahkan format bulan menggunakan substring\n\t\t$tgl = substr($date, 8, 2); // memisahkan format tanggal menggunakan substring\n\t\t$result = $tgl . \" \" . $BulanIndo[(int)$bulan-1] . \" \". $tahun;\n\t\treturn($result);\n\t}" ]
[ "0.76933616", "0.6848752", "0.6404229", "0.6106411", "0.59535664", "0.5903208", "0.5809872", "0.57044506", "0.5664918", "0.56606907", "0.56594247", "0.55523455", "0.55216855", "0.5506174", "0.54927564", "0.5492524", "0.5481076", "0.5477098", "0.5472267", "0.5456815", "0.54319894", "0.53840995", "0.538146", "0.5376451", "0.5367269", "0.53639567", "0.5362651", "0.5313071", "0.5303894", "0.5301883", "0.5299713", "0.528694", "0.5269312", "0.52684015", "0.52641696", "0.5246121", "0.524231", "0.52334285", "0.5230329", "0.52190465", "0.52033496", "0.5187573", "0.518295", "0.5176079", "0.5172037", "0.5163198", "0.5152806", "0.51486266", "0.51362", "0.51351243", "0.51231587", "0.51227915", "0.51141363", "0.5112395", "0.5100547", "0.50919646", "0.50873435", "0.5075177", "0.50552344", "0.50513476", "0.50487375", "0.5046612", "0.50413495", "0.50409573", "0.5037358", "0.5034207", "0.5021789", "0.5018854", "0.5014781", "0.5008004", "0.5002549", "0.5001696", "0.4999345", "0.49967247", "0.4992689", "0.4985754", "0.49826777", "0.4972336", "0.49597254", "0.49588174", "0.49567017", "0.49564883", "0.4954894", "0.49401647", "0.49397525", "0.4939336", "0.4939336", "0.49361992", "0.49325854", "0.49270767", "0.49163702", "0.49123716", "0.49101663", "0.49091196", "0.49005118", "0.48988995", "0.48944533", "0.4890119", "0.48876753", "0.48845285" ]
0.7695761
0
function formatDateLocaleVersDB Formate la date passee en parametre depuis le format de saisie vers le format utilisable en base de donnees.
function formatDateLocaleVersDB($date, $type = 2) { $date = ltrim($date); $date = rtrim($date); /* * Separation de la date et de l'heure */ $temp = @explode(" ", $date); $date = $temp[0]; $heure = $temp[1]; $j = 0; do { $test = @strpos($date, $this->sepValide[$j]); if ($test === false) { $j++; } } while ($j < count($this->sepValide) && ($test === false)); $separateurLocal = $this->sepValide[$j]; $temp = @explode($separateurLocal, $date); /* * Assignation des champs */ switch ($this->formatDate) { case 0: $annee = $temp[0]; $mois = $temp[1]; $jour = $temp[2]; break; case 1: $annee = $temp[2]; $mois = $temp[1]; $jour = $temp[0]; break; case 2: $annee = $temp[2]; $mois = $temp[0]; $jour = $temp[1]; break; } /* * Prise en compte de l'annee par defaut */ if ($annee == "") { $annee = date("Y"); } if ($annee < 100) { if ($annee <= $this->dateMini) { $annee = "20" . $annee; } else { $annee = "19" . $annee; } } $date = $annee . $this->separateurDB . $mois . $this->separateurDB . $jour; /* * Reintegration de l'heure le cas echeant */ if ($type == 3) { $date .= " " . $heure; } return $date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mysql2date($format, $date, $translate = \\true)\n {\n }", "private function convert_date_db_format($date)\n {\n $str_date = strtotime($date);\n $db_date = date('Y-m-d', $str_date);\n return $db_date;\n }", "function format_data_out_db($db_date_column)\n{\n $formatted_date = \"DATE_FORMAT($db_date_column, '%a %d %m %Y') \";\n return $formatted_date;\n}", "function format_date($date, $format = 'd', $culture = null, $charset = null)\n{\n return formatDate($date, null, 'd', $format);\n}", "function format_data_in($string_date)\n{\n // $formatted_date = \"DATE_FORMAT($db_date_column, '%a, %e %b %Y ')\";\n $temp = strtotime($string_date);\n $date = date('Y-m-d', $temp);\n $date = DateTime::createFromFormat('D, j M Y', $temp)->format('Y-m-d');\n print_r($date);\n return $date;\n}", "function formatDateDBversLocal($date, $type = 2)\n {\n /*\n * Suppression des espaces, tabulations et autres caracteres indesirables presents en debut et fin de chaine\n */\n $date = ltrim($date);\n $date = rtrim($date);\n $temp = @explode(\" \", $date);\n $date = $temp[0];\n $heure = $temp[1];\n $temp = @explode($this->separateurDB, $date);\n /*\n * Reformatage de la date\n */\n\n switch ($this->formatDate) {\n case 0:\n $date = $temp[0] . $this->separateurLocal . $temp[1] . $this->separateurLocal . $temp[2];\n break;\n case 1:\n $date = $temp[2] . $this->separateurLocal . $temp[1] . $this->separateurLocal . $temp[0];\n break;\n case 2:\n $date = $temp[1] . $this->separateurLocal . $temp[2] . $this->separateurLocal . $temp[0];\n break;\n }\n\n if ($type == 3) {\n /*\n * Reincorporation de l'heure\n */\n $date .= \" \" . $heure;\n }\n return ($date);\n }", "function formatDate($date, $format = '%d %B %Y') {\n setlocale(LC_ALL, 'fr.utf-8');\n\n return strftime($format, strtotime($date));\n}", "function date_sql2en($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"-\", $date);\r\n\t\t\t$date_fr = $date[1].\"/\".$date[2].\"/\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_fr = \"\";\r\n\t\t}\r\n\t\treturn $date_fr;\r\n\t}", "public function formatDate($date = null);", "function dateToDB($date) {\n\tglobal $config;\n\treturn date($config['db_date_format'], strtotime($date));\t\n}", "function utilDatesLocaleVersDB($data)\n {\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n /*\n * Traitement recursif\n */\n $data[$key] = $this->utilDatesDBVersLocale($value);\n } else {\n if (($this->colonnes[$key][\"type\"] == 2 || $this->colonnes[$key][\"type\"] == 3) && strlen($value) > 0) {\n /*\n * Formatage de la date\n */\n $data[$key] = $this->formatDateLocaleVersDB($value, $this->colonnes[$key][\"type\"]);\n }\n }\n }\n\n return $data;\n }", "function ConvertToSqlDate($date)\n {\n if($date != \"\")\n return $this->app->String->Convert($date,\"%3.%2.%1\",\"%1-%2-%3\");\n }", "function formatDatesVersLocal($data)\n {\n return $this->utilDatesDBVersLocale($data);\n }", "public function convertDateToDB($_date) {\n\t\tif(ereg(\"^([0-9]{1,2})-([0-9]{1,2})-([0-9]{4}).*$\",\n\t\t\t$_date, $_arrdt) !== false) {\n\t\t\treturn sprintf(\"%04.4d-%02.2d-%02.2d\",\n\t\t\t\t$_arrdt[3], $_arrdt[2], $_arrdt[1]);\n\t\t\t}\n\t\treturn false;\n\t}", "function format_date($format, $timestamp, $timezone, $lang = LANG_NO)\n{\n\tglobal $_date_translations, $_default_date_translations, $_lang;\n\t\n\t$translations = $_default_date_translations;\n\tif (is_valid_lang($lang) && $lang != $_lang)\n\t{\n\t\t$lang_code = get_lang_code($lang);\n\t\tif (!isset($_date_translations[$lang_code]))\n\t\t{\n\t\t\t$_date_translations[$lang_code] = include(__DIR__ . '/languages/' . $lang_code . '/date.php');\n\t\t}\n\t\t$translations = $_date_translations[$lang_code];\n\t}\n\n\tdate_default_timezone_set($timezone);\n\t$row = date($format, $timestamp);\n\tforeach ($translations as $eng => $localized)\n\t{\n\t\t$row = str_replace($eng, $localized, $row);\n\t}\n\treturn $row;\n}", "function formatFechaBD($value){\n\t$partes = explode(\"-\", $value);\n\t$value = $partes[2].\"-\".$partes[1].\"-\".$partes[0];\n\treturn $value;\n}", "function utilDatesDBVersLocale($data)\n {\n foreach ($data as $key => $value) {\n\n if (is_array($value)) {\n /*\n * Traitement recursif\n */\n $data[$key] = $this->utilDatesDBVersLocale($value);\n } else {\n if (!empty($this->colonnes[$key]) && ($this->colonnes[$key][\"type\"] == 2 || $this->colonnes[$key][\"type\"] == 3) && !empty($value)) {\n /*\n * Formatage de la date\n */\n $data[$key] = $this->formatDateDBversLocal($value, $this->colonnes[$key][\"type\"]);\n }\n }\n\n }\n\n return $data;\n }", "function datum($db_date) {\r\n return strftime('%d.%m.%Y', strtotime($db_date));\r\n }", "private function changeDateFormat($val,$format){\n \n if($val != \"\" && count($this->dbConfigs) > 0){\n switch ($this->dbConfigs['driver']){\n case \"mysql\":\n if($format == \"date\"){\n $val = date(\"Y-m-d\", strtotime($val));\n }\n elseif($format == \"datetime\"){\n $val = date(\"Y-m-d H:i:s\", strtotime($val));\n }\n break;\n case \"sqlsrv\":\n if($format == \"date\"){\n $val = date(\"Y-m-d\",strtotime($val));\n }\n elseif($format == \"datetime\"){\n $val = date(\"Y-m-d H:i:s\",strtotime($val));\n }\n break;\n }\n return $val;\n }\n }", "function formatColumn($column , $db)\n\t{\n\t\tif(JString::stristr(JString::strtolower($column->cacheSqlSpec),'date'))\n\t\t\treturn \"DATE_FORMAT(\".$db->quoteName($column->cacheColumnName).\", '%d-%m-%Y') \";\n\n\t\t return parent::formatColumn($column, $db);\n\t}", "function acadp_mysql_date_format( $date ) {\n\n\t$defaults = array(\n\t\t'year' => 0,\n\t\t'month' => 0,\n\t\t'day' => 0,\n\t\t'hour' => 0,\n\t\t'min' => 0,\n\t\t'sec' => 0\n\t);\n\t$date = array_merge( $defaults, $date );\n\n\t$year = (int) $date['year'];\n\t$year = str_pad( $year, 4, '0', STR_PAD_RIGHT );\n\n\t$month = (int) $date['month'];\n\t$month = max( 1, min( 12, $month ) );\n\n\t$day = (int) $date['day'];\n\t$day = max( 1, min( 31, $day ) );\n\n\t$hour = (int) $date['hour'];\n\t$hour = max( 1, min( 24, $hour ) );\n\n\t$min = (int) $date['min'];\n\t$min = max( 0, min( 59, $min ) );\n\n\t$sec = (int) $date['sec'];\n\t$sec = max( 0, min( 59, $sec ) );\n\n\treturn sprintf( '%04d-%02d-%02d %02d:%02d:%02d', $year, $month, $day, $hour, $min, $sec );\n\n}", "function erp_format_date( $date, $format = false ) {\n if ( ! $format ) {\n $format = erp_get_option( 'date_format', 'erp_settings_general', 'd-m-Y' );\n }\n\n if ( ! is_numeric( $date ) ) {\n $date = strtotime( $date );\n }\n\n if ( function_exists('wp_date') ) {\n return wp_date( $format, $date );\n }\n\n return date_i18n( $format, $date );\n}", "function date_sql2fr($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"-\", $date);\r\n\t\t\t$date_fr = $date[2].\"/\".$date[1].\"/\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_fr = \"\";\r\n\t\t}\r\n\t\treturn $date_fr;\r\n\t}", "function french_to_english_date($date, $format='Y-m-d') {\n\tif(\\DateTime::createFromFormat('d/m/Y', $date)) {\n\t\treturn \\DateTime::createFromFormat('d/m/Y', $date)->format($format);\n\t}\n\treturn null;\n}", "public static function FormatDateToSql($date){\n return date(\"Y-m-d\", strtotime(str_replace('/','-',$date)));\n }", "function format_date( $sql_date ) {\n\t\n\t$timestamp = strtotime($sql_date); //UNIX TIMESTAMP OF SQL DATE\n\n\t\t//then it's over a week\n\t\t$format = \"%B %e\";\n\t\t$formatteddate = strftime ($format, $timestamp);\n\t\t\n\treturn strtoupper($formatteddate);\n}", "function STRdate_format($str, $origin = USERDATE_READ, $format = DBDATE_WRITE) {\r\n if (trim($str) == \"\") {\r\n return -1;\r\n }\r\n try {\r\n $date = DateTime::createFromFormat($origin, $str);\r\n if ($date) {\r\n if ($format == \"datetime\") {\r\n return $date;\r\n }\r\n return $date->format($format);\r\n }\r\n \\Itracker\\Utils\\LoggerFactory::getLogger()->debug(\r\n 'No se puede convertir fecha', array('input' => $str, 'orformat' => $origin, 'destformat' => $format));\r\n return -1;\r\n } catch (Exception $e) {\r\n \\Itracker\\Utils\\LoggerFactory::getLogger()->debug(\r\n 'No se puede convertir fecha', array('input' => $str, 'orformat' => $origin, 'destformat' => $format));\r\n return -1;\r\n }\r\n}", "function uiToDBdate() {\r\n\r\n\t\t$month = (int) substr($this->date, -10, 2);\r\n\t\t$day = (int) substr($this->date, -7, 2);\r\n\t\t$year = (int) substr($this->date, -4, 4);\r\n\r\n\t\t$formattedDate = $year . \"-\" . $month . \"-\" . $day;\r\n\r\n\t\t$this->date = $formattedDate;\r\n\t}", "public static function dbDateFormat(string $date): string\n\t{\n\t\t$date = str_replace('/', '-', $date);\n\t\treturn strtotime($date) ?\n\t\t\tdate('Y-m-d', strtotime($date)) :\n\t\t\t'';\n\t}", "function helper_format_date($date, $format = APP_DATE_TIME_FORMAT){\n return date( $format, strtotime($date) );\n }", "function conv_date($f, $date, $sep = '/') {\n $fmt = '';\n if ($f == '1') { // normal to mysql\n $date = explode('/', $date);\n $fmt = (count($date) == 3) ? $date[2] . '-' . $date[1] . '-' . $date[0] : '';\n } else { // mysql to normal\n $date = explode(' ', $date);\n $date = explode('-', $date[0]);\n $fmt = (count($date) == 3) ? $date[2] . $sep . $date[1] . $sep . $date[0] : '';\n }\n return $fmt;\n}", "public function formatDate($rawDate, $format = 'FULL')\n {\n return FormatDateFromDB($rawDate, $format);\n }", "function dateFormat($date){\n return strftime(\"%d. %m. %Y\", strtotime($date));\n}", "function dateToDBDate($date)\n\t{\n\n\t\tif (is_numeric($date))\n\t\t{\n\t\t\treturn date('Y-m-d', $date);\n\t\t}\n\t\telse if (preg_match('/\\d{2}\\.\\d{2}\\.\\d{4}/', $date))\n\t\t{\n\t\t\t$arDate = explode('.', $date);\n\n\t\t\treturn $arDate[2].'-'.$arDate[1].'-'.$arDate[0];\n\t\t}\n\t\telse if (strtotime($date) > 0)\n\t\t{\n\t\t\treturn date('Y-m-d', strtotime($date));\n\t\t}\n\n\t\treturn '0000-00-00';\n\n\t}", "protected function cnew_convert_date_to_db( $date ) {\r\n $current_date = DateTime::createFromFormat('d/m/Y', $date );\r\n return $current_date ? $current_date->format('Y-m-d') : $current_date;\r\n }", "function format_date(string $date_string = null, $format = 'd/m/Y') {\n return date_format(new \\DateTime($date_string), $format);\n }", "function format_date(string $date_string = null, $format = 'd/m/Y') {\n return date_format(new \\DateTime($date_string), $format);\n }", "function english_to_french_date($date, $format='d/m/Y') {\n\tif(\\DateTime::createFromFormat('Y-m-d', $date)) {\n\t\treturn \\DateTime::createFromFormat('Y-m-d', $date)->format($format);\n\t}\n\treturn null;\n}", "function date_format($date = \"\", $format = \"\") {\n if ($format == \"\")\n $format = \"Y-m-d H:i:s\";\n\n if ($date == \"\")\n return \"\";\n\n $converted = strtotime($date);\n\n if ($converted === false)\n return date($format, $date);\n else\n return date($format, $converted);\n }", "function convertDate_Amj_string($date) \n{\n\tsetlocale (LC_TIME, 'fr_FR','fra'); \n\treturn strftime(\"%A %d %B %Y\", strtotime($date)); \n}", "private static function formatQueryDate($date) {\n\t\t$dateComponents = self::parseDateArgument($date);\n\t\t$y = $dateComponents[0];\n\t\t$m = $dateComponents[1];\n\t\t$d = $dateComponents[2];\n\t\t$format = 'j M Y';\n\t\tif( preg_match('/[?]/', $d) ) {\n\t\t\t$format = 'M Y';\n\t\t\t$d = 1;\n\t\t}\n\t\tif( preg_match('/[?]/', $m) ) {\n\t\t\t$format = 'Y';\n\t\t\t$m = 1;\n\t\t}\n\t\tif( preg_match('/[?]/', $y) ) {\n\t\t\treturn $y;\n\t\t}\n\t\t$timestamp = mktime(0, 0, 0, intval($m) , intval($d), intval($y));\n\t\t$date = new DateTime(\"@$timestamp\");\n\t\treturn $date->format($format); // e.g. 1 Jan 2018 (no leading zero on days)\n\t}", "static public function formatDate($string) {\n if (self::$_static_handler == null) {\n self::$_static_handler = slDatabaseManager::getConnection();\n }\n $format = self::$_static_handler->getDateTimeFormat();\n return date($format, strtotime($string));\n }", "public static function dateToString($date, $format = self::DATE_LONG, $separator = '/', $lang=0,$weekdays = false, $cap = false)\r\n {\r\n $strDate = $date;\r\n $formatByLang = array(\r\n self::DATE_FULL => array(\r\n 'fr' => array(\r\n 'format' => \"Le %s %s %s %s\",\r\n 'values'=> array('day','dayDate', 'monthName', 'year')),\r\n 'en' => array('format' => \"%s %s %s\",\r\n 'values'=> array('monthName', 'dayDate', 'daySuffix', 'year')),\r\n 'es' => array('format' => \"%s de %s de %s\",\r\n 'values'=> array('day','dayDate', 'monthName', 'year'))\r\n ),\r\n self::DATE_LONG => array(\r\n 'fr' => array(\r\n 'format' => \"%s %s %s\",\r\n 'values'=> array('dayDate', 'monthName', 'year')),\r\n 'en' => array('format' => \"%s, %s %s%s, %s\",\r\n 'values'=> array('day', 'monthName', 'dayDate', 'daySuffix', 'year')),\r\n 'es' => array('format' => \"%s, el %s de %s de %s\",\r\n 'values'=> array('day','dayDate', 'monthName', 'year'))\r\n ),\r\n self::DATE_SHORT => array(\r\n 'fr' => array(\r\n 'format' => \"%s %s %s\",\r\n 'values'=> array('dayDate', 'monthName', 'year')),\r\n 'en' => array('format' => \"%s %s %s\",\r\n 'values'=> array('dayDate', 'monthName', 'year')),\r\n 'es' => array('format' => \"%s, el %s de %s de %s\",\r\n 'values'=> array('day','dayDate', 'monthName', 'year'))\r\n ),\r\n self::DATE_LONG_NO_DAY => array(\r\n 'format' => \"%s %s\",\r\n 'values' => array('monthName', 'year')\r\n ),\r\n self::DATE_NUM => array(\r\n 'format' => \"%d{$separator}%d{$separator}%d\",\r\n 'values' => array('dayDate','month', 'year')\r\n ),\r\n self::DATE_SQL => array(\r\n 'format' => \"%d-%d-%d\",\r\n 'values' => array('year', 'month', 'dayDate')\r\n ),\r\n self::DATE_NUM_USA => array(\r\n 'format' => \"%d{$separator}%d{$separator}%d\",\r\n 'values' => array('month', 'dayDate', 'year')\r\n ),\r\n self::DATE_NUM_SHORT_YEAR => array(\r\n 'format' => \"%d{$separator}%d{$separator}%d\",\r\n 'values' => array('dayDate','month', 'yearShort')\r\n ),\r\n self::DATE_MONTH_YEAR => array(\r\n 'format' => \"%s %d\",\r\n 'values' => array('monthName', 'year')\r\n ),\r\n );\r\n if (!empty($date))\r\n {\r\n if($lang==0)\r\n {\r\n $suffixLang = Zend_Registry::get('languageSuffix');\r\n $locale = self::getLocalForLanguage(Zend_Registry::get(\"languageID\"));\r\n }\r\n else\r\n {\r\n $suffixLang = Cible_FunctionsGeneral::getLanguageSuffix($lang);\r\n $locale = self::getLocalForLanguage($lang);\r\n }\r\n if(is_string($date))\r\n $date = new Zend_Date($date, null, $locale);\r\n\r\n $day = $date->get(Zend_Date::WEEKDAY);\r\n $daySuffix = $date->get(Zend_Date::DAY_SUFFIX);\r\n $dayDate = $date->get(Zend_Date::DAY);\r\n $month = $date->get(Zend_Date::MONTH);\r\n $monthName = $date->get(Zend_Date::MONTH_NAME);\r\n $year = $date->get(Zend_Date::YEAR);\r\n $yearShort = $date->get(Zend_Date::YEAR);\r\n switch($format)\r\n {\r\n case self::DATE_FULL :\r\n case self::DATE_SHORT :\r\n case self::DATE_LONG :\r\n if ($format == self::DATE_SHORT)\r\n $monthName = $date->get(Zend_Date::MONTH_NAME_SHORT);\r\n if(strpos($dayDate,'0')==0)\r\n $dayDate = str_replace(\"0\", \"\", $dayDate);\r\n\r\n $formatStr = $formatByLang[$format][$suffixLang]['format'];\r\n foreach ($formatByLang[$format][$suffixLang]['values'] as $value)\r\n $arguments[] = $$value;\r\n $strDate = vsprintf($formatStr, $arguments);\r\n if($suffixLang == 'fr')\r\n {\r\n if($dayDate=='1')\r\n $strDate = str_replace(\"1 \", \"1<sup>er</sup> \", $strDate);\r\n }\r\n\r\n break;\r\n case self::DATE_MONTH_YEAR : // ex: Juin 2011\r\n $formatStr = $formatByLang[$format]['format'];\r\n foreach ($formatByLang[$format]['values'] as $value)\r\n $arguments[] = $$value;\r\n $strDate = ucfirst(vsprintf($formatStr, $arguments));\r\n break;\r\n default :\r\n $formatStr = $formatByLang[$format]['format'];\r\n foreach ($formatByLang[$format]['values'] as $value)\r\n $arguments[] = $$value;\r\n $strDate = vsprintf($formatStr, $arguments);\r\n break;\r\n\r\n }\r\n\r\n if($cap==true)\r\n $strDate = strtoupper($strDate);\r\n }\r\n\r\n return $strDate;\r\n }", "function string_format_complete_date( $p_date ) {\r\n\t$t_timestamp = db_unixtimestamp( $p_date );\r\n\treturn date( config_get( 'complete_date_format' ), $t_timestamp );\r\n}", "public function getDate4Database2($date=null){\n\t\treturn date_format($this->createDate($date),\"Y-m-d\");\n\t}", "function sky_date_french($format, $timestamp = null, $echo = null)\n{\n $param_D = array('', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam', 'Dim');\n $param_l = array('', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi', 'Dimanche');\n $param_F = array('', 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');\n $param_M = array('', 'Jan', 'Fév', 'Mar', 'Avr', 'Mai', 'Jun', 'Jul', 'Aoû', 'Sep', 'Oct', 'Nov', 'Déc');\n $return = '';\n if (is_null($timestamp)) {\n $timestamp = mktime();\n }\n for ($i = 0, $len = strlen($format); $i < $len; $i++) {\n switch ($format[$i]) {\n case '\\\\': // fix.slashes\n $i++;\n $return .= isset($format[$i]) ? $format[$i] : '';\n break;\n case 'D':\n $return .= $param_D[date('N', $timestamp)];\n break;\n case 'l':\n $return .= $param_l[date('N', $timestamp)];\n break;\n case 'F':\n $return .= $param_F[date('n', $timestamp)];\n break;\n case 'M':\n $return .= $param_M[date('n', $timestamp)];\n break;\n default:\n $return .= date($format[$i], $timestamp);\n break;\n }\n }\n if (is_null($echo)) {\n return $return;\n } else {\n echo $return;\n }\n}", "function dateFormat($date, $format=\"m/d/Y h:i:s A\") {\n if (empty($date)) {\n return \"\";\n }\n Zend_Date::setOptions(array('format_type' => 'php'));\n $zdate = new Zend_Date(strtotime($date));\n $str_date = $zdate->toString($format);\n Zend_Date::setOptions(array('format_type' => 'iso'));\n return $str_date;\n }", "function format_date($timestamp)\n{\n //format depends on wether we have a timestamp or not\n if (utf8_strlen($timestamp)>10) {\n $fstr = 'd M Y - G:i';\n } else {\n $fstr = 'd M Y';\n }\n if (utf8_substr($timestamp,0,10)=='0000-00-00') {\n return __('no date set yet');\n }\n if ($lang == \"de\") {\n return date($fstr, strtotime($timestamp));\n } else {\n return date($fstr, strtotime($timestamp));\n }\n}", "function format_date($date, $format = Zend_Date::DATE_MEDIUM)\n{\n if (is_int($date)) {\n $sourceFormat = Zend_Date::TIMESTAMP;\n } else {\n $sourceFormat = Zend_Date::ISO_8601;\n }\n $dateObj = new Zend_Date($date, $sourceFormat);\n return $dateObj->toString($format);\n}", "static function sql_date_format($dateStr){\n $date=new DateTime($dateStr);\n $result = $date->format('d.m.Y H:i') . PHP_EOL;\n \n return $result;\n }", "function date_en2sql($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"/\", $date);\r\n\t\t\t$date_sql = $date[2].\"-\".$date[0].\"-\".$date[1];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_sql = \"\";\r\n\t\t}\r\n\t\treturn $date_sql;\r\n\t}", "function convert_date($date, $format = DATE_FORMAT)\r\n{ \r\n // $date_format is defined in config.inc.php.\r\n if (empty($date)) return;\r\n\r\n switch ($format) {\r\n case 'us12':\r\n return date('m/d/y g:i a', strtotime($date));\r\n break;\r\n case 'us24':\r\n\t\t\treturn date('m/d/y H:i', strtotime($date));\r\n break;\r\n case 'eu12':\r\n return date('d/m/y g:i a', strtotime($date));\r\n break;\r\n case 'eu24':\r\n return date('d/m/y H:i', strtotime($date)); \r\n break;\r\n case 'verbose':\r\n return date('D M jS, Y @ g:ia', strtotime($date));\r\n break;\r\n case 'mysql':\r\n return date('Y-m-d H:i:s', strtotime($date));\r\n break;\r\n case 'mysql_hours':\r\n return date('H:i a', strtotime($date));\r\n break;\r\n\t\tcase 'unix':\r\n return date('U', strtotime($date));\r\n break;\r\n default:\r\n // none specified, just return us12.\r\n return date('m/d/y h:i a', strtotime($date));\r\n }\r\n\r\n}", "function sc_date_format($date){\n\t$CI =& get_instance();\n\tif($CI->session->userdata('locale') =='uk'){\n\t\treturn date('d/m/Y', $date);\n\t}else{\n\t\treturn date('m/d/Y', $date);\n\t}\n}", "function sc_us_date_format($date){\n\treturn date('m/d/Y', $date);\n}", "function formatDate($date){\r\n\t\t\t\t$dateObject = date_create($date);\r\n\t\t\t\treturn date_format($dateObject, \"j F Y\");\r\n\t\t\t}", "private function _format_date_mysql($fecha) {\n if ($fecha != \"\") {\n $date = explode('-', $fecha);\n if (count($date) === 3) {//valida que vengan los 3 datos separados por / array.length = 3\n if (checkdate($date[1], $date[2], $date[0])) {//mm/d/a\n //int $month , int $day , int $year\n //09/20/2018\n return $date[0] . '-' . $date[1] . '-' . $date[2]; //aa-mm-d\n } else {\n return FALSE;\n }\n } else {\n return FALSE;\n }\n } else {\n return FALSE;\n }\n }", "function get_date_textual($format = 'Y-m-d') {\n\t$format = ($format == '') ? 'Y-m-d' : $format;\n\t$format = str_replace('Y', 'yyyy', $format);\n\t$format = str_replace('m', 'mm', $format);\n\t$format = str_replace('d', 'dd', $format);\n\treturn $format;\n}", "function atkFormatDate($date, $format, $weekday=false)\n{\n\tstatic $langcache = array();\n\n\tif (!is_array($date))\n\t{\n\t\t$date = getdate($date);\n\t}\n\n\t/* format month */\n\t$format = str_replace(\"M\", \"%-%\", $format);\n\t$format = str_replace(\"F\", \"%=%\", $format);\n\n\t/* format day */\n\t$format = str_replace(\"D\", \"%&%\", $format);\n\t$format = str_replace(\"l\", \"%*%\", $format);\n\n\tif ($weekday && strpos($format, '%&%') === FALSE && strpos($format, '%*%') === FALSE)\n\t{\n\t\t$format = str_replace(\"d\", \"%*% d\", $format);\n\t\t$format = str_replace(\"j\", \"%*% j\", $format);\n\t}\n\n\t/* get date string */\n\trequire_once(atkconfig('atkroot').\"atk/utils/adodb-time.inc.php\");\n\t$str_date = adodb_date($format, $date[0]);\n\n\t$month = $date['month'];\n\t$shortmonth = substr(strtolower($date[\"month\"]), 0, 3);\n\n\t/* store the text calls */\n\tif(!isset($langcache[$month]))\n\t{\n\t\t$langcache[$month]= atktext(strtolower($month),\"atk\");\n\t}\n\n\tif(!isset($langcache[$shortmonth]))\n\t{\n\t\t$langcache[$shortmonth] = atktext($shortmonth);\n\t}\n\n\t/* replace month/week name */\n\t$str_date = str_replace(\"%-%\", $langcache[$shortmonth], $str_date);\n\t$str_date = str_replace(\"%=%\", $langcache[$month], $str_date);\n\t$str_date = str_replace(\"%*%\", atktext(strtolower($date[\"weekday\"]),\"atk\"), $str_date);\n\t$str_date = str_replace(\"%&%\", atktext(substr(strtolower($date[\"weekday\"]), 0, 3),\"atk\"), $str_date);\n\n\t/* return string */\n\treturn $str_date;\n}", "function format_date($value) {\t\n\t$value = (int)$value;\n\tif($value > 0)\n\t\treturn date($GLOBALS['i18']['date_format'],$value);\n\telse\n\t\treturn '';\n}", "function dateFormat($str){\n\t// YYYY-MM-DD -> DD/MM/YYYY\n\t$dbToNormalize ='#[2][0][0-9][0-9]-[0-1][0-9]-[0-3][0-9]#';\n\t$normalizeToDb = '#[0-3][0-9]/[0-1][0-9]/[2][0][0-9][0-9]#';\n\t$datetimeToNormalize = '#[2][0][0-9][0-9]-[0-1][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9]#';\n\n\tif(preg_match($datetimeToNormalize, $str)){\n\t\t$date = DateTime::createFromFormat('Y-m-d H:i:s', $str);\n\t\treturn $formatedDate = $date->format('d/m/Y à H:i');\t\n\t}\n\telseif (preg_match($dbToNormalize, $str)) {\n\t\t$date = DateTime::createFromFormat('Y-m-d', $str);\n\t\treturn $formatedDate = $date->format('d/m/Y');\n\t}\n\t// DD/MM/YYYY -> YYYY-MM-DD \n\telseif (preg_match($normalizeToDb, $str)) {\n\t\t$date = DateTime::createFromFormat('d/m/Y', $str);\n\t\treturn $formatedDate = $date->format('Y-m-d');\n\t}\n\telse{\n\t\treturn FALSE;\n\t}\n}", "function formatDate($date){\n\tif(validateDate($date)){\n\t\t$year = substr($date,0,4);\n\t\t$month = substr($date,4,2);\n\t\t$day = substr($date,6,2);\n\t\treturn $year.C('STR_YEAR').$month.C('STR_MONTH').$day.C('STR_DAY');\n\t}\n\telse\n\t\treturn C('STR_FORMAT_DATE_FAIL');\n}", "function frdate($date1)\n{\n setlocale(LC_TIME, \"fr_FR.UTF-8\");\n $date2 = strftime(\"%A %d %b %Y\", strtotime($date1));\n return $date2;\n}", "function frdate($date1)\n{\n setlocale(LC_TIME, \"fr_FR.UTF-8\");\n $date2 = strftime(\"%A %d %b %Y\", strtotime($date1));\n return $date2;\n}", "protected function dateFormatDatabase()\n {\n return $this->dateFormat('mysql');\n }", "public static function format_date($date,$format) {\n \n return Yii::app()->dateFormatter->format($format, $date);\n }", "function nl_date( $sql_date ) {\n\t\n\t$timestamp = strtotime($sql_date); //UNIX TIMESTAMP OF SQL DATE\n\t$now = time(); //UNIX TIMESTAMP OF NOW\n\t\n\t\n\t//sees if the thing is on TODAY's date\n\t$format_today_compare = strftime(\"%b %e\", $now);\n\t$format_date_compare = strftime(\"%b %e\", $timestamp);\n\t\n\t$tomorrow = mktime(0,0,0,date(\"m\"),date(\"d\")+1,date(\"Y\"));\n\t\n\tif ($format_today_compare == $format_date_compare) { //IS IT TODAY\n\t\t$formatteddate = \"TONIGHT\";\n\t}\n\telse if (strftime (\"%b %e\", $tomorrow) == strftime (\"%b %e\", $timestamp)) { //IS IT TOMORROW\n\t\t$formatteddate = \"TOMORROW\";\n\t} else if ( $timestamp - $now < 432000 && $timestamp - $now > 0) { //IS IT THIS WEEK?\n\t\t//then it's within a week\n\t\t$format = \"%A\";\n\t\t$formatteddate = strftime ($format, $timestamp);\n\t} else {\n\t\t//then it's over a week\n\t\t$format = \"%a, %b %e\";\n\t\t$formatteddate = strftime ($format, $timestamp);\n\t}\n\t\n\treturn strtoupper($formatteddate);\n\t\n}", "public function format($format) {\n \t$spf = str_replace(array(\"d\",\"m\",\"Y\"),array(\"%3$02d\",\"%2$02d\",\"%1$04d\"),$format);\n \t\treturn sprintf($spf, $this->dt[0], $this->dt[1], $this->dt[2]);\n\t}", "function local_to_iso($date,$date_format)\n{\n $list_date=explode (\"-\",$date);\n if ($date_format=='fr')\n {\n $date=$list_date[2].'-'.$list_date[1].'-'.$list_date[0];\n }\n elseif ($date_format=='en')\n $date=$list_date[2].'-'.$list_date[0].'-'.$list_date[1];\n return $date;\n}", "function local_to_iso($date,$date_format)\n{\n $list_date=explode (\"-\",$date);\n if ($date_format=='fr')\n {\n $date=$list_date[2].'-'.$list_date[1].'-'.$list_date[0];\n }\n elseif ($date_format=='en')\n $date=$list_date[2].'-'.$list_date[0].'-'.$list_date[1];\n return $date;\n}", "function date_format_translated($format, $timestamp) {\n\tglobal $translation;\n\t\n\t$day_name_short = array($translation['tstat_su'], $translation['tstat_mo'], $translation['tstat_tu'], $translation['tstat_we'], $translation['tstat_th'], $translation['tstat_fr'], $translation['tstat_sa']);\n\t$day_name_full = array($translation['tstat_full_su'], $translation['tstat_full_mo'], $translation['tstat_full_tu'], $translation['tstat_full_we'], $translation['tstat_full_th'], $translation['tstat_full_fr'], $translation['tstat_full_sa']);\n\t$month_name_short = array($translation['tstat_jan'], $translation['tstat_feb'], $translation['tstat_mar'], $translation['tstat_apr'], $translation['tstat_may'], $translation['tstat_jun'],\n \t\t\t\t\t $translation['tstat_jul'], $translation['tstat_aug'], $translation['tstat_sep'], $translation['tstat_oct'], $translation['tstat_nov'], $translation['tstat_dec']);\n\t$month_name_full = array($translation['tstat_full_jan'], $translation['tstat_full_feb'], $translation['tstat_full_mar'], $translation['tstat_full_apr'], $translation['tstat_full_may'], $translation['tstat_full_jun'],\n \t\t\t\t\t $translation['tstat_full_jul'], $translation['tstat_full_aug'], $translation['tstat_full_sep'], $translation['tstat_full_oct'], $translation['tstat_full_nov'], $translation['tstat_full_dec']);\n \t\t\t\t\t \n // Loop char by char through php date format string, cacth the ones which need translating\n//--- PHP 4 :-)--------------------------------\nif(!function_exists('str_split')){\n function str_split($str,$split_lengt=1){\n\n $cnt = strlen($str);\n\n for ($i=0;$i<$cnt;$i+=$split_lengt)\n $rslt[]= substr($str,$i,$split_lengt); \n \n return $rslt;\n }\n} \n//----------------------------------------------\n\t$result = \"\";\n\t$format_chars = str_split($format, 1);\n\tforeach ($format_chars as $format_char) {\n\t\tif ($format_char == \"l\") {\n\t\t\t$day_index = date(\"w\", $timestamp);\n\t\t\t$result = $result . $day_name_full[$day_index];\n\t\t} else if ($format_char == \"D\") {\n\t\t\t$day_index = date(\"w\", $timestamp);\n\t\t\t$result = $result . $day_name_short[$day_index];\n\t\t} else if ($format_char == \"F\") {\n\t\t\t$month_index = date(\"n\", $timestamp) - 1;\n\t\t\t$result = $result . $month_name_full[$month_index];\n\t\t} else if ($format_char == \"M\") {\n\t\t\t$month_index = date(\"n\", $timestamp) - 1;\n\t\t\t$result = $result . $month_name_short[$month_index];\n\t\t} else {\n\t\t\t$result = $result . date($format_char, $timestamp);\n\t\t}\n\t}\n\t\n\treturn $result;\n}", "function eo_format_date($dateString='',$format='d-m-Y'){\n\n\tif($format!=''&& $dateString!=''){\n\t\t$datetime = new DateTime($dateString, eo_get_blog_timezone());\n\t\t$formated = eo_format_datetime($datetime,$format);\n\t\treturn $formated;\n\t}\n\treturn false;\n}", "function format_date($date)\n{\n return date('d.m.Y', $date);\n}", "function eo_format_datetime($datetime,$format='d-m-Y'){\n\tglobal $wp_locale;\n\n\tif ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) :\n\t\t\t//Translate\n\t\t\t$datemonth = $wp_locale->get_month($datetime->format('m'));\n\t\t\t$datemonth_abbrev = $wp_locale->get_month_abbrev($datemonth);\n\t\t\t$dateweekday = $wp_locale->get_weekday($datetime->format('w'));\n\t\t\t$dateweekday_abbrev = $wp_locale->get_weekday_abbrev( $dateweekday );\n\t\t\t$datemeridiem = trim($wp_locale->get_meridiem($datetime->format('a')));\n\t\t\t$datemeridiem_capital =$wp_locale->get_meridiem($datetime->format('A'));\n\n\t\t\t$datemeridiem = (empty($datemeridiem) ? $datetime->format('a') : $datemeridiem);\n\t\n\t\t\t$dateformatstring = ' '.$format;\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])D/\", \"\\\\1\" . backslashit( $dateweekday_abbrev ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])F/\", \"\\\\1\" . backslashit( $datemonth ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])l/\", \"\\\\1\" . backslashit( $dateweekday ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])M/\", \"\\\\1\" . backslashit( $datemonth_abbrev ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])a/\", \"\\\\1\" . backslashit( $datemeridiem ), $dateformatstring );\n\t\t\t$dateformatstring = preg_replace( \"/([^\\\\\\])A/\", \"\\\\1\" . backslashit( $datemeridiem_capital ), $dateformatstring );\n\t\t\t$dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 );\n\t endif;\t\n\n\treturn $datetime->format($dateformatstring);\n}", "public function getDateFormatter();", "public function convert_date_db($created_date){\n\t\tif(($created_date != '') && ($created_date != '0000-00-00') && ($created_date != '0000-00-00 00:00:00')){\n\t\t\t$c_d = date('Y-m-d', strtotime($created_date));\n\t\t\treturn $c_d;\n\t\t}\n\t}", "private function formatFecha($fecha, $format = 'dd/mm/yyyy') {\n $newFecha = NULL;\n if (!empty($fecha) && strlen($fecha) == 10) {\n if ($format === 'dd/mm/yyyy') {\n //de: yyyy-mm-dd a: dd/mm/yyyy \n $fecha = explode('-', $fecha);\n $newFecha = $fecha[2] . '/' . $fecha[1] . '/' . $fecha[0];\n }\n if ($format === 'yyyy-mm-dd') {\n //de: dd/mm/yyyy a: yyyy-mm-dd \n $fecha = explode('/', $fecha);\n $newFecha = $fecha[2] . '/' . $fecha[1] . '/' . $fecha[0];\n }\n }\n \n return $newFecha;\n }", "public function date_format($value, $format = 'dd MMMM YYYY') {\r\n\t\tif ($value === null || $value === '') {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\t$date = new Accepte_Date($value);\r\n\r\n\t\treturn $date->format($format, $this->locale);\r\n\t}", "function date_format_intl(DateTimeInterface $date, $format) {\n\t$fmt = new IntlDateFormatter('nl', null, null);\n\t$fmt->setPattern($format);\n\n\treturn $fmt->format($date);\n}", "function date2mysql($date)\r\n\t{\r\n\t\tif($date != \"\")\r\n\t\t{\r\n\t\t@list($jour,$mois,$annee)=explode('/',$date);\t\t\t\t//récupération des différentes valeurs en utilisant les / comme séparateurs\r\n \t\treturn @date('Y-m-d',mktime(0,0,0,$mois,$jour,$annee));\t\t//retour de la date modifié au bon format grace à un mktime\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\treturn $date;\r\n \t\t}\r\n\t}", "private function format()\n {\n return config('app.locale') != 'en' ? 'd/m/Y' : 'm/d/Y';\n }", "function FormatDate2($fecha)\n {\n if($fecha!=NULL || $fecha!=\"\"){\n $meses = [\"\", \"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"];\n $dias = [\"\", \"Lunes\", \"Martes\", \"Miercoles\", \"Jueves\", \"Viernes\", \"Sabado\", \"Domingo\"];\n return date(\"j\", strtotime($fecha)) . \" de \" . $meses[date(\"n\", strtotime($fecha))] . \", \" . date(\"Y\", strtotime($fecha));}\n else\n return \"\";\n }", "function format_date($date) {\n return substr($date, 8, 2) . '/' . substr($date, 5, 2) . '/' . substr($date, 0, 4);\n }", "function format_dates_for_db($formdata, $field_list)\n{\n\t$new_formdata = $formdata;\n\t\n\tforeach($field_list AS $key)\n\t{\n\t\t$field_key = explode('*', $key);\n\t\tif(array_key_exists($field_key[0], $formdata)){\n\t\t\tif(!empty($field_key[1]) && $field_key[1] == 'EXT'){\n\t\t\t\t$new_formdata[$field_key[0]] = date('Y-m-d H:i:s', strtotime($formdata[$field_key[0]]));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_formdata[$field_key[0]] = date('Y-m-d', strtotime($formdata[$field_key[0]]));\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $new_formdata;\n}", "public function format_date_save($date){ \n\t\t$exp_date = explode('/', $date); \n\t\treturn $exp_date[2].'-'.$exp_date[1].'-'.$exp_date[0];\n\t}", "public static function dbDateFormat($timestamp)\n\t{\n\t\treturn strftime(\"%Y-%m-%d %H:%M:%S\",$timestamp);\n\t}", "function brToSqlDate($date) {\n $date = explode('/',$date);\n return $date[2] . '-' . $date[1] . '-' . $date[0];\n}", "function dateFormat( $date, $from = 'Y-m-d', $to = 'd-m-Y' ) {\n $date = DateTime::createFromFormat( $from, $date );\n return $date->format( $to );\n}", "function formatoFecha($data = NULL){\n\n\t\tif($data){\n\n\t\t\t//SEPARA LA FECHA EN 3 PARTES\n\t\t\t$data_funcion = explode(\"-\", $data);\n\t\t\t/*\t$data_funcion[0] = 2019\n\t\t\t\t$data_funcion[1] = 10\n\t\t\t\t$data_funcion[2] = 29\n\t\t\t*/\n\n\t\t\t//retornar la fecha en otro formato\n\t\t\treturn $data_funcion[2] .'/'. $data_funcion[1] .'/'. $data_funcion[0];\n\n\t\t}\n\n\t}", "function dbdate($date){\n\t\t$date=explode(\"-\",$date);\n\t\t$year=explode(\" \",$date[2]);\n\t\t$date1=$year[0].\"-\";\n\t\tif($date[1]<10 && (substr($date[1],0,1)!=0))\n\t\t\t$date1.=\"0\".$date[1].\"-\";\n\t\telse\n\t\t\t$date1.=$date[1].\"-\";\n\t\tif($date[0]<10 && (substr($date[0],0,1)!=0))\n\t\t\t$date1.=\"0\".$date[0].\" \".$year[1];\n\t\telse\n\t\t$date1.=$date[0].\" \".$year[1];\n\t\treturn $date1;\n\t}", "public function formatDate($date1){\r\n\t\tif( $date1 != '0000-00-00' ){\r\n\t\t\tif($date1!=''){\r\n\t\t\t\t$annee = substr($date1,0,4);\r\n\t\t\t\t$mois = substr($date1,5,2);\r\n\t\t\t\t$jour = substr($date1,8,2);\r\n\t\t\t\t$date2 = $jour.'/'.$mois.'/'.$annee;\r\n\t\t\t}else{\r\n\t\t\t\t$date2 = '';\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$date2 = '';\r\n\t\t}\r\n\t\treturn $date2;\r\n\t}", "function Fecha_estandar($IngresoFecha){\t\n$date = date_create($IngresoFecha);\nreturn date_format($date, 'd-m-Y');\n}", "function formato_fecha($fecha, $formato){\n\t\tif($formato==\"1\"){\n\t\t\tif($fecha==\"0\"){\n\t\t\t\t$fecha = \"\";\n\t\t\t}else{\n\t\t\t\t$fecha = substr($fecha, 6, 2).\"/\".substr($fecha, 4, 2).\"/\".substr($fecha, 0, 4);\n\t\t\t}\n\t\t}elseif($formato==\"2\"){\n\t\t\tif($fecha==\"\"){\n\t\t\t\t$fecha = \"0\";\n\t\t\t}else{\n\t\t\t\t$fecha = substr($fecha, 6, 4).substr($fecha, 3, 2).substr($fecha, 0, 2);\n\t\t\t}\n\t\t}elseif($formato==\"3\"){\n\t\t\tif($fecha==\"0000-00-00\"){\n\t\t\t\t$fecha = \"\";\n\t\t\t}else{\n\t\t\t\t$fecha = substr($fecha, 8, 2).\"/\".substr($fecha, 5, 2).\"/\".substr($fecha, 0, 4);\n\t\t\t}\n\t\t}\n\t\treturn $fecha;\n\t}", "private function formatDate($date) {\n\t\tif ($date === '' || !$date) {\n\t\t\treturn;\n\t\t}\n\t\tif (DateTime::createFromFormat('Y-m-d', $date)) {\n\t\t\t$formatedDate = $date;\n }elseif (\\Zend_Date::isDate($date, \\Zend_Date::ISO_8601)) {\n $tmpDt = new \\Zend_Date($date, \\Zend_Date::ISO_8601);\n $formatedDate = $tmpDt->toString('Y-MM-dd');\n\t\t} else {\n\t\t\t$tmpDt = DateTime::createFromFormat('d/m/Y', $date);\n\t\t\t$formatedDate = $tmpDt->format('Y-m-d');\n\t\t}\n\t\treturn $formatedDate;\n\t}", "function internationalDate($todate)\n\t{\n\t\t$myDate=date_create($todate);\n\t\treturn date_format($myDate, \"m/d/y\");\n\t}", "public function formatDate($value)\n {\n \tif($value !== NULL):\n\t \tif(strpos($value, '/') !== false)\n\t \t\t$value = AFormatter::revertDate($value);\n\t\t\t\t\n\t //if(!is_numeric($value)) $value=strtotime ($value);\n\t //return date($this->dateFormat,$value);\n\t \n\t \n\t //LO: To format date that falls outside of 32 bit integer range \n\t if(DateTime::createFromFormat('Y-m-d',$value))\n\t \t\treturn DateTime::createFromFormat('Y-m-d',$value)->format($this->dateFormat);\n\t\t\telse if(DateTime::createFromFormat('Y-m-d G:i:s',$value))\n\t\t\t\treturn DateTime::createFromFormat('Y-m-d G:i:s',$value)->format($this->dateFormat);\t\n\t\t\telse if(DateTime::createFromFormat('Y/m/d',$value))\n\t\t\t\treturn DateTime::createFromFormat('Y/m/d',$value)->format($this->dateFormat);\n\t\t\telse if(DateTime::createFromFormat('d-m-Y',$value))\n\t\t\t\treturn DateTime::createFromFormat('d-m-Y',$value)->format($this->dateFormat);\n\t\t\telse \n\t\t\t\treturn $value;\n\n\t\telse:\n\t\t\treturn $value;\n\t\tendif;\n }", "function dateToFrench($date, $format) \n{\n $english_days = array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday');\n $french_days = array('lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche');\n $english_months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\n $french_months = array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre');\n return str_replace($english_months, $french_months, str_replace($english_days, $french_days, date($format, strtotime($date) ) ) );\n}", "function formatDate($date){\n $newDate = strtotime($date);\n $newFormat = date('D j/n Y', $newDate);\n echo $newFormat;\n}", "function convertDate($sql_date) \r\n{\r\n\t$date = strtotime($sql_date);\r\n\t$final_date = date(\"Y-m-d H:i:s\", $date);\r\n\treturn $final_date;\r\n}", "static function mysqlToFullDate($mydsqlDate) {\r\n\t\t$date = strtotime($mydsqlDate);\r\n\t\treturn date(__('d.m.Y'), $date);\r\n\t}", "public function date_format($date, $type = 0) {\n\t\tif ($date == '' || $date == \"0000-00-00\") {\n\t\t\treturn \"\";\n\t\t}\n\t\t$st = Yii::$app->getTable;\n\n\t\t$df = $st->settings('local', 'date_format');\n\t\tsetlocale(LC_TIME, 'en_US');\n\t\tif ($type == 1) {\n\t\t\t$result = date(\"$df\", $date); // date($df,strtotime($date));\n\t\t} else {\n\t\t\t$result = date(\"$df\", strtotime($date)); // date($df,strtotime($date));\n\n\t\t}\n\n\t\treturn $result;\n\t}" ]
[ "0.7049775", "0.7010625", "0.6754904", "0.67259943", "0.672076", "0.6652524", "0.6618812", "0.6489226", "0.64814925", "0.64743197", "0.6423657", "0.63993", "0.63718444", "0.63512194", "0.6317918", "0.6305824", "0.6294213", "0.62837803", "0.62603724", "0.6254809", "0.6234275", "0.6231567", "0.6209033", "0.61890393", "0.6185483", "0.6182179", "0.61723644", "0.6161261", "0.61539996", "0.61442894", "0.6122864", "0.60901463", "0.60382146", "0.6035538", "0.60208654", "0.60161895", "0.60161895", "0.60118186", "0.600695", "0.5995428", "0.5989909", "0.598665", "0.5980325", "0.5979322", "0.59697896", "0.5958497", "0.5936701", "0.5933249", "0.59229255", "0.5920325", "0.59151113", "0.59149104", "0.591021", "0.5907232", "0.5900675", "0.5870267", "0.5857027", "0.58470774", "0.5847058", "0.58397555", "0.583894", "0.5826876", "0.5826876", "0.582657", "0.5822", "0.5821089", "0.58143777", "0.58052087", "0.58052087", "0.5804732", "0.58003855", "0.5784381", "0.5773344", "0.57639295", "0.5762742", "0.5760144", "0.5757973", "0.5756107", "0.5752613", "0.57488793", "0.5748587", "0.57434106", "0.5736458", "0.5736312", "0.57336694", "0.5732523", "0.57194304", "0.57154834", "0.57095885", "0.57067627", "0.5701892", "0.5698609", "0.5688735", "0.5685374", "0.56814384", "0.56751174", "0.56687075", "0.56681675", "0.5667234", "0.566705" ]
0.7501466
0
Fonction permettant de transformer une date au format DB vers le format local
function formatDateDBversLocal($date, $type = 2) { /* * Suppression des espaces, tabulations et autres caracteres indesirables presents en debut et fin de chaine */ $date = ltrim($date); $date = rtrim($date); $temp = @explode(" ", $date); $date = $temp[0]; $heure = $temp[1]; $temp = @explode($this->separateurDB, $date); /* * Reformatage de la date */ switch ($this->formatDate) { case 0: $date = $temp[0] . $this->separateurLocal . $temp[1] . $this->separateurLocal . $temp[2]; break; case 1: $date = $temp[2] . $this->separateurLocal . $temp[1] . $this->separateurLocal . $temp[0]; break; case 2: $date = $temp[1] . $this->separateurLocal . $temp[2] . $this->separateurLocal . $temp[0]; break; } if ($type == 3) { /* * Reincorporation de l'heure */ $date .= " " . $heure; } return ($date); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatDatesVersLocal($data)\n {\n return $this->utilDatesDBVersLocale($data);\n }", "function local_to_iso($date,$date_format)\n{\n $list_date=explode (\"-\",$date);\n if ($date_format=='fr')\n {\n $date=$list_date[2].'-'.$list_date[1].'-'.$list_date[0];\n }\n elseif ($date_format=='en')\n $date=$list_date[2].'-'.$list_date[0].'-'.$list_date[1];\n return $date;\n}", "function local_to_iso($date,$date_format)\n{\n $list_date=explode (\"-\",$date);\n if ($date_format=='fr')\n {\n $date=$list_date[2].'-'.$list_date[1].'-'.$list_date[0];\n }\n elseif ($date_format=='en')\n $date=$list_date[2].'-'.$list_date[0].'-'.$list_date[1];\n return $date;\n}", "function mysql2date($format, $date, $translate = \\true)\n {\n }", "function formatDateLocaleVersDB($date, $type = 2)\n {\n $date = ltrim($date);\n $date = rtrim($date);\n /*\n * Separation de la date et de l'heure\n */\n $temp = @explode(\" \", $date);\n $date = $temp[0];\n $heure = $temp[1];\n $j = 0;\n do {\n $test = @strpos($date, $this->sepValide[$j]);\n if ($test === false) {\n $j++;\n }\n } while ($j < count($this->sepValide) && ($test === false));\n $separateurLocal = $this->sepValide[$j];\n $temp = @explode($separateurLocal, $date);\n /*\n * Assignation des champs\n */\n switch ($this->formatDate) {\n case 0:\n $annee = $temp[0];\n $mois = $temp[1];\n $jour = $temp[2];\n break;\n case 1:\n $annee = $temp[2];\n $mois = $temp[1];\n $jour = $temp[0];\n break;\n case 2:\n $annee = $temp[2];\n $mois = $temp[0];\n $jour = $temp[1];\n break;\n }\n /*\n * Prise en compte de l'annee par defaut\n */\n if ($annee == \"\") {\n $annee = date(\"Y\");\n }\n\n if ($annee < 100) {\n if ($annee <= $this->dateMini) {\n $annee = \"20\" . $annee;\n } else {\n $annee = \"19\" . $annee;\n }\n }\n\n $date = $annee . $this->separateurDB . $mois . $this->separateurDB . $jour;\n /*\n * Reintegration de l'heure le cas echeant\n */\n if ($type == 3) {\n $date .= \" \" . $heure;\n }\n return $date;\n }", "function french_to_english_date($date, $format='Y-m-d') {\n\tif(\\DateTime::createFromFormat('d/m/Y', $date)) {\n\t\treturn \\DateTime::createFromFormat('d/m/Y', $date)->format($format);\n\t}\n\treturn null;\n}", "function cjpopups_local_date($format, $date = null){\n\tif($date == null){\n\t\t$datetime = strtotime(date('Y-m-d H:i:s'));\n\t}else{\n\t\t$datetime = strtotime(date('Y-m-d H:i:s', $date));\n\t}\n\t$timezone_string = get_option('timezone_string');\n\tif($timezone_string != ''){\n\t\tdate_default_timezone_set($timezone_string);\n\t\t$return = date($format, $datetime);\n\t}else{\n\t\t$return = date($format, $datetime);\n\t}\n\treturn $return;\n}", "function date_sql2en($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"-\", $date);\r\n\t\t\t$date_fr = $date[1].\"/\".$date[2].\"/\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_fr = \"\";\r\n\t\t}\r\n\t\treturn $date_fr;\r\n\t}", "function conv_date($f, $date, $sep = '/') {\n $fmt = '';\n if ($f == '1') { // normal to mysql\n $date = explode('/', $date);\n $fmt = (count($date) == 3) ? $date[2] . '-' . $date[1] . '-' . $date[0] : '';\n } else { // mysql to normal\n $date = explode(' ', $date);\n $date = explode('-', $date[0]);\n $fmt = (count($date) == 3) ? $date[2] . $sep . $date[1] . $sep . $date[0] : '';\n }\n return $fmt;\n}", "function frdate($date1)\n{\n setlocale(LC_TIME, \"fr_FR.UTF-8\");\n $date2 = strftime(\"%A %d %b %Y\", strtotime($date1));\n return $date2;\n}", "function frdate($date1)\n{\n setlocale(LC_TIME, \"fr_FR.UTF-8\");\n $date2 = strftime(\"%A %d %b %Y\", strtotime($date1));\n return $date2;\n}", "function date_sql2fr($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"-\", $date);\r\n\t\t\t$date_fr = $date[2].\"/\".$date[1].\"/\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_fr = \"\";\r\n\t\t}\r\n\t\treturn $date_fr;\r\n\t}", "function english_to_french_date($date, $format='d/m/Y') {\n\tif(\\DateTime::createFromFormat('Y-m-d', $date)) {\n\t\treturn \\DateTime::createFromFormat('Y-m-d', $date)->format($format);\n\t}\n\treturn null;\n}", "function ConvertToSqlDate($date)\n {\n if($date != \"\")\n return $this->app->String->Convert($date,\"%3.%2.%1\",\"%1-%2-%3\");\n }", "function dateConvert($date,$format){\n //Casting created_at\n $date = new DateTime($date);\n $waktu = $date->Format($format);\n return $waktu;\n}", "function uiToDBdate() {\r\n\r\n\t\t$month = (int) substr($this->date, -10, 2);\r\n\t\t$day = (int) substr($this->date, -7, 2);\r\n\t\t$year = (int) substr($this->date, -4, 4);\r\n\r\n\t\t$formattedDate = $year . \"-\" . $month . \"-\" . $day;\r\n\r\n\t\t$this->date = $formattedDate;\r\n\t}", "function format_data_in($string_date)\n{\n // $formatted_date = \"DATE_FORMAT($db_date_column, '%a, %e %b %Y ')\";\n $temp = strtotime($string_date);\n $date = date('Y-m-d', $temp);\n $date = DateTime::createFromFormat('D, j M Y', $temp)->format('Y-m-d');\n print_r($date);\n return $date;\n}", "private function convert_date_db_format($date)\n {\n $str_date = strtotime($date);\n $db_date = date('Y-m-d', $str_date);\n return $db_date;\n }", "function STRdate_format($str, $origin = USERDATE_READ, $format = DBDATE_WRITE) {\r\n if (trim($str) == \"\") {\r\n return -1;\r\n }\r\n try {\r\n $date = DateTime::createFromFormat($origin, $str);\r\n if ($date) {\r\n if ($format == \"datetime\") {\r\n return $date;\r\n }\r\n return $date->format($format);\r\n }\r\n \\Itracker\\Utils\\LoggerFactory::getLogger()->debug(\r\n 'No se puede convertir fecha', array('input' => $str, 'orformat' => $origin, 'destformat' => $format));\r\n return -1;\r\n } catch (Exception $e) {\r\n \\Itracker\\Utils\\LoggerFactory::getLogger()->debug(\r\n 'No se puede convertir fecha', array('input' => $str, 'orformat' => $origin, 'destformat' => $format));\r\n return -1;\r\n }\r\n}", "public abstract function getLocalDateTimeFormat();", "function french_to_english_datetime($datetime, $format='Y-m-d H:i:s') {\n\tif(\\DateTime::createFromFormat('d/m/Y H:i:s', $datetime)) {\n\t\treturn \\DateTime::createFromFormat('d/m/Y H:i:s', $datetime)->format($format);\n\t}\n\treturn null;\n}", "function dateToDB($date) {\n\tglobal $config;\n\treturn date($config['db_date_format'], strtotime($date));\t\n}", "function toMySQL($local = false)\n\t{\n\t\t$date = ($local) ? $this->_date + $this->_offset : $this->_date;\n\t\t$date = ($this->_date !== false) ? date('Y-m-d H:i:s', $date) : null;\n\t\treturn $date;\n\t}", "function convertDate_Amj_string($date) \n{\n\tsetlocale (LC_TIME, 'fr_FR','fra'); \n\treturn strftime(\"%A %d %B %Y\", strtotime($date)); \n}", "function dateToFrench($date, $format) \n{\n $english_days = array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday');\n $french_days = array('lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche');\n $english_months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\n $french_months = array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre');\n return str_replace($english_months, $french_months, str_replace($english_days, $french_days, date($format, strtotime($date) ) ) );\n}", "function sky_date_french($format, $timestamp = null, $echo = null)\n{\n $param_D = array('', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam', 'Dim');\n $param_l = array('', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi', 'Dimanche');\n $param_F = array('', 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');\n $param_M = array('', 'Jan', 'Fév', 'Mar', 'Avr', 'Mai', 'Jun', 'Jul', 'Aoû', 'Sep', 'Oct', 'Nov', 'Déc');\n $return = '';\n if (is_null($timestamp)) {\n $timestamp = mktime();\n }\n for ($i = 0, $len = strlen($format); $i < $len; $i++) {\n switch ($format[$i]) {\n case '\\\\': // fix.slashes\n $i++;\n $return .= isset($format[$i]) ? $format[$i] : '';\n break;\n case 'D':\n $return .= $param_D[date('N', $timestamp)];\n break;\n case 'l':\n $return .= $param_l[date('N', $timestamp)];\n break;\n case 'F':\n $return .= $param_F[date('n', $timestamp)];\n break;\n case 'M':\n $return .= $param_M[date('n', $timestamp)];\n break;\n default:\n $return .= date($format[$i], $timestamp);\n break;\n }\n }\n if (is_null($echo)) {\n return $return;\n } else {\n echo $return;\n }\n}", "protected function convertDateUser()\n{\n$jour = substr($this->getDateUtilisateur(), 0, 2);\n$mois= substr($this->getDateUtilisateur(), 3, 2);\n$annee= substr($this->getDateUtilisateur(), 6, 4);\n$dateSys = $annee.\"-\".$mois.\"-\".$jour;\nreturn $dateSys;\n}", "function utilDatesDBVersLocale($data)\n {\n foreach ($data as $key => $value) {\n\n if (is_array($value)) {\n /*\n * Traitement recursif\n */\n $data[$key] = $this->utilDatesDBVersLocale($value);\n } else {\n if (!empty($this->colonnes[$key]) && ($this->colonnes[$key][\"type\"] == 2 || $this->colonnes[$key][\"type\"] == 3) && !empty($value)) {\n /*\n * Formatage de la date\n */\n $data[$key] = $this->formatDateDBversLocal($value, $this->colonnes[$key][\"type\"]);\n }\n }\n\n }\n\n return $data;\n }", "function date_sys_to_local($timestamp, $local_tz='') {\n\tif($local_tz == '') $local_tz = @$_SESSION['cms']['user']['timezone'];\n\tif($local_tz == '') return $timestamp;\n\t\n\t$offset = date_tz_offset($timestamp, $local_tz);\n\treturn $timestamp + $offset;\n}", "function date_mysql_fr($date){\n if ($date != \"0000-00-00\" && $date != \"\" && $date != null){\n $my_date = Datetime::createFromFormat('Y-m-d', $date)->format('d/m/Y');\n return $my_date;\n } else {\n return null;\n }\n}", "private function changeDateFormat($val,$format){\n \n if($val != \"\" && count($this->dbConfigs) > 0){\n switch ($this->dbConfigs['driver']){\n case \"mysql\":\n if($format == \"date\"){\n $val = date(\"Y-m-d\", strtotime($val));\n }\n elseif($format == \"datetime\"){\n $val = date(\"Y-m-d H:i:s\", strtotime($val));\n }\n break;\n case \"sqlsrv\":\n if($format == \"date\"){\n $val = date(\"Y-m-d\",strtotime($val));\n }\n elseif($format == \"datetime\"){\n $val = date(\"Y-m-d H:i:s\",strtotime($val));\n }\n break;\n }\n return $val;\n }\n }", "function localize_date($date, $location = 'en_EN') {\r\n if (strlen($date) == 10) {\r\n\r\n $date_array = explode('-', $date);\r\n\r\n if (substr($location, 0, 2) == 'fr' OR substr($location, 0, 2) == 'de' OR substr($location, 0, 2) == 'es') {\r\n return $date_array[2] . '.' . $date_array[1] . '.' . $date_array[0];\r\n } elseif (substr($location, 0, 2) == 'en') {\r\n return $date;\r\n }\r\n }\r\n\r\n return $date;\r\n}", "function convert_date($date, $format = DATE_FORMAT)\r\n{ \r\n // $date_format is defined in config.inc.php.\r\n if (empty($date)) return;\r\n\r\n switch ($format) {\r\n case 'us12':\r\n return date('m/d/y g:i a', strtotime($date));\r\n break;\r\n case 'us24':\r\n\t\t\treturn date('m/d/y H:i', strtotime($date));\r\n break;\r\n case 'eu12':\r\n return date('d/m/y g:i a', strtotime($date));\r\n break;\r\n case 'eu24':\r\n return date('d/m/y H:i', strtotime($date)); \r\n break;\r\n case 'verbose':\r\n return date('D M jS, Y @ g:ia', strtotime($date));\r\n break;\r\n case 'mysql':\r\n return date('Y-m-d H:i:s', strtotime($date));\r\n break;\r\n case 'mysql_hours':\r\n return date('H:i a', strtotime($date));\r\n break;\r\n\t\tcase 'unix':\r\n return date('U', strtotime($date));\r\n break;\r\n default:\r\n // none specified, just return us12.\r\n return date('m/d/y h:i a', strtotime($date));\r\n }\r\n\r\n}", "function ConvertDate($mysqlDate)\n {\n if($mysqlDate != \"\")\n return $this->app->String->Convert($mysqlDate,\"%1-%2-%3\",\"%3.%2.%1\");\n }", "function convertDate_Amj_jmA($date)\n{\n\tsetlocale (LC_TIME, 'fr_FR','fra'); \n\treturn strftime(\"%d/%m/%Y\", strtotime($date)); \n}", "protected function dateFormatDatabase()\n {\n return $this->dateFormat('mysql');\n }", "function date2mysql($date)\r\n\t{\r\n\t\tif($date != \"\")\r\n\t\t{\r\n\t\t@list($jour,$mois,$annee)=explode('/',$date);\t\t\t\t//récupération des différentes valeurs en utilisant les / comme séparateurs\r\n \t\treturn @date('Y-m-d',mktime(0,0,0,$mois,$jour,$annee));\t\t//retour de la date modifié au bon format grace à un mktime\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\treturn $date;\r\n \t\t}\r\n\t}", "function utilDatesLocaleVersDB($data)\n {\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n /*\n * Traitement recursif\n */\n $data[$key] = $this->utilDatesDBVersLocale($value);\n } else {\n if (($this->colonnes[$key][\"type\"] == 2 || $this->colonnes[$key][\"type\"] == 3) && strlen($value) > 0) {\n /*\n * Formatage de la date\n */\n $data[$key] = $this->formatDateLocaleVersDB($value, $this->colonnes[$key][\"type\"]);\n }\n }\n }\n\n return $data;\n }", "function dateElementFromEnglish($locale,$text,$strfTimeformat) {\n\t$saveLocale = setlocale(LC_TIME,0);setlocale(LC_TIME,$locale);\n\t$translation = strftime($strfTimeformat,strtotime($text));\n\tsetlocale(LC_TIME,$saveLocale);\n\treturn $translation;\n}", "public function toISOLocalDate() : string\n {\n if ($this->timezoneIsLocal) {\n return $this->format('Y-m-d');\n }\n return $this->cloneToMutable()->setTimezone(static::$timezoneLocal)->format('Y-m-d');\n }", "public static function parse_calendardate($local_format) {\n preg_match('/\\(?([^-]{1})[^-]*-([^-]{1})[^-]*-([^-]{1})[^-]*\\)/', $local_format, $matches);\n $calendar_format = \"%\" . $matches[1] . \"-%\" . $matches[2] . \"-%\" . $matches[3];\n return str_replace(array(\"y\", \"ᅣ1�7\", \"a\", \"j\"), array(\"Y\", \"Y\", \"Y\", \"d\"), $calendar_format);\n }", "static function convert_dateFr($date) {\r\n $tab = explode('-', $date);\r\n $result = $tab['0'] . \" \" . Functions::get_mois($tab['1']) . \" \" . $tab['2'];\r\n return $result;\r\n }", "function convertDate($sql_date) \r\n{\r\n\t$date = strtotime($sql_date);\r\n\t$final_date = date(\"Y-m-d H:i:s\", $date);\r\n\treturn $final_date;\r\n}", "public function mswConvertMySQLDate($sql) {\n $split = explode('-',$sql);\n switch ($this->settings->jsDateFormat) {\n case 'DD-MM-YYYY':\n return $split[2].'-'.$split[1].'-'.$split[0];\n break;\n case 'DD/MM/YYYY':\n return $split[2].'/'.$split[1].'/'.$split[0]; \n break;\n case 'YYYY-MM-DD':\n return $sql;\n break;\n case 'YYYY/MM/DD':\n return str_replace('-','/',$sql);\n break;\n case 'MM-DD-YYYY':\n return $split[1].'-'.$split[2].'-'.$split[0]; \n break;\n case 'MM/DD/YYYY':\n return $split[1].'/'.$split[2].'/'.$split[0];\n break;\n }\n}", "function english_to_french_datetime($datetime, $format='d/m/Y H:i') {\n\tif(\\DateTime::createFromFormat('Y-m-d H:i:s', $datetime)) {\n\t\treturn \\DateTime::createFromFormat('Y-m-d H:i:s', $datetime)->format($format);\n\t}\n\treturn null;\n}", "function formatDate($date, $format = '%d %B %Y') {\n setlocale(LC_ALL, 'fr.utf-8');\n\n return strftime($format, strtotime($date));\n}", "public function convertDateToDB($_date) {\n\t\tif(ereg(\"^([0-9]{1,2})-([0-9]{1,2})-([0-9]{4}).*$\",\n\t\t\t$_date, $_arrdt) !== false) {\n\t\t\treturn sprintf(\"%04.4d-%02.2d-%02.2d\",\n\t\t\t\t$_arrdt[3], $_arrdt[2], $_arrdt[1]);\n\t\t\t}\n\t\treturn false;\n\t}", "public function date_to_sql($from) {\n\t\t// \\xC2\\xA0 is &nbsp; entity\n\t\t$from = preg_replace(\"/(\\s|\\xc2\\xa0)+/\", '', $from);\n\t\t// missing dot\n\t\tif (preg_match('/^\\d{1,2}\\.\\d{1,2}$/', $from))\n\t\t\t$from = $from . '.';\n\t\t// missing year\n\t\tif (preg_match('/^\\d{1,2}\\.\\d{1,2}.$/', $from))\n\t\t\t$from = $from . date('Y');\n\t\t($date = date_create_from_format('j#n#y H:i', $from))\t # d-m-y\n\t\t|| ($date = date_create_from_format('j#n#Y H:i', $from))\t# d-m-yyyy\n\t\t|| ($date = date_create_from_format('j#n#Y H:i', date('j.n.Y', strtotime($from))));\n\t\treturn date_format($date, 'Y-m-d H:i:s');\n\t}", "function mysql_to_rfc3339($date_string)\n {\n }", "public function DateFR2DateSQL ($date) {\n //29/12/1990 23:30\n $day = substr($date,0,2);\n $month = substr($date,3,2);\n $year = substr($date,6,4);\n $hour = substr($date,11,2);\n $minute = substr($date,14,2);\n $second = substr($date,18,2);\n //debug($hour.'-'.$minute.'-'.$second.'-'.$month.'-'.$day.'-'.$year);die;\n\n $timestamp= mktime($hour,$minute,$second,$month,$day,$year);\n return date('Y-m-d H:i:s',$timestamp); \n }", "function date_fr($date_saisie){\n @list ($jour , $mois , $an) = split(\"[-./]\",$date_saisie);\n //inverse la date\n return($an.\"-\".$mois.\"-\".$jour);\n \n}", "function convertdateanglais($date){\n\t$ladate=explode('-',$date);\n\t$jour=$ladate[2];\n\t$moi=$ladate[1];\n\t$anne=$ladate[0];\n\t$madate=date(\"d/m/Y\", mktime(0, 0, 0, $moi, $jour, $anne));\n\treturn $madate;\n}", "function Fecha_estandar($IngresoFecha){\t\n$date = date_create($IngresoFecha);\nreturn date_format($date, 'd-m-Y');\n}", "function _field_date_us($fval) \n {\n $f_date = \"\";\n if ($fval) {\n list($m,$d,$y) = split('/', $fval);\n $f_date = array($y, $m, $d);\n }\n return $this->_field_date($f_date);\n }", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFechaF($fecha)\n{\n $date =New DateTime();\n return $fechaPedidoDesde= date_format($date->createFromFormat('d/m/Y',$fecha), 'd/m/Y');\n \n}", "function getDateJour()\n {\n return $this->formatDateDBversLocal(date('Y-m-d'));\n }", "function internationalDate($todate)\n\t{\n\t\t$myDate=date_create($todate);\n\t\treturn date_format($myDate, \"m/d/y\");\n\t}", "function dateToMySQL ($dateSource, $date) {\n\t$dateOUT = \"\";\n\t$dateSource = strtolower($dateSource);\n\t// Replace '/' by '-' from original date. This allow me use \"sscanf($date,\"%d %d %d\")\"\n\t$date = str_ireplace(\"/\", \"-\", $date);\n\tif ($date != \"\") {\n\t\tif ($dateSource == \"yyyymmdd\")\n\t\t\tlist($year, $month, $day) = sscanf($date,\"%d %d %d\");\n\t\tif ($dateSource == \"ddmmyyyy\")\n\t\t\tlist($day, $month, $year) = sscanf($date,\"%d %d %d\");\n\t\tif ($dateSource == \"yyyyddmm\")\n\t\t\tlist($year, $day, $month) = sscanf($date,\"%d %d %d\");\n\t\tif ($dateSource == \"mmyyyydd\")\n\t\t\tlist($month, $year, $day) = sscanf($date,\"%d %d %d\");\n\t\tif ($dateSource == \"\") {\n\t\t\t// Autodetect mode [Supported modes: (YYYYMMDD) Or (DDMMYYYY)]\n\t\t\tlist($day, $month, $year) = sscanf($date,\"%d %d %d\");\n\t\t\tif (strlen($year) <= 3) {\n\t\t\t\tlist($year, $month, $day) = sscanf($date,\"%d %d %d\");\n\t\t\t}\n\t\t}\n\t\t$dateOUT = sprintf (\"%04d-%02d-%02d\", abs($year), abs($month), abs($day));\n\t}\n\treturn ($dateOUT);\n}", "function date_en2sql($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"/\", $date);\r\n\t\t\t$date_sql = $date[2].\"-\".$date[0].\"-\".$date[1];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_sql = \"\";\r\n\t\t}\r\n\t\treturn $date_sql;\r\n\t}", "function dateToDBDate($date)\n\t{\n\n\t\tif (is_numeric($date))\n\t\t{\n\t\t\treturn date('Y-m-d', $date);\n\t\t}\n\t\telse if (preg_match('/\\d{2}\\.\\d{2}\\.\\d{4}/', $date))\n\t\t{\n\t\t\t$arDate = explode('.', $date);\n\n\t\t\treturn $arDate[2].'-'.$arDate[1].'-'.$arDate[0];\n\t\t}\n\t\telse if (strtotime($date) > 0)\n\t\t{\n\t\t\treturn date('Y-m-d', strtotime($date));\n\t\t}\n\n\t\treturn '0000-00-00';\n\n\t}", "function convertDate_jmA_Amj($date)\r\n{\r\n\tsetlocale (LC_TIME, 'en_EN','en');\r\n\treturn strftime(\"%Y-%m-%d\", strtotime($date));\r\n}", "function datum($db_date) {\r\n return strftime('%d.%m.%Y', strtotime($db_date));\r\n }", "function date_fr2sql($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"/\", $date);\r\n\t\t\t$date_sql = $date[2].\"-\".$date[1].\"-\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_sql = \"\";\r\n\t\t}\r\n\t\treturn $date_sql;\r\n\t}", "public function dateTimeFormat();", "public function getDateFormatter();", "function brToSqlDate($date) {\n $date = explode('/',$date);\n return $date[2] . '-' . $date[1] . '-' . $date[0];\n}", "static function mysqlToFullDate($mydsqlDate) {\r\n\t\t$date = strtotime($mydsqlDate);\r\n\t\treturn date(__('d.m.Y'), $date);\r\n\t}", "function format_data_out_db($db_date_column)\n{\n $formatted_date = \"DATE_FORMAT($db_date_column, '%a %d %m %Y') \";\n return $formatted_date;\n}", "function customDateFormat($date)\n{\n $MyDate = Carbon::parse($date)->format('j/M');\n\n return $MyDate;\n}", "function format_date($timestamp)\n{\n //format depends on wether we have a timestamp or not\n if (utf8_strlen($timestamp)>10) {\n $fstr = 'd M Y - G:i';\n } else {\n $fstr = 'd M Y';\n }\n if (utf8_substr($timestamp,0,10)=='0000-00-00') {\n return __('no date set yet');\n }\n if ($lang == \"de\") {\n return date($fstr, strtotime($timestamp));\n } else {\n return date($fstr, strtotime($timestamp));\n }\n}", "protected function cnew_convert_date_to_db( $date ) {\r\n $current_date = DateTime::createFromFormat('d/m/Y', $date );\r\n return $current_date ? $current_date->format('Y-m-d') : $current_date;\r\n }", "function get_local_rfc_822_date($int_date, $server_offset_time)\n{\n // $int_date: current date in UNIX timestamp\n $GMT_value = get_local_GMT_offset($server_offset_time);\n $local_date = date(\"D, d M Y H:i:s\", $int_date + $server_offset_time);\n $local_date .= \" \" . str_replace(':', '', $GMT_value);\n return $local_date;\n}", "function filtrarFecha( $fecha )\n{\n $fecha = new DateTime( $fecha );\n $fecha = DATE_FORMAT( $fecha, 'Y-m-d' );\n \n return $fecha;\n}", "public static function formatMySqlToDatepicker($date = NULL, $localTimezoneCity = null) {\n if ($date) {\n $sqlToLocal = self::SQLToLocal($date, $localTimezoneCity, FALSE, 'm/d/Y');\n return $sqlToLocal;\n }\n }", "static function convert_dateFrEn($date) {\r\n $tab = explode('-', $date);\r\n $result = $tab['0'] . \"-\" . $tab['1'] . \"-\" . $tab['2'];\r\n return $result;\r\n }", "function acf_convert_date_to_php($date = '')\n{\n}", "function sc_date_format($date){\n\t$CI =& get_instance();\n\tif($CI->session->userdata('locale') =='uk'){\n\t\treturn date('d/m/Y', $date);\n\t}else{\n\t\treturn date('m/d/Y', $date);\n\t}\n}", "function toDate($string, $format){\r\n\t\t$months = ['Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre'];\r\n\r\n\t\t$date = explode(' ', $string)[0];\r\n\t\t$time = substr(explode(' ', $string)[1], 0, 5);\r\n\r\n\t\t$day = explode('-', $date)[2];\r\n\t\t$monthS = explode('-', $date)[1];\r\n\t\t$monthL = $months[intval($monthS) - 1];\r\n\t\t$year = explode('-', $date)[0];\r\n\r\n\t\tif($format == 'short')\r\n\t\t\treturn $day.'/'.$monthS.'/'.$year.' '.$time;\r\n\t\telse\r\n\t\t\treturn $day.' '.$monthL.' '.$year.' '.$time;\r\n\t}", "static function sql_date_format($dateStr){\n $date=new DateTime($dateStr);\n $result = $date->format('d.m.Y H:i') . PHP_EOL;\n \n return $result;\n }", "public static function FormatDateToSql($date){\n return date(\"Y-m-d\", strtotime(str_replace('/','-',$date)));\n }", "function convDate($arg1) {\n\t\t$arr = explode(\"/\",$arg1);\n\t\treturn $arr[2].\"/\".$arr[0].\"/\".$arr[1];\n\t}", "function timezone_aware_date($date, $format){\n\treturn sprintf('<time dateTime=\"%s\" data-format=\"%s\">%s %s</time>', ha($date->format('c')), ha($format), h($date->format($format)), h($date->format('T')));\n}", "function toUnix($local = false)\n\t{\n\t\t$date = null;\n\t\tif ($this->_date !== false) {\n\t\t\t$date = ($local) ? $this->_date + $this->_offset : $this->_date;\n\t\t}\n\t\treturn $date;\n\t}", "function get_date_textual($format = 'Y-m-d') {\n\t$format = ($format == '') ? 'Y-m-d' : $format;\n\t$format = str_replace('Y', 'yyyy', $format);\n\t$format = str_replace('m', 'mm', $format);\n\t$format = str_replace('d', 'dd', $format);\n\treturn $format;\n}", "function sqlToDate($sql){\n \treturn substr($sql, 8, 2) . \"/\" . substr($sql, 5, 2) . \"/\" . substr($sql, 0, 4);\n }", "function stringToDate($datestring,$format=DATE_FORMAT){\r\n\t$thedate=NULL;\r\n\tif($datestring){\r\n\t\tswitch($format){\r\n\r\n\t\t\tcase \"SQL\":\r\n\t\t\t\t$temparray=explode(\"-\",$datestring);\r\n\t\t\t\tif(count($temparray)==3)\r\n\t\t\t\t\t$thedate=mktime(0,0,0,(int) $temparray[1],(int) $temparray[2],(int) $temparray[0]);\r\n\t\t\t\telse\r\n\t\t\t\t\treturn false;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"English, US\":\r\n\t\t\t\t$datestring=\"/\".preg_replace(\"/,./\",\"/\",$datestring);\r\n\t\t\t\t$temparray=explode(\"/\",$datestring);\r\n\t\t\t\tif(count($temparray)==4)\r\n\t\t\t\t\t$thedate=mktime(0,0,0,(int) $temparray[1],(int) $temparray[2],(int) $temparray[3]);\r\n\t\t\t\telse\r\n\t\t\t\t\treturn false;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"English, UK\":\r\n\t\t\t\t$datestring=\"/\".preg_replace(\"/,./\",\"/\",$datestring);\r\n\t\t\t\t$temparray=explode(\"/\",$datestring);\r\n\t\t\t\tif(count($temparray)==4)\r\n\t\t\t\t\t$thedate=mktime(0,0,0,(int) $temparray[2],(int) $temparray[1],(int) $temparray[3]);\r\n\t\t\t\telse\r\n\t\t\t\t\treturn false;\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"Dutch, NL\":\r\n\t\t\t\t$datestring=\"-\".preg_replace(\"/,./\",\"-\",$datestring);\r\n\t\t\t\t$temparray=explode(\"-\",$datestring);\r\n\t\t\t\tif(count($temparray)==4)\r\n\t\t\t\t\t$thedate=mktime(0,0,0,(int) $temparray[2],(int) $temparray[1],(int) $temparray[3]);\r\n\t\t\t\telse\r\n\t\t\t\t\treturn false;\r\n\t\t\tbreak;\r\n\r\n\t\t}\r\n\t}\r\n\treturn $thedate;\r\n}", "function formatFechaBD($value){\n\t$partes = explode(\"-\", $value);\n\t$value = $partes[2].\"-\".$partes[1].\"-\".$partes[0];\n\treturn $value;\n}", "function toRFC822($local = false)\n\t{\n\t\t$date = ($local) ? $this->_date + $this->_offset : $this->_date;\n\t\t$date = ($this->_date !== false) ? date('D, d M Y H:i:s O', $date) : null;\n\t\treturn $date;\n\t}", "function setFechaNoSQL($FE_FechaNac)\n\t{\n\t\t$partes = explode(\"-\", $FE_FechaNac);\n\t\t$FE_FechaNac = $partes[2].'/'.$partes[1].'/'.$partes[0];\n\t\treturn $FE_FechaNac;\n\t}", "function carbonLocale(\\Carbon\\Carbon $object, $format = '%A %d %B %Y') {\r\n return $object->formatLocalized($format);\r\n}", "public function getDate4Database2($date=null){\n\t\treturn date_format($this->createDate($date),\"Y-m-d\");\n\t}", "function dateFormat($date){\n return strftime(\"%d. %m. %Y\", strtotime($date));\n}", "public function dateViewHelperFormatsDateLocalizedDataProvider() {}", "function string_format_complete_date( $p_date ) {\r\n\t$t_timestamp = db_unixtimestamp( $p_date );\r\n\treturn date( config_get( 'complete_date_format' ), $t_timestamp );\r\n}", "function date_local_to_sys($timestamp, $local_tz='') {\n\tif($local_tz == '') $local_tz = @$_SESSION['cms']['user']['timezone'];\n\tif($local_tz == '') return $timestamp;\n\n\t$offset = date_tz_offset($timestamp, $local_tz);\n\treturn $timestamp - $offset;\n}" ]
[ "0.744275", "0.71687794", "0.71687794", "0.6671895", "0.6539937", "0.65258914", "0.64745843", "0.64665806", "0.64477676", "0.6442992", "0.6442992", "0.6433353", "0.622903", "0.620525", "0.61669123", "0.61510944", "0.6142375", "0.6141505", "0.6111638", "0.60762763", "0.6071926", "0.60675424", "0.60666627", "0.60433084", "0.60178906", "0.60032207", "0.59645367", "0.59584713", "0.5948072", "0.59459126", "0.59254533", "0.5901675", "0.58821493", "0.5878467", "0.587192", "0.5870531", "0.5846995", "0.5818463", "0.5817539", "0.58168733", "0.5810243", "0.5774977", "0.57686126", "0.5768184", "0.57651895", "0.5755913", "0.57548666", "0.57356465", "0.5731033", "0.5730958", "0.5719436", "0.5714004", "0.5699283", "0.5696582", "0.5695498", "0.5695498", "0.5695498", "0.5695498", "0.5695498", "0.5694683", "0.5694542", "0.5690936", "0.5681951", "0.5681733", "0.5653697", "0.5651737", "0.56425965", "0.5638339", "0.5637233", "0.56313455", "0.562975", "0.56199807", "0.561858", "0.5618579", "0.5616913", "0.5600274", "0.55981755", "0.55934894", "0.55870223", "0.55828834", "0.5577528", "0.55738693", "0.5572968", "0.5569316", "0.5563812", "0.55615336", "0.5560545", "0.5559963", "0.555927", "0.55532336", "0.5552554", "0.55517656", "0.55463785", "0.55455387", "0.5535946", "0.553543", "0.5529644", "0.5528953", "0.55248344", "0.55111855" ]
0.6934417
3
Fonction permettant de formater l'ensemble des dates d'un tableau en fournissant les attributs de date concernes Fonction recursive, traitant les tableaux multilignes
function formatDatesVersLocal($data) { return $this->utilDatesDBVersLocale($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function utilDatesLocaleVersDB($data)\n {\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n /*\n * Traitement recursif\n */\n $data[$key] = $this->utilDatesDBVersLocale($value);\n } else {\n if (($this->colonnes[$key][\"type\"] == 2 || $this->colonnes[$key][\"type\"] == 3) && strlen($value) > 0) {\n /*\n * Formatage de la date\n */\n $data[$key] = $this->formatDateLocaleVersDB($value, $this->colonnes[$key][\"type\"]);\n }\n }\n }\n\n return $data;\n }", "function utilDatesDBVersLocale($data)\n {\n foreach ($data as $key => $value) {\n\n if (is_array($value)) {\n /*\n * Traitement recursif\n */\n $data[$key] = $this->utilDatesDBVersLocale($value);\n } else {\n if (!empty($this->colonnes[$key]) && ($this->colonnes[$key][\"type\"] == 2 || $this->colonnes[$key][\"type\"] == 3) && !empty($value)) {\n /*\n * Formatage de la date\n */\n $data[$key] = $this->formatDateDBversLocal($value, $this->colonnes[$key][\"type\"]);\n }\n }\n\n }\n\n return $data;\n }", "function _format_date($row, &$params)\n\t{\n\t\t//Get needed timestamps and format\n\t\t$yesterday_stamp\t= mktime(0, 0, 0, date(\"m\") , date(\"d\")-1, date(\"Y\"));\n\t\t$yesterday \t\t\t= strftime(\"%Y-%m-%d\", $yesterday_stamp);\n\t\t$today_stamp\t\t= mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\"));\n\t\t$today \t\t\t\t= date('Y-m-d');\n\t\t$tomorrow_stamp \t= mktime(0, 0, 0, date(\"m\") , date(\"d\")+1, date(\"Y\"));\n\t\t$tomorrow \t\t\t= strftime(\"%Y-%m-%d\", $tomorrow_stamp);\n\t\t\n\t\t$dates_stamp\t\t= strtotime($row->dates);\n\t\t$enddates_stamp\t\t= $row->enddates ? strtotime($row->enddates) : null;\n\n\t\t//if datemethod show day difference\n\t\tif($params->get('datemethod', 1) == 2) {\n\t\t\t//check if today or tomorrow\n\t\t\tif($row->dates == $today) {\n\t\t\t\t$result = JText::_( 'TODAY' );\n\t\t\t} elseif($row->dates == $tomorrow) {\n\t\t\t\t$result = JText::_( 'TOMORROW' );\n\t\t\t} elseif($row->dates == $yesterday) {\n\t\t\t\t$result = JText::_( 'YESTERDAY' );\n\t\t\t\n\t\t\t//This one isn't very different from the DAYS AGO output but it seems \n\t\t\t//adequate to use a different language string here.\n\t\t\t//\n\t\t\t//the event has an enddate and it's earlier than yesterday\n\t\t\t} elseif($row->enddates && $enddates_stamp < $yesterday_stamp) {\n\t\t\t\t$days = round( ($today_stamp - $enddates_stamp) / 86400 );\n\t\t\t\t$result = JText::sprintf( 'ENDED DAYS AGO', $days );\n\t\t\t\t\n\t\t\t//the event has an enddate and it's later than today but the startdate is earlier than today\n\t\t\t//means a currently running event \n\t\t\t} elseif($row->enddates && $enddates_stamp > $today_stamp && $dates_stamp < $today_stamp) {\n\t\t\t\t$days = round( ($today_stamp - $dates_stamp) / 86400 );\n\t\t\t\t$result = JText::sprintf( 'STARTED DAYS AGO', $days );\n\t\t\t\t\n\t\t\t//the events date is earlier than yesterday\n\t\t\t} elseif($dates_stamp < $yesterday_stamp) {\n\t\t\t\t$days = round( ($today_stamp - $dates_stamp) / 86400 );\n\t\t\t\t$result = JText::sprintf( 'DAYS AGO', $days );\n\t\t\t\t\n\t\t\t//the events date is later than tomorrow\n\t\t\t} elseif($dates_stamp > $tomorrow_stamp) {\n\t\t\t\t$days = round( ($dates_stamp - $today_stamp) / 86400 );\n\t\t\t\t$result = JText::sprintf( 'DAYS AHEAD', $days );\n\t\t\t}\n\t\t} else {\n\t\t\t//single day event\n\t\t\t$date = strftime($params->get('formatdate', '%d.%m.%Y'), strtotime( $row->dates.' '.$row->times ));\n\t\t\t$result = JText::sprintf('ON DATE', $date);\n\t\t\t\n\t\t\t//Upcoming multidayevent (From 16.10.2008 Until 18.08.2008)\n\t\t\tif($dates_stamp > $tomorrow_stamp && $enddates_stamp) {\n\t\t\t\t$startdate = strftime($params->get('formatdate', '%d.%m.%Y'), strtotime( $row->dates.' '.$row->times ));\n\t\t\t\t$enddate = strftime($params->get('formatdate', '%d.%m.%Y'), strtotime( $row->enddates.' '.$row->endtimes ));\n\t\t\t\t$result = JText::sprintf('FROM UNTIL', $startdate, $enddate);\n\t\t\t}\n\t\t\t\n\t\t\t//current multidayevent (Until 18.08.2008)\n\t\t\tif( $row->enddates && $enddates_stamp > $today_stamp && $dates_stamp < $today_stamp ) {\n\t\t\t\t//format date\n\t\t\t\t$result = strftime($params->get('formatdate', '%d.%m.%Y'), strtotime( $row->enddates.' '.$row->endtimes ));\n\t\t\t\t$result = JText::sprintf('UNTIL', $result);\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn $result;\n\t}", "private function _date_format($results) {\n\t\tif ( $this->date_format) {\n\n\t\t\t$date_cols = $this->date_cols;\n\t\t\tif (!in_array($this->date_column, $this->date_cols)) {\n\t\t\t\t$date_cols[] = $this->date_column;\n\t\t\t}\n\n\t\t\tforeach ($results as &$r) {\n\t\t\t\tforeach ($date_cols as $key) {\n\t\t\t\t\tif (isset($r[$key]) && !empty($r[$key])) {\n\t\t\t\t\t\t$date = date_create($r[$key]);\n\t\t\t\t\t\t$r[$key] = date_format($date, $this->date_format);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $results;\n\t}", "public function formatDate($date = null);", "function dateToIndo($date) { // fungsi atau method untuk mengubah tanggal ke format indonesia\n // variabel BulanIndo merupakan variabel array yang menyimpan nama-nama bulan\n $BulanIndo = array(\"Januari\", \"Februari\", \"Maret\",\n \"April\", \"Mei\", \"Juni\",\n \"Juli\", \"Agustus\", \"September\",\n \"Oktober\", \"November\", \"Desember\");\n $split = explode(' ', $date);\n\n $jam = $split[1];\n $date = $split[0];\n\n $tahun = substr($date, 0, 4); // memisahkan format tahun menggunakan substring\n $bulan = substr($date, 5, 2); // memisahkan format bulan menggunakan substring\n $tgl = substr($date, 8, 2); // memisahkan format tanggal menggunakan substring\n \n $result = $tgl . \" \" . $BulanIndo[(int)$bulan-1] . \" \". $tahun . ' ' . $jam;\n return $result;\n}", "public function afterFind(){\n // Format dates based on the locale\n foreach($this->metadata->tableSchema->columns as $columnName => $column){\n if ($column->dbType == 'date'){\n $aux= CDateTimeParser::parse($this->$columnName,\"yyyy-MM-dd\");\n $this->$columnName = ($aux != null )?date('d/m/Y',$aux ):null;\n }elseif ($column->dbType == 'datetime'){\n $aux= CDateTimeParser::parse($this->$columnName,\"yyyy-MM-dd HH:mm:ss\");\n $this->$columnName = ($aux != null )?date('d/m/Y H:i:s',$aux ):null;\n }\n }\n }", "function dateFormatArray($concerts){\n for($i = 0; $i < sizeof($concerts); $i++){\n $concerts[$i]['datum'] = dateFormat($concerts[$i]['datum']);\n }\n \n return $concerts;\n}", "public function getDateFormatter();", "function format_daterange($start_date, $end_date, $format = 'd', $full_text, $start_text, $end_text, $culture = null, $charset = null)\n{\n if ($start_date != '' && $end_date != '')\n {\n return sprintf($full_text, format_date($start_date, $format, $culture, $charset), format_date($end_date, $format, $culture, $charset));\n }\n else if ($start_date != '')\n {\n return sprintf($start_text, format_date($start_date, $format, $culture, $charset));\n }\n else if ($end_date != '')\n {\n return sprintf($end_text, format_date($end_date, $format, $culture, $charset));\n }\n}", "private function return_dates($dados)\n {\n\n $var_month = $dados[0]->mes;\n $var_year = $dados[0]->ano;\n $var_dayOfWeek = $dados[0]->dia_encontro;\n $var_counting_days = cal_days_in_month(CAL_GREGORIAN, $var_month, $var_year); //days of month\n\n $dini = mktime(0,0,0,$var_month,1,$var_year);\n $dfim = mktime(0,0,0,$var_month,$var_counting_days,$var_year);\n\n $return_d = array();\n\n while($dini <= $dfim) //Enquanto uma data for inferior a outra\n {\n $dt = date(\"d/m/Y\",$dini); //Convertendo a data no formato dia/mes/ano\n $diasemana = date(\"w\", $dini);\n\n if($diasemana == $var_dayOfWeek)\n { // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n array_push($return_d, $dt);\n }\n\n $dini += 86400; // Adicionando mais 1 dia (em segundos) na data inicial\n }\n\n //Segundo dia encontro\n $var_month = $dados[0]->mes;\n $var_year = $dados[0]->ano;\n $var_dayOfWeek = $dados[0]->segundo_dia_encontro;\n $var_counting_days = cal_days_in_month(CAL_GREGORIAN, $var_month, $var_year); //days of month\n\n $dini = mktime(0,0,0,$var_month,1,$var_year);\n $dfim = mktime(0,0,0,$var_month,$var_counting_days,$var_year);\n\n $bPrimeiro = false;\n\n while($dini <= $dfim) //Enquanto uma data for inferior a outra\n {\n $dt = date(\"d/m/Y\",$dini); //Convertendo a data no formato dia/mes/ano\n $diasemana = date(\"w\", $dini);\n\n if($diasemana == $var_dayOfWeek)\n { // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n\n if ($bPrimeiro==false) {\n array_push($return_d, \"\");\n array_push($return_d, \" Segundo Dia Encontro \");\n }\n\n array_push($return_d, $dt);\n $bPrimeiro=true;\n }\n\n $dini += 86400; // Adicionando mais 1 dia (em segundos) na data inicial\n }\n\n array_push($return_d, \"\");\n array_push($return_d, \" Encontro Avulso (Criar Novo) \");\n\n //Verifica se houve encontro avulso para a celula / mes / ano\n $dt_encontro_avulso = $this->buscar_data_avulsa($dados[0]->celulas_id, $var_month, $var_year);\n\n if ($dt_encontro_avulso!=null) {\n array_push($return_d, \"\");\n array_push($return_d, \" Houve Encontro Avulso : \");\n\n foreach ($dt_encontro_avulso as $item) {\n array_push($return_d, date(\"d/m/Y\", strtotime($item->data_encontro)));\n }\n }\n\n return ($return_d);\n\n }", "function list_day_work($date)\n{\n Database::getInstance()->getConnection()->real_escape_string($date);\n // Scoate id_urile din zilele lucrate dupa data\n $row = [];\n $query = \"SELECT wd.id, angajati.surname, angajati.name, loc_activitate.locatie, wd.comment FROM cozagro_db.work_days wd\n INNER JOIN cozagro_db.angajati angajati ON wd.id_angajat=angajati.id \n INNER JOIN cozagro_db.loc_activitate loc_activitate ON wd.id_loc_activitate=loc_activitate.id \n WHERE DATE_FORMAT(submission_date, '%d - %c - %Y') = '$date' AND wd.deleted='0'\n ORDER BY angajati.surname ASC \";\n $result = Database::getInstance()->getConnection()->query($query);\n if (!$result) {\n die(\"Errore la extragere pentru zilele de lucru in function.php\" . Database::getInstance()->getConnection()->error);\n };\n\n $i = 0;\n while ($dates = $result->fetch_assoc()) {\n\n $row[$i] = [\"id_work_days\" => $dates['id'],\n \"nume\" => $dates['surname'] . \" \" . $dates['name'],\n \"loc_activitate\" => $dates['locatie'],\n \"comment\" => $dates['comment']];\n\n //Identifica numele angajatului dupa ID\n\n $i++;\n }\n $result->free_result();\n return $row;\n}", "function formatDateLocaleVersDB($date, $type = 2)\n {\n $date = ltrim($date);\n $date = rtrim($date);\n /*\n * Separation de la date et de l'heure\n */\n $temp = @explode(\" \", $date);\n $date = $temp[0];\n $heure = $temp[1];\n $j = 0;\n do {\n $test = @strpos($date, $this->sepValide[$j]);\n if ($test === false) {\n $j++;\n }\n } while ($j < count($this->sepValide) && ($test === false));\n $separateurLocal = $this->sepValide[$j];\n $temp = @explode($separateurLocal, $date);\n /*\n * Assignation des champs\n */\n switch ($this->formatDate) {\n case 0:\n $annee = $temp[0];\n $mois = $temp[1];\n $jour = $temp[2];\n break;\n case 1:\n $annee = $temp[2];\n $mois = $temp[1];\n $jour = $temp[0];\n break;\n case 2:\n $annee = $temp[2];\n $mois = $temp[0];\n $jour = $temp[1];\n break;\n }\n /*\n * Prise en compte de l'annee par defaut\n */\n if ($annee == \"\") {\n $annee = date(\"Y\");\n }\n\n if ($annee < 100) {\n if ($annee <= $this->dateMini) {\n $annee = \"20\" . $annee;\n } else {\n $annee = \"19\" . $annee;\n }\n }\n\n $date = $annee . $this->separateurDB . $mois . $this->separateurDB . $jour;\n /*\n * Reintegration de l'heure le cas echeant\n */\n if ($type == 3) {\n $date .= \" \" . $heure;\n }\n return $date;\n }", "public static function formatDates($data){\n\t\tif(!isset($data)){\n\t\t\tthrow new InvalidArgumentException(\"the object to format dates is null \");\n\t\t}\n\t\t\n\t\tif(!is_object($data) && !is_array($data) ){\n\t\t\tthrow new InvalidArgumentException(\"the parameter to format dates is not a object or array\");\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tforeach($data as $k => $v){\n\t\t\tif(PayURequestObjectUtil::isKeyDateField($k)){\n\t\t\t\tif(is_array($data)){\n\t\t\t\t\t$miliseconds = $data[$k];\n\t\t\t\t\t$data[$k] = PayURequestObjectUtil::getDate($miliseconds); \n\t\t\t\t}else if(is_object($data)){\n\t\t\t\t\t$miliseconds = $data->$k;\n\t\t\t\t\t$data->$k = PayURequestObjectUtil::getDate($miliseconds);\n\t\t\t\t}\n\t\t\t}else if(is_object($data) && (is_object($data->$k) || is_array($data->$k))){\n\t\t\t\t$data->$k = PayURequestObjectUtil::formatDates($data->$k);\n\t\t\t}else if(is_array($data) && (is_object($data[$k]) || is_array($data[$k]))){\n\t\t\t\t$data[$k] = PayURequestObjectUtil::formatDates($data[$k]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "function liste_evenements($id_agenda, $T_debut_periode, $T_fin_periode, $journee_order_by=true, $type_sortie=\"lecture\")\r\n{\r\n\t////\tPériode simple : début dans la période || fin dans la période || debut < periode < fin\r\n\t$date_debut\t\t= strftime(\"%Y-%m-%d %H:%M:00\", $T_debut_periode);\r\n\t$date_fin\t\t= strftime(\"%Y-%m-%d %H:%M:59\", $T_fin_periode);\r\n\t$sql_periode\t= \"((T1.date_debut between '\".$date_debut.\"' and '\".$date_fin.\"') OR (T1.date_fin between '\".$date_debut.\"' and '\".$date_fin.\"') OR (T1.date_debut < '\".$date_debut.\"' and T1.date_fin > '\".$date_fin.\"'))\";\r\n\t////\tPériodicité des événements : type périodicité spécifié && debut déjà commencé && fin pas spécifié/arrivé && date pas dans les exceptions && périodicité jour/semaine/mois/annee\r\n\t$period_date_fin = strftime(\"%Y-%m-%d\", $T_fin_periode);\r\n\t$date_ymd\t\t= strftime(\"%Y-%m-%d\", $T_debut_periode);\r\n\t$jour_semaine\t= str_replace(\"0\",\"7\",strftime(\"%w\",$T_debut_periode)); // de 1 à 7 (lundi à dimanche)\r\n\t$mois\t\t\t= strftime(\"%m\",$T_debut_periode); // mois de l'annee en numérique => 01 à 12\r\n\t$jour_mois\t\t= strftime(\"%d\",$T_debut_periode); // jour du mois en numérique => 01 à 31\r\n\t$jour_annee\t\t= strftime(\"%m-%d\", $T_debut_periode);\r\n\t$periodicite\t= \"(T1.periodicite_type is not null AND T1.date_debut<'\".$date_debut.\"' AND (T1.period_date_fin is null or '\".$period_date_fin.\"'<=T1.period_date_fin) AND (T1.period_date_exception is null or period_date_exception not like '%\".$date_ymd.\"%') AND ((T1.periodicite_type='jour_semaine' and T1.periodicite_valeurs like '%\".$jour_semaine.\"%') OR (T1.periodicite_type='jour_mois' and T1.periodicite_valeurs like '%\".$jour_mois.\"%') OR (T1.periodicite_type='mois' and T1.periodicite_valeurs like '%\".$mois.\"%' and DATE_FORMAT(T1.date_debut,'%d')='\".$jour_mois.\"') OR (T1.periodicite_type='annee' and DATE_FORMAT(T1.date_debut,'%m-%d')='\".$jour_annee.\"')))\";\r\n\t////\tRécupère la liste des evenements ($order_by_sql==\"heure_debut\" si on récup les évenements d'1 jour, pour pouvoir bien intégrer les evenements récurents)\r\n\t$order_by_sql = ($journee_order_by==true) ? \"DATE_FORMAT(T1.date_debut,'%H')\" : \"T1.date_debut\";\r\n\t$liste_evenements_tmp = db_tableau(\"SELECT T1.* FROM gt_agenda_evenement T1, gt_agenda_jointure_evenement T2 WHERE T1.id_evenement=T2.id_evenement AND T2.id_agenda='\".intval($id_agenda).\")' AND T2.confirme='1' AND (\".$sql_periode.\" OR \".$periodicite.\") ORDER BY \".$order_by_sql.\" asc\");\r\n\r\n\t////\tCree le tableau de sortie (en ajoutant le droit d'accès, masquant les libellés si besoin, etc.)\r\n\tglobal $objet;\r\n\t$liste_evenements = array();\r\n\tforeach($liste_evenements_tmp as $key_evt => $evt_tmp)\r\n\t{\r\n\t\t$droit_acces = droit_acces($objet[\"evenement\"], $evt_tmp, false);\r\n\t\tif($type_sortie==\"tout\" || ($type_sortie==\"lecture\" && $droit_acces>0))\r\n\t\t{\r\n\t\t\t// Ajoute l'evenement au tableau de sortie avec son droit d'accès\r\n\t\t\t$liste_evenements[$key_evt] = $evt_tmp;\r\n\t\t\t$liste_evenements[$key_evt][\"droit_acces\"] = $droit_acces;\r\n\t\t\t// masque les détails si besoin : \"evt public mais détails masqués\"\r\n\t\t\tif($type_sortie==\"lecture\") $liste_evenements[$key_evt] = masque_details_evt($liste_evenements[$key_evt]);\r\n\t\t}\r\n\t}\r\n\treturn $liste_evenements;\r\n}", "function formatDateParams() {\n $session = CRM_Core_Session::singleton();\n $dateType = $session->get('dateTypes');\n $setDateFields = array_intersect_key($this->_params, array_flip($this->_dateFields));\n foreach ($setDateFields as $key => $value) {\n CRM_Utils_Date::convertToDefaultDate($this->_params, $dateType, $key);\n $this->_params[$key] = CRM_Utils_Date::processDate($this->_params[$key]);\n }\n }", "public function dateViewHelperFormatsDateLocalizedDataProvider() {}", "function format_dates_for_db($formdata, $field_list)\n{\n\t$new_formdata = $formdata;\n\t\n\tforeach($field_list AS $key)\n\t{\n\t\t$field_key = explode('*', $key);\n\t\tif(array_key_exists($field_key[0], $formdata)){\n\t\t\tif(!empty($field_key[1]) && $field_key[1] == 'EXT'){\n\t\t\t\t$new_formdata[$field_key[0]] = date('Y-m-d H:i:s', strtotime($formdata[$field_key[0]]));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_formdata[$field_key[0]] = date('Y-m-d', strtotime($formdata[$field_key[0]]));\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $new_formdata;\n}", "function DateToIndo($date) {\r\n // variabel BulanIndo merupakan variabel array yang menyimpan nama-nama bulan\r\n $BulanIndo = array(\"Januari\", \"Februari\", \"Maret\",\r\n \"April\", \"Mei\", \"Juni\",\r\n \"Juli\", \"Agustus\", \"September\",\r\n \"Oktober\", \"November\", \"Desember\");\r\n $tahun = substr($date, 0, 4); // memisahkan format tahun menggunakan substring\r\n $bulan = substr($date, 5, 2); // memisahkan format bulan menggunakan substring\r\n $tgl = substr($date, 8, 2); // memisahkan format tanggal menggunakan substring\r\n $zzesult = $tgl . \" \" . $BulanIndo[(int)$bulan-1] . \" \". $tahun;\r\n return($zzesult);\r\n }", "function FormatDate2($fecha)\n {\n if($fecha!=NULL || $fecha!=\"\"){\n $meses = [\"\", \"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"];\n $dias = [\"\", \"Lunes\", \"Martes\", \"Miercoles\", \"Jueves\", \"Viernes\", \"Sabado\", \"Domingo\"];\n return date(\"j\", strtotime($fecha)) . \" de \" . $meses[date(\"n\", strtotime($fecha))] . \", \" . date(\"Y\", strtotime($fecha));}\n else\n return \"\";\n }", "function formldatesimp($gdate, $gcode, $tdate, $tcode)\n{ // formatiert lebenszeit in Liste\n $code = 10 * $gcode + $tcode;\n switch ($code) {\n case 0:\n return substr($gdate, 8, 2) . '.' . substr($gdate, 5, 2) . '.' . substr($gdate, 0, 4) . ' - ' . substr($tdate, 8, 2) . '.' . substr($tdate, 5, 2) . '.' . substr($tdate, 0, 4);\n case 1:\n return substr($gdate, 8, 2) . '.' . substr($gdate, 5, 2) . '.' . substr($gdate, 0, 4) . ' - ' . substr($tdate, 0, 4);\n case 2:\n return substr($gdate, 8, 2) . '.' . substr($gdate, 5, 2) . '.' . substr($gdate, 0, 4) . ' - ';\n case 8:\n return substr($gdate, 8, 2) . '.' . substr($gdate, 5, 2) . '.' . substr($gdate, 0, 4);\n case 9:\n return '*' . substr($gdate, 8, 2) . '.' . substr($gdate, 5, 2) . '.' . substr($gdate, 0, 4);\n case 10:\n return substr($gdate, 0, 4) . ' - ' . substr($tdate, 8, 2) . '.' . substr($tdate, 5, 2) . '.' . substr($tdate, 0, 4);\n case 11:\n return substr($gdate, 0, 4) . ' - ' . substr($tdate, 0, 4);\n case 12:\n return substr($gdate, 0, 4) . ' - ';\n case 18:\n return substr($gdate, 0, 4);\n case 19:\n return '*' . substr($gdate, 0, 4);\n case 20:\n return ' - ' . substr($tdate, 8, 2) . '.' . substr($tdate, 5, 2) . '.' . substr($tdate, 0, 4);\n case 21:\n return ' - ' . substr($tdate, 0, 4);\n case 22:\n return \"&dagger;\";\n case 28:\n return \"\";\n case 29:\n return \"*\";\n }\n return date(\"d.m.Y\", strtotime($date));\n}", "function agenda_date_debut_liste($date, $affichage_debut = 'date_jour') {\n\tswitch ($affichage_debut) {\n\t\tcase 'date_jour':\n\t\t\tbreak;\n\t\tcase 'date_veille':\n\t\t\t$date = agenda_jourdecal($date, -1);\n\t\t\tbreak;\n\t\tcase 'debut_semaine':\n\t\t\t$t = strtotime($date);\n\t\t\t$date = agenda_jourdecal($date, -(date('N', $t)-1));\n\t\t\tbreak;\n\t\tcase 'debut_semaine_prec':\n\t\t\t$t = strtotime($date);\n\t\t\t$date = agenda_jourdecal($date, -(date('N', $t)-1+7));\n\t\t\tbreak;\n\t\tcase 'debut_mois':\n\t\t\t$t = strtotime($date);\n\t\t\t$date = agenda_jourdecal($date, -(date('j', $t)-1));\n\t\t\tbreak;\n\t\tcase 'debut_mois_prec':\n\t\t\t$t = strtotime($date);\n\t\t\t$date = agenda_jourdecal($date, -(date('j', $t)-1)); // debut de mois\n\t\t\t$date = agenda_moisdecal($date, -1); // precedent\n\t\t\tbreak;\n\t\tcase 'debut_mois_1':\n\t\tcase 'debut_mois_2':\n\t\tcase 'debut_mois_3':\n\t\tcase 'debut_mois_4':\n\t\tcase 'debut_mois_5':\n\t\tcase 'debut_mois_6':\n\t\tcase 'debut_mois_7':\n\t\tcase 'debut_mois_8':\n\t\tcase 'debut_mois_9':\n\t\tcase 'debut_mois_10':\n\t\tcase 'debut_mois_11':\n\t\tcase 'debut_mois_12':\n\t\t\t$t = strtotime($date);\n\t\t\t$mdebut = intval(substr($affichage_debut, strlen('debut_mois_')));\n\t\t\t$mcourant = date('n', $t);\n\t\t\t$offset = ($mcourant-$mdebut+12)%12;\n\t\t\t$date = agenda_jourdecal($date, -(date('j', $t)-1)); // debut de mois\n\t\t\t$date = agenda_moisdecal($date, -$offset);\n\t\t\tbreak;\n\t}\n\treturn $date;\n}", "function DateToIndo($date) {\n // variabel BulanIndo merupakan variabel array yang menyimpan nama-nama bulan\n $BulanIndo = array(\"Januari\", \"Februari\", \"Maret\",\n \"April\", \"Mei\", \"Juni\",\n \"Juli\", \"Agustus\", \"September\",\n \"Oktober\", \"November\", \"Desember\");\n $tahun = substr($date, 0, 4); // memisahkan format tahun menggunakan substring\n $bulan = substr($date, 5, 2); // memisahkan format bulan menggunakan substring\n $tgl = substr($date, 8, 2); // memisahkan format tanggal menggunakan substring\n $result = $tgl . \" \" . $BulanIndo[(int)$bulan-1] . \" \". $tahun;\n return($result);\n \n}", "public function createGridDataHorizontalDates()\n {\n $aPeriods = $this->getGridDataPeriods();\n $aLevels = $this->getGridDataLevels();\n if (empty($aPeriods) || empty($aLevels)) {\n $this->aErrors[] = 'No period or level data provided';\n\n return false;\n }\n $aAllPeriodLevels = $this->getAllGridDataPeriodLevels($aPeriods, $aLevels);\n ?>\n <table id=\"dimension_table\" border=\"1\" class=\"dim_table\">\n <tbody><tr><th></th>\n <?php\n foreach ($aPeriods as $nPeriodId => $aPeriod) {\n echo \"<th>{$aPeriod['period_name_x_axis']}</th>\\n\";\n }\n ?>\n </tr></tbody>\n <?php\n foreach ($aLevels as $nLevelId => $aLevel) {\n $nLevelId = $aLevel['id'];\n echo \"<tr>\\n\";\n ?>\n <td>\n <?php\n if (!empty($aLevel['link_exists'])) {\n ?>\n <a class=\"more\" title=\"<?=$aLevel['label']?>\" \n href=\"?year=<?=$aLevel['nYear']?>&amp;level=<?=$aLevel['level']\n ?>&amp;parent_level_id=<?=$aLevel['level_id']?>\"><?=$aLevel['code']?></a>\n <?php\n } else {\n echo $aLevel['code'];\n }\n ?>\n </td>\n <?php\n foreach ($aPeriods as $nPeriodId => $sPeriod) {\n ?>\n <td>\n <?php\n if (!empty($aAllPeriodLevels[$nPeriodId][$nLevelId]['link_exists'])) {\n ?>\n <a class=\"more\" title=\"<?=$aLevel['label']?>\" \n href=\"?year=<?=$aLevel['nYear']?>&amp;period_id=<?=\n $aAllPeriodLevels[$nPeriodId][$nLevelId]['period_id']?>&amp;level=<?=\n $aAllPeriodLevels[$nPeriodId][$nLevelId]['level']?>&amp;parent_level_id=<?=\n $aAllPeriodLevels[$nPeriodId][$nLevelId]['parent_level_id']?>&amp;level_id=<?=\n $aAllPeriodLevels[$nPeriodId][$nLevelId]['level_id']?>\"><?=\n $this->getFormattedAmt($aAllPeriodLevels[$nPeriodId][$nLevelId]['amt'])?></a>\n <?php\n } else {\n echo '0';\n }\n ?>\n </td>\n <?php\n }\n echo \"</tr>\\n\";\n }\n\n echo '</table>';\n }", "public function printDiasByRango($fechaInicio, $fechaFin){\n echo \"<h1>$this->asignatura : Programacion</h1>\";\n// echo \"<strong>FechaInicio = \".$fechaInicio->format('Y-m-d').\"</strong>\";\n// echo \"<strong>FechaFin = \".$fechaFin->format('Y-m-d').\"</strong>\";\n echo \"<h2> Unidades </h2>\";\n $this->printUnidades();\n\n //echo \"<h2> PLANIFICACION\".count($this->DIAS).\"</h2>\";\n $mes = -1;\n foreach($this->DIAS as $dia){\n // parsear dia\n $mesDia = $dia->fecha->format('m');\n $diaSemana = $dia->fecha->format('w');\n\n // cambio de mes\n if ($mes != $mesDia){\n // cambio de mes\n // fin mes\n if ($mes != -1){\n echo \"</table>\\n\";\n }\n\n // nuevo mes\n $mes = $mesDia;\n $this->printCabeceraMes($dia);\n // rellenar hasta lunes\n if ($diaSemana != 0 ){\n $relleno = $diaSemana;\n }else{\n // es domingo cambio\n $relleno = 7;\n }\n for ($d = 1; $d < $relleno; $d++ ){\n echo \"<td></td>\\n\";// hueco de dia vacio\n }\n }\n // cambio de semana\n if ($diaSemana == 1){\n echo \"</tr>\\n\";\n echo \"<tr>\\n\";\n }\n\n // cambio de unidad\n //<<\n\n // escribir dia\n $this->printDia($dia);\n }\n\n }", "function day_name($date,$session_nik,$datacuti,$dataliburbersama,$datalibur,$datasakittanpasuratdokter,$datasakitdengansuratdokter){\n\n $tanggal = date('Y-m-d', strtotime($date));\n\n $query = mysql_query(\"SELECT * FROM tbl_holiday WHERE Tanggal='$tanggal'\");\n $total = mysql_num_rows($query);\n $data = mysql_fetch_array($query);\n \n $cutiid = \"\";\n \n\n $countdatacuti = sizeof($datacuti); //untuk mengecek data di dalam array\n $countdataliburbersama = sizeof($dataliburbersama); //untuk mengecek data di dalam array\n $countsakittanpasuratdokter = sizeof($datasakittanpasuratdokter); //untuk mengecek data di dalam array\n $countsakitdengansuratdokter = sizeof($datasakitdengansuratdokter); //untuk mengecek data di dalam array\n \n \n $N = date('N', strtotime($date));\n\n if ($N==1){\n $kyou = 'Senin';\n }\n elseif ($N==2){\n $kyou = 'Selasa';\n }\n elseif ($N==3){\n $kyou = 'Rabu';\n }\n elseif ($N==4){\n $kyou = 'Kamis';\n }\n elseif ($N==5){\n $kyou = 'Jumat';\n }\n elseif ($N==6){\n $kyou = 'Sabtu';\n }\n elseif ($N==7){\n $kyou = 'Minggu';\n }\n else{\n $kyou = '';\n }\n\n\n if ($total>0 || $kyou=='Minggu' || $kyou=='Sabtu' || $countdataliburbersama>0){\n return '<font color=\"red\"><strong>'.$kyou.'</strong></font>';\n }elseif($countdatacuti>0 || $countsakittanpasuratdokter || $countsakitdengansuratdokter) {\n return '<font color=\"blue\"><strong>'.$kyou.'</strong></font>';\n }else{\n return $kyou;\n }\n\n \n\n}", "public function afterFind($arg) {\n foreach ($this->dateFields as $field) {\n foreach ($arg as $key => $item) {\n if (isset($item[$this->name][$field]))\n $arg[$key][$this->name][$field] = $this->_date4View($arg[$key][$this->name][$field]);\n }\n }\n return parent::afterFind($arg);\n }", "private function process_dates($args) {\n\t\t\t$date_format = explode ( '|' , $args['_date_format'] );\n\t\t\t$date_order = $date_format[0];\n\t\t\t$date_picture = $date_format[1];\n\t\t\t$date_fields = explode ( ',' , $args['_date_fields'] );\n\t\t\t$date = array();\n\t\t\tdate_default_timezone_set('UTC');\n\t\t\t$text_date_field = substr ($date_order, 0, 1) === 't';\n\t\t\n\t\t\tforeach ( $date_fields as $date_field ) {\n\t\t\t\tif ($text_date_field) {\n\t\t\t\t\t// date sent as a string\n\t\t\t\t\t$date_divider = substr ($date_order, 1, 1);\n\t\t\t\t\t$date_split = explode ($date_divider, $args[$date_field]);\n\t\t\t\t\tfor ($i = 0; $i < 3 ; $i++) {\n\t\t\t\t\t\t$date[substr ( $date_order, $i + 2, 1)] = $date_split[$i];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// date sent as an array\n\t\t\t\t\tfor ($i = 0; $i < count($args[$date_field]) ; $i++) {\n\t\t\t\t\t\t$date[substr ( $date_order, $i, 1)] = $args[$date_field][$i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$args[$date_field] = date ( $date_picture, mktime(0, 0, 0, $date[\"m\"], $date[\"d\"], $date[\"y\"]));\n\t\t\t\t\t// See http://php.net/manual/en/function.date.php and\n\t\t\t\t\t// http://php.net/manual/en/function.mktime.php\n\t\t\t}\n\t\t\treturn $args;\n\t\t}", "function buildDateString($date_array)\n{\n return $date_array[\"year\"].'-'.$date_array[\"mon\"].'-'.$date_array[\"mday\"];\n}", "function date_slide($columns,$date,$cls){\r\n $data = '';\r\n for($i=0;$i<$columns;$i++){\r\n $date_C = date('D Y-m-d', strtotime($date. ' + '.$i.' days'));\r\n if($cls==1){\r\n $data .='<div class=\"col-sm-2 padding0\"><div class=\"sch-dtetime width100\">'.$date_C.'</div></div>';\r\n }else{\r\n $data .='<div class=\"dttime-list\">'.$date_C.'</div>';\r\n }\r\n }\r\n return $data;\r\n }", "public function format_date_text($date,$b_date_only=false,$force_user_language='')\n {\n global $Ccontroller_main;\n global $GLOBAL_DAYS;\n global $GLOBAL_MONTHS;\n \n if($force_user_language!='')\n {\n $user_language = $force_user_language;\n }\n else\n {\n $user_language = $Ccontroller_main->get_m_user_language();\n }\n \n //YESTERDAY\n if(!$b_date_only && date(\"Y-m-d\", strtotime(\"yesterday\")) == date(\"Y-m-d\",strtotime($date)))\n {\n \n switch($user_language)\n {\n case 'FR': \n $date = 'Hier';\n break;\n case 'EN': \n $date = 'Yesterday';\n break;\n } \n }\n \n //TODAY\n else if(!$b_date_only && date(\"Y-m-d\") == date(\"Y-m-d\",strtotime($date)))\n {\n $Cdate_time = new Cmydatetime($date, new DateTimeZone('EUROPE/Paris'));\n $Cdate_time_now = new Cmydatetime(\"now\", new DateTimeZone('EUROPE/Paris'));\n $interval = $Cdate_time->diff($Cdate_time_now);\n //echo $Cdate_time_now->format('H i s').':'.$Cdate_time->format('H i s').'<br>';\n switch($user_language)\n {\n case 'FR':\n if($interval->H>0){$date = $interval->format('Il y a %h heure(s), %i minute(s)');}\n else if($interval->i>0){$date = $interval->format('Il y a %i minute(s)');}\n else {$date = $interval->format('Il y a %s seconde(s)');}\n break;\n case 'EN': \n if($interval->H>0){$date = $interval->format('%h hour(s), %i minute(s) ago');}\n else if($interval->i>0){$date = $interval->format('%i minute(s) ago');}\n else {$date = $interval->format('%s second(s) ago');} \n break;\n } \n }\n \n //OTHER DATE\n else\n {\n $Cdate_time = new Cmydatetime($date, new DateTimeZone('EUROPE/Paris'));\n $date ='';\n\n switch($user_language)\n {\n case 'FR': \n $date = $GLOBAL_DAYS[$Cdate_time->format('N')]['fr'].' '.$Cdate_time->format('d').' '.$GLOBAL_MONTHS[$Cdate_time->format('n')]['fr'].' '.$Cdate_time->format('Y');\n break;\n case 'EN': \n $date = $GLOBAL_DAYS[$Cdate_time->format('N')]['en'].', '.$GLOBAL_MONTHS[$Cdate_time->format('n')]['en'].' '.$Cdate_time->format('d').' '.$Cdate_time->format('Y');\n break;\n } \n }\n \n return $date;\n }", "public function getAllDate($datoDesde,$datoHasta){\n $sql = \"SELECT Id, Proveedor, Concepto, FORMAT(Monto, 2) AS Monto, Revisado, DATE_FORMAT(FechaSolicitud,'%d/%m/%Y') AS FechaSolicitud, AutorizadoPago, DATE_FORMAT(FechaAutorizado,'%d/%m/%Y') AS FechaAutorizado, estado, Comentario, ComentarioCapt, DATE_FORMAT(FechaPago,'%d/%m/%Y') AS FechaPago From \" .self::$tablename. \" WHERE FechaSolicitud BETWEEN '{$datoDesde}' AND '{$datoHasta}' ORDER BY Id DESC\";\n return Executor::doit($sql);\n }", "function non_breaking_date() {\r\n\t\t$english_months_array = array(\r\n\t\t// month => variations\r\n\t\t'January' => array('Jan.', 'Jan'),\r\n\t\t'February' => array('Feb.', 'Feb'),\r\n\t\t'March' => array('Mar.', 'Mar'),\r\n\t\t'April' => array('Apr.', 'Apr'),\r\n\t\t'May' => array(),\r\n\t\t'June' => array('Jun.', 'Jun'),\r\n\t\t'July' => array('Jul.', 'Jul'),\r\n\t\t'August' => array('Aug.', 'Aug'),\r\n\t\t'September' => array('Sept.', 'Sept'),\r\n\t\t'October' => array('Oct.', 'Oct'),\r\n\t\t'November' => array('Nov.', 'Nov'),\r\n\t\t'December' => array('Dec.', 'Dec'),\r\n\t\t);\r\n\t\t$french_months_array = array(\r\n\t\t// month => variations\r\n\t\t'janvier' => array('jan.', 'jan'),\r\n\t\t'février' => array('fév.', 'fév', 'f&#233;vrier', 'f&#233;v.', 'f&#233;v', 'f&#xe9;vrier', 'f&#xe9;v.', 'f&#xe9;v', 'f&eacute;vrier', 'f&eacute;v.', 'f&eacute;v'),\r\n\t\t'mars' => array('mar.', 'mar'),\r\n\t\t'avril' => array('avr.', 'avr'),\r\n\t\t'mai' => array(),\r\n\t\t'juin' => array(),\r\n\t\t'juillet' => array('juil.', 'juil'),\r\n\t\t'août' => array('ao&#251;t', 'ao&#xfb;t', 'ao&ucirc;t'),\r\n\t\t'septembre' => array('sept.', 'sept'),\r\n\t\t'octobre' => array('oct.', 'oct'),\r\n\t\t'novembre' => array('nov.', 'nov'),\r\n\t\t'décembre' => array('déc.', 'déc', 'd&#233;cembre', 'd&#233;c.', 'd&#233;c', 'd&#xe9;cembre', 'd&#xe9;c.', 'd&#xe9;c', 'd&eacute;cembre', 'd&eacute;c.', 'd&eacute;c'),\r\n\t\t);\r\n\t\t$english_seasons_array = array(\r\n\t\t'Spring',\r\n\t\t'Summer',\r\n\t\t'Fall',\r\n\t\t'Winter',\r\n\t\t);\r\n\t\t$french_seasons_array = array(\r\n\t\t'printemps',\r\n\t\t'été', '&#233;t&#233;', '&#xe9;t&#xe9;', '&eacute;t&eacute;',\r\n\t\t'automne',\r\n\t\t'hiver',\r\n\t\t);\r\n\t\t$time_periods_array = array();\r\n\t\tforeach($english_months_array as $month => $variations_array) {\r\n\t\t\t$time_periods_array[] = $month;\r\n\t\t\tforeach($variations_array as $variation) {\r\n\t\t\t\t$time_periods_array[] = $variation;\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($french_months_array as $month => $variations_array) {\r\n\t\t\t$time_periods_array[] = $month;\r\n\t\t\tforeach($variations_array as $variation) {\r\n\t\t\t\t$time_periods_array[] = $variation;\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($english_seasons_array as $season) {\r\n\t\t\t$time_periods_array[] = $season;\r\n\t\t}\r\n\t\tforeach($french_seasons_array as $season) {\r\n\t\t\t$time_periods_array[] = $season;\r\n\t\t}\r\n\t\tif($this->config['non_breaking_type'] === 'noWrap') {\r\n\t\t\tif(ReTidy::is_clf2()) {\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,2},*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span class=\"noWrap\">$1 $3 $5</span>', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span class=\"noWrap\">$1 $3 $5</span>', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,4},*)/is', '<span class=\"noWrap\">$1 $3</span>', $this->code, -1, $c);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)/is', '<span class=\"noWrap\">$1 $3</span>', $this->code, -1, $d);\r\n\t\t\t} else {\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,2},*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $3 $5</span>', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $3 $5</span>', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,4},*)/is', '<span style=\"white-space: nowrap;\">$1 $3</span>', $this->code, -1, $c);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)/is', '<span style=\"white-space: nowrap;\">$1 $3</span>', $this->code, -1, $d);\r\n\t\t\t}\r\n\t\t} else { // default to nbsp\r\n\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,2},*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '$1&nbsp;$3&nbsp;$5', $this->code, -1, $a);\r\n\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '$1&nbsp;$3&nbsp;$5', $this->code, -1, $b);\r\n\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,4},*)/is', '$1&nbsp;$3', $this->code, -1, $c);\r\n\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)/is', '$1&nbsp;$3', $this->code, -1, $d);\r\n\t\t\t\r\n\t\t}\r\n\t\tif(ReTidy::is_clf2()) {\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2&ndash;$4&ndash;$6</span>$7', $this->code, -1, $e);\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2&nbsp;$4&nbsp;&ndash;&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2$3$4$5$6</span>$7', $this->code, -1, $e);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2&nbsp;$4&nbsp;$6&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t} else {\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2&ndash;$4&ndash;$6</span>$7', $this->code, -1, $e);\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2&nbsp;$4&nbsp;&ndash;&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2$3$4$5$6</span>$7', $this->code, -1, $e);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2&nbsp;$4&nbsp;$6&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t}\r\n\t\t//$this->logMsgIf(\"non_breaking_year_range\", $count);\r\n\t\t$count = $a + $b + $c + $d + $e + $f;\r\n\t\t//var_dump($a, $b, $c, $d, $e, $f);\r\n\t\t$this->logMsgIf(\"non_breaking_date\", $count);\r\n\t}", "function date_format_translated($format, $timestamp) {\n\tglobal $translation;\n\t\n\t$day_name_short = array($translation['tstat_su'], $translation['tstat_mo'], $translation['tstat_tu'], $translation['tstat_we'], $translation['tstat_th'], $translation['tstat_fr'], $translation['tstat_sa']);\n\t$day_name_full = array($translation['tstat_full_su'], $translation['tstat_full_mo'], $translation['tstat_full_tu'], $translation['tstat_full_we'], $translation['tstat_full_th'], $translation['tstat_full_fr'], $translation['tstat_full_sa']);\n\t$month_name_short = array($translation['tstat_jan'], $translation['tstat_feb'], $translation['tstat_mar'], $translation['tstat_apr'], $translation['tstat_may'], $translation['tstat_jun'],\n \t\t\t\t\t $translation['tstat_jul'], $translation['tstat_aug'], $translation['tstat_sep'], $translation['tstat_oct'], $translation['tstat_nov'], $translation['tstat_dec']);\n\t$month_name_full = array($translation['tstat_full_jan'], $translation['tstat_full_feb'], $translation['tstat_full_mar'], $translation['tstat_full_apr'], $translation['tstat_full_may'], $translation['tstat_full_jun'],\n \t\t\t\t\t $translation['tstat_full_jul'], $translation['tstat_full_aug'], $translation['tstat_full_sep'], $translation['tstat_full_oct'], $translation['tstat_full_nov'], $translation['tstat_full_dec']);\n \t\t\t\t\t \n // Loop char by char through php date format string, cacth the ones which need translating\n//--- PHP 4 :-)--------------------------------\nif(!function_exists('str_split')){\n function str_split($str,$split_lengt=1){\n\n $cnt = strlen($str);\n\n for ($i=0;$i<$cnt;$i+=$split_lengt)\n $rslt[]= substr($str,$i,$split_lengt); \n \n return $rslt;\n }\n} \n//----------------------------------------------\n\t$result = \"\";\n\t$format_chars = str_split($format, 1);\n\tforeach ($format_chars as $format_char) {\n\t\tif ($format_char == \"l\") {\n\t\t\t$day_index = date(\"w\", $timestamp);\n\t\t\t$result = $result . $day_name_full[$day_index];\n\t\t} else if ($format_char == \"D\") {\n\t\t\t$day_index = date(\"w\", $timestamp);\n\t\t\t$result = $result . $day_name_short[$day_index];\n\t\t} else if ($format_char == \"F\") {\n\t\t\t$month_index = date(\"n\", $timestamp) - 1;\n\t\t\t$result = $result . $month_name_full[$month_index];\n\t\t} else if ($format_char == \"M\") {\n\t\t\t$month_index = date(\"n\", $timestamp) - 1;\n\t\t\t$result = $result . $month_name_short[$month_index];\n\t\t} else {\n\t\t\t$result = $result . date($format_char, $timestamp);\n\t\t}\n\t}\n\t\n\treturn $result;\n}", "function format_data_out_db($db_date_column)\n{\n $formatted_date = \"DATE_FORMAT($db_date_column, '%a %d %m %Y') \";\n return $formatted_date;\n}", "function DateToIndo($date) {\n\t // variabel BulanIndo merupakan variabel array yang menyimpan nama-nama bulan\n\t\t$BulanIndo = array(\"Januari\", \"Februari\", \"Maret\",\n\t \"April\", \"Mei\", \"Juni\",\n\t \"Juli\", \"Agustus\", \"September\",\n\t \"Oktober\", \"November\", \"Desember\");\n\t\t$tahun = substr($date, 0, 4); // memisahkan format tahun menggunakan substring\n\t\t$bulan = substr($date, 5, 2); // memisahkan format bulan menggunakan substring\n\t\t$tgl = substr($date, 8, 2); // memisahkan format tanggal menggunakan substring\n\t\t$result = $tgl . \" \" . $BulanIndo[(int)$bulan-1] . \" \". $tahun;\n\t\treturn($result);\n\t}", "public function formatDate($date1){\r\n\t\tif( $date1 != '0000-00-00' ){\r\n\t\t\tif($date1!=''){\r\n\t\t\t\t$annee = substr($date1,0,4);\r\n\t\t\t\t$mois = substr($date1,5,2);\r\n\t\t\t\t$jour = substr($date1,8,2);\r\n\t\t\t\t$date2 = $jour.'/'.$mois.'/'.$annee;\r\n\t\t\t}else{\r\n\t\t\t\t$date2 = '';\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$date2 = '';\r\n\t\t}\r\n\t\treturn $date2;\r\n\t}", "function getChangeLog(\\PDO $dbh, $naIndex, $stDate = \"\", $endDate = \"\") {\r\n if ($stDate == \"\" && $endDate == \"\" && $naIndex < 1) {\r\n return \"Set a Start date. \";\r\n }\r\n\r\n $logDates = \"\";\r\n $whDates = \"\";\r\n $whereName = \"\";\r\n\r\n if ($stDate != \"\") {\r\n $logDates = \" and Date_Time >= '$stDate' \";\r\n $whDates = \" and a.Effective_Date >= '$stDate' \";\r\n }\r\n\r\n if ($endDate != \"\") {\r\n $logDates .= \" and Date_Time <= '$endDate' \";\r\n $whDates .= \" and a.Effective_Date <= '$endDate' \";\r\n }\r\n\r\n $whereName = ($naIndex == 0) ? \"\" : \" and idName = \" . $naIndex;\r\n\r\n $result2 = $dbh->query(\"SELECT * FROM name_log WHERE 1=1 \" . $whereName . $logDates . \" order by Date_Time desc limit 200;\");\r\n\r\n $data = \"<table id='dataTbl' class='display'><thead><tr>\r\n <th>Date</th>\r\n <th>Type</th>\r\n <th>Sub-Type</th>\r\n <th>User Id</th>\r\n <th>Member Id</th>\r\n <th>Log Text</th></tr></thead><tbody>\";\r\n\r\n while ($row2 = $result2->fetch(\\PDO::FETCH_ASSOC)) {\r\n\r\n $data .= \"<tr>\r\n <td>\" . date(\"Y-m-d H:i:s\", strtotime($row2['Timestamp'])) . \"</td>\r\n <td>\" . $row2['Log_Type'] . \"</td>\r\n <td>\" . $row2['Sub_Type'] . \"</td>\r\n <td>\" . $row2['WP_User_Id'] . \"</td>\r\n <td>\" . $row2['idName'] . \"</td>\r\n <td>\" . $row2['Log_Text'] . \"</td></tr>\";\r\n }\r\n\r\n\r\n // activity table has volunteer data\r\n $query = \"select a.idName, a.Effective_Date, a.Action_Codes, a.Other_Code, a.Source_Code, g.Description as Code, g2.Description as Category, ifnull(g3.Description, '') as Rank\r\nfrom activity a left join gen_lookups g on substring_index(Product_Code, '|', 1) = g.Table_Name and substring_index(Product_Code, '|', -1) = g.Code\r\nleft join gen_lookups g2 on g2.Table_Name = 'Vol_Category' and substring_index(Product_Code, '|', 1) = g2.Code\r\nleft join gen_lookups g3 on g3.Table_Name = 'Vol_Rank' and g3.Code = a.Other_Code\r\n where a.Type = 'vol' $whereName $whDates order by a.Effective_Date desc limit 100;\";\r\n\r\n $result3 = $dbh->query($query);\r\n\r\n while ($row2 = $result3->fetch(\\PDO::FETCH_ASSOC)) {\r\n\r\n $data .= \"<tr>\r\n <td>\" . date(\"Y-m-d H:i:s\", strtotime($row2['Effective_Date'])) . \"</td>\r\n <td>Volunteer</td>\r\n <td>\" . $row2['Action_Codes'] . \"</td>\r\n <td>\" . $row2['Source_Code'] . \"</td>\r\n <td>\" . $row2['idName'] . \"</td>\r\n <td>\" . $row2['Category'] . \"/\" . $row2[\"Code\"] . \", Rank = \" . $row2[\"Rank\"] . \"</td></tr>\";\r\n }\r\n\r\n\r\n return $data . \"</tbody></table>\";\r\n}", "public function formatDates($results, $primary, $model, $dateFields, $parseTime=false)\n\t{\n\t\tif (!is_array($dateFields)) {\n\t\t\t$dateFields = array($dateFields);\n\t\t}\n\t\t//TODO: figure out how to display dates without datetime because on searches it will slow things down somewhat?\n\t\tif(isset($results[0][$model][$dateFields[0]]))\n\t\t{\n\t\t\tif ($parseTime) {\n\t\t\t\tforeach($results as $i => $result)\t{\n\t\t\t\t\tforeach($dateFields as $dateField) {\n\t\t\t\t\t\tif (isset($results[$i][$model][$dateField])) {\n\t\t\t\t\t\t\t$date = $results[$i][$model][$dateField]; \n\t\t\t\t\t\t\tif (Validation::datetime($date)) {\n\t\t\t\t\t\t\t\t$intDate = strtotime($date);\n\t\t\t\t\t\t\t\t$results[$i][$model][$dateField] = date(Configure::read('DISP_DATE_FORMAT'), $intDate);\n\t\t\t\t\t\t\t\t$results[$i][$model][$parseTime] = date(Configure::read('DISP_TIME_FORMAT'), $intDate);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach($results as $i => $result)\t{\n\t\t\t\t\tforeach($dateFields as $dateField) {\n\t\t\t\t\t\tif (isset($results[$i][$model][$dateField])) {\n\t\t\t\t\t\t\t$date = $results[$i][$model][$dateField]; \n\t\t\t\t\t\t\tif (Validation::date($date)) {\n\t\t\t\t\t\t\t\t$intDate = strtotime($date);\n\t\t\t\t\t\t\t\t$results[$i][$model][$dateField] = date(Configure::read('DISP_DATE_FORMAT'), $intDate);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (isset($results[$model][$dateFields[0]]))\n\t\t\t{\n\t\t\t\tforeach($dateFields as $dateField) {\n\t\t\t\t\t$intDate = strtotime($results[$model][$dateField]);\n\t\t\t\t\t$results[$model][$dateField] = date(Configure::read('DISP_DATE_FORMAT'), $intDate);\n\t\t\t\t\tif ($parseTime) {\n\t\t\t\t\t\t$results[$model][$parseTime] = date(Configure::read('DISP_TIME_FORMAT'), $intDate);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $results;\n\t}", "function e_formatDate($tstamp){\n $m = intval(date(\"m\", $tstamp));\n $d = (date(\"d\", $tstamp));\n $l = strtolower((date(\"l\", $tstamp)));\n switch ($m) {\n case 1: $m_name = $lang_months_short[0]; break;\n case 2: $m_name = $lang_months_short[1]; break;\n case 3: $m_name = $lang_months_short[2]; break;\n case 4: $m_name = $lang_months_short[3]; break;\n case 5: $m_name = $lang_months_short[4]; break;\n case 6: $m_name = $lang_months_short[5]; break;\n case 7: $m_name = $lang_months_short[6]; break;\n case 8: $m_name = $lang_months_short[7]; break;\n case 9: $m_name = $lang_months_short[8]; break;\n case 10: $m_name = $lang_months_short[9]; break;\n case 11: $m_name = $lang_months_short[10]; break;\n case 12: $m_name = $lang_months_short[11]; break;\n default: $m_name = \"\"; break;\n }\n\n switch ($l) {\n case 'sunday': $l_name = $lang_days[0]; break;\n case 'monday': $l_name = $lang_days[1]; break;\n case 'tuesday': $l_name = $lang_days[2]; break;\n case 'wednesday': $l_name = $lang_days[3]; break;\n case 'thursday': $l_name = $lang_days[4]; break;\n case 'friday': $l_name = $lang_days[5]; break;\n case 'saturday': $l_name = $lang_days[6]; break;\n default: $l_name = \"\"; break;\n }\n return $d . \" \" . $m_name . \"(\" . $l_name . \")\";\n }", "function format($type, $row) {\n\n $row->RemittanceSequence = $this->transaction->RemittanceSequence;\n $row->CustomerOrgNumber = $this->transaction->CustomerOrgNumber;\n $row->NumTransactions = $this->transaction->NumTransactions;\n $row->TotalAmount = $this->transaction->TotalAmount;\n $row->Database = $this->transaction->Database;\n $row->Date = $this->transaction->Date;\n $row->VersionSoftware = $this->transaction->VersionSoftware;\n\n $this->transaction->RemittanceDaySequence++; #Starts at zero each day\n $this->transaction->NumRecords++; #Starts at zero each file\n \n $row->RemittanceDaySequence = $this->transaction->RemittanceDaySequence;\n $row->NumRecords = $this->transaction->NumRecords;\n\n #$html = \"$type\";\n foreach($this->formatH[$type] as $field => $column) {\n if($field != 'name') {\n #print_r($row);\n #print \"$field - field: \" . $column['field'] . \"<br>\\n\";\n\n $value = '';\n if(isset($column['field']) && $row->{$column['field']}) {\n $value = $row->{$column['field']};\n\n } elseif(isset($column['value']) && strlen($column['value'])) {\n $value = $column['value'];\n\n } else {\n $value = ' ';\n }\n $length = $column['stop'] - $column['start'] + 1;\n if($column['type'] == 'int' || $column['type'] == 'amount') {\n $pad = '0';\n $align = STR_PAD_LEFT;\n } elseif($column['type'] == 'text' || $column['type'] == 'date' || $column['type'] == 'bankaccount' || $column['type'] == 'monthdate') {\n $pad = ' ';\n $align = STR_PAD_RIGHT;\n } else {\n $pad = '*'; #Not defined \n $align = STR_PAD_LEFT;\n }\n $value = $this->{$column['type']}($value);\n $value = substr($value, 0, $length); #husk Œ klippe de totale datene til max lenge\n \n $html .= str_pad($value, $length, $pad, $align);\n #print \"field: $field: length: $length, value: <b>\" . str_pad($value, $length, $pad, $align) . \"</b>, pad: $pad, field: \" . $column['field'] . \", type: \" . $column['type'] . \"<br>\\n\";\n\n }\n }\n $html .= \"\\n\";\n return $html;\n }", "function DateToIndo($date) {\n // variabel BulanIndo merupakan variabel array yang menyimpan nama-nama bulan\n\t\t$BulanIndo = array(\"Januari\", \"Februari\", \"Maret\",\n\t\t\t\t\t\t \"April\", \"Mei\", \"Juni\",\n\t\t\t\t\t\t \"Juli\", \"Agustus\", \"September\",\n\t\t\t\t\t\t \"Oktober\", \"November\", \"Desember\");\n\t\n\t\t$tahun = substr($date, 0, 4); // memisahkan format tahun menggunakan substring\n\t\t$bulan = substr($date, 5, 2); // memisahkan format bulan menggunakan substring\n\t\t$tgl = substr($date, 8, 2); // memisahkan format tanggal menggunakan substring\n\t\t\n\t\t$result = $tgl . \" \" . $BulanIndo[(int)$bulan-1] . \" \". $tahun;\n\t\treturn($result);\n}", "function formatDate($date){\r\n\t\t\t\t$dateObject = date_create($date);\r\n\t\t\t\treturn date_format($dateObject, \"j F Y\");\r\n\t\t\t}", "function fetch_datebetwine_paiement_filtre()\n\t{\n\t $output = '';\n\t $query = '';\n\t $total;\n\t $jour1 =$this->input->post('jour1');\n\t $jour2 =$this->input->post('jour2');\n\t if($jour1 > $jour2)\n\t {\n\t $data = $this->crud_model->fetch_data_paiement_date($jour2, $jour1);\n\t $total = $this->crud_model->fetch_sum_data_paiement_date($jour2, $jour1);\n\t }\n\t else{\n\t $data = $this->crud_model->fetch_data_paiement_date($jour1, $jour2);\n\t $total = $this->crud_model->fetch_sum_data_paiement_date($jour1, $jour2);\n\t }\n\n\t $money = $this->crud_model->fetch_data_paiement_date_montant($jour1, $jour2);\n\t \n\n\t $pdf_link ='<a class=\"btn btn-outline-warning pull-right mt-2 mb-2\" \n\t href=\"'.base_url().'admin/pdf_liste_facture/'.$jour1.'/'.$jour2.' \"><i class=\"fa fa-print mr-1\"></i> PDF</a>';\n\t \n\t $output .= '\n\n\t <div align=\"right\" class=\"pull-right mb-2\">\n\t \n\t '.$pdf_link.'\n\t </div>\n\t \n\t <table class=\"table-striped table-bordered nk-tb-list nk-tb-ulist dataTable no-footer\" data-auto-responsive=\"true\" id=\"user_data\" role=\"grid\" aria-describedby=\"DataTables_Table_1_info\">\n\t <theader>\n\t <tr>\n\t <th width=\"5%\">Selectionner</th>\n\t <th width=\"5%\">Avatar</th>\n\t <th width=\"20%\">Nom complet</th>\n\t <th width=\"15%\">Rencontre</th>\n\t <th width=\"10%\">Statut</th>\n\t <th width=\"20%\">Jour</th>\n\t <th width=\"5%\">Heure</th>\n\t <th width=\"10%\">Place</th>\n\n\t <th width=\"10%\">Imprimer</th>\n\t \n\t \n\t </tr>\n\t <theader>\n\t <tbody>\n\t ';\n\t foreach($data->result() as $row)\n\t {\n\t if ($row->etat_reservation ==0) {\n\n\n\t $link = '<a href=\"tel:'.$row->telephone.'\" class=\"text-primary\"><i class=\"fa fa-phone\"></i></a>\n\t <input type=\"checkbox\" name=\"tel\" value=\"'.$row->telephone.'\" class=\"tels mr-1 delete_checkbox\">\n\t &nbsp;\n\t <a href=\"javascript:void(0);\" idreservation=\"'.$row->idreservation.'\" class=\"btn btn-dark btn-sm btn-circle valider\"><i class=\"fa fa-check text-white\"></i> </a>\n\t \n\t ';\n\n\t $etat_reservation = '\n\t \n\t <a type=\"button\" href=\"'.base_url().'admin/pdf_billet/'.$row->codeReservation.'\" class=\"btn btn-primary btn-circle btn-sm print\"><i class=\"fa fa-print\"></i></a>\n\t ';\n\t }\n\t else{\n\t $etat_reservation = '\n\t \n\t <a type=\"button\" href=\"'.base_url().'admin/pdf_billet/'.$row->codeReservation.'\" class=\"btn btn-primary btn-circle btn-sm print\"><i class=\"fa fa-print\"></i></a>\n\t ';\n\n\t $link = '<a href=\"tel:'.$row->telephone.'\" class=\"text-primary\"><i class=\"fa fa-phone\"></i></a>\n\t <input type=\"checkbox\" name=\"tel\" value=\"'.$row->telephone.'\" class=\"tels mr-1 delete_checkbox\">\n\t &nbsp;\n\t <a href=\"javascript:void(0);\" idreservation=\"'.$row->idreservation.'\" class=\"btn btn-success btn-circle btn-sm\"><i class=\"fa fa-check text-white\"></i></a>\n\t ';\n\t }\n\t \n\n\t $etat ='<span class=\"badge badge-warning\"><i class=\"fa fa-user\"></i> Client </span>';\n\n\n\t $email = '<a href=\"mailto:'.$row->email.'\" class=\"text-primary\"><i class=\"fa fa-google mr-1\"></i> '.$row->email.'</a>\n\t \n\t ';\n\n\t \n\t $output .= '\n\t <tr>\n\t <td>'.$link.'</td>\n\t <td><img src=\"'.base_url().'upload/photo/'.$row->image.'\" class=\"table-user-thumb\" style=\"border-radius: 50%; width: 50px; height: 30px;\" /></td>\n\n\t <td>'.substr($row->first_name.' '.$row->last_name, 0,20).'...</td>\n\n\t <td>'.$row->nomMatch.'</td>\n\t <td>'.$etat.'</td>\n\t <td>'.nl2br(substr(date(DATE_RFC822, strtotime($row->jour)), 0, 23)).'</td>\n\t <td>'.$row->heure.'</td>\n\n\t <td>'.$row->nomStade.' <br>'.$row->nomPlace.'</td>\n\n\t <td>'.$etat_reservation.'</td>\n\t \n\t </tr>\n\t ';\n\n\t }\n\n\t $output .='\n\t <tr>\n\t <td colspan=\"8\">Montant total </td>\n\t <td><h4>'.$total.'$</h4></td>\n\t \n\t </tr>\n\t \n\t ';\n\t $output .= '\n\t <tbody>\n\t <tfooter>\n\t <tr>\n\t <th width=\"5%\">Selectionner</th>\n\t <th width=\"5%\">Avatar</th>\n\t <th width=\"20%\">Nom complet</th>\n\t <th width=\"15%\">Rencontre</th>\n\t <th width=\"10%\">Statut</th>\n\t <th width=\"20%\">Jour</th>\n\t <th width=\"5%\">Heure</th>\n\t <th width=\"10%\">Place</th>\n\n\t <th width=\"10%\">Action</th>\n\t \n\t \n\t </tr>\n\t <tfooter>\n\t </table>';\n\t echo $output;\n\t}", "function formatDateDBversLocal($date, $type = 2)\n {\n /*\n * Suppression des espaces, tabulations et autres caracteres indesirables presents en debut et fin de chaine\n */\n $date = ltrim($date);\n $date = rtrim($date);\n $temp = @explode(\" \", $date);\n $date = $temp[0];\n $heure = $temp[1];\n $temp = @explode($this->separateurDB, $date);\n /*\n * Reformatage de la date\n */\n\n switch ($this->formatDate) {\n case 0:\n $date = $temp[0] . $this->separateurLocal . $temp[1] . $this->separateurLocal . $temp[2];\n break;\n case 1:\n $date = $temp[2] . $this->separateurLocal . $temp[1] . $this->separateurLocal . $temp[0];\n break;\n case 2:\n $date = $temp[1] . $this->separateurLocal . $temp[2] . $this->separateurLocal . $temp[0];\n break;\n }\n\n if ($type == 3) {\n /*\n * Reincorporation de l'heure\n */\n $date .= \" \" . $heure;\n }\n return ($date);\n }", "function _field_date($fval) \n {\n // if $fval is not already split up, we assume std. date string // YYYY-MM-DD\n if (is_array($fval)) {\n $f_date = &$fval;\n }\n elseif ($fval) {\n $f_date = split('-', $fval, 3);\n }\n else {\n $f_date = array('','','');\n }\n\n $res = \"<span id=\\\"\" . $this->name . \"\\\">\";\n\n for ($i=1; $i<32; $i++) { $days[sprintf(\"%02d\", $i)] = $i; }\n\n $months_abbr = array(\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\");\n for ($i=1; $i<13; $i++) { $months[sprintf(\"%02d\", $i)] = $months_abbr[$i-1]; }\n\n $fmonths = new formex_field($this->fex, $this->name.'_month', array('Months', 'select', $months));\n $res .= $fmonths->get_html($f_date[1]);\n\n if (isset($this->attribs) and !isset($this->attribs['suppress_day'])) {\n $fdays = new formex_field($this->fex, $this->name.'_day', array('Dates', 'select', $days));\n $res .= $fdays->get_html($f_date[2]);\n }\n\n $year_range = null;\n $this_year = date('Y');\n if (isset($this->opts) and is_numeric($this->opts)) { // int val will be this year +\n $year_range = $this->_array_stringify(range($this_year, $this_year+$this->opts));\n }\n elseif (isset($this->attribs) && is_array($this->attribs)) { // exact range specified\n $begin = (isset($this->attribs['year_begin']))? $this->attribs['year_begin'] : $this_year;\n $end = $this_year;\n if (isset($this->attribs['year_end'])) {\n if (substr($this->attribs['year_end'], 0, 4) == 'now+') {\n $end = $this_year + intval(substr($this->attribs['year_end'], 4));\n }\n elseif (substr($this->attribs['year_end'], 0, 4) == 'now-') {\n $end = $this_year - intval(substr($this->attribs['year_end'], 4));\n }\n elseif (substr($this->attribs['year_end'], 0, 1) == '+') {\n $end = $begin + intval(substr($this->attribs['year_end'], 1));\n }\n elseif (substr($this->attribs['year_end'], 0, 1) == '-') {\n $end = $begin - intval(substr($this->attribs['year_end'], 1));\n }\n else {\n $end = intval($this->attribs['year_end']);\n }\n }\n\n if ($begin != $end) {\n $year_range = $this->_array_stringify(range($begin, $end));\n }\n }\n\n if ($year_range) { // dropdown w/ that range\n $fyears = new formex_field($this->fex, $this->name.'_year', array('Years', 'select', $year_range));\n }\n else { // 4-space text field\n $fyears = new formex_field($this->fex, $this->name.'_year', array('Years', 'text', null, array('size'=>4)));\n }\n $res .= $fyears->get_html($f_date[0]);\n unset($fmonths, $fdays, $fyears);\n $res .= \"</span>\";\n\n return $res;\n }", "public function getDados()\n {\n $aLinhas = array();\n\n /**\n * montamos as datas, e processamos o balancete de verificação\n */\n $oDaoPeriodo = db_utils::getDao(\"periodo\");\n $sSqlDadosPeriodo = $oDaoPeriodo->sql_query_file($this->iCodigoPeriodo);\n $rsPeriodo = db_query($sSqlDadosPeriodo);\n $oDadosPerido = db_utils::fieldsMemory($rsPeriodo, 0);\n $sDataInicial = \"{$this->iAnoUsu}-01-01\";\n $iUltimoDiaMes = cal_days_in_month(CAL_GREGORIAN, $oDadosPerido->o114_mesfinal, $this->iAnoUsu);\n $sDataFinal = \"{$this->iAnoUsu}-{$oDadosPerido->o114_mesfinal}-{$iUltimoDiaMes}\";\n $sWherePlano = \" c61_instit in ({$this->getInstituicoes()}) \";\n /**\n * processa o balancete de verificação\n */\n $rsPlano = db_planocontassaldo_matriz($this->iAnoUsu,\n $sDataInicial,\n $sDataFinal,\n false,\n $sWherePlano,\n '',\n 'true',\n 'true');\n\n $iTotalLinhasPlano = pg_num_rows($rsPlano);\n /**\n * percorremos a slinhas cadastradas no relatorio, e adicionamos os valores cadastrados manualmente.\n */\n $aLinhasRelatorio = $this->oRelatorioLegal->getLinhasCompleto();\n for ($iLinha = 1; $iLinha <= count($aLinhasRelatorio); $iLinha++) {\n\n $aLinhasRelatorio[$iLinha]->setPeriodo($this->iCodigoPeriodo);\n $aColunasRelatorio = $aLinhasRelatorio[$iLinha]->getCols($this->iCodigoPeriodo);\n $aColunaslinha = array();\n $oLinha = new stdClass();\n $oLinha->totalizar = $aLinhasRelatorio[$iLinha]->isTotalizador();\n $oLinha->descricao = $aLinhasRelatorio[$iLinha]->getDescricaoLinha();\n $oLinha->colunas = $aColunasRelatorio;\n $oLinha->nivellinha = $aLinhasRelatorio[$iLinha]->getNivel();\n foreach ($aColunasRelatorio as $oColuna) {\n\n $oLinha->{$oColuna->o115_nomecoluna} = 0;\n if ( !$aLinhasRelatorio[$iLinha]->isTotalizador() ) {\n $oColuna->o116_formula = '';\n }\n }\n\n if (!$aLinhasRelatorio[$iLinha]->isTotalizador()) {\n\n $aValoresColunasLinhas = $aLinhasRelatorio[$iLinha]->getValoresColunas(null, null, $this->getInstituicoes(),\n $this->iAnoUsu);\n\n $aParametros = $aLinhasRelatorio[$iLinha]->getParametros($this->iAnoUsu, $this->getInstituicoes());\n foreach($aValoresColunasLinhas as $oValor) {\n foreach ($oValor->colunas as $oColuna) {\n $oLinha->{$oColuna->o115_nomecoluna} += $oColuna->o117_valor;\n }\n }\n\n /**\n * verificamos se a a conta cadastrada existe no balancete, e somamos o valor encontrado na linha\n */\n for ($i = 0; $i < $iTotalLinhasPlano; $i++) {\n\n $oResultado = db_utils::fieldsMemory($rsPlano, $i);\n\n\n $oParametro = $aParametros;\n\n foreach ($oParametro->contas as $oConta) {\n\n $oVerificacao = $aLinhasRelatorio[$iLinha]->match($oConta, $oParametro->orcamento, $oResultado, 3);\n\n if ($oVerificacao->match) {\n\n $this->buscarInscricaoEBaixa($oResultado, $iLinha, $sDataInicial, $sDataFinal);\n\n if ( $oVerificacao->exclusao ) {\n\n $oResultado->saldo_anterior *= -1;\n $oResultado->saldo_anterior_debito *= -1;\n $oResultado->saldo_anterior_credito *= -1;\n $oResultado->saldo_final *= -1;\n }\n\n $oLinha->sd_ex_ant += $oResultado->saldo_anterior;\n $oLinha->inscricao += $oResultado->saldo_anterior_credito;\n $oLinha->baixa += $oResultado->saldo_anterior_debito;\n $oLinha->sd_ex_seg += $oResultado->saldo_final;\n }\n }\n }\n }\n $aLinhas[$iLinha] = $oLinha;\n }\n\n unset($aLinhasRelatorio);\n\n /**\n * calcula os totalizadores do relatório, aplicando as formulas.\n */\n foreach ($aLinhas as $oLinha) {\n\n if ($oLinha->totalizar) {\n\n foreach ($oLinha->colunas as $iColuna => $oColuna) {\n\n if (trim($oColuna->o116_formula) != \"\") {\n\n $sFormulaOriginal = ($oColuna->o116_formula);\n $sFormula = $this->oRelatorioLegal->parseFormula('aLinhas', $sFormulaOriginal, $iColuna, $aLinhas);\n $evaluate = \"\\$oLinha->{$oColuna->o115_nomecoluna} = {$sFormula};\";\n ob_start();\n eval($evaluate);\n $sRetorno = ob_get_contents();\n ob_clean();\n if (strpos(strtolower($sRetorno), \"parse error\") > 0 || strpos(strtolower($sRetorno), \"undefined\" > 0)) {\n $sMsg = \"Linha {$iLinha} com erro no cadastro da formula<br>{$oColuna->o116_formula}\";\n throw new Exception($sMsg);\n\n }\n }\n }\n }\n }\n\n return $aLinhas;\n }", "public function display($File){\n\n\tdate_default_timezone_set('America/Detroit');\n\t$list='<tr>';\n\n\t/*foreach($File as $row)\n\t{\n\t\t//if($row['date_time']>=$_POST['begDate'] && $row['date_Time']<=$_POST['endDate']){\n\t\t\t$list .= \"<li>Date: {$row['date_time']} {$row['notes']} </li>\";\n\t\t\t$first_date=mktime(0,0,0,intval(date(\"m\")),1);\n\t\t\t$next_month_timestamp=strtotime(\"+1 month\");\n\t\t\t$firstOf_next=mktime(0,0,0,intval(date(\"m\",$next_month_timestamp)),1,intval(date(\"y\",$next_month_timestamp)));\n\t\t\n\t\t\t//$timestamp =date(\"Y-m-d\", strtotime('-2 months'));\n\t\t//$DateTime=getdate($timestamp);\n\t\t$list=\"<tr><td>Note taken on $firstOf_next\n\t\t</td><td> notes:{$row['notes']}</td></tr>\";\n\t*/\n\t//while($row = $File->fetch_array()){\n\t\tforeach($File as $row){\n\t\t$list='<tr>';\n\t\t $list .= \"<td>Date: {$row['date_time']} </td><td>{$row['notes']} </td>\";\t\n\t\t\n\t\t $timestamp =date(\"Y-m-d\", strtotime($row['date_time']));\n\t\t$start_date=strtotime('2021-11-01');\n\t\t $end_date=strtotime('2021-11-31');\n \n\t\t if($timestamp<$start_date && $timestamp>=$end_date){\n\t\t\t die('Date doesnot fall within valid range');\n\t\t \n\t\t }\n\n\t\t\n\t\techo \"<tr><td>Date: $timestamp\n\t\t</td><td> notes: {$row['notes']}</td></tr>\";\n\t\t\t\n\t\t\n\t\t\t$list='</tr>';\n\t\n}\n\n//$list='</tr>';\necho $list;\n\n}", "function formatTeamMemberRow($row, $nbData, $r, $functionData) {\n $row['date'] = nkDate($row['date'], true);\n\n return $row;\n}", "public function findSaneparDate(){\n $data = $this->sanepar->findSaneparDate();\n foreach($data as $dt){\n $data[$dt] = substr($dt,0,4) . '/' . substr($dt,4,5);\n }\n return $data;\n }", "protected function beforeValidate ()\n {\n //$this->tglrevisimodul = date ('Y-m-d', strtotime($this->tglrevisimodul));\n $format = new MyFormatter();\n //$this->tglrevisimodul = $format->formatDateTimeForDb($this->tglrevisimodul);\n foreach($this->metadata->tableSchema->columns as $columnName => $column){\n if ($column->dbType == 'date')\n {\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }\n else if ( $column->dbType == 'timestamp without time zone')\n {\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }\n }\n\n return parent::beforeValidate ();\n }", "public function getDates()\n {\n $this->getFields()->each(function ($field) {\n if ($field instanceof FieldTypeDateInterface) {\n $this->dates[] = $field->getDBKey();\n }\n });\n\n if ($this->hasField(static::CREATED_AT) and $this->hasField(static::UPDATED_AT)) {\n $this->timestamps = true;\n }\n\n return parent::getDates();\n }", "function Feriados1($ano, $posicao) {\n $dia = 86400;\n $datas = array();\n $datas['pascoa'] = easter_date($ano);\n $datas['sexta_santa'] = $datas['pascoa'] - (2 * $dia);\n $datas['carnaval'] = $datas['pascoa'] - (47 * $dia);\n $datas['corpus_cristi'] = $datas['pascoa'] + (60 * $dia);\n $feriados = array(\n '01/01',\n '02/02', // Navegantes\n date('d/m', $datas['carnaval']),\n date('d/m', $datas['sexta_santa']),\n date('d/m', $datas['pascoa']),\n '21/04',\n '01/05',\n date('d/m', $datas['corpus_cristi']),\n '07/09',\n '20/09', // Revolução Farroupilha \\m/\n '12/10',\n '02/11',\n '15/11',\n '25/12',\n );\n\n return $feriados[$posicao] . \"/\" . $ano;\n}", "function getEvents($date, $groupe){\n\t/*La date nous est donnée au format JJ-MM-AAAA*/\n\t$ex_date = explode('-', $date);\n\t$dateCherchee = new DateTime($ex_date[2].'-'.$ex_date[1].'-'.$ex_date[0]);\n\t\n try{\n\t\t$bdd = new PDO('mysql:host=localhost;dbname=trip_manager;charset=utf8', 'root', '');\n\t}catch (Exception $e){\n\t\tdie('Erreur : ' . $e->getMessage());\n\t}\n\t\n $eventListHTML = '';\n\n $result = $bdd->query(\"SELECT * FROM events WHERE groupe = '\".$groupe.\"' AND status = 1\");\n \n while($donnees = $result->fetch()){\n\t\tif($donnees['date'] !== ''){\n\t\t\t$ranges = explode('+', $donnees['date']);\n\t\t\tfor($i=0; $i<count($ranges); $i++){\n\t\t\t\t$dates = explode(';', $ranges[$i]);\n\t\t\t\t$date_debut = $dates[0];\n\t\t\t\t$date_fin = $dates[1];\n\t\t\t\t\n\t\t\t\t$start_date = new DateTime($date_debut);\n\t\t\t\t\n\t\t\t\t$end_date = new DateTime($date_fin);\n\t\t\t\t\n\t\t\t\tif(($start_date<=$dateCherchee) && ($end_date>= $dateCherchee)){\n\t\t\t\t\t$membre_id = str_replace(\"Disponibilité de \", \"\", $donnees['title']);\n\t\t\t\t\t\n\t\t\t\t\t$couleur = getColorS($groupe,$membre_id);\n\t\t\t\t\t\n\t\t\t\t\t$eventListHTML .= '<span class=\"color\" style=\"background-color: '.$couleur.';\"></span>';\n\t\t\t\t\tbreak 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n \n return $eventListHTML;\n}", "function makeEndPeriodTable()\n{\n global $db;\n\n //id poslednych volieb\n $id_volbyMax = $db->query(\"SELECT MAX(id_volby) as maxID FROM vlady;\")->fetch(PDO::FETCH_ASSOC)[maxID];\n\n //posledne 2 datumy volieb => volebne obdobie od-do\n $lastDates = getLastDates();\n\n //posledne volebne obdobie\n $lastPeriod = getPeriod($lastDates);\n $newPeriod = explode(' - ',$lastPeriod)[1] . \" +\";\n\n //vyber vlad v poslednom volebnom obdobi\n $query = \"SELECT\n vlady.datumOD, vlady.datumDO,vlady.id_volby\n FROM vlady \n INNER JOIN volby ON vlady.id_volby = volby.id\n WHERE vlady.id_volby in ({$id_volbyMax},{$id_volbyMax}-1)\";\n\n $stmt = $db->query($query);\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n echo \"<h2>Vlády v posledných volebných obdobiach: </h2>\n <table id='table_id' class='display' style='width:60%'>\n <thead>\n <tr>\n <th>Obdobie</th>\n <th>Od</th>\n <th>Do</th>\n </tr>\n <tr id='filters'>\n <th>Obdobie</th>\n <th>Od</th>\n <th>Do</th>\n </tr>\n </thead>\n <tbody>\";\n\n foreach ($results as $result) {\n\n echo \"<tr class='table-item'>\";\n if ($result['id_volby'] == $id_volbyMax){\n echo \"<td>{$newPeriod}</td>\";\n }\n else {\n echo \"<td>{$lastPeriod}</td>\";\n }\n echo \"<td>{$result['datumOD']}</td>\";\n echo \"<td>{$result['datumDO']}</td>\";\n echo \"</tr>\";\n }\n\n echo \"</tbody></table>\";\n}", "function datesArray() \n {\n // var's Defintion:\n $_SESSION['err_msg'] =\"\"; // Clear error messgae\n $host\t\t =\"127.0.0.1\"; \t// Host name\n $db_usr\t\t \t=\"root\"; \t // Mysql username\n $db_pwd\t\t \t=\"1q2w3e4r\"; \t// Mysql password\n $db_name\t \t=\"project\"; \t// Database name\n $tbl_name\t \t\t=\"Dates\"; \t // Table name\t\n if (isset($_SESSION['username'])) \n { \n // Connect to the database\n $dbc = mysqli_connect($host, $db_usr, $db_pwd, $db_name) or trigger_error(\"DB Connection fail\",E_USER_WARNING);\n if($DEBUG) {echo \"<p>Connected to:\" . $host . \" -> \" . $db_name . \" </p><br />\"; }\n $query = \"SELECT * FROM $tbl_name\";\n $data = mysqli_query($dbc, $query) or trigger_error(\"DB Read fail\",E_USER_WARNING);\n if($DEBUG) {echo \"<p>Sending query: \" . $query . \" </p><br />\"; }\n //get number of rows returned\n $num_datas = $data->num_rows; \n if( $num_datas > 0)//will not make a table without records\n { \n $options = array( ); \n $cntr = 0 ; \n while( $row = $data->fetch_assoc() ) //loop to show each records\n { //extract row -- this will make a $row['firstname'] to just a variable $firstname only\n extract($row);\n $tmp = \" {$Cal_Date} {$At_time}\"; \n $options[$cntr++] = $tmp; \n }\t\t\t\t \n } else { echo \"No records found.\"; }\n // Cleanup\n $data->free();\n $dbc->close(); \n } else { \n $_SESSION['err_msg'] = 'Sorry, you must be loged in to complete this action.'; \n if(!$DEBUG) {header(\"location: ../_php_fail.php\");}\n }\n if($DEBUG){print_r($options);}\n return $options; \n }", "function nl_date_style( $sql_date ) {\n\t\n\t$timestamp = strtotime($sql_date); //UNIX TIMESTAMP OF SQL DATE\n\t$now = time(); //UNIX TIMESTAMP OF NOW\n\t\n\t\n\t//sees if the thing is on TODAY's date\n\t$format_today_compare = strftime(\"%b %e\", $now);\n\t$format_date_compare = strftime(\"%b %e\", $timestamp);\n\t\n\t$tomorrow = mktime(0,0,0,date(\"m\"),date(\"d\")+1,date(\"Y\"));\n\t\n\t$formatteddate = \"soon\";\n\t\n\tif ($format_today_compare == $format_date_compare) { //IS IT TODAY\n\t\t$formatteddate = \"tonight\";\n\t}\n\telse if (strftime (\"%b %e\", $tomorrow) == strftime (\"%b %e\", $timestamp)) { //IS IT TOMORROW\n\n\t} else if ( $timestamp - $now < 432000 && $timestamp - $now > 0) { //IS IT THIS WEEK?\n\t\t//then it's within a week\n\t} else {\n\t\t//then it's over a week\n\t}\n\t\n\treturn $formatteddate;\n\t\n}", "function conv_date($f, $date, $sep = '/') {\n $fmt = '';\n if ($f == '1') { // normal to mysql\n $date = explode('/', $date);\n $fmt = (count($date) == 3) ? $date[2] . '-' . $date[1] . '-' . $date[0] : '';\n } else { // mysql to normal\n $date = explode(' ', $date);\n $date = explode('-', $date[0]);\n $fmt = (count($date) == 3) ? $date[2] . $sep . $date[1] . $sep . $date[0] : '';\n }\n return $fmt;\n}", "function format_data_in($string_date)\n{\n // $formatted_date = \"DATE_FORMAT($db_date_column, '%a, %e %b %Y ')\";\n $temp = strtotime($string_date);\n $date = date('Y-m-d', $temp);\n $date = DateTime::createFromFormat('D, j M Y', $temp)->format('Y-m-d');\n print_r($date);\n return $date;\n}", "public static function trataData($data,$formato=\"completo\")\n\t{\n\t\t//$date1 = new Zend_Date('2013-03-11 02:26:51', null, 'pt_br');\r\n\t\tif($formato == \"completo\"){\n\t\t\t$date = new Zend_Date($data, null, 'pt_br');\r\n\t\t\treturn $date;\n\t\t}\n\t\telse if($formato == \"normal\"){\n\t\t\t$date = new Zend_Date($data);\r\n\t\t\treturn $date->get('dd/MM/YYYY');\n\t\t}\n\t\telse if($formato == \"portal\"){\r\n\t\t\t$date = new Zend_Date($data);\r\n\t\t\treturn $date->get('dd'). \" \". ucfirst(substr($date->get('MMMM'), 0, 3)) .\" \".$date->get('YYYY');\r\n\t\t}\n\t}", "function getTable($date)\n{\n list($year, $month) = explode(\"-\", $date);\n //echo $year + \", \";\n //echo $month + \", \";\n //echo $date + \", \";\n\n\n $days_in_month = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n //echo \", \";\n\n // Creating connection\n include('DB_config.php');\n $conn = new mysqli($servername, $username, $password, $db_name);\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n echo '<script>console.log(\"[MySQL] Database connected successfully\")</script>';\n\n mysqli_set_charset($conn, \"utf8\");\n $sql = \"SELECT ID, NAME FROM users ORDER BY NAME\";\n $rs = $conn->query($sql);\n\n if ($rs->num_rows > 0) {\n $start = 0;\n $end = 0;\n $table = '<table id=\"dochadzka\">';\n $table .= '<col span=\"1\" class=\"wide\">';\n // first row\n $table .= '<tr><th>Meno</th>';\n $i = 1;\n while ($i != $days_in_month + 1) {\n if (isWeekend($year . \"-\" . $month . \"-\" . $i)) {\n $table .= '<th class = \"weekend\">' . $i++ . '.</th>';\n } else {\n $table .= '<th>' . $i++ . '.</th>';\n }\n\n }\n $table .= '</tr>';\n // end first row\n\n while ($row = $rs->fetch_assoc()) {\n //$table.='<option value=\"'.$row['id'].'\">'.$row['firstname'].' ' .$row['lastname'].'</option>';\n $table .= '<tr id=\"' . $row['ID'] . '\"><td id=\"name\">' . $row['NAME'] . '</td>';\n $user_id = $row['ID'];\n\n $sql = \"SELECT start_date,end_date,status_id FROM evidence WHERE user_id=\" . $user_id . \" AND MONTH(start_date)=\" . $month . \" AND YEAR(start_date)=\" . $year . \" ORDER BY id,start_date\";\n $rs1 = $conn->query($sql);\n $num_of_rows = $rs1->num_rows;\n if ($num_of_rows > 0) {\n $i = 1;\n\n $table_row = array();\n while ($i++ <= $days_in_month + 1) {\n array_push($table_row, \"<td></td>\");\n }\n\n while ($result = $rs1->fetch_assoc()) {\n\n\n list($year, $month, $day) = array_pad(explode('-', $result['start_date']), 3, null);\n $start = (int)$day;\n //echo $start.\" -> \";\n list($year, $month, $day) = array_pad(explode('-', $result['end_date']), 3, null);\n $end = (int)$day;\n //echo $end.\"<br />\";\n\n $i = $start;\n while ($end >= $i) {\n $table_row[$i++] = \"<td id=state\" . $result['status_id'] . \"></td>\";\n }\n /*\n if($num_of_rows > 1 && $j == $num_of_rows && $i < $days_in_month) {\n echo $i.\"<br />\";\n while($i++ != $days_in_month+1) {\n $table.='<th></th>';\n }\n }\n */\n\n\n //$start = 0;\n //$end = 0;\n }\n $i = 0;\n while ($i++ < $days_in_month) {\n $table .= $table_row[$i];\n }\n } else {\n $result = null;\n $i = 1;\n while ($i++ != $days_in_month + 1) {\n $table .= '<td></td>';\n }\n }\n\n }\n\n\n $table .= '</table>';\n echo $table;\n } else {\n echo \"0 results\";\n }\n\n}", "protected function beforeValidate ()\n {\n //$this->tglrevisimodul = date ('Y-m-d', strtotime($this->tglrevisimodul));\n $format = new MyFormatter();\n //$this->tglrevisimodul = $format->formatDateTimeForDb($this->tglrevisimodul);\n foreach($this->metadata->tableSchema->columns as $columnName => $column){\n if ($column->dbType == 'date')\n {\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }\n else if ($column->dbType == 'timestamp without time zone')\n {\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n } \n }\n\n return parent::beforeValidate ();\n }", "function nl_date( $sql_date ) {\n\t\n\t$timestamp = strtotime($sql_date); //UNIX TIMESTAMP OF SQL DATE\n\t$now = time(); //UNIX TIMESTAMP OF NOW\n\t\n\t\n\t//sees if the thing is on TODAY's date\n\t$format_today_compare = strftime(\"%b %e\", $now);\n\t$format_date_compare = strftime(\"%b %e\", $timestamp);\n\t\n\t$tomorrow = mktime(0,0,0,date(\"m\"),date(\"d\")+1,date(\"Y\"));\n\t\n\tif ($format_today_compare == $format_date_compare) { //IS IT TODAY\n\t\t$formatteddate = \"TONIGHT\";\n\t}\n\telse if (strftime (\"%b %e\", $tomorrow) == strftime (\"%b %e\", $timestamp)) { //IS IT TOMORROW\n\t\t$formatteddate = \"TOMORROW\";\n\t} else if ( $timestamp - $now < 432000 && $timestamp - $now > 0) { //IS IT THIS WEEK?\n\t\t//then it's within a week\n\t\t$format = \"%A\";\n\t\t$formatteddate = strftime ($format, $timestamp);\n\t} else {\n\t\t//then it's over a week\n\t\t$format = \"%a, %b %e\";\n\t\t$formatteddate = strftime ($format, $timestamp);\n\t}\n\t\n\treturn strtoupper($formatteddate);\n\t\n}", "function process_date(&$list, $field, $add_age = false)\n{\n\t$today = strtotime('2018-09-14');\t// RAR was 'today'\n\tforeach ($list as $index => $row) {\n\t\t$d = $row[$field];\n\t\tif (empty ($d) || ($d == '0000-00-00'))\n\t\t\t$d = '';\n\t\telse\n\t\t\t$d = date ('j M y', strtotime ($d));\n\t\t$list[$index][$field] = $d;\n\n\t\tif ($add_age) {\n\t\t\tif (empty($d)) {\n\t\t\t\t$a = '';\n\t\t\t\t$m = '';\n\t\t\t} else {\n\t\t\t\t$a = floor (($today - strtotime($d)) / 86400);\n\t\t\t\t$m = sprintf ('%.1f', $a / 30.44);\n\t\t\t}\n\n\t\t\t$list[$index]['age'] = $a;\n\t\t\t$list[$index]['months'] = $m;\n\t\t}\n\t}\n\n}", "function translate_date_to_ro($date_eng)\n{\n $days_of_week = ['Mon' => 'Luni,', 'Tue' => 'Marti,', 'Wed' => 'Miercuri,', 'Thu' => 'Joi,', 'Fri' => 'Vineri,', 'Sat' => 'Sambata,', 'Sun' => 'Duminica,'];\n $months_of_year = ['01' => 'Ian', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'Mai', '06' => 'Iun', '07' => 'Iul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Noi', '12' => 'Dec'];\n $date_eng = explode(\" \", $date_eng);\n $date_eng[0] = $days_of_week[$date_eng[0]];\n $date_eng[2] = $months_of_year[$date_eng[2]];\n $date_ro = implode(\" \", $date_eng);\n//print_r($date_ro);\n return $date_ro;\n}", "private function Write_Monthly_Table() {\n\t\t$top = 445 + self::VERT_MARGIN;\n\t\t$left = self::HORZ_MARGIN;\n\t\t$label_width = 160;\n\t\t$table_left = $left + $label_width;\n\t\t$cell_width = 55;\n\t\t$row_height = 8.5;\n\t\t\n\t\t/**\n\t\t * Build label backgrounds\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($left, $top, $label_width + ($cell_width * 1), $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t/**\n\t\t * Add the strokes\n\t\t */\n\t\t$this->Rect_TL($table_left, $top, $cell_width, $row_height);\n\t//\t$this->Rect_TL($table_left + ($cell_width * 1), $top, $cell_width, $row_height);\n\t//\t$this->Rect_TL($table_left + ($cell_width * 2), $top, $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t/**\n\t\t * Add the labels\n\t\t */\n\t\t$this->Text_TL(\"CURRENT PERIOD\",\n\t\t\t$left, $top, \n\t\t\t$label_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['LEFT']}\");\n\t\t\n\t\t$this->Text_TL(\"PERIOD\",\n\t\t\t$table_left, $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");\n\t\t\n\t\t/*$this->Text_TL(\"WEEK\",\n\t\t\t$table_left + ($cell_width * 1), $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");\n\t\t\n\t\t$this->Text_TL(\"MONTH\",\n\t\t\t$table_left + ($cell_width * 2), $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");*/\n\t\t\t\n\t\t$current_row = 1;\n\t\t$totals = array(\n\t\t\t'weekly' => 0,\n\t\t\t'biweekly' => 0,\n\t\t\t'semimonthly' => 0,\n\t\t\t'monthly' => 0,\n\t\t);\n\t\tforeach ($this->data['period'] as $label => $values) {\n\t\t\t/**\n\t\t\t * Special processing\n\t\t\t */\n\t\t\tswitch ($label) {\n\t\t\t\tcase 'nsf$':\n\t\t\t\t\tcontinue 2;\n\t\t\t\tcase 'debit returns':\n//\t\t\t\t\t$this->pdf->setcolor('fill', 'rgb', 1, 1, 176/255, 0);\n//\t\t\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t\t\t$this->pdf->fill();\n\t\t\t\t\t\n//\t\t\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t\t\t$this->pdf->stroke();\n\t\t\t\t\t/*$percentage = $values['month']? number_format($values['month'] / $this->data['monthly']['total debited']['month'] * 100, 1):0;\n\t\t\t\t\t$this->Text_TL($percentage.'%',\n\t\t\t\t\t\t$table_left + ($cell_width * 3), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['CENTER']}\");*/\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'net cash collected':\n\t\t\t\t\t$this->pdf->setcolor('fill', 'rgb', 1, 1, 176/255, 0);\n\t\t\t\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t//$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t//$this->Rect_TL($table_left + ($cell_width * 2), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t$this->pdf->fill();\n\t\t\t\t\t\n\t\t\t\t\t//$this->Text_TL(number_format($this->data['period']['total debited']['span'] - $this->data['period']['debit returns']['span'], 2),\n\t\t\t\t\t$this->Text_TL(number_format($this->data['period']['total debited']['span'] - $this->data['period']['nsf$']['span'], 2),\n\t\t\t\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\t\t\n\t\t\t\t\t/*$this->Text_TL(number_format($this->data['monthly']['total debited']['week'] - $this->data['monthly']['debit returns']['week'], 2),\n\t\t\t\t\t\t$table_left + ($cell_width * 1), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\t$this->Text_TL(number_format($this->data['monthly']['total debited']['month'] - $this->data['monthly']['debit returns']['month'], 2),\n\t\t\t\t\t\t$table_left + ($cell_width * 2), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\t\t\tbreak;\n\t\t\t\t//FORBIDDEN ROWS!\n\t\t\t\tcase 'moneygram deposit':\n\t\t\t\t//case 'credit card payments':\n\t\t\t\t\tcontinue 2;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t$format_decimals = 0;\n\t\t\tswitch ($label) {\n\t\t\t\tcase 'new customers':\n\t\t\t\tcase 'card reactivations':\n\t\t\t\tcase 'reactivated customers':\n\t\t\t\tcase 'refunded customers':\n\t\t\t\tcase 'resend customers':\n\t\t\t\tcase 'cancelled customers':\n\t\t\t\tcase 'paid out customers (ach)':\n\t\t\t\tcase 'paid out customers (non-ach)':\n\t\t\t\t\t$format_decimals = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$format_decimals = 2;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t\t$this->Rect_TL($left, $top + ($row_height * $current_row), $label_width, $row_height);\n\t\t\t$this->pdf->fill();\n\t\t\t\n\t\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t$this->Rect_TL($table_left + ($cell_width * 2), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t$this->pdf->stroke();\n\t\t\t\n\t\t\t$this->Text_TL(strtoupper($label),\n\t\t\t\t$left + $label_indent, $top + ($row_height * $current_row), \n\t\t\t\t$label_width - $label_indent, $row_height,\n\t\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\t\n\t\t\tif ($label != 'net cash collected') {\n\t\t\t\t$this->Text_TL(number_format($values['span'], $format_decimals),\n\t\t\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\n\t\t\t\t/*$this->Text_TL(number_format($values['week'], $format_decimals),\n\t\t\t\t\t$table_left + ($cell_width * 1), $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\n\t\t\t\t$this->Text_TL(number_format($values['month'], $format_decimals),\n\t\t\t\t\t$table_left + ($cell_width * 2), $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\t}\n\t\t\t\n\t\t\t$current_row++;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Advances in Collection\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($left, $top + ($row_height * $current_row), $label_width, $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t$this->Text_TL(\"ADVANCES IN COLLECTION\",\n\t\t\t$left, $top + ($row_height * $current_row), \n\t\t\t$label_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['advances_collections'], 2),\n\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t/**\n\t\t * Advances in Active\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($table_left + ($cell_width * 4), $top + ($row_height * $current_row), $cell_width * 2, $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t$this->Rect_TL($table_left + ($cell_width * 6), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t$this->Text_TL(\"ACTIVE ADVANCES OUT\",\n\t\t\t$table_left + ($cell_width * 4), $top + ($row_height * $current_row), \n\t\t\t$cell_width * 2, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['advances_active'], 2),\n\t\t\t$table_left + ($cell_width * 6), $top + ($row_height * $current_row), \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t}", "function build_calendar($month,$year,$dateArray) {\r\n $daysOfWeek = array('S','M','T','W','T','F','S');\r\n\r\n // What is the first day of the month in question?\r\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\r\n\r\n // How many days does this month contain?\r\n $numberDays = date('t',$firstDayOfMonth);\r\n\r\n // Retrieve some information about the first day of the\r\n // month in question.\r\n $dateComponents = getdate($firstDayOfMonth);\r\n\r\n // What is the name of the month in question?\r\n $monthName = $dateComponents['month'];\r\n\r\n // What is the index value (0-6) of the first day of the\r\n // month in question.\r\n $dayOfWeek = $dateComponents['wday'];\r\n\r\n // Create the table tag opener and day headers\r\n\r\n $calendar = \"<table class='table table-bordered'>\";\r\n $calendar .= \"<caption>$monthName $year</caption>\";\r\n $calendar .= \"<tr>\";\r\n\r\n // Create the calendar headers\r\n\r\n foreach($daysOfWeek as $day) {\r\n $calendar .= \"<th class='header'>$day</th>\";\r\n } \r\n\r\n // Create the rest of the calendar\r\n\r\n // Initiate the day counter, starting with the 1st.\r\n\r\n $currentDay = 1;\r\n\r\n $calendar .= \"</tr><tr>\";\r\n\r\n // The variable $dayOfWeek is used to\r\n // ensure that the calendar\r\n // display consists of exactly 7 columns.\r\n\r\n if ($dayOfWeek > 0) { \r\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\"; \r\n }\r\n \r\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\r\n \r\n while ($currentDay <= $numberDays) {\r\n\r\n // Seventh column (Saturday) reached. Start a new row.\r\n\r\n if ($dayOfWeek == 7) {\r\n\r\n $dayOfWeek = 0;\r\n $calendar .= \"</tr><tr>\";\r\n\r\n }\r\n \r\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\r\n \r\n $date = \"$year-$month-$currentDayRel\";\r\n\t\tif($date == date('Y-m-d')){\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date' bgcolor='#ADD8E6'>$currentDay<br/>\";\r\n\t\t}else{\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date'>$currentDay<br/>\";\r\n\t\t}\r\n \r\n\t\t $sql = mysql_query(\"SELECT * FROM leavesys.leave_details WHERE date = '\".$date.\"'\");\r\n\t\t while($result = mysql_fetch_array($sql)){\r\n\t\t\t $sql2 = mysql_query(\"SELECT * FROM user WHERE id = '\".$result['applicant_id'].\"'\");\r\n\t\t\t $result2 = mysql_fetch_assoc($sql2);\r\n\t\t\t\tif($result['half'] == 1){\r\n\t\t\t\t\t$c_content = \" (am)\";\r\n\t\t\t\t}else if($result['half'] == 2){\r\n\t\t\t\t\t$c_content = \" (pm)\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$c_content = \"\";\r\n\t\t\t\t}\r\n\t\t\t\t$calendar .= $result2['country_code'].\" - \".$result2['name'].$c_content.\"<br/>\";\r\n\t\t }\r\n\t\t $sql1 = mysql_query(\"SELECT * FROM leavesys.holiday WHERE date = '\".$date.\"'\");\r\n\t\t while($result1 = mysql_fetch_array($sql1)){\r\n\t\t\t if($result1['country'] == \"al\"){\r\n\t\t\t\t $calendar .= \"<font color='blue;'>\".$result1['name'].\"</font><br/>\";\r\n\t\t\t }else{\r\n\t\t\t\t$calendar .= \"<font color='blue;'>\".$result1['name'].\" (\".$result1['country'].\")</font><br/>\";\r\n\t\t\t }\r\n\t\t }\r\n\t\t $calendar .= \"</td>\";\r\n\r\n // Increment counters\r\n \r\n $currentDay++;\r\n $dayOfWeek++;\r\n\r\n }\r\n \r\n \r\n\r\n // Complete the row of the last week in month, if necessary\r\n\r\n if ($dayOfWeek != 7) { \r\n \r\n $remainingDays = 7 - $dayOfWeek;\r\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\"; \r\n\r\n }\r\n \r\n $calendar .= \"</tr>\";\r\n\r\n $calendar .= \"</table>\";\r\n\r\n return $calendar;\r\n\r\n}", "function get_dates() {\n $m = date('m');\n $d = date('d');\n $y = date('Y');\n $retour['j'] = date('d/m/Y', mktime(0, 0, 0, $m, $d, $y));\n $retour['s1'] = date('d/m/Y', mktime(0, 0, 0, $m, $d +7, $y));\n $retour['s2'] = date('d/m/Y', mktime(0, 0, 0, $m, $d +14, $y));\n $retour['s3'] = date('d/m/Y', mktime(0, 0, 0, $m, $d +21, $y));\n $retour['m1'] = date('d/m/Y', mktime(0, 0, 0, $m +1, $d, $y));\n $retour['m2'] = date('d/m/Y', mktime(0, 0, 0, $m +2, $d, $y));\n $retour['m3'] = date('d/m/Y', mktime(0, 0, 0, $m +3, $d, $y));\n $retour['m6'] = date('d/m/Y', mktime(0, 0, 0, $m +6, $d, $y));\n $retour['m9'] = date('d/m/Y', mktime(0, 0, 0, $m +9, $d, $y));\n $retour['m12'] = date('d/m/Y', mktime(0, 0, 0, $m, $d, $y +1));\n return $retour;\n}", "function create_all_program_dates_array($valid_post_array = FALSE){\n\t\n\tglobal $wpdb;\n\t\n\t//Build Query. Fetch all post id's and dates from Post Meta\n\t$query = \"SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key='mf_SALF_meta_date'\";\n\t// Run Query\n\t$post_ID_query= $wpdb->get_results($query);\n\t$post_ID_query = remove_unpublished_posts($post_ID_query);\n\t\n\t\n\t\n\t\n\t\n\t//seperate days/months/years\n\tforeach ($post_ID_query as $post_dates){\n\t\t\n\t\t//create $post_id->$date array\n\t\t$dates[$post_dates->post_id]=$post_dates->meta_value;\n\t\t\n\t\t//unset invalid posts (program dates from unselected venues)\n\t\tif($valid_post_array){//if have valid posts\n\t\t\tforeach ($dates as $post_id=>$post_date){\n\t\t\t\tif(!in_array($post_id,$valid_post_array)) unset($dates[$post_id]);\n\t\t\t}\n\t\t}\n\t\t//explode dates within array as day/month/year\n\t\tforeach ($dates as $post_id=>$post_date){\n\t\t\t\n\t\t\t\n\t\t\t\t$exploded_post_date_array[$post_id] = explode('/',$post_date);\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t//Create Key Values, Day, Month, Year\n\t\t\t\t$exploded_post_date_array[$post_id]['day']= $exploded_post_date_array[$post_id][0];\n\t\t\t\t$exploded_post_date_array[$post_id]['month']= $exploded_post_date_array[$post_id][1];\n\t\t\t\t$exploded_post_date_array[$post_id]['year']= $exploded_post_date_array[$post_id][2];\n\t\t\t\n\t\t\t\t//remove old key values\n\t\t\t\tunset($exploded_post_date_array[$post_id][0]);\n\t\t\t\tunset($exploded_post_date_array[$post_id][1]);\n\t\t\t\tunset($exploded_post_date_array[$post_id][2]);\n\t\t}\n\t\n\t}\n\t\n\t\n\treturn $exploded_post_date_array;\n}", "function generar_calendario_precios($year,$month,$id){\n\tinclude('../includes/conexion_nueva.php');\n\t$tabla = 'sys_pricerange';\n\t$sql = 'SELECT precio,fecha,tipo FROM '.$tabla.' WHERE id_propiedad = '.$id.' AND fecha >= \"'.$year.'-'.$month.'-1\" AND fecha<= \"'.$year.'-'.$month.'-31\"';\n\tmysqli_set_charset($connection, \"utf8\");\n\t$periodos = $connection->query($sql);\n\t$precios = array();\n\twhile ($res = $periodos->fetch_assoc()) {\n\t\t$fe = strtotime($res['fecha']);\n\t\t$precios[$fe] = $res['precio'];\n\t\t$tipos[$fe] = $res['tipo'];\n\t}\n\n\t# Obtenemos el dia de la semana del primer dia\n\t# Devuelve 0 para domingo, 6 para sabado\n\t$diaSemana=date(\"w\",mktime(0,0,0,$month,1,$year))+7;\n\t# Obtenemos el ultimo dia del mes\n\t$ultimoDiaMes=date(\"d\",(mktime(0,0,0,$month+1,1,$year)-1));\n\t$meses=array(1=>\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\");\n\n\t$calendar = '';\n\t$calendar .= '<table class=\"calendario\" width=\"250\" style=\"text-align:center;margin:0px 5px 0px 5px\">';\n\t//$calendar .= '<table class=\"calendario\" style=\"text-align:center;width:300px;display:block; oveflow:hidden; float:left\">';\n\t\t$calendar .= '<caption>'.$meses[$month].\" \".$year.'</caption>';\n\t\t$calendar .= '<tr><th>Lun</th><th>Mar</th><th>Mie</th><th>Jue</th><th>Vie</th><th>Sab</th><th>Dom</th></tr>';\n\t\t$calendar .= '<tr>';\n\t\t\t# definimos los valores iniciales para nuestro calendario\n\t\t\t$last_cell = $diaSemana + $ultimoDiaMes;\n\t\t\t// hacemos un bucle hasta 42, que es el máximo de valores que puede\n\t\t\t// haber... 6 columnas de 7 dias\n\t\t\tfor($i=1;$i<=49;$i++){\n\t\t\t\tif($i==$diaSemana){\n\t\t\t\t\t// determinamos en que dia empieza\n\t\t\t\t\t$day=1;\n\t\t\t\t}\n\t\t\t\tif($i<$diaSemana || $i>=$last_cell){\n\t\t\t\t\t// celca vacia\n\t\t\t\t\t$calendar .= \"<td>&nbsp;</td>\";\n\t\t\t\t}else{\n\t\t\t\t\t$precio = '';\n\t\t\t\t\t$fe = strtotime($year.'-'.$month.'-'.$day);\n\t\t\t\t\tif(isset($precios[$fe])){\n\t\t\t\t\t\t$precio = $precios[$fe];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$precio = '0';\n\t\t\t\t\t}\n\t\t\t\t\tif(isset($tipos[$fe])){\n\t\t\t\t\t\t$tipo = 'T= '.$tipos[$fe];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$tipo = '--';\n\t\t\t\t\t}\n\t\t\t\t\t$calendar .= \"<td style='background:#75BB7D;'><span>$day</span><br />\".$precio.\"€<br /><span>\".$tipo.\"</span></td>\";\n\t\t\t\t\t$day++;\n\t\t\t\t}\n\t\t\t\t// cuando llega al final de la semana, iniciamos una columna nueva\n\t\t\t\tif($i%7==0){\n\t\t\t\t\t$calendar .= \"</tr><tr>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t$calendar .= '</tr>';\n\t$calendar .= '</table>';\n\n\treturn $calendar;\n}", "public function beforeSave() {\n foreach ($this->dateFields as $item) {\n $this->data[$this->name][$item] = $this->_date4Db($this->data[$this->name][$item]);\n }\n return parent::beforeSave();\n }", "public function formatData($date) {\n\t\t return date('F j, Y, g:i:a', strtotime($date));\n\t }", "public function getDateDebut();", "public function groupes_ali_et_cal() {\n\t\tfunction dateenlettre($date) {\n\t\t\t$split = explode(\"-\",$date);\n\t\t\t$jour = $split[2];\n\t\t\t$mois = $split[1];\n\t\t\t$annee = $split[0];\n\t\t\t$newTimestamp = mktime(12,0,0,$mois,$jour,$annee);\n\t\t\t \n\t\t\t$Jour = array(\"Dimanche\",\"Lundi\",\"Mardi\",\"Mercredi\",\"Jeudi\",\"Vendredi\",\"Samedi\");\n\t\t\t$Mois = array(\"\",\"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Août\",\"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\");\n\t\t\t \n\t\t\treturn $Jour[date(\"w\", $newTimestamp)] . ' ' . $jour . ' ' . $Mois[date(\"n\", $newTimestamp)] . ' ' . $annee;\n\t\t}\n\t\t\n\t\t// Fonction qui renvoi le nombre de jours entre deux dates\n\t\tfunction jours($date1, $date2){\n\t\t\t$diff = abs($date1 - $date2); \n\t\t\t$retour = array();\n\t\t \n\t\t\t$tmp = $diff;\n\t\t\t$retour['second'] = $tmp % 60;\n\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['second']) /60 );\n\t\t\t$retour['minute'] = $tmp % 60;\n\t\t\t\n\t\t\t$tmp = floor( ($tmp - $retour['minute'])/60 );\n\t\t\t$retour['hour'] = $tmp % 24;\n\t\t\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['hour']) /24 );\n\t\t\t$retour['day'] = $tmp;\n\t\t\t\t \n\t\t\treturn $retour['day'];\n\t\t}\n\t\t\n\t\t\n\t\t$id = AuthComponent::user('id');\n\t\tsetlocale (LC_TIME, 'fr_FR.utf8','fra');\n\t\t$date = date('Y-m-d');\n\t\t\n\t\t$this->set('debut',null);\n\t\t$this->set('fin',null);\n\t\tif ($this->request->is('post')) {\n\t\t\t/* Vérification des informations envoyées */\n\t\t\t$message;\n\t\t\t$stop = false;\n\t\t\t$deb = $_POST['debut'];\n\t\t\t$fin = $_POST['fin'];\n\t\t\t\n\t\t\tif (!(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$deb))) {\n\t\t\t\t$stop = true;\n\t\t\t\t$message = \"Erreur, la date de début est invalide, elle doit être sous format 'YYYY-MM-DD'\";\n\t\t\t} elseif (!(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$fin))) {\n\t\t\t\t$stop = true;\n\t\t\t\t$message = \"Erreur, la date de fin est invalide, elle doit être sous format 'YYYY-MM-DD'\";\n\t\t\t} else {\n\t\t\t\tif ($deb > $date ) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date d'aujourd'hui\";\n\t\t\t\t} elseif ($fin > $date) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date d'aujourd'hui\";\n\t\t\t\t}\n\t\t\t\tif ($deb == $fin) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être égale à la date de fin\";\n\t\t\t\t} elseif ($deb > $fin) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date de fin\";\n\t\t\t\t}\n\t\t\t\t$this->set('debut',$deb);\n\t\t\t\t$this->set('fin',$fin);\n\t\t\t}\n\t\t\t/* fin vérif */\n\t\t\tif ($stop) {\n\t\t\t\t$this->Session->setFlash(__($message));\n\t\t\t} else {\n\t\t\t\t$fin = $fin . ' 23:59:59';\n\t\t\t\t$repas = $this->Suivialimentaire->find('all',array('conditions' => array('AND' => array(\n\t\t\t\t\t\t\t\tarray('id_user' => $id),\n\t\t\t\t\t\t\t\tarray('Suivialimentaire.created BETWEEN ? AND ?' => array($deb, $fin))\n\t\t\t\t)),'order' => array('Suivialimentaire.created DESC') ));\n\t\t\t\t$temp = $repas;\n\t\t\t\t$i = 0;\n\t\t\t\tforeach ($repas as $r) {\n\t\t\t\t\t$temp[$i]['Aliment']= $this->Aliment->find('first', array('conditions' => array('Aliment.id' => $r['Suivialimentaire']['id_aliment'])));\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$repas = $temp;\n\t\t\t\t$cal = 0;\n\t\t\t\tforeach ($repas as $rep) {\n\t\t\t\t\tif (!empty($rep['Aliment'])) {\n\t\t\t\t\t\t$cal = $cal + ($rep['Aliment']['Donneesaliment'][1]['valmoy'] * $rep['Suivialimentaire']['quantite'] * $rep['Suivialimentaire']['portion']/100) * count(explode(\"@\",$rep['Suivialimentaire']['nomSA']));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$valsplit = explode(\"@\", $rep['Alimhorsclassification']['nutri']);\n\t\t\t\t\t\t$valresul = $valsplit[1];\n\t\t\t\t\t\t$cal = $cal + ($valresul * $rep['Suivialimentaire']['quantite'] * $rep['Suivialimentaire']['portion']/100) * count(explode(\"@\",$rep['Suivialimentaire']['nomSA']));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->set('repas',$repas);\n\t\t\t\t$this->set('cal',$cal);\n\t\t\t\t$time1 = strtotime($deb);\n\t\t\t\t$time2 = strtotime($fin);\n\t\t\t\t$e=jours($time1, $time2);\n\t\t\t\t$this->set('joursDiff',$e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "function calendar($date) {\r\n\t //If no parameter is passed use the current date.\r\n\t if($date == null)\r\n\t $date = getDate();\r\n\r\n\t $day \t\t\t= $date[\"mday\"];\r\n\t $month \t\t= $date[\"mon\"];\r\n\t $month_name \t= $date[\"month\"];\r\n\t $year \t\t\t= $date[\"year\"];\r\n\r\n\t $this_month \t= getDate(mktime(0, 0, 0, $month, 1, $year));\r\n\t $next_month \t= getDate(mktime(0, 0, 0, $month + 1, 1, $year));\r\n\r\n\t //Find out when this month starts and ends.\r\n\t $first_week_day = $this_month[\"wday\"];\r\n\t $days_in_this_month = round(($next_month[0] - $this_month[0]) / (60 * 60 * 24));\r\n\r\n\t $calendar_html = \"<table width='100%'>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_header' colspan='7' /> Month: \".$month_name.\" / Year: \".$year.\"</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_subheader'>Sunday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Monday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Tuesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Wednesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Thursday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Friday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Saterday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\";\r\n\r\n\t// Fill the first week of the month with the appropriate number of blanks.\r\n\t\t\t$gapcounter = 0;\r\n\t\t\tfor($week_day = 0; $week_day < $first_week_day; $week_day++) {\r\n\t\t\t\t\t$gapcounter = $gapcounter + 1;\r\n\t\t\t\t}\r\n\t\t\t$calendar_html = $calendar_html.\"<td class='perp_report_cell' colspan='\".$gapcounter.\"'></td>\";\t\r\n\t\r\n\t// Draw Calendar Elements\r\n\t\t\t// I forget!\t\t\t\t\r\n\t $week_day = $first_week_day;\r\n\t for($day_counter = 1; $day_counter <= $days_in_this_month; $day_counter++) {\r\n\t\t\t\t\t// Determine Day of the week\r\n\t\t\t\t\t$week_day %= 7;\r\n\t\t\t\t\r\n\t\t\t\t\t// If this variable equals 0, we will need to start a new row.\r\n\t\t\t\t\tif($week_day == 0) {\r\n\t\t\t\t\t\t\t$calendar_html = $calendar_html.\"</tr><tr>\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$datetopull = $year.\"/\".$month.\"/\".$day_counter;\r\n\t\t\t\t\t$innercell = \"<TABLE width='100%' style='margin-bottom:0;margin-top:0;'><tr><td class='perp_report_fieldname'>Date:</td><td class='perp_report_fieldcontent'>\".$datetopull.\"</td></tr>\";\r\n\t\t\t\t\t//Now Get inspection List for this day.....\r\n\t\t\t\t\t$objconn = mysqli_connect($GLOBALS['hostdomain'], $GLOBALS['hostusername'], $GLOBALS['passwordofdatabase'], $GLOBALS['nameofdatabase']);\t\t\t\t\t\r\n\t\t\t\t\tif (mysqli_connect_errno()) {\r\n\t\t\t\t\t\t\t// there was an error trying to connect to the mysql database\r\n\t\t\t\t\t\t\t//printf(\"connect failed: %s\\n\", mysqli_connect_error());\r\n\t\t\t\t\t\t\texit();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$sql = \"SELECT * FROM tbl_139_337_main WHERE 139337_date = '\".$datetopull.\"' ORDER BY 139337_time\";\r\n\t\t\t\t\t\t\t//echo \"The SQL Statement is :\".$sql.\"<br>\";\r\n\t\t\t\t\t\t\t$objrs = mysqli_query($objconn, $sql);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($objrs) {\r\n\t\t\t\t\t\t\t\t\t$number_of_rows = mysqli_num_rows($objrs);\r\n\t\t\t\t\t\t\t\t\twhile ($objarray = mysqli_fetch_array($objrs, MYSQLI_ASSOC)) {\r\n\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\r\n\t\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// So the Archieved or Duplicate Narrowing...\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow\t\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_a\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_b\t\t\t\t= 0;\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancyid\t\t\t= $objarray['Discrepancy_id'];\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancycondition\t= $objarray['discrepancy_checklist_id'];\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_a\t\t\t\t= preflights_tbl_139_337_main_a_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is archieved.\r\n\t\t\t\t\t\t\t\t\t\t\t//$displayrow_d\t\t\t\t= preflights_tbl_139_327_main_sub_d_d_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is duplicate.\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($displayrow == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$innercell = $innercell.\"<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<form style='margin-bottom:0;' action='part139337_report_display.php' method='POST' name='reportform' id='reportform' target='WLHMWindow' onsubmit='window.open('', 'WLHMWindow', 'width=800,height=600,status=no,resizable=no,scrollbars=yes')'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td colspan='2' class='formoptionsubmit'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='hidden' name='recordid'\tID='recordid' \t\t\tvalue=\".$tmpdiscrepancyid.\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' value='D:\".$tmpdiscrepancyid.\"' name='b1' ID='b1' class='makebuttonlooklikelargetext' style='width:100%;'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$innercell = $innercell.\"</table>\";\t\r\n\t\t\t\t\tif ($counter == 0) {\r\n\t\t\t\t\t\t\t$innercell = $innercell.\"Nothing Reported\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$calendar_html = $calendar_html.\"<td align=\\\"center\\\" valign='top' class='perp_report_activecell'>&nbsp;\".$innercell.\"</td>\";\r\n\t\t\t\t\t$week_day++;\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t}\r\n\r\n\t $calendar_html .= \"</tr>\";\r\n\t $calendar_html .= \"</table>\";\r\n\r\n\t return($calendar_html);\r\n\t }", "function operasiJoinByDate($date){\n\t\t$query = $this->db->query(\"SELECT DISTINCT o.id_operasi, o.operasi, o.id_alat, a.id_kategori, o.tanggal, o.keterangan AS keterangan_operasi, a.nama_alat FROM operasi o INNER JOIN alat a ON o.id_alat = a.id_alat WHERE o.tanggal='$date' GROUP BY a.id_alat\"); \n\t\t\treturn $query->result();\n\t}", "function oa_date_views_data_alter(&$data) {\n foreach ($data as $table => $data_table) {\n foreach ($data_table as $field => $data_field) {\n if (!empty($data_field['field']['handler']) && $data_field['field']['handler'] === 'views_handler_field_date') {\n $data[$table][$field]['field']['handler'] = 'oa_date_handler_field_date';\n }\n }\n }\n}", "function datum($db_date) {\r\n return strftime('%d.%m.%Y', strtotime($db_date));\r\n }", "public function get ($db_period_dic)\n {\n $beg = $this->begin;\n $end = $this->end;\n $format = 'Y-m-d';\n echo \"\\n\\n[DATES] From \".date($format,$beg).\" to \".date($format,$end).\" period dates.\\n\";\n $format = 'Ymd H:i'; // Required format for SQL\n $stack = array();\n\n foreach ($db_period_dic as $db_slug => $period)\n {\n $stack[$db_slug] = [];\n foreach ($period as $id => $p)\n {\n $add = false;\n $_beg = strtotime($p['fechainicio']);\n $_end = strtotime($p['fechafin']);\n\n // Include all period with matching dates\n if ($beg >= $_beg && $beg <= $_end\n || $end >= $_beg && $end <= $_end)\n $add = true;\n\n // Add it to stack\n if ($add)\n $stack[$db_slug][$id] = [\n 'begin' => date($format, $_beg),\n 'end' => date($format, $_end),\n ];\n }\n\n // Select for each db the first begin and the last end dates.\n $_keys = array_keys($stack[$db_slug]);\n if (count($_keys) >= 2)\n {\n $stack[$db_slug] = array(\n 'begin' => isset($stack[$db_slug][$_keys[0]]['begin'])?$stack[$db_slug][$_keys[0]]['begin']:null,\n 'end' => isset($stack[$db_slug][$_keys[count($_keys)-1]]['end'])?$stack[$db_slug][$_keys[count($_keys)-1]]['end']:null,\n );\n }\n $stack[$db_slug] = array_merge([], ['begin' => null, 'end' => null], $stack[$db_slug]);\n }\n return $stack;\n }", "private function _consolideDate(){\n\t\t$this->_mktime();\n\t\t$this->_setDate();\n\t}", "function date_mysql2html($date, $returnTime = true) {\n\t if( ! preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}/', $date)){\n\t return $date;\n\t }\n\t\t$y = substr($date, 0, 4);\n\t\t$m = substr($date, 5, 2);\n\t\t$d = substr($date, 8, 2);\n\t\t$time = substr($date, 11, 5);\n\t\t$sep = '.';\n\t\treturn $d . $sep . $m . $sep . $y . ($returnTime ? ' ' . $time : \"\");\n\t}", "function dates_interconv( $date_format1, $date_format2, $date_str )\n {\n $base_struc = split('[/.-]', $date_format1);\n $date_str_parts = split('[/.-]', $date_str );\n \n //print_r( $base_struc ); echo \"<br>\";\n //print_r( $date_str_parts ); echo \"<br>\";\n \n $date_elements = array();\n \n $p_keys = array_keys( $base_struc );\n foreach ( $p_keys as $p_key )\n {\n if ( !empty( $date_str_parts[$p_key] ))\n {\n $date_elements[$base_struc[$p_key]] = $date_str_parts[$p_key];\n }\n else\n return false;\n }\n \n $dummy_ts = mktime( 0,0,0, $date_elements['m'],$date_elements['d'],$date_elements['Y']);\n \n return date( $date_format2, $dummy_ts );\n }", "public function gerarDados() {\n \n if (empty($this->sDataInicial)) {\n throw new Exception(\"Data inicial nao informada!\");\n }\n \n if (empty($this->sDataFinal)) {\n throw new Exception(\"Data final não informada!\");\n }\n /**\n * Separamos a data do em ano, mes, dia\n */\n list($iAno, $iMes, $iDia) = explode(\"-\",$this->sDataFinal);\n $oInstituicao = db_stdClass::getDadosInstit(db_getsession(\"DB_instit\"));\n $sListaInstit = db_getsession(\"DB_instit\");\n $sSqlSubsidio = \"select c16_mes, \";\n $sSqlSubsidio .= \" c16_ano,\";\n $sSqlSubsidio .= \" c16_subsidiomensal,\";\n $sSqlSubsidio .= \" c16_subsidioextraordinario,\";\n $sSqlSubsidio .= \" z01_nome, \";\n $sSqlSubsidio .= \" z01_cgccpf \";\n $sSqlSubsidio .= \" from padsigapsubsidiosvereadores \"; \n $sSqlSubsidio .= \" inner join cgm on z01_numcgm = c16_numcgm \"; \n $sSqlSubsidio .= \" where c16_ano = {$iAno} \";\n $sSqlSubsidio .= \" and c16_mes <= $iMes\"; \n $sSqlSubsidio .= \" and c16_instit = {$sListaInstit}\";\n $sSqlSubsidio .= \" order by c16_ano, c16_mes\";\n $rsSubsidio = db_query($sSqlSubsidio); \n $iTotalLinhas = pg_num_rows($rsSubsidio);\n for ($i = 0; $i < $iTotalLinhas; $i++) {\n \n $sDiaMesAno = \"{$iAno}-\".str_pad($iMes, 2, \"0\", STR_PAD_LEFT).\"-\".str_pad($iDia, 2, \"0\", STR_PAD_LEFT);\n $oSubSidio = db_utils::fieldsMemory($rsSubsidio, $i);\n \n $oRetorno = new stdClass();\n $oRetorno->subCodigoEntidade = str_pad($this->iCodigoTCE, 4, \"0\", STR_PAD_LEFT);\n $oRetorno->subMesAnoMovimento = $sDiaMesAno;\n $iUltimoDiaMes = cal_days_in_month(CAL_GREGORIAN, $oSubSidio->c16_mes, $oSubSidio->c16_ano); \n $oRetorno->subMesAnoReferencia = $oSubSidio->c16_ano.\"-\".str_pad($oSubSidio->c16_mes, 2, \"0\", STR_PAD_LEFT).\"-\".\n str_pad($iUltimoDiaMes, 2, \"0\", STR_PAD_LEFT);\n $oRetorno->subNomeVereador = substr($oSubSidio->z01_nome, 0, 80); \n $oRetorno->subCPF = str_pad($oSubSidio->z01_cgccpf, 11, \"0\", STR_PAD_LEFT); \n $oRetorno->subMensal = $this->corrigeValor($oSubSidio->c16_subsidiomensal, 13); \n $oRetorno->subExtraordinario = $this->corrigeValor($oSubSidio->c16_subsidioextraordinario, 13); \n $oRetorno->subTotal = $this->corrigeValor(($oSubSidio->c16_subsidioextraordinario+\n $oSubSidio->c16_subsidiomensal), 13);\n array_push($this->aDados, $oRetorno); \n }\n return true;\n }", "public function rangesToDates(){\n //Rangos::\n }", "function convert_repdiario_to_html()\n {\n $date = Carbon::now();\n $currentDate = $date->format('d-m-y');\n $rep_data = $this->get_rep_diario();\n\n $output = '\n <h3 align=\"center\">Informe de entregas al día '.$currentDate.'</h3>\n <table width=\"50%\" align=\"center\" style=\"border-collapse: collapse; border: 0px;\">\n <tr>\n <th style=\"border: 1px solid; padding:12px;\" width=\"20%\">Id</th>\n <th style=\"border: 1px solid; padding:12px;\" width=\"30%\">Nombre</th>\n <th style=\"border: 1px solid; padding:12px;\" width=\"30%\">Cantidad entregas</th>\n <th style=\"border: 1px solid; padding:12px;\" width=\"30%\">Total ($)</th>\n </tr>'; \n foreach($rep_data as $rep)\n {\n $output .= '\n <tr>\n <td style=\"border: 1px solid; padding:12px;\">'.$rep->rep_id.'</td>\n <td style=\"border: 1px solid; padding:12px;\">'.$rep->rep_name.'</td>\n <td style=\"border: 1px solid; padding:12px;\">'.$rep->cantidad_ventas.'</td>\n <td style=\"border: 1px solid; padding:12px;\">$'.$rep->total_ventas.'</td>\n </tr>\n ';\n }\n $output .= '</table>';\n return $output;\n }", "function get_details_on_date_range($sdate,$edate) {\n $query = \"\n SELECT\n tbl_tender_basic_details.tender_id,\n tbl_tender_basic_details.mgo_file_ref,\n tbl_tender_basic_details.dos_file_ref,\n tbl_tender_basic_details.vote_id,\n tbl_vote_master.vote_head,\n tbl_vote_master.vote_name,\n tbl_tender_basic_details.item_id,\n tbl_items_list.item_code,\n tbl_items_list.item_name,\n tbl_tender_basic_details.quantity,\n tbl_tender_basic_details.unit_type_id,\n tbl_unit_types.unit_name,\n tbl_tender_basic_details.tndr_open_date,\n tbl_doc_ho_from_dos.ho_date,\n tbl_date_of_doc_ho.date_of_doc_ho,\n tbl_tec_due_date.tec_due_date,\n tbl_received_tec.received_tec_date,\n tbl_forward_tec.forward_tec_date,\n tbl_recommandation_due_date.recomma_due_date,\n tbl_received_recommendation.rece_rec_date,\n tbl_forward_to_tender_bd.fwd_tb_date,\n tbl_tender_board_approval.tb_approval_date,\n tbl_suppliers.supplier_ref,\n tbl_suppliers.supplier_name,\n tbl_approved_supplier.appd_sup_remarks,\n tbl_delivery_date.delivery_date,\n tbl_delivery_date.delivery_remarks\n FROM\n tbl_tender_basic_details\n Inner Join tbl_vote_master ON tbl_vote_master.vote_id = tbl_tender_basic_details.vote_id\n Inner Join tbl_items_list ON tbl_items_list.item_id = tbl_tender_basic_details.item_id\n Inner Join tbl_unit_types ON tbl_unit_types.unit_id = tbl_tender_basic_details.unit_type_id\n Inner Join tbl_doc_ho_from_dos ON tbl_doc_ho_from_dos.ho_mgo_file_ref = tbl_tender_basic_details.mgo_file_ref\n Inner Join tbl_date_of_doc_ho ON tbl_date_of_doc_ho.date_of_doc_ho_mgo_ref = tbl_doc_ho_from_dos.ho_mgo_file_ref\n Inner Join tbl_tec_due_date ON tbl_tec_due_date.tec_due_mgo_ref = tbl_date_of_doc_ho.date_of_doc_ho_mgo_ref\n Inner Join tbl_received_tec ON tbl_received_tec.received_tec_mgo_ref = tbl_tec_due_date.tec_due_mgo_ref\n Inner Join tbl_forward_tec ON tbl_forward_tec.forward_tec_mgo_ref = tbl_received_tec.received_tec_mgo_ref\n Inner Join tbl_recommandation_due_date ON tbl_recommandation_due_date.recomma_date_mgo_ref = tbl_forward_tec.forward_tec_mgo_ref\n Inner Join tbl_received_recommendation ON tbl_received_recommendation.rece_rec_mgo_ref = tbl_recommandation_due_date.recomma_date_mgo_ref\n Inner Join tbl_forward_to_tender_bd ON tbl_forward_to_tender_bd.fwd_tb_mgo_ref = tbl_received_recommendation.rece_rec_mgo_ref\n Inner Join tbl_tender_board_approval ON tbl_tender_board_approval.tb_approval_mgo_ref = tbl_forward_to_tender_bd.fwd_tb_mgo_ref\n Inner Join tbl_approved_supplier ON tbl_approved_supplier.appd_mgo_file_ref = tbl_tender_board_approval.tb_approval_mgo_ref\n Inner Join tbl_delivery_date ON tbl_delivery_date.delivery_date_mgo_ref = tbl_approved_supplier.appd_mgo_file_ref\n Inner Join tbl_suppliers ON tbl_suppliers.supplier_id = tbl_approved_supplier.appd_sup_id\n WHERE delivery_date BETWEEN '$sdate' AND '$edate'\n \";\n $query_result = $this->mDbm->setData($query);\n return $query_result;\n }", "function date_fr2sql($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"/\", $date);\r\n\t\t\t$date_sql = $date[2].\"-\".$date[1].\"-\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_sql = \"\";\r\n\t\t}\r\n\t\treturn $date_sql;\r\n\t}", "function build_calendar($month,$year,$dateArray) {\n $daysOfWeek = array('S','M','T','W','T','F','S');\n\n // What is the first day of the month in question?\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\n\n // How many days does this month contain?\n $numberDays = date('t',$firstDayOfMonth);\n\n // Retrieve some information about the first day of the\n // month in question.\n $dateComponents = getdate($firstDayOfMonth);\n\n // What is the name of the month in question?\n $monthName = $dateComponents['month'];\n\n // What is the index value (0-6) of the first day of the\n // month in question.\n $dayOfWeek = $dateComponents['wday'];\n\n // Create the table tag opener and day headers\n\n $calendar = \"<table class='calendar'>\";\n $calendar .= \"<caption>$monthName $year</caption>\";\n $calendar .= \"<tr>\";\n\n // Create the calendar headers\n\n foreach($daysOfWeek as $day) {\n $calendar .= \"<th class='header'>$day</th>\";\n }\n\n // Create the rest of the calendar\n\n // Initiate the day counter, starting with the 1st.\n\n $currentDay = 1;\n\n $calendar .= \"</tr><tr>\";\n\n // The variable $dayOfWeek is used to\n // ensure that the calendar\n // display consists of exactly 7 columns.\n\n if ($dayOfWeek > 0) {\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\";\n }\n\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\n\n while ($currentDay <= $numberDays) {\n\n // Seventh column (Saturday) reached. Start a new row.\n\n if ($dayOfWeek == 7) {\n\n $dayOfWeek = 0;\n $calendar .= \"</tr><tr>\";\n\n }\n\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\n\n $date = \"$year-$month-$currentDayRel\";\n\n $calendar .= \"<td class='day' rel='$date'>$currentDay</td>\";\n\n // Increment counters\n\n $currentDay++;\n $dayOfWeek++;\n\n }\n\n\n\n // Complete the row of the last week in month, if necessary\n\n if ($dayOfWeek != 7) {\n\n $remainingDays = 7 - $dayOfWeek;\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\";\n\n }\n\n $calendar .= \"</tr>\";\n\n $calendar .= \"</table>\";\n\n return $calendar;\n\n}", "public function __toString()\n {\n // Can this set of dates be rendered?\n if (!$this->bOneFullMonth) {\n throw new \\Exception(\n __METHOD__ . ' - Only one full month can be rendered (end date must be \"true\").'\n );\n }\n\n $i = 0;\n $strHtml = '<h3 class=\"sked-cal-title\">' . date('F', strtotime($this->strStart))\n . '</h3><table class=\"sked-cal\"><thead>';\n\n // Day headers\n foreach (SkeVent::WEEKDAYS as $strDay)\n $strHtml .= '<th><center>' . $strDay . '</center></th>';\n\n $strHtml .= '</thead><tr>';\n for ($j = 0; $j < $this->monthPadDates(); $j++) {\n $i++;\n $strHtml .= '<td></td>';\n }\n\n foreach ($this as $skeDate) {\n $i++;\n $strHtml .= '<td class=\"sked-cal-date' . (date('Y-m-d') !== $skeDate->format('Y-m-d') ? '' : ' sked-cal-date-current') . '\">';\n $strHtml .= '<span class=\"sked-cal-date-num\">' . $skeDate->format('j') . '</span>';\n $strHtml .= '<ul class=\"sked-cal-date-list\">';\n foreach ($skeDate->events() as $skeVent) {\n $strHtml .= '<li class=\"sked-cal-date-event\">'\n . '<a href=\"#\" class=\"sked-cal-event-link\" id=\"skevent-'\n . $skeVent->id . '\" data-owner-id=\"' . $skeVent->owner()\n . '\">'\n . $skeVent->label\n . '</a><span>' . $skeVent->time('g:ia', $this->strTimezone) . '</span>'\n . '</li>';\n }\n $strHtml .= '</ul>';\n $strHtml .= '</td>';\n if (7 === $i) {\n $i = 0;\n $strHtml .= '</tr><tr>';\n }\n }\n\n if ($i) {\n for ($j = $i; $j < 7; $j++) {\n $strHtml .= '<td></td>';\n }\n }\n\n return $strHtml . '</tr></table>';\n }", "function page_dates() {\r\n \t\tglobal $admin_lang, $extern_action, $extern_sure, $extern_topic, $extern_date, $extern_place, $extern_id, $_SERVER, $actual_user_id, $actual_user_showname;\r\n\t\t\r\n\t\tif(!isset($extern_action))\r\n\t\t\t$extern_action = '';\r\n\t\t\r\n\t\t$out = \"\\t\\t\\t<h3>\" . $admin_lang['dates'] . \"</h3><hr />\\r\\n\";\r\n\t\t\r\n\t\t//\r\n\t\t// delete the selected entrie\r\n\t\t//\r\n\t\tif($extern_action == \"delete\") {\r\n\t\t\tif(isset($extern_sure)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif($extern_sure == 1)\r\n\t\t\t\t\tdb_result(\"DELETE FROM \" . DB_PREFIX . \"dates WHERE date_id=\" . $extern_id);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$result = db_result(\"SELECT * FROM \" . DB_PREFIX . \"dates WHERE date_id=\" . $extern_id);\r\n\t\t\t\t$row = mysql_fetch_object($result);\r\n\t\t\t\t$out .= \"Den News Eintrag &quot;\" . $row->date_topic . \"&quot; wirklich löschen?<br />\r\n\t\t\t<a href=\\\"admin.php?page=dates&amp;action=delete&amp;id=\" . $extern_id . \"&amp;sure=1\\\" title=\\\"Wirklich Löschen\\\">ja</a> &nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t<a href=\\\"admin.php?page=dates\\\" title=\\\"Nicht Löschen\\\">nein</a>\";\r\n\t\t\t\r\n\t\t\t\treturn $out;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\r\n\t\t// add a new entrie\r\n\t\t//\r\n\t\telseif($extern_action == \"new\") {\r\n\t\t\tif($extern_topic != \"\" && $extern_place != \"\" && $extern_date != \"\") {\r\n\t\t\t\t$date = explode(\".\", $extern_date);\r\n\t\t\t\tdb_result(\"INSERT INTO \".DB_PREFIX.\"dates (date_topic, date_place, date_date, date_creator) VALUES ('\".$extern_topic.\"', '\".$extern_place.\"', '\".mktime(0, 0, 0, $date[1], $date[0], $date[2]).\"', '$actual_user_id')\");\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t//\r\n\t\t// update the selected entrie\r\n\t\t//\r\n\t\telseif($extern_action == \"update\") { \r\n\t\t\tif($extern_topic != \"\" && $extern_place != \"\" && $extern_date != \"\" && $extern_id != 0) {\r\n\t\t\t\t$date = explode(\".\", $extern_date);\r\n\t\t\t\tdb_result(\"UPDATE \".DB_PREFIX.\"dates SET date_topic= '\".$extern_topic.\"', date_place= '\".$extern_place.\"', date_date='\".mktime(0, 0, 0, $date[1], $date[0], $date[2]).\"' WHERE date_id=\".$extern_id);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($extern_action != \"edit\") {\r\n\t\t\t$out .= \"\\t\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"dates\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"new\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['date'] . \": <span class=\\\"info\\\">Dies ist das Datum, an dem die Veranstaltung stattfindet (Format: TT.MM.YYYY, Beispiel: 05.11.2005)</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"date\\\" maxlength=\\\"10\\\" value=\\\"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['location'] . \": <span class=\\\"info\\\">Gemeint ist hier der Ort an welchem die Veranstaltung stattfindet.</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"place\\\" maxlength=\\\"60\\\" value=\\\"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['topic'] . \": <span class=\\\"info\\\">Dies ist die Beschreibung des Termins</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"topic\\\" maxlength=\\\"150\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Eingelogt als \" . $actual_user_showname . \" &nbsp;</td><td><input type=\\\"submit\\\" class=\\\"button\\\" value=\\\"Senden\\\" />&nbsp;<input type=\\\"reset\\\" class=\\\"button\\\" value=\\\"Zurücksetzen\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t<br />\r\n\t\t\t</form>\\r\\n\";\r\n\t\t}\r\n\t\t\t$out .= \"\\t\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"dates\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"update\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['date'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['location'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['topic'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['creator'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['actions'] . \":</td>\r\n\t\t\t\t\t</tr>\\r\\n\";\r\n\t\t//\r\n\t\t// write all news entries\r\n\t\t//\r\n\t\t$result = db_result(\"SELECT * FROM \" . DB_PREFIX . \"dates ORDER BY date_date ASC\");\r\n\t\twhile($row = mysql_fetch_object($result)) {\r\n\t\t\t//\r\n\t\t\t// show an editform for the selected entrie\r\n\t\t\t//\r\n\t\t\tif($extern_id == $row->date_id && $extern_action == \"edit\") {\r\n\t\t\t\t$out .= \"\\t\\t\\t\\t\\t<tr id=\\\"dateid\" . $row->date_id . \"\\\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"id\\\" value=\\\"\".$row->date_id.\"\\\" />\r\n\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"date\\\" maxlength=\\\"10\\\" value=\\\"\" . date(\"d.m.Y\", $row->date_date) . \"\\\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"place\\\" maxlength=\\\"60\\\" value=\\\"\" . $row->date_place . \"\\\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"topic\\\" value=\\\"\" . $row->date_topic . \"\\\" maxlength=\\\"150\\\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . getUserByID($row->date_creator) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\\\"submit\\\" value=\\\"Speichern\\\" class=\\\"button\\\" />\r\n\t\t\t\t\t\t\t&nbsp;<a href=\\\"admin.php?page=dates&amp;action=delete&amp;id=\".$row->date_id.\"\\\" title=\\\"Löschen\\\">Löschen</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\";\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// show only the entrie\r\n\t\t\t//\r\n\t\t\telse {\r\n\t\t\t\t$out .= \"\\t\\t\\t\\t\\t<tr ID=\\\"dateid\" . $row->date_id . \"\\\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . date(\"d.m.Y\", $row->date_date) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . $row->date_place . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . nl2br($row->date_topic) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . getUserByID($row->date_creator) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t\t<a href=\\\"admin.php?page=dates&amp;action=edit&amp;id=\".$row->date_id.\"#dateid\".$row->date_id.\"\\\" title=\\\"Bearbeiten\\\">Bearbeiten</a>\r\n\t\t\t\t\t\t\t&nbsp;<a href=\\\"admin.php?page=dates&amp;action=delete&amp;id=\".$row->date_id.\"\\\" title=\\\"Löschen\\\">Löschen</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\\r\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$out .= \"\\t\\t\\t\\t</table>\r\n\t\t\t</form>\";\r\n\t\r\n\t\treturn $out;\r\n \t}", "private function makeHTMLIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$style = 'class=\"normalDay\"';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$style = 'class=\"weekendDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$style = 'class=\"currentDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->calWeekDays .= \"\\t</tr>\\n\\t<tr>\\n\";\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t}\n\n\t\t\t// Draw days\n\t\t\t$this->calWeekDays .= \"\\t\\t<td valign=\\\"top\\\" \".$style.'>'.$this->dayOfMonth;\n\t\t\t\n\t\t\tif($this->addWeekDay) {\n\t\t\t\t$this->calWeekDays .= \"|\".$this->weekDayNum;\n\t\t\t}\n\t\t\t\n\t\t\tif(strlen($this->addEvtDest) > 0) {\n\t\t\t\t$addevtimg = (strlen($this->addEvtImg) > 0 ? '<img src=\"'.$this->addEvtImg.'\" class=\"addevtimg\" />' : '+');\n\t\t\t\t$this->calWeekDays .= '[<a href=\"'.$this->addEvtDest.'?date='.$this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth.'\" title=\"Add Event\" class=\"addevt\">'.$addevtimg.'</a>]';\n\t\t\t}\n\t\t\t\n\t\t\t$this->calWeekDays .= \" \".$this->makeDayEventListHTML().\"</td>\\n\";\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "protected function prepareDates(array $data): array\n {\n return $this->formatDateFields(['start_date', 'due_date'], $data);\n }", "function _fecha_tabla($fecha, $formato) {\n return ($fecha == null) ? null : date($formato,strtotime($fecha));\n }", "public function gerarDados() {\n \n if (empty($this->sDataInicial)) {\n throw new Exception(\"Data inicial nao informada!\");\n }\n \n if (empty($this->sDataFinal)) {\n throw new Exception(\"Data final não informada!\");\n }\n /**\n * Separamos a data do em ano, mes, dia\n */\n list($iAno, $iMes, $iDia) = explode(\"-\",$this->sDataFinal);\n \n $oInstituicao = db_stdClass::getDadosInstit(db_getsession(\"DB_instit\"));\n $sListaInstit = db_getsession(\"DB_instit\");\n $sWhere = \"o70_instit in ({$sListaInstit})\";\n $iAnoUsu = (db_getsession(\"DB_anousu\")-1);\n $sDataIni = $iAnoUsu.\"-01-01\";\n $sDataFim = $iAnoUsu.\"-12-31\";\n $sSqlBalAnterior = db_receitasaldo(11, 1, 3, true, $sWhere, $iAnoUsu, $sDataIni, $sDataFim, true);\n \n $sSqlAgrupado = \"select case when fc_conplano_grupo($iAnoUsu, substr(o57_fonte,1,1) || '%', 9000 ) is false \"; \n $sSqlAgrupado .= \" then substr(o57_fonte,2,14) else substr(o57_fonte,1,15) end as o57_fonte, \";\n $sSqlAgrupado .= \" o57_descr, \";\n $sSqlAgrupado .= \" saldo_inicial, \";\n $sSqlAgrupado .= \" saldo_arrecadado_acumulado, \"; \n $sSqlAgrupado .= \" x.o70_codigo, \";\n $sSqlAgrupado .= \" x.o70_codrec, \";\n $sSqlAgrupado .= \" coalesce(o70_instit,0) as o70_instit, \";\n $sSqlAgrupado .= \" fc_nivel_plano2005(x.o57_fonte) as nivel \"; \n $sSqlAgrupado .= \" from ({$sSqlBalAnterior}) as x \";\n $sSqlAgrupado .= \" left join orcreceita on orcreceita.o70_codrec = x.o70_codrec and o70_anousu={$iAnoUsu} \";\n $sSqlAgrupado .= \" order by o57_fonte \"; \n $rsBalancete = db_query($sSqlAgrupado);\n $iTotalLinhas = pg_num_rows($rsBalancete);\n for ($i = 1; $i < $iTotalLinhas; $i++) {\n \n $oReceita = db_utils::fieldsMemory($rsBalancete, $i);\n $sDiaMesAno = \"{$iAno}-\".str_pad($iMes, 2, \"0\", STR_PAD_LEFT).\"-\".str_pad($iDia, 2, \"0\", STR_PAD_LEFT);\n \n $oReceitaRetorno = new stdClass();\n \n $oReceitaRetorno->braCodigoEntidade = str_pad($this->iCodigoTCE, 4, \"0\", STR_PAD_LEFT);\n $oReceitaRetorno->braMesAnoMovimento = $sDiaMesAno;\n $oReceitaRetorno->braContaReceita = str_pad($oReceita->o57_fonte, 20, 0, STR_PAD_RIGHT);\n $oReceitaRetorno->braCodigoOrgaoUnidadeOrcamentaria = str_pad($oInstituicao->codtrib, 4, \"0\", STR_PAD_LEFT);\n $nSaldoInicial = $oReceita->saldo_inicial;\n $oReceita->saldo_inicial = str_pad(number_format(abs($oReceita->saldo_inicial),2,\".\",\"\"), 13,'0', STR_PAD_LEFT);\n $oReceitaRetorno->braValorReceitaOrcada = $oReceita->saldo_inicial;\n $oReceita->saldo_arrecadado_acumulado = str_pad(number_format(abs($oReceita->saldo_arrecadado_acumulado) \n ,2,\".\",\"\"), 12,'0', STR_PAD_LEFT);\n $oReceitaRetorno->braValorReceitaRealizada = $oReceita->saldo_arrecadado_acumulado;\n $oReceitaRetorno->braCodigoRecursoVinculado = str_pad($oReceita->o70_codigo, 4, \"0\", STR_PAD_LEFT); \n $oReceitaRetorno->braDescricaoContaReceita = substr($oReceita->o57_descr, 0, 255); \n $oReceitaRetorno->braTipoNivelConta = ($oReceita->o70_codrec==0?'S':'A'); \n $oReceitaRetorno->braNumeroNivelContaReceita = $oReceita->nivel;\n $this->aDados[] = $oReceitaRetorno; \n }\n return true;\n }", "function mkWeekDays(){\n\tif ($this->startOnSun){\n\t\t$out=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNumTitle.\"\\\">\".$this->weekNumTitle.\"</td>\";\n\t\tfor ($x=0;$x<=6;$x++) $out.=\"<td class=\\\"\".$this->cssWeekDay.\"\\\">\".$this->getDayName($x).\"</td>\";\n\t\t$out.=\"</tr>\\n\";\n\t}\n\telse{\n\t\t$out=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNumTitle.\"\\\">\".$this->weekNumTitle.\"</td>\";\n\t\tfor ($x=1;$x<=6;$x++) $out.=\"<td class=\\\"\".$this->cssWeekDay.\"\\\">\".$this->getDayName($x).\"</td>\";\n\t\t$out.=\"<td class=\\\"\".$this->cssWeekDay.\"\\\">\".$this->getDayName(0).\"</td>\";\n\t\t$out.=\"</tr>\\n\";\n\t\t$this->firstday=$this->firstday-1;\n\t\tif ($this->firstday<0) $this->firstday=6;\n\t}\nreturn $out;\n}", "function SemanasEnElMes(){\n \n $fecha_hoy = date('Y-m-01');\n $fecha_fin = date('Y-m-t');\n $dia_fin = date('t');\n $j=1;\n $diaf = '';\n //dia finales\n for($i=1;$i <= $dia_fin;$i++){ \n if(($i%7) == 0){\n $diaf .= $i.',';\n $j++; \n } \n }\n \n $diaf = substr($diaf, 0, -1);\n $sep_fd = explode(\",\", $diaf);\n $count_d = count($sep_fd); \n $ini_semana = array();\n $inicios = array();\n //dias iniciales\n for($i=0;$i< $count_d;$i++){ \n \n \n $fecha_actual = date(\"Y-m-$sep_fd[$i]\"); \n $ini_semana = date(\"Y-m-d\",strtotime($fecha_actual.\"- 6 days\")); \n array_push($inicios,$ini_semana); \n }\n \n //semanas del mes\n $semanas_mes = array();\n $semana_dia_final = array();\n for($i=0;$i< $count_d;$i++){\n if(($count_d-1) == $i){\n $semanas_mes[$i] = array('fi'=>$inicios[$i],'ff'=>date(\"Y-m-t\")); \n } else{ \n $semanas_mes[$i] = array('fi'=>$inicios[$i],'ff'=>date(\"Y-m-$sep_fd[$i]\")); \n }\n }\n \n //var_dump($semanas_mes);\n return $semanas_mes;\n\n \n}", "function date_sql2en($date)\r\n\t{\r\n\t\tif (!empty($date))\r\n\t\t{\r\n\t\t\t$date = explode(\"-\", $date);\r\n\t\t\t$date_fr = $date[1].\"/\".$date[2].\"/\".$date[0];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$date_fr = \"\";\r\n\t\t}\r\n\t\treturn $date_fr;\r\n\t}", "function operasiJoin4($date){\t\n\t\t$query = $this->db->query(\"SELECT k.id_kondisi, k .kondisi, k.id_alat, a.id_kategori, k.tanggal, k.keterangan AS keterangan_kondisi , a.nama_alat FROM kondisi k INNER JOIN alat a ON k.id_alat = a.id_alat WHERE k.tanggal='$date' GROUP BY a.id_alat\"); \n\t\treturn $query->result();\n\t}", "function acadp_mysql_date_format( $date ) {\n\n\t$defaults = array(\n\t\t'year' => 0,\n\t\t'month' => 0,\n\t\t'day' => 0,\n\t\t'hour' => 0,\n\t\t'min' => 0,\n\t\t'sec' => 0\n\t);\n\t$date = array_merge( $defaults, $date );\n\n\t$year = (int) $date['year'];\n\t$year = str_pad( $year, 4, '0', STR_PAD_RIGHT );\n\n\t$month = (int) $date['month'];\n\t$month = max( 1, min( 12, $month ) );\n\n\t$day = (int) $date['day'];\n\t$day = max( 1, min( 31, $day ) );\n\n\t$hour = (int) $date['hour'];\n\t$hour = max( 1, min( 24, $hour ) );\n\n\t$min = (int) $date['min'];\n\t$min = max( 0, min( 59, $min ) );\n\n\t$sec = (int) $date['sec'];\n\t$sec = max( 0, min( 59, $sec ) );\n\n\treturn sprintf( '%04d-%02d-%02d %02d:%02d:%02d', $year, $month, $day, $hour, $min, $sec );\n\n}", "function data_extenso()\r\n{\r\n\tglobal $semana;\r\n\tglobal $mes;\t\r\n\t$diasemana = date('w');\r\n\t$diames = date('j');\r\n\t$numeromes = date('n');\r\n\t$ano = date('Y');\t\r\n\treturn $semana[ $diasemana ] . ', ' .\r\n\t\t $diames . ' de ' . \r\n\t\t $mes[ $numeromes ] . ' de ' . \r\n\t\t $ano;\t\t \r\n}" ]
[ "0.6419705", "0.6232734", "0.62155175", "0.6118826", "0.58787435", "0.583618", "0.5812811", "0.5803407", "0.575797", "0.5730881", "0.57227534", "0.5687638", "0.56755865", "0.56228286", "0.5606867", "0.5590837", "0.55857974", "0.5577274", "0.557112", "0.5545066", "0.5538341", "0.55334336", "0.55297405", "0.54933316", "0.54825383", "0.54617953", "0.54571384", "0.54513615", "0.54507774", "0.54420716", "0.542119", "0.54071254", "0.53753805", "0.5369358", "0.5365601", "0.5361739", "0.5359109", "0.5356523", "0.53560954", "0.53490317", "0.5346782", "0.53458375", "0.532202", "0.53197604", "0.52961266", "0.5294382", "0.5284646", "0.52823865", "0.52817845", "0.52687407", "0.5265995", "0.52588737", "0.525747", "0.5255687", "0.52546996", "0.5250871", "0.5250438", "0.52481204", "0.5247175", "0.52425295", "0.5238077", "0.523713", "0.5233602", "0.5230716", "0.522625", "0.52189946", "0.52159685", "0.52104306", "0.5208559", "0.52008945", "0.51926416", "0.5192563", "0.5184431", "0.51814646", "0.5177374", "0.5173741", "0.51649606", "0.5162338", "0.51609004", "0.514761", "0.5139347", "0.5132768", "0.5126407", "0.51121956", "0.51111656", "0.5107952", "0.5107195", "0.51010144", "0.51010054", "0.5097929", "0.5093131", "0.50801367", "0.5078545", "0.5073313", "0.5073072", "0.5071053", "0.50701696", "0.5067521", "0.5065939", "0.50610167" ]
0.52943844
45
Vidage brutal de la table
function vidageTable() { try { $res = $this->connection->exec('delete from ' . $this->table); } catch (PDOException $e) { $res = -1; if ($this->debug_mode > 0) { $this->addMessage($e->getMessage()); } throw new ObjetBDDException($e->getMessage()); } return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function table_voltooid($conn)\n\t{\n\t\t$data=prepare_data_volt($conn);\n\t\t\n\t\tfor ($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\techo \"<tr>\";\n\t\t\tforeach($data[$i] as $best)\n\t\t\t{\n\t\t\t\techo \"<td>$best</td>\";\n\t\t\t}\n\t\t\techo \"</tr>\";\n\t\t}\n\t}", "public function visualizar() {\n echo $this->getTabuleiro();\n }", "function barra($nombre, $porcentaje)\n{\n\t$ancho = 1;\n\n\t//LARGO M�IMO\n\t$largo = 10;\n?>\n<table width=\"40%\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#E9E9E9\">\n<tr id=\"trtitulogris\">\n<td colspan=\"2\"><?php echo $nombre; ?></td>\n</tr>\n<tr>\n<td width=\"70%\"><img src=\"../../../../imagenes/punto.gif\" height=\"<?php echo $largo ?>\" width=\"<?php echo $porcentaje ?>%\" style=\"color:#FEF7ED\"></td>\n<td width=\"30%\"><?php echo round($porcentaje,1).\" %\"; ?></td>\n</tr>\n</table>\n<br>\n<?php\n}", "function tableau_visites_rubriques($date) {\r\n\tglobal $couleur_claire;\r\n\r\n\t$tab_rubart = rubriques_du_jour($date);\r\n\r\n\t$aff = '';\r\n\t$aff .= debut_cadre_relief('rubrique-24.gif', true);\r\n\t$aff .= \"<div class='cart_titre_bold verdana3'>\" . _T('actijour:repartition_visites_secteurs') . \"</div>\";\r\n\r\n\tif ($tab_rubart) {\r\n\t\t// add visites\r\n\t\t$nbr = 0;\r\n\t\tforeach ($tab_rubart as $s => $c) {\r\n\t\t\t$nbr += $c['vis'];\r\n\t\t}\r\n\r\n\t\t$ifond = 0;\r\n\r\n\t\t$aff .= \"<table cellpadding='2' cellspacing='0' width='100%' border='0'>\\n\";\r\n\r\n\t\tforeach ($tab_rubart as $sect => $cat) {\r\n\t\t\t$ifond = $ifond ^ 1;\r\n\t\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\t\t\t$s_titre = typo(info_rubrique($sect));\r\n\t\t\t$prct_s = round(($cat['vis'] / $nbr) * 100, 1);\r\n\r\n\t\t\t$aff .= \"<tr bgcolor='$couleur'>\\n<td colspan='2'>\"\r\n\t\t\t\t. http_img_pack('secteur-12.gif', 'ico', 'align=\\'absmiddle\\'', '') . \"&nbsp;<b>\"\r\n\t\t\t\t. supprimer_numero($s_titre) . \"</b></td>\\n\"\r\n\t\t\t\t. \"<td width='8%'><div align='right'><b>\"\r\n\t\t\t\t. $cat['vis'] . \"</b></div></td>\\n\"\r\n\t\t\t\t. \"<td width='12%'><div class='verdana2 bold' align='right'>\"\r\n\t\t\t\t. $prct_s . \"%</div></td>\\n\"\r\n\t\t\t\t. \"</tr>\\n\";\r\n\r\n\t\t\tif ($cat['rub']) {\r\n\t\t\t\tforeach ($cat['rub'] as $idr => $vis) {\r\n\t\t\t\t\t$r_titre = typo(info_rubrique($idr));\r\n\t\t\t\t\t$prct_r = round(($vis / $nbr) * 100, 1);\r\n\r\n\t\t\t\t\t$aff .= \"<tr bgcolor='$couleur'>\\n<td width='2%'>&nbsp;</td>\"\r\n\t\t\t\t\t\t. \"<td>\"\r\n\t\t\t\t\t\t. http_img_pack('rubrique-12.gif', 'ico', 'align=\\'absmiddle\\'', '') . \"&nbsp;\"\r\n\t\t\t\t\t\t. supprimer_numero($r_titre) . \"</td>\\n\"\r\n\t\t\t\t\t\t. \"<td width='8%'><div align='right'>\"\r\n\t\t\t\t\t\t. $vis . \"</div></td>\\n\"\r\n\t\t\t\t\t\t. \"<td width='12%'><div class='verdana1' align='right'>\"\r\n\t\t\t\t\t\t. $prct_r . \"%</div></td>\\n</tr>\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$aff .= \"</table>\\n\";\r\n\t}\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "function barra($nombre, $porcentaje) {\n $ancho = 1;\n\n //LARGO MÍNIMO\n $largo = 10;\n ?>\n <table width=\"50%\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#E9E9E9\">\n <tr id=\"trtitulogris\">\n <td colspan=\"2\"><?php echo $nombre; ?></td>\n </tr>\n <tr>\n <td width=\"70%\"><img src=\"../../../../imagenes/punto.gif\" height=\"<?php echo $largo ?>\" width=\"<?php echo $porcentaje ?>%\" style=\"color:#FEF7ED\"></td>\n <td width=\"30%\"><?php echo round($porcentaje, 1) . \" %\"; ?></td>\n </tr>\n </table>\n <br>\n <?php\n }", "function visualizar(){\n\t\t$consulta=$this->sql;\n\t\t$result=mysql_query($consulta);\n\t\t\n\t\techo \"<center><table class='enhancedtablerowhover'>\n\t\t\t<caption>\".$this->comentarioTabla($this->nombreTabla($result,0)).\"</caption>\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t<td scope='col' colspan=2></td>\n\t\t\t\";\n\t\tfor($i=0;$i<mysql_num_fields($result);$i++)\n\t\t{\t\n\t\t \tif(!$this->mostrarCampo($this->nombreCampo($result,$i)) or stripos($this->nombreCampo($result,$i),\"imagen\"))continue;\n\t\t \t$des = str_replace(\"/*\",\"\",$this->comentario($this->nombreCampo($result, $i), $this->nombreTabla($result, $i)));\n\t\t\techo \"<th scope='col' ><a href='?order='>$des</a></th>\";\n\t\t}\n\t\techo\"\t\n\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\";\n\t\twhile ($row = mysql_fetch_array($result)) {\n\t\t$filtro=$this->cifrar($row,$result);\n\t\techo \"<tr>\";\n\t\techo \"<td class='CrearReporte'>\n\t\t\t\t<a href='$_SERVER[PHP_SELF]?operacion=m&$filtro'>\n\t\t\t\t<img src='\".$this->PathImages.\"editar.png'>\n\t\t\t</a>\n\t\t </td>\";\n\t\techo \"<td class='CrearReporte' >\n\t <a href='$_SERVER[PHP_SELF]?operacion=b&$filtro'>\n\t\t\t\t<img src='\".$this->PathImages.\"eliminar.png'>\n\t\t\t\t</a>\n\t\t\t </td>\n\t\t\t \";\n\t\t //?columna=$row[0]&operacion=q \n\t\tfor ($i = 0; $i < mysql_num_fields($result); $i++){\n\t\t \tif(!$this->mostrarCampo($this->nombreCampo($result,$i)) or stripos($this->nombreCampo($result,$i),\"imagen\"))continue;\n\t\t\techo \"<td>\".$row[$i].\"</td>\";\n\t\t}\n\t\techo \"</tr>\";\n\t}\n\techo \"</tr></tbody></table></center>\";\n\t}", "function ImprimeTablePOB($idTabla, $data, $pactu, $peli, $crxpag, $paginap = 1, $cantlink = 5,$orderby = -1,$buscar=\"\",$classCSS=\"\",$link_td=\"\") {\n\t\t $tabla=\"\";\n\t\t//$tabla.= Buscar($buscar);// formulario buscar si llamo a esta funcion solo serviria para el boton buscar no eventos teclado\n //$tabla.= '<table id=\"' . $idTabla . '\" class=\"'.$classCSS.'\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center\" ><tr>';\n\t\t $tabla.= '<table id=\"' . $idTabla . '\" class=\"'.$classCSS.'\" cellpadding=\"0\" cellspacing=\"1\" >';\n try {\n // if (count($data) > 0) {\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n if ($pactu != \"\") {\n if ($conta == 0) {;\n $tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n //Nombres de las columnas\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t$ordenar = $x + 1;\t\t\t\t\t\n\t\t\t\t\t//$tabla.= '<th><a href=\"?pagina=' . $paginap . '&orden=' . $ordenar . '\" >' . utf8_encode($data[\"columnas\"][$x]) . '</a></th>';\n\t\t\t\t\t$tabla.= '<th><a href=\"#\" onClick=\"Paginar(\\'pagina=' . $paginap . '&orden=' .$ordenar .'&busca=' .$buscar .'\\'); return false\" >' . utf8_encode($data[\"columnas\"][$x]) . '</a></th>'.\"\\n\";\n\t\t\t\t \n }\n $tabla.= \"</tr>\";\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n $fin = $paginap * $crxpag;\n $ini = $fin - $crxpag;\n for ($i = $ini;$i < $fin;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= '<tr>';\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"' . $pactu . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Mactualizar\"><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t \n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n // $tabla.= '<td><a href=\"' . $peli . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Eliminar\"><img src=\"../imgcixphp/ico_eliminar.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$peli.'('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n\t\t\t\t\t\t\tif($link_td!=\"\"){\t$ID= $data[\"cuerpo\"][$i][0] ; // ID\n\t\t\t\t\t\t\t\t$url =$link_td.\"?id=\".$ID;// Url mas id como dato mediante el metodo get \t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t $tabla.= '<td onclick=\"document.location=\\''.$url.'\\' \" >' . $data[\"cuerpo\"][$i][\"$columnas\"] . '</td>' . \"\\n\";\n\t\t\t\t\t\t\t }else{ \n\t\t\t\t\t\t\t\t$tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . '</td> '.\"\\n\";\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t// $tabla.= '<td>&nbsp;&nbsp;' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&nbsp;&nbsp; </td> '.\"\\n\";\n \n }\n }\n $tabla.= '</tr>'.\"\\n\";\t\t\t\t\n\t\t\t\t\t\n } \n\t\t\t\t//===========FIN CUERPO DE TABLA==============================================================================\n\t\t\t\t\t $tabla.= '</table><p style=\"clear:both;height:5px;\"></p>'; \n //===========PAGINADO======================================================================================================================\n $paginado = Paginar($cantele, $crxpag, $paginap, $cantlink,$orderby,$buscar);\n $tabla.= $paginado;\n //===========FIN PAGINADO ==================================================================================================================\n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Datos Registrados\"; \n\t\t\t \t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot></table><br>';\n\t\t\t\t}\n\t\t\t\n } catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "function ispis_tablice($ucenici)\n {\n echo '<table border=1>';\n foreach ($ucenici as $key => $ime) {\n echo '<tr><td>'\n .$key.'</td>;\n <td>'.$ime.'</td>;\n </tr>';\n }\n echo '</table>';\n }", "function tabelKoppenVeilingen(){\n\tprint(\"<table class='ui celled fixed basic table' border='1px'> \n\t <tr>\n\t\t <td>Object Nr</td> \n\t\t <td>Titel</td>\n\t\t <td>Verkoper</td>\n\t\t <td>Koper</td>\n\t\t <td></td>\n\t\t <td></td>\n\t </tr>\"); \n}", "function TableShow($align,$LineFeedHeight)\r\n{\r\n\t// Le calcul ne l'est pas, lui ;-)\r\n\t$oldFontSizePt=$this->FontSizePt;\r\n\t$oldFontFamily=$this->FontFamily;\r\n\r\n\t$tableFontFamily='helvetica';\r\n\t$cellmargin=3.0;\t\t// pifomètre : un peu de marge sur la largeur de cellule\r\n\t$wrwi=$this->w - $this->lMargin - $this->rMargin;\r\n\t//-----------\r\n\t$tableFontSize=10;\r\n\t$TableWidth = 1.01*$wrwi;\r\n\t$max_width=0;\r\n\t$min_font_size=6.0; // mis à 6, 5 était vraiment petit\r\n\t$maxiter = 10;\r\n\tdo {\r\n\t\t$tableFontSize = $tableFontSize *min(1.0,$wrwi/$TableWidth)*0.99; // 0.99 pour converger plus vite\r\n\r\n\t\t$fixed_width= ($tableFontSize<$min_font_size) || ($maxiter==1) || ($TableWidth<=$wrwi);\r\n\t\tif ($fixed_width)\r\n\t\t\t$coeff=min(1.0,$wrwi/$TableWidth);\r\n\r\n\t\t$tableFontSize = max($min_font_size,$tableFontSize);\r\n\t\t// on boucle sur la taille de police tant que la largeur du tableau ne rentre pas dans la page\r\n\r\n\t\t// remise à zéro des largeurs de colonnes\r\n\t\tforeach ($this->columnProp as $i=>$cprop)\r\n\t\t\tif ($fixed_width)\t$this->columnProp[$i]['w']=$this->columnProp[$i]['w']*$coeff;// redimenssioner la largeur de la colonne\r\n\t\t\telse\t$this->columnProp[$i]['w']=0.0;\r\n\t\tforeach($this->tableContent as $j=>$row)\r\n\t\t\t$this->lineProp[$j]['h']=0.0;\r\n\r\n\t\t// on passe toutes les cellules du tableau en revue\r\n\t\t// de façon à calculer la largeur max de chaque colonne pour la taille de police courante\r\n\t\tforeach($this->tableContent as $j=>$row) {\r\n\t\t\tforeach($row as $i=>$cell) {\r\n\t\t\t\t$htmlContent = $cell['content'].\"<br />\";\r\n\t\t\t\tif ($this->tableContent[$j][$i]['TH']) {\r\n\t\t\t\t\t$htmlContent=\"<B>$htmlContent</B>\";\r\n\t\t\t\t}\r\n\t\t\t\tlist($width,$height)=$this->CellSize($htmlContent,$tableFontFamily,$tableFontSize,$LineFeedHeight,$cellmargin,$fixed_width?$this->columnProp[$i]['w']:0);\r\n\r\n\t\t\t\tif (!$fixed_width)\r\n\t\t\t\t\t$this->columnProp[$i]['w'] = max($this->columnProp[$i]['w'],$width);\r\n\t\t\t\t$this->lineProp[$j]['h'] = max($this->lineProp[$j]['h'],$height)+0.3;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Repris de CalcWidth : calcul de la largeur de la table\r\n\t\t$TableWidth=0.0;\r\n\t\tforeach($this->columnProp as $col) {\r\n\t\t\t$TableWidth += $col['w'];\r\n\t\t}\r\n\t} while (!$fixed_width && $maxiter--);\r\n\r\n\t//-----------\r\n\t//\tEnvoi du tableau dans le flux PDF\r\n\t//-----------\r\n\r\n\t$this->SetFont($tableFontFamily, '', $tableFontSize);\r\n\t//Calcule l'abscisse du tableau\r\n\tif($align=='C')\r\n\t\t$this->TableX=max(($this->w-$TableWidth)/2, 0);\r\n\telseif($align=='R')\r\n\t\t$this->TableX=max($this->w-$this->rMargin-$TableWidth, 0);\r\n\telse\r\n\t\t$this->TableX=$this->lMargin;\r\n\r\n\t$ci=0;\t# flip-flop pour couleur de fond de ligne\r\n\tforeach($this->tableContent as $j=>$row) {\r\n\t\t$this->SetX($this->TableX);\r\n\t\t$fill = !empty($this->RowColors[$ci]);\r\n\t\tif ($fill) {\r\n\t\t\t$this->SetFillColor($this->RowColors[$ci][0],\r\n\t\t\t\t\t\t\t\t$this->RowColors[$ci][1],\r\n\t\t\t\t\t\t\t\t$this->RowColors[$ci][2]);\r\n\t\t}\r\n\r\n\t\tforeach($this->tableContent[$j] as $i=>$cell) {\r\n\t\t\tif ($this->tableContent[$j][$i]['TH'] == true) {\r\n\t\t\t\t$this->SetFont($tableFontFamily, 'B', $tableFontSize);\r\n\t\t\t\t$this->SetFillColor(255, 255, 0);\t// jaune\r\n\t\t\t\t$fill=1;\r\n\t\t\t}\r\n\t\t\t$this->OutputCell(\r\n\t\t\t\t$this->columnProp[$i]['w'],\r\n\t\t\t\t$this->lineProp[$j]['h'],\r\n\t\t\t\t$cell['content'],\r\n\t\t\t\t1,\r\n\t\t\t\t$LineFeedHeight,\r\n\t\t\t\t$this->columnProp[$i]['a'],\r\n\t\t\t\t$fill,0);\r\n\r\n\t\t\tif ($this->tableContent[$j][$i]['TH']) {\r\n\t\t\t\t$this->SetFont('', '', $tableFontSize);\r\n\t\t\t\t$this->SetFillColor(255);\t// blanc\r\n\t\t\t}\r\n\t\t}\r\n\t\t$ci=1-$ci;\r\n\t\t$this->maxLineWidth = max($this->maxLineWidth,$this->x);\r\n\t\t$this->Ln($this->lineProp[$j]['h']);\r\n\t}\r\n\r\n\t$this->SetFont($oldFontFamily, '', $oldFontSizePt);\r\n\t$this->Ln($LineFeedHeight);\r\n}", "function prikazi_sqltabelu($sql_tabela) {\n\n\tglobal $db;\n\n\techo \"<table class='dt-table'>\";\n\techo \"<h2>\" . $sql_tabela . \"</h2>\";\n\n\t// generisanje headera tabele (prikaz podataka)\n\n\t$komanda_head = \"SELECT * FROM $sql_tabela LIMIT 1\";\n\t$result_head = mysql_query($komanda_head, $db);\t\n\n\twhile ( $red = mysql_fetch_assoc($result_head) ) :\n\n\t\t$m = 0;\n\n\t\techo \"<tr class='dt-table'>\";\n\n\t\tforeach ($red as $item) {\n\t\n\t\t\t$kolona = mysql_field_name($result_head, $m);\n \t\t\techo \"<td class='dt-table'>\" . $kolona . \"</td>\";\n \t\t\t//echo \"<td>\" . $item . \"</td>\";\n \t\t$m++;\n\n\t\t}\n\n\t\techo \"</tr>\";\n\n\tendwhile;\n\n\t// generisanje tela tabele (prikaz podataka)\n\n\t$komanda_body = \"SELECT * FROM $sql_tabela\";\n\t$result_body = mysql_query($komanda_body, $db);\n\n\n\twhile ( $red = mysql_fetch_assoc($result_body) ) :\n\n\t\t$n = 0;\n\n\t\techo \"<tr class='dt-table'>\";\n\n\t\tforeach ($red as $item) {\n\t\n\t\t\t$kolona = mysql_field_name($result_body, $n);\n \t\t\techo \"<td class='dt-table'>\" . $item . \"</td>\";\n \t\t$n++;\n\n\t\t}\n\n\t\techo \"</tr>\";\n\n\tendwhile;\n\n\techo \"</table>\";\n\n}", "function TablaVentasDiariasVendedor()\n {\t\n\t\n\t $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n\t $this->SetXY(10, 15); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n //$this->Cell(130);\n //Título\n $this->Cell(140,8,'',0,0,'');\n\t$this->Cell(180,8,'LISTADO DE VENTAS DIARIAS DEL '.date(\"d-m-Y\"),0,1,'C');\n\t\n $this->Cell(140,8,'',0,0,'');\n\t$this->Cell(180,8,'DE CAJA N°.'.base64_decode($_GET['caja']),0,0,'C');\n //Salto de línea\n $this->Ln(15);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'CAJA',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL DESC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarVentasDiarias();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$PagototalCompras=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago'];\n $PagototalCompras+=$reg[$i]['totalpago2']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n\t$this->CellFitSpace(60,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n\n $this->Cell(35,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n\t$UtilidadBruto= $Pagototal-$PagototalCompras;\n\t$MargenBruto = ( $UtilidadBruto == '' ? \"0.00\" : number_format($UtilidadBruto/$PagototalCompras, 2, '.', ','));\n\t\n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n\t$this->Cell(35,5,'',0,0,'C');\n\t$this->Cell(15,5,'',0,0,'C');\n $this->Cell(30,5,'',0,0,'C');\n $this->Cell(30,5,'',0,0,'C');\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(22,5,'',0,0,'C');\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(37,5,\"TOTAL GANANCIAS\",1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(30,5,utf8_decode(number_format($MargenBruto*100, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n }", "function desplegarTabla($query,$anchtable=array(),$iconos=array(),$coLoTabla=\"table-primary\"){\n\n\tglobal $oBD;\n\n\t$registros = $oBD->consulta($query);\n\n\t$columnas = mysqli_num_fields($registros);\n\techo '<table class= \"table table-hover'.$coLoTabla.'\">';\n\t// creacion de la cabecera\n\techo '<tr class=\"table-dark\">';// hace el renglon\n\n\t// if (count($anchtable)){\n\t// \tforeach ($anchtable as $anch) {\n\t// \t\techo \"<td style=width:$anch.'%';></td>\";\n\t// \t\techo $anch;\n\t// \t}\n\t// }\n$k = 0;\n// si el count de iconos existe entonces me mandaron iconos \n\tif (count($iconos)){\n\t\tforeach ($iconos as $icono) {\n\t\t\techo $k;\n\t\t\t\t\t\n\t\t\tif (count($anchtable)) {\n\t\t\t\techo \"<td style=width:$anchtable[$k];>&nbsp;</td>\";\t\n\t\t\t}else{\n\t\t\t\techo \"<td>&nbsp;</td>\";\t\n\t\t\t}\n\n\t\t\t$k++;\n\t\t}\n\t}\n\t//echo $columnas;\n\techo $k;\n\t//$k=$k-1;\n\tfor ($c=0; $c < $columnas; $c++){\n\t\t// para traer los nombres de los campos\n\t\t$campo=mysqli_fetch_field_direct($registros,$c); // da la informacion de un campo en la base de datos\n\t\t \n\t\t if (count($anchtable)) {\n\t\t\t\techo \"<td style=width:$anchtable[$k];>$campo->name.$c</td>\";\t\n\t\t\t}else{\n\t\t\t\techo '<td style=\"width:(90/$columnas)%\">'.$campo->name.'</td>';\t\t\n\t\t\t}\n\t\t // echo $anchtable[$c];\n\t\t $k++;\n\t\t\n\t}\n\techo '</tr>';\n\t// fin cabecera\n\t// comienzo de registros\n\tfor ($r=0; $r < $oBD->numeRegistros; $r++) \n\t{ echo '<tr>';\n\t\t// agregando iconos\n\t\t// EN EL CASO DE QUE \"UPDATE EXISTA EN EL ARRGLO DE LOS ICONOS\"\n\t\tif (in_array(\"update\", $iconos)) {\n\t\t\t//da comportamiento de los iconos\n\t\t\techo '<td style=\"width:5%\"><img src=\"imagenes/update.png\"></td>';\n\t\t}\n\n\t\tif (in_array(\"delete\", $iconos)) {\n\t\t\t//da comportamiento de los iconos\n\t\t\techo '<td style=\"width:5%\"><img src=\"imagenes/delete.png\"></td>';\n\t\t}\n\n\n\t\t$campos = mysqli_fetch_array($registros);\n\t\t// despliega la informacion de un registro especifico\n\t\tfor ($c=0; $c < $columnas; $c++) \n\t\t\techo '<td>'.$campos[$c].'</td>';\n\t echo '</tr>';\n\t\t\n\t}\necho '</table>';\necho $k;\n}", "function ImprimeTableP($idTabla, $data, $pactu, $peli, $crxpag, $paginap = 1, $cantlink = 5,$classCSS=\"\") {\n\t\t$tabla = '<table id=\"' . $idTabla . '\" class=\"'.$classCSS.'\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center;\" >';\n try {\n //if (count($data) > 0) {\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n $tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {\n $tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n $tabla.= '<th>' . utf8_encode($data[\"columnas\"][$x]) . '</th>'.\"\\n\";\n //$tabla.= Columna_Cabezera(\"f1\", utf8_encode($data[\"columnas\"][$x]));\n \n }\n \t\t$tabla.= '</tr>';\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n\t\t\t\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n $fin = $paginap * $crxpag;\n $ini = $fin - $crxpag;\n for ($i = $ini;$i < $fin;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= '<tr>';\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"' . $pactu . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Mactualizar\"><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n // $tabla.= '<td><a href=\"' . $peli . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Eliminar\"><img src=\"../imgcixphp/ico_eliminar.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$peli.'('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . '</td> '.\"\\n\";\n }\n }\n $tabla.= '</tr>';\n } \n\t\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n \t $tabla.= '</table><p style=\"clear:both;height:5px;\"></p>';\n\t\t\t \n\t\t\t //===========PAGINADO======================================================================================================================\n \t$paginado = Paginar($cantele, $crxpag, $paginap, $cantlink);\n $tabla.= $paginado;\n //===========FIN PAGINADO ==================================================================================================================\n \n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Datos Registrados\"; \n\t\t\t \t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot></table><br/>';\n\t\t\t\t}\n\t\t\t\n }catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "function EdtDuJourVertical($tab_data, $jour, $flags) \r\n{\r\n $result = \"\";\r\n $entetes = ConstruireEnteteEDT();\r\n $creneaux = ConstruireCreneauxEDT();\r\n $hauteur_demicreneaux = 20;\r\n\t$hauteur_creneaux = $hauteur_demicreneaux * 2;\r\n\t$nb_creneaux = $creneaux['nb_creneaux'];\r\n if (($nb_creneaux == 0) OR ($nb_creneaux == 1)) {\r\n $height = \"94px\";\r\n }\r\n else {\r\n $height = $nb_creneaux*2*$hauteur_demicreneaux + $hauteur_demicreneaux+1;\r\n $height = $height.\"px;\";\r\n } \r\n while (!isset($entetes['entete'][$jour])) {\r\n $jour--;\r\n }\r\n $jour_sem = $entetes['entete'][$jour];\r\n\r\n $result .= \" <div class=\\\"fond\\\">\\n\";\r\n $result .= \"<div class=\\\"colonne\\\" style=\\\"height : \".$height.\"\\\">\\n\";\r\n $jour_sem = $entetes['entete'][$jour];\r\n $result .= \"<div class=\\\"entete\\\" style=\\\"height : \".$hauteur_demicreneaux.\"px;\\\"><div class=\\\"cadre\\\">\".$jour_sem.\"</div></div>\\n\";\r\n $index_box = 0;\r\n while (isset($tab_data[$jour]['type'][$index_box]))\r\n {\r\n if ($tab_data[$jour]['type'][$index_box] == \"vide\") {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n $result .= \"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\";\r\n \r\n if (strpos($tab_data[$jour]['couleur'][$index_box], \"Repas\") !== FALSE) {\r\n $result .= \"<div class=\\\"cadreRepas\\\">\\n\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cadre\\\">\\n\";\r\n }\r\n if (isset($tab_data[$jour]['extras'][$index_box])) {\r\n $result .= \"Hello\".$tab_data[$jour]['extras'][$index_box];\r\n }\r\n $result .= \"</div></div>\\n\"; \r\n\r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"erreur\")\r\n {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule\\\" style = \\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n $result .= \"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\";\r\n $result .= \"<div class=\\\"cadreRouge\\\">\\n\";\r\n $result .= $tab_data[$jour]['contenu'][$index_box];\r\n $result .= \"</div></div>\\n\"; \r\n\r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"conteneur\")\r\n {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule\\\" style =\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule\\\" style = \\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n \r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"cours\")\r\n {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n $result .= \"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\";\r\n if (strpos($tab_data[$jour]['couleur'][$index_box], \"Couleur\") !== FALSE) {\r\n $result .= \"<div class=\\\"cadreCouleur\\\">\\n\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cadre\\\">\\n\";\r\n }\r\n if (isset($tab_data[$jour]['extras'][$index_box])) {\r\n $result .= $tab_data[$jour]['extras'][$index_box];\r\n }\r\n if ($flags & INFOBULLE) {\r\n $lesson_content_1 = str_replace(\"<br />\", \" - \", $tab_data[$jour]['contenu'][$index_box]);\r\n $lesson_content_2 = str_replace(\"<i>\", \" \", $lesson_content_1);\r\n $lesson_content = str_replace(\"</i>\", \" \", $lesson_content_2);\r\n $result .=\"<div class=\\\"ButtonBar\\\"><div class=\\\"image\\\"><img src=\\\"../../templates/DefaultEDT/images/info.png\\\" title=\\\"\".$lesson_content.\"\\\" /></div></div>\";\r\n $result .= \"</div></div>\\n\";\r\n\r\n }\r\n else {\r\n $result .= $tab_data[$jour]['contenu'][$index_box];\r\n $result .= \"</div></div>\\n\";\r\n }\r\n\r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"fin_conteneur\")\r\n {\r\n $result .= \"</div>\\n\";\r\n }\r\n else \r\n {\r\n // ========= type de box non implémentée\r\n\r\n }\r\n\r\n\r\n $index_box++;\r\n }\r\n\r\n $result .= \"</div>\\n\";\r\n\r\n\tif ($flags & CRENEAUX_INVISIBLES) {\r\n\t\t$result .= '</div>';\r\n\t}\r\n\telse {\r\n\t\t// ===== affichage de la colonne créneaux\r\n\r\n\t\t$result .= \"<div class=\\\"colonne_creneaux\\\">\\n\";\r\n\t\t$result .= \"<div class=\\\"entete_creneaux\\\" style=\\\"height : \".$hauteur_demicreneaux.\"px;\\\">\";\r\n\t\tif (isset($tab_data['entete_creneaux'])) {\r\n\t\t\t$result .= $tab_data['entete_creneaux'];\r\n\t\t}\r\n\t\t$result .= \"</div>\\n\";\r\n\r\n\t\tfor ($i = 0; $i < $creneaux['nb_creneaux']; $i++)\r\n\t\t{\r\n\t\t\t$hauteur = 2 * $hauteur_demicreneaux;\r\n\t\t\t$hauteur = $hauteur.\"px;\";\r\n\t\t\t$result .= \"<div class=\\\"cellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n\t\t\t$result .= \"<div class=\\\"cellule_creneaux\\\"><div class=\\\"cadre\\\">\".$creneaux['creneaux'][$i].\"</div></div>\\n\";\r\n\t\t\t$result .= \"</div>\";\r\n\t\t}\r\n\t}\r\n\t\t$result .= \"</div></div><div class=\\\"spacer\\\"></div>\";\r\n return $result;\r\n}", "function write_table_head()//scrie capul de tabel pentru perioadele de vacanta\r\n{\r\n\t$output = \"\";\r\n\tadd($output,'<table width=\"500px\" cellpadding=\"1\" cellspacing=\"1\" class=\"special\">');\r\n\tadd($output,'<tr class=\"tr_head\"><td>Nr</td><td>Data inceput</td><td>Data sfarsit</td></tr>');\r\n\t\r\n\treturn $output;\r\n}", "function traiter_tableau($bloc) {\n\t// id \"unique\" pour les id du tableau\n\t$tabid = substr(md5($bloc), 0, 4);\n\n\t// Decouper le tableau en lignes\n\tpreg_match_all(',([|].*)[|]\\n,UmsS', $bloc, $regs, PREG_PATTERN_ORDER);\n\t$lignes = array();\n\t$debut_table = $summary = '';\n\t$l = 0;\n\n\t// Traiter chaque ligne\n\t$reg_line1 = ',^(\\|(' . _RACCOURCI_TH_SPAN . '))+$,sS';\n\t$reg_line_all = ',^(' . _RACCOURCI_TH_SPAN . ')$,sS';\n\t$hc = $hl = array();\n\tforeach ($regs[1] as $ligne) {\n\t\t$l++;\n\n\t\t// Gestion de la premiere ligne :\n\t\tif ($l == 1) {\n\t\t\t// - <caption> et summary dans la premiere ligne :\n\t\t\t// || caption | summary || (|summary est optionnel)\n\t\t\tif (preg_match(',^\\|\\|([^|]*)(\\|(.*))?$,sS', rtrim($ligne, '|'), $cap)) {\n\t\t\t\t$cap = array_pad($cap, 4, null);\n\t\t\t\t$l = 0;\n\t\t\t\tif ($caption = trim($cap[1])) {\n\t\t\t\t\t$debut_table .= \"<caption>\" . $caption . \"</caption>\\n\";\n\t\t\t\t}\n\t\t\t\t$summary = ' summary=\"' . entites_html(trim($cap[3])) . '\"';\n\t\t\t}\n\t\t\t// - <thead> sous la forme |{{titre}}|{{titre}}|\n\t\t\t// Attention thead oblige a avoir tbody\n\t\t\telse {\n\t\t\t\tif (preg_match($reg_line1, $ligne, $thead)) {\n\t\t\t\t\tpreg_match_all('/\\|([^|]*)/S', $ligne, $cols);\n\t\t\t\t\t$ligne = '';\n\t\t\t\t\t$cols = $cols[1];\n\t\t\t\t\t$colspan = 1;\n\t\t\t\t\tfor ($c = count($cols) - 1; $c >= 0; $c--) {\n\t\t\t\t\t\t$attr = '';\n\t\t\t\t\t\tif ($cols[$c] == '<') {\n\t\t\t\t\t\t\t$colspan++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($colspan > 1) {\n\t\t\t\t\t\t\t\t$attr = \" colspan='$colspan'\";\n\t\t\t\t\t\t\t\t$colspan = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// inutile de garder le strong qui n'a servi que de marqueur\n\t\t\t\t\t\t\t$cols[$c] = str_replace(array('{', '}'), '', $cols[$c]);\n\t\t\t\t\t\t\t$ligne = \"<th id='id{$tabid}_c$c'$attr>$cols[$c]</th>$ligne\";\n\t\t\t\t\t\t\t$hc[$c] = \"id{$tabid}_c$c\"; // pour mettre dans les headers des td\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$debut_table .= \"<thead><tr class='row_first'>\" .\n\t\t\t\t\t\t$ligne . \"</tr></thead>\\n\";\n\t\t\t\t\t$l = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Sinon ligne normale\n\t\tif ($l) {\n\t\t\t// Gerer les listes a puce dans les cellules\n\t\t\t// on declenche simplement sur \\n- car il y a les\n\t\t\t// -* -# -? -! (qui produisent des -&nbsp;!)\n\t\t\tif (strpos($ligne, \"\\n-\") !== false) {\n\t\t\t\t$ligne = traiter_listes($ligne);\n\t\t\t}\n\n\t\t\t// tout mettre dans un tableau 2d\n\t\t\tpreg_match_all('/\\|([^|]*)/S', $ligne, $cols);\n\n\t\t\t// Pas de paragraphes dans les cellules\n\t\t\tforeach ($cols[1] as &$col) {\n\t\t\t\tif (strlen($col = trim($col))) {\n\t\t\t\t\t$col = preg_replace(\"/\\n{2,}/S\", \"<br /> <br />\", $col);\n\t\t\t\t\tif (_AUTOBR) {\n\t\t\t\t\t\t$col = str_replace(\"\\n\", _AUTOBR . \"\\n\", $col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// assembler le tableau\n\t\t\t$lignes[] = $cols[1];\n\t\t}\n\t}\n\n\t// maintenant qu'on a toutes les cellules\n\t// on prepare une liste de rowspan par defaut, a partir\n\t// du nombre de colonnes dans la premiere ligne.\n\t// Reperer egalement les colonnes numeriques pour les cadrer a droite\n\t$rowspans = $numeric = array();\n\t$n = $lignes ? count($lignes[0]) : 0;\n\t$k = count($lignes);\n\t// distinguer les colonnes numeriques a point ou a virgule,\n\t// pour les alignements eventuels sur \",\" ou \".\"\n\t$numeric_class = array(\n\t\t'.' => 'point',\n\t\t',' => 'virgule',\n\t\ttrue => ''\n\t);\n\tfor ($i = 0; $i < $n; $i++) {\n\t\t$align = true;\n\t\tfor ($j = 0; $j < $k; $j++) {\n\t\t\t$rowspans[$j][$i] = 1;\n\t\t\tif ($align and preg_match('/^[{+-]*(?:\\s|\\d)*([.,]?)\\d*[}]*$/', trim($lignes[$j][$i]), $r)) {\n\t\t\t\tif ($r[1]) {\n\t\t\t\t\t$align = $r[1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$align = '';\n\t\t\t}\n\t\t}\n\t\t$numeric[$i] = $align ? (\" class='numeric \" . $numeric_class[$align] . \"'\") : '';\n\t}\n\tfor ($j = 0; $j < $k; $j++) {\n\t\tif (preg_match($reg_line_all, $lignes[$j][0])) {\n\t\t\t$hl[$j] = \"id{$tabid}_l$j\"; // pour mettre dans les headers des td\n\t\t} else {\n\t\t\tunset($hl[0]);\n\t\t}\n\t}\n\tif (!isset($hl[0])) {\n\t\t$hl = array();\n\t} // toute la colonne ou rien\n\n\t// et on parcourt le tableau a l'envers pour ramasser les\n\t// colspan et rowspan en passant\n\t$html = '';\n\n\tfor ($l = count($lignes) - 1; $l >= 0; $l--) {\n\t\t$cols = $lignes[$l];\n\t\t$colspan = 1;\n\t\t$ligne = '';\n\n\t\tfor ($c = count($cols) - 1; $c >= 0; $c--) {\n\t\t\t$attr = $numeric[$c];\n\t\t\t$cell = trim($cols[$c]);\n\t\t\tif ($cell == '<') {\n\t\t\t\t$colspan++;\n\n\t\t\t} elseif ($cell == '^') {\n\t\t\t\t$rowspans[$l - 1][$c] += $rowspans[$l][$c];\n\n\t\t\t} else {\n\t\t\t\tif ($colspan > 1) {\n\t\t\t\t\t$attr .= \" colspan='$colspan'\";\n\t\t\t\t\t$colspan = 1;\n\t\t\t\t}\n\t\t\t\tif (($x = $rowspans[$l][$c]) > 1) {\n\t\t\t\t\t$attr .= \" rowspan='$x'\";\n\t\t\t\t}\n\t\t\t\t$b = ($c == 0 and isset($hl[$l])) ? 'th' : 'td';\n\t\t\t\t$h = (isset($hc[$c]) ? $hc[$c] : '') . ' ' . (($b == 'td' and isset($hl[$l])) ? $hl[$l] : '');\n\t\t\t\tif ($h = trim($h)) {\n\t\t\t\t\t$attr .= \" headers='$h'\";\n\t\t\t\t}\n\t\t\t\t// inutile de garder le strong qui n'a servi que de marqueur\n\t\t\t\tif ($b == 'th') {\n\t\t\t\t\t$attr .= \" id='\" . $hl[$l] . \"'\";\n\t\t\t\t\t$cols[$c] = str_replace(array('{', '}'), '', $cols[$c]);\n\t\t\t\t}\n\t\t\t\t$ligne = \"\\n<$b\" . $attr . '>' . $cols[$c] . \"</$b>\" . $ligne;\n\t\t\t}\n\t\t}\n\n\t\t// ligne complete\n\t\t$class = alterner($l + 1, 'odd', 'even');\n\t\t$html = \"<tr class='row_$class $class'>$ligne</tr>\\n$html\";\n\t}\n\n\treturn \"\\n\\n<table\" . $GLOBALS['class_spip_plus'] . $summary . \">\\n\"\n\t. $debut_table\n\t. \"<tbody>\\n\"\n\t. $html\n\t. \"</tbody>\\n\"\n\t. \"</table>\\n\\n\";\n}", "function tableVolby($conn ,$selected_val){\n $sql = \"SELECT strany.nazov as nazov, strany.skratka as skratka, vysledky.kresla as kresla, \n vysledky.koalicia as koalicia\n FROM strany, vysledky, volby WHERE ((strany.id = vysledky.id_strany) \n AND (vysledky.id_volby = volby.id))\n AND(volby.den1 = '$selected_val')\";\n $result = $conn->query($sql);\n\n if ($result->num_rows > 0) {\n echo \"<table id='myTable'>\";\n echo \" \n <tr class=\\\"header\\\">\n <th onclick>Nazov</th> \n <th onclick>Skratka</th> \n <th onclick>Kresla</th>\n <th onclick>Koalicia</th>\n </tr>\";\n // output data of each row\n while($row = $result->fetch_assoc()) {\n writeTableLine2($row);\n }\n echo \"</table><br>\";\n }\n// else {\n// echo \"0 results\";\n// }\n $result->free();\n}", "function ImprimeTablePO($idTabla, $data, $pactu, $peli, $crxpag=10, $paginap = 1, $cantlink = 5,$orderby = -1,$classCSS=\"\") { \n $tabla = '<table id=\"' . $idTabla . '\" class=\"'.$classCSS.'\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center\" >';\n try {\n // if (count($data) > 0) {\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n if ($pactu != \"\") {\n if ($conta == 0) {;\n $tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n //Nombres de las columnas\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t$ordenar = $x + 1;\t\t\t\t\t\n\t\t\t\t\t//$tabla.= '<th><a href=\"?pagina=' . $paginap . '&orden=' . $ordenar . '\" >' . utf8_encode($data[\"columnas\"][$x]) . '</a></th>';\n\t\t\t\t\t$tabla.= '<th><a href=\"#\" onClick=\"Paginar(\\'pagina=' . $paginap . '&orden=' . $ordenar . '\\'); return false\" >' . utf8_encode($data[\"columnas\"][$x]) . '</a></th>'.\"\\n\";\n\t\t\t\t \n }\n \t\t$tabla.= \"</tr>\";\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n $fin = $paginap * $crxpag;\n $ini = $fin - $crxpag;\n for ($i = $ini;$i < $fin;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= '<tr>';\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"' . $pactu . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Mactualizar\"><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n // $tabla.= '<td><a href=\"' . $peli . 'id=' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&accion=Eliminar\"><img src=\"../imgcixphp/ico_eliminar.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$peli.'('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . '</td> '.\"\\n\";\n }\n }\n $tabla.= '</tr>';\n }\n\t\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n \t$tabla.= '</table><p style=\"clear:both;height:5px;\"></p>'; \n //===========PAGINADO======================================================================================================================\n $paginado = Paginar($cantele, $crxpag, $paginap, $cantlink,$orderby);\n $tabla.= $paginado;\n //===========FIN PAGINADO ==================================================================================================================\n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Datos Registrados\"; \n\t\t\t \t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot></table><br>';\n\t\t\t\t}\n\t\t\t\n }catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "function echo_resultats_bib($query){\n\techo '<table id=\"traitementbib_fr\" class=\"display\" width=\"100%\" cellspacing=\"0\">\n\t\t\t<thead>\n\t\t\t\t<tr>';\n\t// Noms des colonnes du tableau\n\t// Si la box \"tout\" est cochée ou si aucune ne sont cochées, affiche toutes les colonnes\n\n\t\techo '\n\t\t<th>EC Number</th>\n\t\t<th>Auteur</th>\n\t\t<th>Titre</th>\n\t\t<th>Année</th>\n\t\t<th>Volume</th>\n\t\t<th>Première page</th>\n\t\t<th>Dernière Page</th>\n\t\t<th>Pubmed</th>\t\t\n\t\t<th>Medline</th>\n\t\t<th>Prosite</th>\n\t\t<th>Swissprot</th>\n\n\t</tr>\n\t</thead>\n\t<tbody>';\n\n\t$ec_courant=\"\";\n\t$flag=false;\n\twhile ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\t\tif($row['ec']!=$ec_courant) {\n\t\t\t$ec_courant=$row['ec'];\n\t\t\tif($flag) {\n\t\t\t\t$swi.='</td>';\n\t\t\t\t\n\t\t\t\techo '<tr>'.$ec.$aut.$tit.$year.$vol.$fpa.$lpa.$pub.$med.$pro.$swi.'</tr>';\n\t\t\t}\n\t\t\telse $flag=true;\n\t\t\t\n\t\t\t$swi_l=array();\n\t\t\t\n\t\t\t$ec='<td><a target=\"_blank\" href=\"traitementfiche_fr.php?ec='.$row['ec'].'\">'.$row['ec'].'</a></td>';\n\t\t\t$aut='<td>'.$row['authors'].'</td>';\n\t\t\t$tit='<td>'.$row['title'].'</td>';\n\t\t\t$year='<td>'.$row['year'].'</td>';\n\t\t\t$vol='<td>'.$row['volume'].'</td>';\n\t\t\t$fpa='<td>'.$row['first_page'].'</td>';\n\t\t\t$lpa='<td>'.$row['last_page'].'</td>';\n\t\t\t$pub='<td><a target=\"_blank\" href=\"https://www.ncbi.nlm.nih.gov/pubmed/'.$row['pubmed'].'\">'.$row['pubmed'].'</a></td>';\n\t\t\t$med='<td><a target=\"_blank\" href=\"https://www.ncbi.nlm.nih.gov/pubmed?cmd=PureSearch&term='.$row['ec1'].'.'.$row['ec2'].'.'.$row['ec3'].'.'.$row['ec4'].'\"[EC%2FRN Number]>'.$row['medline'].'</a></td>';\n\t\t\t$pro='<td><a target=\"_blank\" href=\"https://prosite.expasy.org/'.$row['num_prosite'].'\">'.$row['num_prosite'].'</a></td>';\n\t\t\t$swi='<td>';\n\t\t\t\n\t\t\t\n\t\t\tif(!empty($row['code_swissprot'])) {\n\t\t\t\tif(!in_array($row['code_swissprot'],$swi_l)) {\n\t\t\t\t\t$swi=$swi.'<a target=\"_blank\" href=\"http://www.uniprot.org/uniprot/'.$row['num_swissprot'].'\">'.$row['code_swissprot'].'</a>'.\"\\t \";\n\t\t\t\t\t$swi_l[]=$row['code_swissprot'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif(!empty($row['code_swissprot'])) {\n\t\t\t\tif(!in_array($row['code_swissprot'],$swi_l)) {\n\t\t\t\t\t$swi=$swi.'<a target=\"_blank\" href=\"http://www.uniprot.org/uniprot/'.$row['num_swissprot'].'\">'.$row['code_swissprot'].'</a>'.\"\\t \";\n\t\t\t\t\t$swi_l[]=$row['code_swissprot'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t$swi.='</td>';\n\t\t\t\t\n\techo '<tr>'.$ec.$aut.$tit.$year.$vol.$fpa.$lpa.$pub.$med.$pro.$swi.'</tr>';\n\techo '</tbody>\n\t</table>';\n\n\techo \"\n\t\t<script type=\\\"text/javascript\\\">\n\t\t\t$(document).ready(function() {\n\t\t\t\t$('#traitementbib_fr').DataTable({\n\t\t\t\t\tdom: 'Bfrtip',\n\t\t\t\t\tlengthMenu: [\n\t\t\t [ 10, 25, 50, -1 ],\n\t\t\t [ '10 rows', '25 rows', '50 rows', 'Show all' ]\n\t\t\t ],\n\t\t\t columnDefs: [\n\t\t\t {\n\t\t\t targets: -1,\n\t\t\t visible: false\n\t\t\t } \n \t\t\t\t],\n\n\t\t\t\t\tbuttons: [\n\t\t\t\t\t \t{\n\t\t\t\t\t\t\textend: 'collection',\n\t\t\t text: 'Export',\n\t\t\t buttons: [\n\t\t\t \t{\n\t\t\t\t\t extend: 'copyHtml5',\n\t\t\t\t\t exportOptions: {\n\t\t\t\t\t columns: ':visible'\n\t\t\t\t\t }\n\t\t\t\t\t },\n\t\t\t\t\t {\n\t\t\t\t\t extend: 'csvHtml5',\n\t\t\t\t\t exportOptions: {\n\t\t\t\t\t columns: ':visible'\n\t\t\t\t\t }\n\t\t\t\t\t },\n\t\t\t\t\t {\n\t\t\t\t\t extend: 'excelHtml5',\n\t\t\t\t\t exportOptions: {\n\t\t\t\t\t columns: ':visible'\n\t\t\t\t\t }\n\t\t\t\t\t },\n\t\t\t\t\t {\n\t\t\t\t\t extend: 'pdfHtml5',\n\t\t\t\t\t orientation: 'landscape',\n \t\t\t\t\t\tpageSize: 'LEGAL',\n\t\t\t\t\t exportOptions: {\n\t\t\t\t\t columns: ':visible'\n\t\t\t\t\t }\n\t\t\t\t\t },\n\t\t\t\t\t {\n\t\t\t\t\t extend: 'print',\n\t\t\t\t\t exportOptions: {\n\t\t\t\t\t columns: ':visible'\n\t\t\t\t\t \t}\n\t\t\t\t\t }\n\t\t\t ]\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'pageLength',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\textend: 'colvis'\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</script>\";\n}", "function inferieur($tableau){\n\n$elementsParPage=100; \n \n$total=count($tableau);\n \n//determinons le nbre des pages\n$nombreDePages=ceil($total/$elementsParPage);\n \nif(isset($_GET['page']))\n{\n $pageActuelle=intval($_GET['page']);\n \n if($pageActuelle>$nombreDePages) \n {\n $pageActuelle=$nombreDePages;\n }\n}\nelse \n{\n $pageActuelle=1; \n}\n\n$nombreDePages=ceil($total/$elementsParPage);\n \n$premiereEntree=($pageActuelle-1)*$elementsParPage; // On calcule la première entrée à lire\n \n$cpt=0;\n\necho \"<table class='TablePremier' style='margin-top:20px;'><tr>\";\n for ($i=$premiereEntree; $i < ($premiereEntree+$elementsParPage); $i++) \n { \n if($i==count($tableau))\n {\n break;\n }\n $cpt++; \n echo '<td>'.$tableau[$i].'</td>';\n\n if($cpt==10)\n {\n echo '</tr>';\n $cpt=0;\n } \n }\necho '</table>';\n\necho '<p>Page : '; \n for($i=1; $i<=$nombreDePages; $i++)\n {\n if($i==$pageActuelle)\n {\n echo ' [ '.$i.' ] '; \n } \n else \n {\n echo '<a href=\"index.php?pageCourant=exo1&page='.$i.'\"> '.$i.' </a>';\n }\n }\necho '</p>';\n}", "public function visualizzazione(){\n $nameColumn = $this->getColumnName();\n $tuple = $this->read();\n foreach($nameColumn as $nome){\n $x = ' <td> '. $nome . ' </td> ';\n echo $x;\n }\n \n foreach($tuple as $ris){\n $str ='<tr> <td> '.$ris->getId(). ' </td> '.\n '<td> '.$ris->getNome(). '</td>'.\n '<td> '.$ris->getUsername(). '</td>'.\n '<td> '.$ris->getPassword(). '</td>'.\n '<td> '.$ris->getEmail(). '</td>'.\n '<td> '.$ris->getMuseo(). '</td>'.\n '</tr>';\n echo $str;\n };\n }", "public function mostra(){\n echo \"<tr><td>\".$this->codi.\"</td><td>\".$this->nom.\"</td></tr>\";\n }", "public function Tablet() {\n\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t$plantilla->Parametro('Titulo', 'Comunicación');\n\t\t\t$plantilla->Parametro('avisos', $this->Modelo->avisos());\n\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'Tablet.html')));\n\t\t}", "function visualizar($pag=\"\",$orderby=\"\")\n {\n global $sIdConvenioAct;\n for($i=0;$i<2;$i++){\n $consulta = $this->sql;\n //filas obtenidas\n $total = $this->contarfilas($consulta);\n //tamaņo del paginador\n if($total<200):\n $tampag=20;\n elseif ($total<400):\n $tampag=40;\n else:\n $tampag=60;\n endif;\n $iniciaren=($pag-1) * $tampag; //Registro actual\n if($iniciaren<0)$iniciaren=0;\n \n $this->paginar($pag, $total, $tampag, \"?pag=\"); \n \n if ($orderby !=\"\"){\n $consulta = $this->sql.\" ORDER BY $orderby LIMIT $iniciaren,$tampag\";\n }\n else {\n $consulta = $this->sql.\" LIMIT $iniciaren,$tampag\"; \n }\n \n $result = $this->query($consulta);\n //obtener descripcion de la tabla\n $tablades = $this->comentarioTabla($this->nombreTabla($result, 0));\n //si no tiene, poner como descripcion el nombre de la misma\n if ($tablades == \"\") $tablades = $this->nombreTabla($result, 0);\n else if($this->edit==1 and $this->delete==1) $espacio = 2;\n else if($this->edit==1 and $this->delete==0) $espacio = 1;\n else if($this->edit==0 and $this->delete==1) $espacio = 1;\n else $espacio = 0;\n echo \"\\n<center><table class='enhancedtablerowhover'>\n \\n<caption><center><font size='1.5'>\".$tablades.\"</font></center></caption>\n \\n<thead>\n \\n<tr>\n \\n<td scope='col' colspan=\".($espacio+2).\"></td>\";\n \n for ($i = 0; $i < mysql_num_fields($result); $i++)\n {\n $campo=$this->nombreCampo($result, $i);\n //los campos imagen no mostrarlos\n if (!$this->mostrarCampo($campo))\n continue;\n //obtener descripcion del campo \n $des = str_replace(\"/*\", \"\", $this->comentario($this->nombreCampo($result, $i),\n $this->nombreTabla($result, $i)));\n //si no tiene, poner como descripcion el nombre del mismo\n if ($des == \"\" or is_numeric($des)) $des = $campo;\n echo \"\\n<th scope='col' ><a href='?order=$campo'>$des</a></th>\";\n }\n echo \" \\n</tr>\n \\n</thead>\n \\n<tbody>\";\n while ($row = mysql_fetch_array($result))\n {\n $filtro = $this->cifrar($row, $result);\n echo \"\\n<tr>\";\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Imprimir' href='reporte/rptEmbarques.php?iFolio=\".$row['iFolio'].\"&sContrato=\".$row['sContrato'].\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&sIdConvenio=$sIdConvenioAct\".\"&dFecha=\".$row['dIdFecha'].\"' target='_blank' >\n \\n<img src='\".$this->PathImages.\"impresora.png' width=15></a></td>\";//$_SESSION['orden']\n if($this->edit==1)\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Seleccionar Folio' href='$_SERVER[PHP_SELF]?iFolioSuministro=\".$row['iFolio'].\"'>\n \\n<img src='\".$this->PathImages.\"seleccionar.jpg' width=15></a></td>\";\n echo \"\\n<td class='CrearReporte'>\n \\n<a title = 'Modificar Registro ' href='$_SERVER[PHP_SELF]?operacion=m&$filtro'>\n \\n<img src='\".$this->PathImages.\"editar.png' width=12></a></td>\";\n if($this->delete==1)//'href='$_SERVER[PHP_SELF]?operacion=b&$filtro'\n echo \"\\n<td class='CrearReporte' >\n \\n<a title = 'Eliminar el Registro' href=\\\"#\\\" \n onClick=\\\" if( confirm('Realmente Desea Eliminar el Registro?') ){ document.location='$_SERVER[PHP_SELF]?operacion=b&$filtro' };\\\" >\n \\n<img src='\".$this->PathImages.\"eliminar.png' width=12>\n \\n</a></td> \";\n for ($i = 0; $i < mysql_num_fields($result); $i++)\n {\n if(strpos(strtoupper($this->nombreCampo($result, $i)),strtoupper(\"Imagen\")) and $tipo = $this->tipoCampo($result, $i)==\"blob\") \n {\n $nombreImagen=\"\";\n foreach($this->campollave as $claves){\n $nombreImagen.=$row[$claves]; \n }\n $nombreImagen = str_replace(\"/\",\"-\",$nombreImagen);\n $nombreImagen.=\".jpg\";\n //$nombreImagen=$row[$this->campollave].\".jpg\";\n $img = $this->procesarImagen($row[$i],$nombreImagen);\n }\n if (!$this->mostrarCampo($this->nombreCampo($result, $i)))\n continue;\n if ($img){\n echo \"\\n<td><img border=1 src = '$nombreImagen' width = '90' heigth = '90'</img></td>\";\n $img = false;\n }\n else if(( strpos(strtoupper($this->nombreCampo($result, $i)),\"DLL\")!==false or strpos(strtoupper($this->nombreCampo($result, $i)),\"MN\")!==false )\n AND $this->tipoCampo($result, $i)==\"real\"){\n $row[$i] = number_format($row[$i], 4, '.', ',');\n echo \"\\n<td class ='derecha'>$ \".$row[$i].\"</td>\";\n }\n else if( strpos($this->tipoCampo($result, $i),\"real\")!==false ){\n $row[$i] = number_format($row[$i], 4, '.', ',');\n echo \"\\n<td class ='derecha'> \".$row[$i].\"</td>\";\n }\n else if(strpos(strtolower($this->nombreCampo($result, $i)), strtolower(\"fecha\"))!==false){//formato de fecha\n echo \"\\n<td>\".formatoFecha($row[$i]).\"</td>\";\n }\n else\n echo \"\\n<td>\".$row[$i].\"</td>\";\n\n }\n echo \"\\n</tr>\";\n }\n echo \"\\n</tr></tbody></table></center>\";\n $this->paginar($pag, $total, $tampag, \"?pag=\"); \n }\n }", "function TablaProductosVendidos()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\");\n\t$this->SetXY(10, 15);\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(75,6,'',0,0,'');\n\t$this->Cell(120,6,'LISTADO DE PRODUCTOS VENDIDOS POR FECHAS ',0,1,'C');\n \n\t$this->Cell(75,6,'',0,0,'');\n $this->Cell(120,6,' DESDE '.$_GET[\"desde\"].' HASTA '.$_GET[\"hasta\"],0,0,'C');\n //Salto de línea\n $this->Ln(15);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'CÉDULA GERENTE: ',0,0,'');\n\t$this->Cell(44,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->Cell(30,5,'NOMBRE GERENTE:',0,0,'');\n\t$this->Cell(83,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'TELÉFONO GERENTE: ',0,0,'');\n $this->Cell(44,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->Cell(30,5,'CORREO GERENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(8,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'CÓDIGO',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'DESCRIPCIÓN DE PRODUCTO',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'CATEGORIA',1,0,'C', True);\n\t$this->CellFitSpace(23,8,'PRECIO V.',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'EXISTENCIA',1,0,'C', True);\n\t$this->CellFitSpace(18,8,'VENDIDOS',1,0,'C', True);\n\t$this->CellFitSpace(26,8,'MONTO TOTAL',1,1,'C', True);\n\t\n $ve = new Login();\n\t$reg = $ve->BuscarVentasProductos();\n\t$precioTotal=0;\n\t$existeTotal=0;\n\t$vendidosTotal=0;\n\t$pagoTotal=0;\n\t$a=1;\n\tfor($i=0;$i<sizeof($reg);$i++){\n\t$precioTotal+=$reg[$i]['precioventa'];\n\t$existeTotal+=$reg[$i]['existencia'];\n\t$vendidosTotal+=$reg[$i]['cantidad']; \n\t$pagoTotal+=$reg[$i]['precioventa']*$reg[$i]['cantidad'];\n\t$this->SetFont('courier','',7); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(8,5,$a++,1,0,'C');\n\t$this->CellFitSpace(15,5,$reg[$i][\"codproducto\"],1,0,'C');\n $this->CellFitSpace(60,5,utf8_decode($reg[$i][\"producto\"]),1,0,'C');\n\t$this->CellFitSpace(20,5,utf8_decode($reg[$i][\"nomcategoria\"]),1,0,'C');\n\t$this->CellFitSpace(23,5,utf8_decode(number_format($reg[$i][\"precioventa\"], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(22,5,utf8_decode($reg[$i]['existencia']),1,0,'C');\n\t$this->CellFitSpace(18,5,utf8_decode($reg[$i]['cantidad']),1,0,'C');\n\t$this->CellFitSpace(26,5,utf8_decode(number_format($reg[$i]['precioventa']*$reg[$i]['cantidad'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(8,5,'',0,0,'C');\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(20,5,'TOTALES',1,0,'C', True);\n $this->SetFont('courier','B',7);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(23,5,utf8_decode(number_format($precioTotal, 2, '.', ',')),1,0,'C');\n $this->Cell(22,5,utf8_decode($existeTotal),1,0,'C');\n $this->Cell(18,5,utf8_decode($vendidosTotal),1,0,'C'); \n $this->CellFitSpace(26,5,utf8_decode(number_format($pagoTotal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(5,6,'',0,0,'');\n $this->Cell(100,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(60,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(5,6,'',0,0,'');\n $this->Cell(100,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(60,6,'',0,0,'');\n $this->Ln(4);\n }", "function entable($all){\n \n $table = new Table();\n $table->setClass(\"table table-striped table-bordered\");\n $header = new Tr();\n \n $th = new Th(\"Orden\");\n $header->add($th);\n \n $th = new Th(\"Proveedor\");\n $header->add($th);\n \n $th = new Th(\"Total Pzas\");\n $header->add($th);\n \n $th = new Th(\"Recibidas\");\n $header->add($th);\n \n \n $th = new Th(\"Restantes\");\n $header->add($th);\n \n $th = new Th(\"Status\");\n $header->add($th);\n \n \n $th = new Th(\"Recibos\");\n $header->add($th);\n \n $th = new Th(\"Comprobante\");\n $header->add($th);\n \n $th = new Th(\"\");\n $header->add($th);\n \n $table->add($header);\n foreach ($all as $key=> $element){\n $tr = new Tr();\n \n $td = new Td($element->id);\n $tr->add($td);\n \n $td = new Td($element->getProvider());\n $tr->add($td);\n \n \n $pedidas = $element->getPiezas();\n $td = new Td($pedidas);\n $tr->add($td);\n \n $recibidas = $element->getReceived();\n $td = new Td($recibidas);\n $tr->add($td);\n \n \n $restantes = $pedidas - $recibidas;\n $td = new Td($restantes);\n $tr->add($td);\n if (empty($element->status))\n $element->status = \"Abierta\";\n $td = new Td($element->status);\n $tr->add($td);\n \n \n $recibos = $element->getRecibosTable();\n $td = new Td($recibos);\n $tr->add($td);\n \n \n \n \n $receipt = site_url2(\"orders/receipt/{$element->unique}\");\n $receive_anchor = new Anchor(\"Agregar Recibo\",\"$receipt\");\n if ($restantes==0){\n $receive_anchor = new Anchor(\"Agregar Recibo\",\"#\");\n $receive_anchor->setAttr(\"disabled\",\"disabled\");\n $receive_anchor->setAttr(\"onclick\",\"return false\");\n // mark order as closed\n \n \n }\n $receive_anchor->setClass(\"btn btn-default\");\n $td = new Td($receive_anchor);\n $td->setStyle(\"text-align:center\");\n $tr->add($td);\n \n \n \n \n $table->add($tr);\n \n }\n \n \n return $table;\n }", "function tabla($lista, $totalColumnas) {\n $totalFilas = count($lista) / $totalColumnas;\n echo \"<table border='1'>\";\n for ($fila = 0; $fila < $totalFilas; $fila++) {\n echo \"<tr>\";\n for ($i=0;$i<$totalColumnas;$i++) {\n $posicion = $totalColumnas * $fila + $i;\n if ($posicion < count($lista)) {\n $contenido = $lista[$posicion];\n } else {\n $contenido = \"\";\n }\n echo \"<td>\".$contenido.\"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "function table_des_mots($table, $les_mots) {\n\tglobal $afficher_groupe;\n\n\tif (!is_array($afficher_groupe)) return;\n\n\t$in_group = \" AND id_groupe IN (\" . join($afficher_groupe, \", \") .\")\";\n\n\t$result_groupe = spip_query(\"SELECT * FROM spip_groupes_mots\n\tWHERE forum = 'oui' AND $table = 'oui'\". $in_group);\n\n\t$ret = '';\n\twhile ($row_groupe = spip_fetch_array($result_groupe)) {\n\t\t$id_groupe = $row_groupe['id_groupe'];\n\t\t$titre_groupe = propre($row_groupe['titre']);\n\t\t$unseul = ($row_groupe['unseul']== 'oui') ? 'radio' : 'checkbox';\n\t\t$result =spip_query(\"SELECT * FROM spip_mots\n\t\tWHERE id_groupe='$id_groupe'\");\n\t\t$total_rows = spip_num_rows($result);\n\n\t\tif ($total_rows > 0) {\n\t\t\t$ret .= \"\\n<p />\"\n\t\t\t . \"<div class='spip_encadrer' style='font-size: 80%;'>\"\n\t\t\t . \"<b>$titre_groupe&nbsp;:</b>\"\n\t\t\t . \"<table cellpadding='0' cellspacing='0' border='0' width='100%'>\\n\"\n\t\t\t .\"<tr><td width='47%' valign='top'>\";\n\t\t\t$i = 0;\n\n\t\twhile ($row = spip_fetch_array($result)) {\n\t\t\t$id_mot = $row['id_mot'];\n\t\t\t$titre_mot = propre($row['titre']);\n\t\t\t$descriptif_mot = propre($row['descriptif']);\n\n\t\t\tif ($i >= ($total_rows/2) AND $i < $total_rows) {\n\t\t\t\t$i = $total_rows + 1;\n\t\t\t\t$ret .= \"</td><td width='6%'>&nbsp;</td>\n\t\t\t\t<td width='47%' valign='top'>\";\n\t\t\t}\n\n\t\t\t$ret .= boutonne($unseul, \"ajouter_mot[]\", $id_mot, \"id='mot$id_mot' \" . $les_mots[$id_mot]) .\n\t\t\t afficher_petits_logos_mots($id_mot)\n\t\t\t. \"<b><label for='mot$id_mot'>$titre_mot</label></b><br />\";\n\n\t\t\tif ($descriptif_mot)\n\t\t\t\t$ret .= \"$descriptif_mot<br />\";\n\t\t\t$i++;\n\t\t}\n\n\t\t$ret .= \"</td></tr></table>\";\n\t\t$ret .= \"</div>\";\n\t\t}\n\t}\n\n\treturn $ret;\n}", "function ImprovedTable($header,$data)\n{\n\t//Anchuras de las columnas\n\t$w=array(60,30,20,35,35);\n\t//Cabeceras\n\t$l = mysql_connect(\"localhost\",\"pmm\",\"guhAf2eh\");\n\t//$l = mysql_connect(\"DBSERVER\",\"root\",\"root\");\n\tmysql_select_db(\"pmm_dbpruebas\", $l);\n\t//mysql_select_db(\"pmm_dbweb\", $l);\n\t$s = \"SELECT CONCAT_WS(' ',nombre,paterno,materno) AS cliente, d.calle, d.poblacion, d.estado, d.pais\n\tFROM catalogocliente cc\n\tINNER JOIN direccion d ON cc.id = d.codigo\n\tWHERE d.facturacion='SI'\n\tLIMIT 0,100\";\t\n\t$r = mysql_query($s,$l) or die($s);\n\t\n\tfor($i=0;$i<count($header);$i++)\n\t\t$this->Cell($w[$i],7,$header[$i],1,0,'C');\n\t$this->Ln();\n\t//Datos\t\n\t\twhile($row = mysql_fetch_array($r)){\n\t\t\t$this->Cell($w[0],6,$row[0],'LR');\n\t\t\t$this->Cell($w[1],6,$row[1],'LR');\n\t\t\t$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');\n\t\t\t$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');\n\t\t\t$this->Ln();\n\t\t}\n\t/*foreach($data as $row)\n\t{\n\t\t$this->Cell($w[0],6,$row[0],'LR');\n\t\t$this->Cell($w[1],6,$row[1],'LR');\n\t\t$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');\n\t\t$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');\n\t\t$this->Ln();\n\t}*/\n\t//Lnea de cierre\n\t$this->Cell(array_sum($w),0,'','T');\n}", "function display() {\r\n echo '<table cols=\"3\" style=\"font-size:large; font-weight:bold\">';\r\n echo '<tr>'; \r\n for ($pos = 0; $pos < 9; $pos++) { \r\n echo $this->show_cell($pos); \r\n if ($pos % 3 == 2) {\r\n echo '</tr><tr>';\r\n } \r\n }\r\n echo '</tr>';\r\n echo '</table>';\r\n }", "function listPage_tableField(){\n $this->data_view['tableField'] = array(\n array('name'=>'id','title'=>'Mã'),\n array('name'=>'image','title'=>'Hình','type'=>'image','linkDetail'=>true),\n array('name'=>'title','title'=>'Tên','linkDetail'=>true),\n array('name'=>'c_title','title'=>'Loại'),\n array('name'=>'price','title'=>'Giá','type'=>'number'),\n array('name'=>'price_promotion','title'=>'Giá giảm','type'=>'number','hidden'=>true),\n array('name'=>'views','title'=>'Lượt xem','type'=>'number'),\n array('name'=>'is_active','title'=>'Trạng thái','type'=>'status'),\n array('name'=>'is_stock','title'=>'Còn hàng','type'=>'status','hidden'=>true),\n array('name'=>'is_special','title'=>'Nổi bật','type'=>'status','hidden'=>true)\n );\n }", "function tablaDatos(){\n\n $editar = $this->Imagenes($this->PrimaryKey,0);\n $eliminar = $this->Imagenes($this->PrimaryKey,1);\n $sql = 'SELECT\n C.id_componentes,\n P.descripcion planta,\n S.descripcion secciones,\n E.descripcion Equipo,\n C.`descripcion` Componente\n ,'.$editar.','.$eliminar.' \nFROM\n `componentes` C\nINNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\nINNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\nINNER JOIN\n plantas P ON P.id_planta = S.id_planta\nWHERE\n \n C.`activo` = 1';\n \n $datos = $this->Consulta($sql,1); \n if(count($datos)){\n $_array_formu = array();\n $_array_formu = $this->generateHead($datos);\n $this->CamposHead = ( isset($_array_formu[0]) && is_array($_array_formu[0]) )? $_array_formu[0]: array();\n \n $tablaHtml = '<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-body recargaDatos\" style=\"page-break-after: always;\">\n <div class=\"table-responsive\">';\n $tablaHtml .='';\n \t\t$tablaHtml .= $this->print_table($_array_formu, 7, true, 'table table-striped table-bordered',\"id='tablaDatos'\");\n \t\t$tablaHtml .=' </div>\n </div>\n </div>\n </div>\n </div>\n ';\n }else{\n $tablaHtml = '<div class=\"col-md-8\">\n <div class=\"alert alert-info alert-dismissable\">\n <button class=\"close\" aria-hidden=\"true\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Atenci&oacute;n</strong>\n No se encontraron registros.\n </div>\n </div>';\n }\n \n if($this->_datos=='r') echo $tablaHtml;\n else return $tablaHtml;\n \n }", "public function tablaProductos () \n\t\t{\t\t\n\t\t\t//Javascript !!!\n\t\t\taddJs('js/products_table.js');\n\t\t\thidden ('iter',0); \n\t\t\t\n\t\t\techo '<table id=\"tabla_productos\" bgColor=#333 cellspacing=1 cellpadding=2 width=700><tbody>';\n\t\t\techo '<tr>'.\n\t\t\t\t\t'<th>Cantidad</th><th>Producto</th><th>Precio<br>sin Iva</th>'.\n\t\t\t\t\t'<th>Precio<br>con Iva</th><th>Total Neto</th><th>Total</th><th></th></tr>';\n\n\t\t\techo '</tbody></table>';\n\n\t\t\techo '<table bgColor=#333 cellspacing=1 cellpadding=2 width=700>';\n\t\t\t$this->tablaSumatoria();\n\t\t\techo '</table>';\t\t\t\n\t\t}", "function morepagestable($datas,$lineheight=8) {\n $l = $this->lMargin;\n $startheight = $h = $this->GetY();\n $startpage = $currpage = $this->page;\n // calculate the whole width\n foreach($this->tablewidths AS $width) {\n $fullwidth += $width;\n }\n $this->SetFont('Arial','',6);\n // Now let's start to write the table\n foreach($datas AS $row => $data) {\n $this->page = $currpage;\n // write the horizontal borders\n $this->Line($l,$h,$fullwidth+$l,$h);\n // write the content and remember the height of the highest col\n $posicion = 0;\n $fil=0;\n foreach($data AS $col => $txt) {\n \tif($posicion == 0 AND strpos($txt,\".\")===false){\n \t\t$fil=1;\n \t}\n \t\n \t$posicion++;\n \t$this->SetFillColor(60,100,200);\n \t$this->SetTextColor(0,0,0);\n $this->page = $currpage;\n $this->SetXY($l,$h);\n $this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,1,$fil);\n $l += $this->tablewidths[$col];\n\t\t\t$this->SetFillColor(0,0,0);\n if($tmpheight[$row.'-'.$this->page] < $this->GetY()) {\n $tmpheight[$row.'-'.$this->page] = $this->GetY();\n }\n if($this->page > $maxpage)\n $maxpage = $this->page;\n }\n\n // get the height we were in the last used page\n $h = $tmpheight[$row.'-'.$maxpage];\n // set the \"pointer\" to the left margin\n $l = $this->lMargin;\n // set the $currpage to the last page\n $currpage = $maxpage;\n }\n // draw the borders\n // we start adding a horizontal line on the last page\n $this->page = $maxpage;\n $this->Line($l,$h,$fullwidth+$l,$h);\n // now we start at the top of the document and walk down\n for($i = $startpage; $i <= $maxpage; $i++) {\n $this->page = $i;\n $l = $this->lMargin;\n $t = ($i == $startpage) ? $startheight : $this->tMargin+140;\n $lh = ($i == $maxpage) ? $h : $this->h-$this->bMargin;\n $this->Line($l,$t,$l,$lh);\n foreach($this->tablewidths AS $width) {\n $l += $width;\n $this->Line($l,$t,$l,$lh);\n }\n }\n // set it to the last page, if not it'll cause some problems\n $this->page = $maxpage;\n}", "function entete_table($position_entete) {\n global $pdf;\n $pdf->SetDrawColor(183); // Couleur du fond RVB\n $pdf->setFillColor(89,133,255); // Couleur des filets RVB\n $pdf->SetTextColor(0); // Couleur du texte noir\n $pdf->SetY($position_entete);\n // position de colonne 1 (10mm à gauche)\n $pdf->SetX(5);\n $pdf->Cell(40,8,'Prestation',1,0,'C',1); // 60 >largeur colonne, 8 >hauteur colonne\n // position de la colonne 2 (70 = 10+60)\n $pdf->SetX(45);\n $pdf->Cell(40,8,'Date',1,0,'C',1);\n $pdf->SetX(85);\n $pdf->Cell(40,8,'Prix HT',1,0,'C',1);\n $pdf->SetX(125);\n $pdf->Cell(40,8,'Tva',1,0,'C',1);\n $pdf->SetX(165);\n $pdf->Cell(40,8,iconv(\"UTF-8\", \"CP1250//TRANSLIT\", \"Quantité/Durée\"),1,0,'C',1);\n\n // position de la colonne 3 (130 = 70+60)\n\n\n $pdf->Ln(); // Retour à la ligne\n}", "function paludisme($nb_susp,$nb_tdr_moins,$nb_tdr_plus,$nb_traite){\n $this->SetFont('Arial','',15);\n $this->Cell(0,6,\"Tableau de Paludisme\");\n $this->Ln();\n $this->SetFont('Times','',12);\n $this->Cell(140,5,\"Nombre de supect de paludisme \",1);\n $this->Cell(14,5,$nb_susp,1,0,'R');\n $this->Ln();\n $this->Cell(140,5,utf8_decode(\"Nombre de cas de paludisme testés\"),1);\n $this->Cell(14,5,$nb_tdr_moins + $nb_tdr_plus,1,0,'R');\n $this->Ln();\n $this->Cell(140,5,\"Nombre de cas de TDR+\",1);\n $this->Cell(14,5,$nb_tdr_plus,1,0,'R');\n $this->Ln();\n $this->Cell(140,5,utf8_decode(\"Nombre de cas de paludisme traités (confirmé)\"),1);\n $this->Cell(14,5,$nb_traite,1,0,'R');\n $this->Ln();\n $this->Ln();\n }", "public function displayAll() {\n \t\n \techo \"<table border=1>\";\n\t\techo \"<tr>\";\n\t\techo \"<th>Id</th>\";\n\t\techo \"<th>Ora aterizare</th>\";\n\t\techo \"<th>De la</th>\";\n\t\techo \"<th>Compania</th>\";\n\t\techo \"</tr>\";\n\n\t\tforeach($this->findAll() as $k => $zbor){ //parcugem arrayul pe linie\n\t\t\techo \"<tr>\";\n\n\t\t\techo \"<td> \" . $zbor[\"id\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"ora_aterizare\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"de_la\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"compania\"] . \"</td>\";\n\t\t\t\n\t\t\techo \"</tr>\";\n\t\t}\n\n\t\techo \"</table>\";\n }", "function encabezadoReporte() {\n ?>\n <table width=\"100%\">\n <tr>\n <caption class=\"sigma centrar\">\n REPORTE DE INSCRIPCION\n </caption>\n </tr>\n </table>\n <?\n }", "function affichagetableau6_12($tab)\n{\n foreach ($tab as $elt) {\n echo \"[\" . $elt . \"]\" . \"\\t\";\n }\n echo \"\\nLes valeurs du tableau ont été incrémentées de 1.\";\n}", "function ImprimeTableFunciones($idTabla, $data, $pactu = \"\", $peli = \"\",$classCSS=\"\") {\n // echo \"ImprimeTable:::::::::::::::\".count($data[\"cuerpo\"]).\" <br>\";\n\t\ttry {\n // if (count($data) > 0) {\n\t\t\t $tabla = '<table id=\"'.$idTabla.'\" class=\"' . $classCSS . '\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center;\" >';\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n\t\t\t\t\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n\t\t\t\t\t \n if ($pactu != \"\") {\n if ($conta == 0) {;\n\t\t\t\t\t\t $tabla.= '<th></th>';\n //$tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<th></th>';\n\t\t\t\t\t\t\t//$tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n $tabla.= '<th>' . utf8_encode($data[\"columnas\"][$x]) . '</th>'; \n }\n\t\t\t\t$tabla.= '</tr>';\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n for ($i = 0;$i < $cantele;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= \"<tr>\";\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"javascript:'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .');\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>';\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"'.$pactu.'('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td><a href=\"#\" onClick=\"'.$peli.'('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>'.\"\\n\";\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>&nbsp;' . $data[\"cuerpo\"][$i][\"$columnas\"] . '&nbsp; </td>'.\"\\n\";\n }\n }\n $tabla.= '</tr>';\n }\n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Datos Registrados\"; \n\t\t\t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot>';\n\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n $tabla.= '</table><br />';\n\t\t\t\t//}\n }catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "function generateTable($results,$table_title){\n\n $dir = variable_get('fossee_site_banner_banner_directory', \"not found\");\n //$path = site_banners_path(); // path to the folder containing the banner files\n $realpath = file_create_url($dir); //\n $settings_form_link = $path = \"http://\".$_SERVER['SERVER_NAME'] . base_path() . 'fossee-site-banner/banner-settings/';\n $col_length = 3; // The number of columns in the table in which banners are displayed\n $i=0;\n $banners = array();\n $banner = new stdClass();\n\n foreach ($results as $result) { // this foreach statement loops throught the result containing fossee_banner_details returned from the fossee_banner_details table in database\n # code...\n\n $banner->file_name = $result->file_name;\n $banner->status = $result->status;\n $banner->id = $result->id;\n\n $banners[($i/$col_length)][($i%$col_length)] = $banner;\n unset($banner);\n $i++;\n }\n\n for($j=0;$j<sizeof($banners);$j++){ // loops through rows of banner images for checking necessary conditons and rendered accordingly\n\n unset($col); // col array contains the html code for displaing the banner images\n\n for($k=0;$k<sizeof($banners[$j]);$k++){ // loops through columns of $j row of the banners array\n unset($banner);\n $banner = $banners[$j][$k];\n\n if($banners[$j]!=NULL){ // necessary for rows which contains less than 3 banners\n if($banner->status == 'active'){\n $status_pointer = \"border: 10px solid orange\"; // this style adds the orange border for displaying the active banners\n } else {\n $status_pointer = \"\";\n }\n\n\n $col[$k] = '\n\t\t\t<div style = \"height : 170px; width : 200px;\">\n\t\t\t<img class=\"imgStyle\" onclick=\"imageClicked(this); return false;\" id=\"'.$banner->id.'\" src=\"'.$realpath.\"/\".$banner->file_name.'\" style=\"height:60%;width: 100%;'.$status_pointer.'\">\n\t\t\t<button type=\"button\" style = \"width : 100%\" class=\"btn\" onclick=\"window.open(\\''.$settings_form_link.$banner->id.'\\',\\'_self\\')\">Banner Settings</button>\n\t\t\t</div>\n\t\t\t';\n\n } else {\n # code...\n $col[$k] = \"\"; // if there is no image this element of col is left empty\n }\n }\n\n\n /* the html code for displaying banners is put into rows array which will be later used for rendering the table*/\n $rows[] = array(\n\n $col[0],\n $col[1],\n $col[2],\n\n );\n }\n\n /* checks that the $rows is not empty and renders the table */\n if (!empty($rows)) {\n\n try {\n $header = array($table_title,\"\",\"\");\n $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'sort-table')));\n $output .= theme('pager');\n } catch (Exception $e) {\n }\n\n\n } else {\n\n //$output .= t(\"No results found.\");\n\n }\n\n return $output;\n\n}", "function tableauToHTML(array $tab)\n{\n echo \"<table>\";\n foreach ($tab as $i => $ligne) {\n echo \"<tr>\";\n foreach ($ligne as $j => $valeur) {\n echo \"<td>$valeur</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "public function mostrar_tabla_borradores(){\n\t\t$return = array( \n\t\t\t'pestanna_borradores' => '',\n\t\t\t'contenido_borradores' => '');\n\n\t\tif($this->tipo_usuario == 'empresa'){\n\t\t\t$return['pestanna_borradores'] = '<li class=\"\"><a href=\"#pestanna_borradores\" data-toggle=\"tab\">Borradores</a></li>';\n\t\t}\n\n\t\t$cols = array('id', 'clave_interna', 'provincia', 'municipio', 'tipo_venta', 'fecha_publicacion');\n\t\t$this->where('ussr',$this->user);\n\n\t\tif($salida = $this->get('anuncios_borradores', NULL, $cols)){\n\n\t\t\t$return['contenido_borradores'] .= '<table class=\"table table-bordered table-hover\">';\n\t\t\t$return['contenido_borradores'] .='<tr>\n\t\t\t\t\t<th>clave_interna</th><th>provincia</th>\n\t\t\t <th>municipio</th><th>tipo_venta</th>\n\t\t\t <th>fecha_publicacion</th>\n\t\t\t <th>Opciones</th>\n\t\t\t </tr>';\n\n\t\t\tforeach ($salida as $key => $value) {\n\t\t\t\t$return['contenido_borradores'] .='<tr>\n\t\t\t <td>'.$value['clave_interna'].'</td>\n\t\t\t <td>'.$value['provincia'].'</td>\n\t\t\t <td>'.$value['municipio'].'</td>\n\t\t\t <td>'.$value['tipo_venta'].'</td>\n\t\t\t <td>'.$value['fecha_publicacion'].'</td>\n\n\t\t\t <td>'.$this->dropdown_tabla_borradores($value['id']).'</td>\n\n\t\t\t </tr>';\n\n\t\t\t}\n\n\t\t\t$return['contenido_borradores'] .= '</table>';\n\n\t\t}\n\t\treturn $return;\n\t}", "public function createTable($prenotazioni) {\r\n echo \"<table id='tblPrenotazioni' summary='Tabella che riporta le prenotazioni delle aule di interesse per gli studenti di Matematica e Informatica.' >\";\r\n echo \"<thead>\";\r\n echo \"<tr> <th> ORARIO: </th>\";\r\n // NUMERO DI AULE:\r\n $numAule = 0;\r\n foreach (self::$array_aule as $aula) {\r\n echo \"<th> $aula </th>\";\r\n $numAule++;\r\n }\r\n echo \"</tr>\";\r\n echo \"</thead>\";\r\n echo \"<tbody>\";\r\n for ($i = 0; $i <= 22; $i++) {\r\n echo \"<tr> <td class='indice_ora'> \".$this->convertiInOra($i).\" </td>\";\r\n if (isset($prenotazioni[$i])) {\r\n foreach (self::$array_aule as $aula) {\r\n if (isset($prenotazioni[$i][$aula])) {\r\n if ($prenotazioni[$i][$aula]==\"\\\"\")\r\n echo \"<td class='apici'> <span > \\\" </span> </td>\";\r\n else\r\n echo \"<td class='corso'> <span>\" . $prenotazioni[$i][$aula][4] . \"</span> </td>\";\r\n } else {\r\n echo \"<td> </td>\";\r\n $this->arrayAuleLibere[$i][$aula]=\"libera\";\r\n }\r\n }\r\n } else {\r\n for ($j = 0; $j < $numAule; $j++)\r\n echo \"<td> </td>\";\r\n $this->arrayAuleLibere[$i]=\"tutto libero\";\r\n }\r\n echo \"</tr>\";\r\n } \r\n echo \"</tbody>\";\r\n echo \"</table>\";\r\n //var_dump($this->arrayAuleLibere);\r\n }", "function tabledata_Cadre_voirlestables ($serveur,$boolSPIP=false)\r\n{\r\n global $connect_statut, $spip_lang, $connect_id_auteur;\r\n\r\n $tables_extra = array();\r\n $tables_spip = array();\r\n $intNbExtra = 0 ;\r\n\r\n $sqlResultTables = sql_showbase('%');\r\n while ($tabNomTable = sql_fetch($sqlResultTables))\r\n {\r\n foreach ($tabNomTable as $key => $val)\r\n {\r\n if (preg_match('#^'.tabledata_table_prefix().'_#', $val))\r\n {\r\n $tables_spip[] = $val;\r\n }\r\n else\r\n {\r\n $tables_extra[] = $val;\r\n ++$intNbExtra ;\r\n }\r\n }\r\n }\r\n\r\n // affichage\r\n echo \"Choisir une table Extra parmis celle ci-dessous:\\n\";\r\n if ($intNbExtra<1)\r\n {\r\n echo \"Aucune table extra ne semble disponible.\";\r\n }\r\n else\r\n {\r\n echo tabledata_table_HTML ($tables_extra);\r\n }\r\n if ($boolSPIP)\r\n {\r\n echo \"<hr/>\";\r\n echo \"Les tables de SPIP :\\n\";\r\n echo tabledata_table_HTML ($tables_spip);\r\n }\r\n return;\r\n}", "function TablaVentasProductos()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 15 ,10, 55 , 18 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',15);\n //Movernos a la derecha\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$ve = new Login();\n $ve = $ve->VentasPorId();\n\t\n################################################# BLOQUE N° 1 ###################################################\t\n\n //Bloque de membrete principal\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 10, 190, 20, '1.5', '');\n\t\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 14, 12, 12, '1.5', 'F');\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 14, 12, 12, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',16);\n $this->SetXY(101, 14);\n $this->Cell(20, 5, 'V', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(98, 19);\n $this->Cell(20, 5, 'Venta', 0 , 0);\n\t\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 10);\n $this->Cell(20, 5, 'N° VENTA ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 10);\n $this->Cell(20, 5,utf8_decode($ve[0]['codventa']), 0 , 0);\n\t\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 13);\n $this->Cell(20, 5, 'N° SERIE ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 13);\n $this->Cell(20, 5,utf8_decode($ve[0]['codserieve']), 0 , 0);\n\t\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 16);\n $this->Cell(20, 5, 'N° AUTORIZACIÓN ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 16);\n $this->Cell(20, 5,utf8_decode($ve[0]['codautorizacionve']), 0 , 0);\n\t\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 19);\n $this->Cell(20, 5, 'FECHA VENTA ', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 19);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($ve[0]['fechaventa']))), 0 , 0);\n\t\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 22);\n $this->Cell(20, 5, 'FECHA EMISIÓN', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 22);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\")), 0 , 0);\n\t\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 25);\n $this->Cell(20, 5, 'STATUS VENTA', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 25);\n\t\n\tif($ve[0]['fechavencecredito']== '0000-00-00') { \n\t$this->Cell(20, 5,utf8_decode($ve[0]['statusventa']), 0 , 0);\n\t} elseif($ve[0]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode($ve[0]['statusventa']), 0 , 0);\n\t} elseif($ve[0]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(\"VENCIDA\"), 0 , 0);\n\t}\t\n\t\n################################################# BLOQUE N° 2 ###################################################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 32, 190, 18, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 32);\n $this->Cell(20, 5, 'DATOS DE LA EMPRESA ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 36);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(40, 36);\n $this->Cell(20, 5,utf8_decode($con[0]['nomempresa']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(147, 36);\n $this->Cell(90, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 36);\n $this->Cell(90, 5,utf8_decode($con[0]['rifempresa']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 40);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(32, 40);\n $this->Cell(20, 5,utf8_decode($con[0]['direcempresa']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(140, 40);\n $this->Cell(20, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 40);\n $this->Cell(20, 5,utf8_decode($con[0]['tlfempresa']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 44);\n $this->Cell(20, 5, 'GERENTE :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(30, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['nomresponsable']), 0 , 0);\n\t//Linea de membrete Nro 7\n\t$this->SetFont('courier','B',7);\n $this->SetXY(94, 44);\n $this->Cell(20, 5, 'CÉDULA :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['cedresponsable']), 0 , 0);\n\t//Linea de membrete Nro 8\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 44);\n $this->Cell(20, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(142, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['correoresponsable']), 0 , 0);\n\t\n################################################# BLOQUE N° 3 ###################################################\t\n\n\t//Bloque de datos de cliente\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 52, 190, 14, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 52);\n $this->Cell(20, 5, 'DATOS DEL CLIENTE ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 56);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(38, 56);\n $this->Cell(20, 5,utf8_decode($ve[0]['nomcliente']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(112, 56);\n $this->Cell(74, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(122, 56);\n $this->Cell(75, 5,utf8_decode($ve[0]['cedcliente']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(150, 56);\n $this->Cell(90, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(166, 56);\n $this->Cell(90, 5,utf8_decode($ve[0]['tlfcliente']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 60);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(33, 60);\n $this->Cell(20, 5,utf8_decode($ve[0]['direccliente']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(116, 60);\n $this->Cell(20, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(128, 60);\n $this->Cell(20, 5,utf8_decode($ve[0]['emailcliente']), 0 , 0);\n\t\n\t$this->Ln(8);\n\t$this->SetFont('courier','B',10);\n\t$this->SetTextColor(3, 3, 3); // Establece el color del texto (en este caso es Negro)\n $this->SetFillColor(229, 229, 229); // establece el color del fondo de la celda (en este caso es GRIS)\n\t$this->Cell(8,8,'N°',1,0,'C', True);\n\t$this->Cell(17,8,'CÓDIGO',1,0,'C', True);\n\t$this->Cell(67,8,'DESCRIPCIÓN DE PRODUCTO',1,0,'C', True);\n\t$this->Cell(25,8,'CATEGORIA',1,0,'C', True);\n\t$this->Cell(25,8,'PRECIO',1,0,'C', True);\n\t$this->Cell(23,8,'CANTIDAD',1,0,'C', True);\n\t$this->Cell(25,8,'IMPORTE',1,1,'C', True);\n\t\n\t################################################# BLOQUE N° 4 DE DETALLES DE PRODUCTOS ###################################################\t\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 78, 190, 170, '1.5', '');\n\t\n\t$this->Ln(3);\n $tra = new Login();\n $reg = $tra->VerDetallesVentas();\n\t$cantidad=0;\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$cantidad+=$reg[$i]['cantventa'];\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(8,4,$a++,0,0,'C');\n\t$this->CellFitSpace(17,4,utf8_decode($reg[$i][\"codproducto\"]),0,0,'C');\n $this->CellFitSpace(67,4,utf8_decode($reg[$i][\"producto\"]),0,0,'C');\n $this->CellFitSpace(25,4,utf8_decode($reg[$i][\"nomcategoria\"]),0,0,'C');\n\t$this->CellFitSpace(25,4,utf8_decode(number_format($reg[$i][\"precioventa\"], 2, '.', ',')),0,0,'C');\n\t$this->CellFitSpace(23,4,utf8_decode($reg[$i][\"cantventa\"]),0,0,'C');\n\t$this->CellFitSpace(25,4,utf8_decode(number_format($reg[$i][\"importe\"], 2, '.', ',')),0,0,'C');\n $this->Ln();\n }\n \n################################################# BLOQUE N° 5 DE TOTALES ###################################################\t\n\t//Bloque de Informacion adicional\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 250, 110, 28, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',10);\n $this->SetXY(44, 250);\n $this->Cell(20, 5, 'INFORMACIÓN ADICIONAL', 0 , 0);\n\t\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 254);\n $this->Cell(20, 5, 'CANTIDAD DE PRODUCTOS :', 0 , 0);\n $this->SetXY(60, 254);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode($cantidad), 0 , 0);\n\t\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 257.2);\n $this->Cell(20, 5, 'TIPO DE DOCUMENTO :', 0 , 0);\n $this->SetXY(60, 257.2);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode(\"FACTURA\"), 0 , 0);\n\t\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 260.5);\n $this->Cell(20, 5, 'TIPO DE PAGO :', 0 , 0);\n $this->SetXY(60, 260.5);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode($ve[0]['tipopagove'].\" - \".$ve[0]['formapagove']), 0 , 0);\n\t\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 263.5);\n $this->Cell(20, 5, 'FECHA DE VENCIMIENTO :', 0 , 0);\n $this->SetXY(60, 263.5);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode($vence = ( $ve[0]['fechavencecredito'] == '0000-00-00' ? \"0\" : date(\"d-m-Y\",strtotime($ve[0]['fechavencecredito'])))), 0 , 0);\n\t\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 266.5);\n $this->Cell(20, 5, 'DIAS VENCIDOS :', 0 , 0);\n $this->SetXY(60, 266.5);\n\t$this->SetFont('courier','',8);\n\t\n if($ve[0]['fechavencecredito']== '0000-00-00') { \n\t$this->Cell(20, 5,utf8_decode(\"0\"), 0 , 0);\n\t} elseif($ve[0]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(\"0\"), 0 , 0);\n\t} elseif($ve[0]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(Dias_Transcurridos(date(\"Y-m-d\"),$ve[0]['fechavencecredito'])), 0 , 0);\n\t}\n\t\n\t//Linea de membrete Nro 7\n\t$this->SetXY(52, 33);\n\t$this->Codabar(13,271,utf8_decode(\"133923786899444489448576556789\"));\n\t//Linea de membrete Nro 2\n $this->SetFont('courier','B',6.5); \n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->SetXY(48, 271);\n $this->Cell(20, 5, 'Este documento no constituye un comprobante de pago', 0 , 0);\n\t\n\t//Bloque de Totales de factura\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(122, 250, 78, 28, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 252);\n $this->Cell(20, 5, 'SUBTOTAL IVA '.$ve[0][\"ivave\"].'% :', 0 , 0);\n $this->SetXY(167, 252);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($ve[0][\"subtotalivasive\"], 2, '.', ',')), 0 , 0);\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 256);\n $this->Cell(20, 5, 'SUBTOTAL IVA 0% :', 0 , 0);\n $this->SetXY(167, 256);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($ve[0][\"subtotalivanove\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 260);\n $this->Cell(20, 5, 'IVA '.$ve[0][\"ivave\"].'% :', 0 , 0);\n $this->SetXY(167, 260);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($ve[0][\"totalivave\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 264);\n $this->Cell(20, 5, 'DESC '.$ve[0][\"descuentove\"].'% :', 0 , 0);\n $this->SetXY(167, 264);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($ve[0][\"totaldescuentove\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 268);\n $this->Cell(20, 5, 'TOTAL PAGO :', 0 , 0);\n $this->SetXY(167, 268);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($ve[0][\"totalpago\"], 2, '.', ',')), 0 , 0);\n}", "public function displayAll() {\n \t\n \techo \"<table border=1>\";\n\t\techo \"<tr>\";\n\t\techo \"<th>Id</th>\";\n\t\techo \"<th>Ora decolare</th>\";\n\t\techo \"<th>Destinatia</th>\";\n\t\techo \"<th>Compania</th>\";\n\t\techo \"</tr>\";\n\n\t\tforeach($this->findAll() as $k => $zbor){ //parcugem arrayul pe linie\n\t\t\techo \"<tr>\";\n\n\t\t\techo \"<td> \" . $zbor[\"id\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"ora_decolare\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"destinatia\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"compania\"] . \"</td>\";\n\t\t\t\n\t\t\techo \"</tr>\";\n\t\t}\n\n\t\techo \"</table>\";\n }", "function blocs_BarreTypo($tr) {\r\n\treturn $tr.'<tr><td>'._T('couteauprive:blocs:nom').' (en projet)</td></tr>';\r\n}", "public function list_ptto_poa_final($tp_id){\n $lista_aper_padres = $this->model_proyecto->list_prog();//lista de aperturas padres \n $tabla ='';\n foreach($lista_aper_padres as $rowa){\n $proyectos=$this->model_ptto_sigep->acciones_operativas($rowa['aper_programa'],$tp_id);\n if(count($proyectos)!=0){\n $tabla .='<tr bgcolor=\"#99DDF0\" height=\"30\">';\n $tabla .='<td></td>';\n if($this->tp_adm==1){\n $tabla .='<td></td>';\n }\n $tabla .='<td><center>'.$rowa['aper_programa'].''.$rowa['aper_proyecto'].''.$rowa['aper_actividad'].'</center></td>';\n $tabla .='<td>'.$rowa['aper_descripcion'].'</td>';\n $tabla .='<td>'.$rowa['aper_sisin'].'</td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='</tr>';\n $nro=0;\n foreach($proyectos as $row){\n $nro++;\n // $fase = $this->model_faseetapa->get_id_fase($row['proy_id']);\n $aper=$this->model_ptto_sigep->partidas_proyecto($row['aper_id']);\n $tabla .= '<tr height=\"50\">';\n $tabla .= '<td align=center><center><img id=\"loadd'.$row['proy_id'].'\" style=\"display: none\" src=\"'.base_url().'/assets/img/loading.gif\" width=\"25\" height=\"25\" title=\"ESPERE UN MOMENTO, LA PAGINA SE ESTA CARGANDO..\"></center></td>';\n if($this->tp_adm==1){\n if(count($aper)!=0){\n $tabla .='<td><center><a href=\"'.site_url(\"\").'/mnt/ver_ptto_asig_final/'.$row['proy_id'].'\" id=\"myBtnn'.$row['proy_id'].'\" title=\"VER PRESUPUESTO ASIGNADO INICIAL - PROGRAMADO - APROBADO\" iclass=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/faseetapa.png\" WIDTH=\"34\" HEIGHT=\"34\"/></a></center></td>';\n }\n else{\n $tabla .='<td></td>';\n }\n }\n $tabla .= '<td align=center>'.$row['aper_programa'].''.$row['aper_proyecto'].''.$row['aper_actividad'].'</td>';\n $tabla .= '<td>'.$row['proy_id'].' | '.$row['proy_nombre'].'</td>';\n $tabla .= '<td>'.$row['tp_tipo'].'</td>';\n $tabla .= '<td>'.$row['proy_sisin'].'</td>';\n $tabla .= '<td>'.$row['fun_nombre'].' '.$row['fun_paterno'].' '.$row['fun_materno'].'</td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .='<td></td>';\n $tabla .= '</tr>';\n \n\n }\n }\n }\n return $tabla;\n }", "function mostrar_tabla()\n {\n return $this->mostrar_tabla_slickgrid();\n /*\n $sPrefs = '';\n $id_usuario= core\\ConfigGlobal::mi_id_usuario();\n $tipo = 'tabla_presentacion';\n $oPref = new usuarios\\Preferencia(array('id_usuario'=>$id_usuario,'tipo'=>$tipo));\n $sPrefs=$oPref->getPreferencia();\n if ($sPrefs == 'html') {\n return $this->mostrar_tabla_html();\n } else {\n return $this->mostrar_tabla_slickgrid();\n }\n */\n }", "public function display_gall_for_admin(){\n\n $sql = \"SELECT id,name FROM photos WHERE img_navigacija_id=2 LIMIT 9\";\n\n echo \"<table><tr>\";\n $i=0;\n $rows=array();\n foreach(self::$connect->query($sql) as $row){\n\n $rows[]=$row;\n }\n\n foreach($rows as $row){\n $i++;\n if($i % 3==1){\n echo \"</tr><tr>\";\n }\n $this->id=$row['id'];\n $this->name=$row['name'];\n echo \"<td id=\\\"fade\\\"><img src=\\\"../uploaded_images/\".$this->name.\"\\\"/></td>\";\n echo \"<td style>\".$row['name'].\"<br/>\";\n echo \"<a id=\\\"test\\\" href=\\\"delete_photo.php?id=\".$this->id.\"&name=\".$this->name.\"\\\"><i class=\\\"fa fa-trash-o\\\"> Delete</i></a></td>\";\n }\n echo \"</table>\";\n\n }", "public function mis_objetivos_estrategicos(){\n $objetivos = $this->model_mestrategico->list_objetivos_estrategicos(); /// OBJETIVOS ESTRATEGICOS\n $tabla ='';\n $tabla .='<article class=\"col-xs-12 col-sm-12 col-md-12 col-lg-12\">\n <div class=\"jarviswidget jarviswidget-color-darken\" >\n <header>\n <span class=\"widget-icon\"> <i class=\"fa fa-arrows-v\"></i> </span>\n <h2 class=\"font-md\"><strong>OBJETIVOS ESTRATEGICOS</strong></h2> \n </header>\n <div>\n <a role=\"menuitem\" tabindex=\"-1\" href=\"#\" data-toggle=\"modal\" data-target=\"#modal_nuevo_ff\" class=\"btn btn-success\" style=\"width:14%;\" title=\"NUEVO REGISTRO - OBJETIVO ESTRATEGICO\">NUEVO REGISTRO</a><br><br>\n <div class=\"widget-body no-padding\">\n <table id=\"dt_basic\" class=\"table table table-bordered\" width=\"100%\">\n <thead>\n <tr>\n <th style=\"width:1%;\">NRO</th>\n <th style=\"width:3%;\">ACCI&Oacute;N ESTRATEGICA</th>\n <th style=\"width:10%;\">DESCRIPCI&Oacute;N OBJETIVO ESTRATEGICO</th>\n <th style=\"width:5%;\">GESTI&Oacute;N INICIO</th>\n <th style=\"width:5%;\">GESTI&Oacute;N FIN</th>\n <th style=\"width:3%;\">NUEVOS RESULTADOS</th>\n <th style=\"width:50%;\">RESULTADOS FINALES</th>\n <th style=\"width:5%;\">MODIFICAR</th>\n <th style=\"width:5%;\">ELIMINAR</th>\n <th style=\"width:5%;\" title=\"Alineacion PEI-POA\">REPORTE</th>\n <th style=\"width:5%;\" title=\"Exportar Alineacion a formato Excel\">EXP.</th>\n <th></th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n foreach($objetivos as $row){\n $nro++;\n $tabla .='<tr>';\n $tabla .='<td>'.$nro.'</td>';\n $tabla .='<td align=\"center\"><a href=\"'.site_url(\"\").'/me/acciones_estrategicas/'.$row['obj_id'].'\" title=\"ACCIONES ESTRATEGICAS\"><img src=\"' . base_url() . 'assets/img/folder.png\"\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td>'.$row['obj_codigo'].'.- '.$row['obj_descripcion'].'</td>';\n $tabla .='<td>'.$row['obj_gestion_inicio'].'</td>';\n $tabla .='<td>'.$row['obj_gestion_fin'].'</td>';\n $tabla .='<td align=\"center\"><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_add_rf\" class=\"btn btn-xs add_rf\" title=\"AGREGAR NUEVO RESULTADO FINAL\" name=\"'.$row['obj_id'].'\"><img src=\"'.base_url().'assets/ifinal/add.jpg\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td>';\n $rfinal=$this->model_mestrategico->list_resultados_final($row['obj_id']);\n if(count($rfinal)!=0){\n $tabla.='<table class=\"table table-bordered\">\n <thead>\n <tr>\n <th style=\"width:1%;\">NRO</th>\n <th style=\"width:1%;\"></th>\n <th style=\"width:2%;\">C&Oacute;DIGO</th>\n <th style=\"width:10%;\">RESULTADOS FINALES</th>\n <th style=\"width:7%;\">INDICADOR DE IMPACTO</th>\n <th style=\"width:3%;\">META</th>\n <th style=\"width:3%;\">2016</th>\n <th style=\"width:3%;\">2017</th>\n <th style=\"width:3%;\">2018</th>\n <th style=\"width:3%;\">2019</th>\n <th style=\"width:3%;\">2020</th>\n </tr>\n </thead>\n <tbody>';\n $nro_rf=0;\n foreach($rfinal as $rowr){\n $nro_rf++;\n $tabla.='<tr>';\n $tabla.='\n <td>'.$nro_rf.'</td>\n <td align=center><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_mod_rf\" class=\"btn btn-xs mod_rf\" title=\"MODIFICAR RESULTADO FINAL\" name=\"'.$row['obj_id'].'\" id=\"'.$rowr['rf_id'].'\"><img src=\"'.base_url().'assets/img/mod_icon.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>\n <td>'.$rowr['rf_cod'].'</td>\n <td>'.$rowr['rf_resultado'].'</td>\n <td>'.$rowr['rf_indicador'].'</td>\n <td>'.$rowr['rf_meta'].'</td>\n <td>'.$rowr['mes1'].'</td>\n <td>'.$rowr['mes2'].'</td>\n <td>'.$rowr['mes3'].'</td>\n <td>'.$rowr['mes4'].'</td>\n <td>'.$rowr['mes5'].'</td>';\n $tabla.='</tr>';\n }\n $tabla.='\n </tbody>\n </table>';\n }\n $tabla .='</td>';\n $tabla .='<td align=center><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_mod_ff\" class=\"btn btn-xs mod_ff\" title=\"MODIFICAR OBJETIVO ESTRATEGICO\" name=\"'.$row['obj_id'].'\"><img src=\"' . base_url() . 'assets/ifinal/modificar.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td align=center><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_del_ff\" class=\"btn btn-xs del_ff\" title=\"ELIMINAR OBJETIVO ESTRATEGICO\" name=\"'.$row['obj_id'].'\"><img src=\"' . base_url() . 'assets/ifinal/eliminar.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td align=center><a href=\"javascript:abreVentana_obj(\\''.site_url(\"\").'/me/reporte_obj/'.$row['obj_id'].'\\');\" title=\"REPORTE DE VINCULACION PEI\"><img src=\"' . base_url() . 'assets/ifinal/pdf.png\" WIDTH=\"35\" HEIGHT=\"35\"/></td>';\n $tabla .='<td align=center><a href=\"'.site_url(\"\").'/me/exportar_alineacion/'.$row['obj_id'].'\" title=\"EXPORTAR ALINEACION PEI-POA\" id=\"myBtn'.$row['obj_id'].'\"><img src=\"' . base_url() . 'assets/ifinal/excel.jpg\" WIDTH=\"40\"/></a></td>';\n $tabla .='<td align=\"center\"><img id=\"load'.$row['obj_id'].'\" style=\"display: none\" src=\"'.base_url().'/assets/img/loading.gif\" width=\"25\" height=\"25\" title=\"ESPERE UN MOMENTO, LA PAGINA SE ESTA CARGANDO..\"></td>';\n $tabla .='</tr>';\n $tabla.='<script>\n document.getElementById(\"myBtn'.$row['obj_id'].'\").addEventListener(\"click\", function(){\n document.getElementById(\"load'.$row['obj_id'].'\").style.display = \"block\";\n });\n </script>';\n }\n $tabla .='\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </article>';\n\n return $tabla;\n\n }", "public function listtabelPngAction() {\n $this->view->tableList = $this->adm_listtabel_serv->getTableList('PENGADAAN');\n }", "function TablaServiciosDiariasVendedor()\n {\t\n\t\n\t//Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\");\n\t$this->SetXY(10, 15);\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(75,6,'',0,0,'');\n\t$this->Cell(120,6,'LISTADO DE SERVICIOS DEL DIA '.date(\"Y-m-d\"),0,1,'C');\n \n\t$this->Cell(75,6,'',0,0,'');\n $this->Cell(120,6,'DE CAJA N°.'.base64_decode($_GET['caja']),0,0,'C');\n //Salto de línea\n $this->Ln(15);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'CÉDULA GERENTE: ',0,0,'');\n\t$this->Cell(44,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->Cell(30,5,'NOMBRE GERENTE:',0,0,'');\n\t$this->Cell(83,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'TELÉFONO GERENTE: ',0,0,'');\n $this->Cell(44,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->Cell(30,5,'CORREO GERENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO SERVICIO',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'FECHA SERVICIO',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'SERVICIOS',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'SUBTOTAL',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'DESCUENTO',1,0,'C', True);\n\t$this->CellFitSpace(26,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarServiciosDiarias();\n\t$serviciosTotal=0;\n\t$pagoSubtotal=0;\n\t$pagoIva=0;\n\t$pagoDescuento=0;\n\t$pagoTotal=0;\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n $serviciosTotal+=$reg[$i]['cantidad'];\n\t$pagoSubtotal+=$reg[$i]['subtotal']; \n\t$pagoIva+=$reg[$i]['totaliva']; \n\t$pagoDescuento+=$reg[$i]['totaldescuento']; \n\t$pagoTotal+=$reg[$i]['totalpago'];\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codservicio\"],1,0,'C');\n\t$this->CellFitSpace(32,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaservicio']))),1,0,'C');\n\t$this->CellFitSpace(22,5,utf8_decode($reg[$i][\"cantidad\"]),1,0,'C');\n\t$this->CellFitSpace(25,5,utf8_decode(number_format($reg[$i]['subtotal'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totaliva'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totaldescuento'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(26,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',1,0,'C');\n $this->Cell(32,5,'',1,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(32,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(22,5,utf8_decode($serviciosTotal),1,0,'C');\n $this->Cell(25,5,utf8_decode(number_format($pagoSubtotal, 2, '.', ',')),1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($pagoIva, 2, '.', ',')),1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($pagoDescuento, 2, '.', ',')),1,0,'C'); \n $this->CellFitSpace(26,5,utf8_decode(number_format($pagoTotal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\n \n $this->Ln(15); \n $this->SetFont('courier','B',9);\n $this->Cell(190,0,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]).' RECIBIDO POR:___________________________','',1,'C');\n $this->Ln(4);\n }", "function ImprimirCabeceraTabla($tabla){\n echo \"<table><tr>\";\n foreach ($tabla as $valor){\n\n echo \"<th>\".$valor.\"</th>\";\n \n }\n echo \"</tr>\";\n}", "function ImprimeTable($idTabla, $data, $pactu = \"\", $peli = \"\",$classCSS=\"\") {\n // echo \"ImprimeTable:::::::::::::::\".count($data[\"cuerpo\"]).\" <br>\";\n\t\ttry {\n // if (count($data) > 0) {\n\t\t\t $tabla = '<table id=\"'.$idTabla.'\" class=\"' . $classCSS . '\" cellpadding=\"0\" cellspacing=\"1\" border=\"1\" align=\"center\" style=\"text-align:center\" >';\n\t\t\t if (count($data[\"columnas\"]) > 0) {\n\t\t\t\t$tabla.= '<thead>';\n $tabla .= '<tr>';\n $conta = 0;\n $conte = 0;\n\t\t\t\t\n for ($x = 0;$x < count($data[\"columnas\"]);$x++) {\n\t\t\t\t\t \n if ($pactu != \"\") {\n if ($conta == 0) {;\n\t\t\t\t\t\t $tabla.= '<th></th>';\n //$tabla.= '<td></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<th></th>';\n\t\t\t\t\t\t\t//$tabla.= '<td></td>';\n }\n }\n $conta++;\n $conte++;\n $tabla.= '<th>' . utf8_encode($data[\"columnas\"][$x]) . '</th>'; \n }\n\t\t\t\t$tabla.= \"</tr>\";\n\t\t\t\t$tabla.= '</thead>';\n\t\t\t }\n //===========CUERPO DE TABLA=================================================================================================\n $cantele = count($data[\"cuerpo\"]);\n if ($cantele > 0) {\n for ($i = 0;$i < $cantele;$i++) {\n $conta = 0;\n $conte = 0;\n $tabla.= \"<tr>\";\n for ($z = 0;$z < count($data[\"columnas\"]);$z++) {\n $columnas = $data[\"columnas\"][$z];\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n if ($pactu != \"\") {\n if ($conta == 0) {\n // $tabla.= '<td><a href=\"javascript:Modificar('. $data[\"cuerpo\"][$i][\"$columnas\"] .');\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>';\n\t\t\t\t\t\t\t\t $tabla.= '<td><a href=\"#\" onClick=\"Modificar('. $data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" title=\"Actualizar\" ><img title=\"Actualizar\" src=\"../imgcixphp/ico_actualizar.gif\" title=\"Actualizar\" width=\"16\" height=\"16\"/></a></td>';\n }\n }\n if ($peli != \"\") {\n if ($conte == 0) {;\n $tabla.= '<td><a href=\"#\" onClick=\"Eliminar('.$data[\"cuerpo\"][$i][\"$columnas\"] .'); return false;\" ><img src=\"../imgcixphp/delete.gif\" width=\"16\" title=\"Eliminar\" height=\"16\"/></a></td>';\n }\n }\n }\n $conta++;\n $conte++;\n if (isset($data[\"cuerpo\"][$i][\"$columnas\"])) {\n $tabla.= '<td>' . $data[\"cuerpo\"][$i][\"$columnas\"] . ' </td>';\n }\n }\n $tabla.= \"</tr>\";\n }\n \n }else{//solo si es k no hay datos\n\t\t\t\t$mensaje= \"No se encuentran Ningun Dato Registrado\"; \n\t\t\t $tabla.='<tfoot><tr> <td >&nbsp; '.$mensaje.' </td></tr></tfoot>';\n\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t//===========FIN CUERPO DE TABLA===========================================================================================\n $tabla.= \"</table><br>\";\n\t\t\t\t//}\n }\n catch(exception $e) {\n return $e->getMessage();\n }\n return $tabla;\n }", "public function tabel_barangkeluar()\n {\n $data['list_data'] = $this->M_kasir->select('tb_barang_keluar');\n $data['avatar'] = $this->M_kasir->get_data_gambar('tb_upload_gambar_user',$this->session->userdata('name'));\n $this->load->view('kasir/tabel/tabel_barangkeluar',$data);\n }", "function TablaDevolucionesProductos()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 15 ,10, 55 , 17 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',15);\n //Movernos a la derecha\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$dev = new Login();\n $dev = $dev->DevolucionesPorId();\n\t\n################################################# BLOQUE N° 1 ###################################################\t\n\n //Bloque de membrete principal\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 10, 190, 17, '1.5', '');\n\t\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 12, 18, 12, '1.5', 'F');\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 12, 18, 12, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',16);\n $this->SetXY(104, 14);\n $this->Cell(26, 5, 'D', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(98, 19);\n $this->Cell(20, 5, 'Devolución', 0 , 0);\n\t\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',10);\n $this->SetXY(135, 10);\n $this->Cell(20, 5, 'N° DEVOLUCIÓN ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 10);\n $this->Cell(20, 5,utf8_decode($dev[0]['coddevolucion']), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 14);\n $this->Cell(20, 5, 'FECHA DEVOLUCIÓN ', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 14);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($dev[0]['fechadevolucion']))), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 18);\n $this->Cell(20, 5, 'FECHA EMISIÓN', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 18);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\")), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 22);\n $this->Cell(20, 5, 'N° DE CAJA', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 22);\n $this->Cell(20, 5,utf8_decode($dev[0]['nrocaja']), 0 , 0);\n\t\n\t\n################################################# BLOQUE N° 2 ###################################################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 29, 190, 18, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 30);\n $this->Cell(20, 5, 'DATOS DE LA EMPRESA ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 34);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(40, 34);\n $this->Cell(20, 5,utf8_decode($con[0]['nomempresa']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(147, 34);\n $this->Cell(90, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 34);\n $this->Cell(90, 5,utf8_decode($con[0]['rifempresa']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 38);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(32, 38);\n $this->Cell(20, 5,utf8_decode($con[0]['direcempresa']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(140, 38);\n $this->Cell(20, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 38);\n $this->Cell(20, 5,utf8_decode($con[0]['tlfempresa']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 42);\n $this->Cell(20, 5, 'GERENTE :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(30, 42);\n $this->Cell(20, 5,utf8_decode($con[0]['nomresponsable']), 0 , 0);\n\t//Linea de membrete Nro 7\n\t$this->SetFont('courier','B',7);\n $this->SetXY(94, 42);\n $this->Cell(20, 5, 'CÉDULA :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 42);\n $this->Cell(20, 5,utf8_decode($con[0]['cedresponsable']), 0 , 0);\n\t//Linea de membrete Nro 8\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 42);\n $this->Cell(20, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(142, 42);\n $this->Cell(20, 5,utf8_decode($con[0]['correoresponsable']), 0 , 0);\n\t\n################################################# BLOQUE N° 3 ###################################################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 49, 190, 14, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 50);\n $this->Cell(20, 5, 'DATOS DEL PROVEEDOR ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 54);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(36, 54);\n $this->Cell(20, 5,utf8_decode($dev[0]['nomproveedor']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(100, 54);\n $this->Cell(70, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 54);\n $this->Cell(75, 5,utf8_decode($dev[0]['ritproveedor']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 54);\n $this->Cell(90, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(142, 54);\n $this->Cell(90, 5,utf8_decode($dev[0]['emailproveedor']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 58);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(33, 58);\n $this->Cell(20, 5,utf8_decode($dev[0]['direcproveedor']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(90, 58);\n $this->Cell(20, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 58);\n $this->Cell(20, 5,utf8_decode($dev[0]['tlfproveedor']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 58);\n $this->Cell(20, 5, 'CONTACTO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(150, 58);\n $this->Cell(20, 5,utf8_decode($dev[0]['contactoproveedor']), 0 , 0);\n\t\n\t$this->Ln(7);\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(3, 3, 3); // Establece el color del texto (en este caso es Negro)\n $this->SetFillColor(229, 229, 229); // establece el color del fondo de la celda (en este caso es GRIS)\n\t$this->Cell(6,8,'N°',1,0,'C', True);\n\t$this->Cell(15,8,'CÓDIGO',1,0,'C', True);\n\t$this->Cell(50,8,'DESCRIPCIÓN DE PRODUCTO',1,0,'C', True);\n\t$this->Cell(29,8,'CATEGORIA',1,0,'C', True);\n\t$this->Cell(29,8,'PRECIO',1,0,'C', True);\n\t$this->Cell(16,8,'CANT',1,0,'C', True);\n\t$this->Cell(20,8,'LOTE',1,0,'C', True);\n\t//$this->Cell(20,8,'VENCE',1,0,'C', True);\n\t$this->Cell(25,8,'IMPORTE',1,1,'C', True);\n\t\n\t################################################# BLOQUE N° 4 DE DETALLES DE PRODUCTOS ###################################################\t\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 75, 190, 170, '1.5', '');\n\t\n\t$this->Ln(3);\n $tra = new Login();\n $reg = $tra->VerDetallesDevoluciones();\n\t$cantidad=0;\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$cantidad+=$reg[$i]['cantdevolucion'];\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(6,4,$a++,0,0,'C');\n\t$this->CellFitSpace(15,4,utf8_decode($reg[$i][\"codproducto\"]),0,0,'C');\n $this->CellFitSpace(50,4,utf8_decode($reg[$i][\"producto\"]),0,0,'C');\n $this->CellFitSpace(29,4,utf8_decode($reg[$i][\"nomcategoria\"]),0,0,'C');\n\t$this->CellFitSpace(29,4,utf8_decode(number_format($reg[$i][\"preciodevolucion\"], 2, '.', ',')),0,0,'C');\n\t$this->CellFitSpace(16,4,utf8_decode($reg[$i][\"cantdevolucion\"]),0,0,'C');\n\t$this->CellFitSpace(20,4,utf8_decode($reg[$i][\"lotedevolucion\"]),0,0,'C');\n\t//$this->CellFitSpace(20,4,utf8_decode($reg[$i][\"cantdevolucion\"]),0,0,'C');\n\t$this->CellFitSpace(25,4,utf8_decode(number_format($reg[$i][\"importe\"], 2, '.', ',')),0,0,'C');\n $this->Ln();\n }\n \n\t\n\n\n################################################# BLOQUE N° 5 DE TOTALES ###################################################\t\n\t//Bloque de Informacion adicional\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 250, 130, 25, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',12);\n $this->SetXY(46, 252);\n $this->Cell(20, 5, 'INFORMACIÓN ADICIONAL', 0 , 0);\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(12, 258);\n $this->Cell(20, 5, 'CANTIDAD DE PRODUCTOS :', 0 , 0);\n $this->SetXY(60, 258);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode($cantidad), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(12, 262);\n $this->Cell(20, 5, 'TIPO DE DOCUMENTO :', 0 , 0);\n $this->SetXY(60, 262);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(\"FACTURA\"), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetXY(52, 33);\n\t$this->Codabar(13,267,utf8_decode(\"133923786899444489448576556789\"));\n\t//Linea de membrete Nro 2\n $this->SetFont('courier','B',7); \n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->SetXY(55, 268);\n $this->Cell(20, 5, 'Este documento no constituye un comprobante de pago.', 0 , 0);\n\t\n\t//Bloque de Totales de factura\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(142, 250, 58, 25, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(143, 254);\n $this->Cell(20, 5, 'SUB TOTAL :', 0 , 0);\n $this->SetXY(167, 254);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($dev[0][\"subtotald\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(143, 258);\n $this->Cell(20, 5, 'IVA '.$dev[0][\"ivad\"].'% :', 0 , 0);\n $this->SetXY(167, 258);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($dev[0][\"totalivad\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',9);\n $this->SetXY(143, 262);\n $this->Cell(20, 5, 'DESC 0% :', 0 , 0);\n $this->SetXY(167, 262);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(\"0.00\"), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(143, 266);\n $this->Cell(20, 5, 'TOTAL PAGO :', 0 , 0);\n $this->SetXY(167, 266);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($dev[0][\"totald\"], 2, '.', ',')), 0 , 0);\n \n}", "private function loadTable()\n {\n $unites = $this->Unite->all([], 'uniid DESC');\n $i = 1;\n $html = '';\n\n foreach ($unites as $unite) {\n $html .= '<tr>' .\n '<td>' . $i ++ . '</td>' .\n '<td>' . $unite->unilibelle . '</td>' .\n '<td>' . $unite->uniabv . '</td>' .\n '<td>';\n if (in_array('113', $this->session->stkdroits)) {\n $html .= '<a data-toggle=\"modal\" href=\"#editeUnite\" onclick=\"laodForEditUnite(' . $unite->uniid . '); return false\" title=\"editer\"><i class=\"fa fa-edit\" style=\"color: #05AE0E;\"></i></a>';\n } else {\n $html .= '<a href=\"javascript: void(0)\" class=\"disabled\" title=\"editer\"><i class=\"fa fa-edit\"></i></a>';\n }\n if (in_array('112', $this->session->stkdroits)) {\n $html .= '<a data-toggle=\"modal\" href=\"#deletUnite\" onclick=\"laodDataForDeleteUnite(' . $unite->uniid . '); return false;\" title=\"supprimer\"><i class=\"fa fa-remove\" style=\"color: #FF3B30;\"></i></a>';\n }else {\n $html .= '<a href=\"javascript: void(0)\" class=\"disabled\" title=\"editer\"><i class=\"fa fa-remove\"></i></a>';\n }\n $html .= '</td>' .\n '</tr>';\n }\n\n return $html;\n }", "function insertTableInsumosVendidos($headers,$matrizDatos) {\n //verificar tabla a insertar (posteriormente puede ser una funcion):\n\n\n\n\n echo '<div class=\"card-body\">\n <div class=\"table-responsive\" >\n <table class=\"table table-bordered dataTableClase\" width=\"100%\" cellspacing=\"0\">'; //apertura de etiquetas\n //rellenar head:\n echo '<thead><tr>';\n foreach ($headers as $hd) {\n echo \"<th>\".$hd.\"</th>\";\n }\n echo'</tr></thead>';\n //rellenar el footer:\n echo '<tfoot><tr>';\n foreach ($headers as $hd) {\n echo \"<th>\".$hd.\"</th>\";\n }\n echo'</tr></tfoot>';\n echo '<tbody>';\n foreach ($matrizDatos as $reg) {\n echo \"<tr>\";\n foreach ($reg as $cell) {\n echo \"<td>\".$cap = ucfirst(mb_strtolower($cell)).\"</td>\"; // Capitalize\n }\n echo \"</tr>\";\n }\n echo '</tbody></table></div></div>'; //cierre etiquetas tabla\n}", "function TablaComprasProductos()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 15 ,10, 55 , 18 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',15);\n //Movernos a la derecha\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$co = new Login();\n $co = $co->ComprasPorId();\n\t\n################################################# BLOQUE N° 1 ###################################################\t\n\n //Bloque de membrete principal\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 10, 190, 20, '1.5', '');\n\t\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 14, 12, 12, '1.5', 'F');\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 14, 12, 12, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',16);\n $this->SetXY(101, 14);\n $this->Cell(20, 5, 'C', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(98, 19);\n $this->Cell(20, 5, 'Compra', 0 , 0);\n\t\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 10);\n $this->Cell(20, 5, 'N° COMPRA ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 10);\n $this->Cell(20, 5,utf8_decode($co[0]['codcompra']), 0 , 0);\n\t\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 13);\n $this->Cell(20, 5, 'N° SERIE ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 13);\n $this->Cell(20, 5,utf8_decode($co[0]['codseriec']), 0 , 0);\n\t\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 16);\n $this->Cell(20, 5, 'N° AUTORIZACIÓN ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 16);\n $this->Cell(20, 5,utf8_decode($co[0]['codautorizacionc']), 0 , 0);\n\t\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 19);\n $this->Cell(20, 5, 'FECHA COMPRA ', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 19);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($co[0]['fechacompra']))), 0 , 0);\n\t\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 22);\n $this->Cell(20, 5, 'FECHA EMISIÓN', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 22);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\")), 0 , 0);\n\t\n\t$dias = ( $co[0]['fechavencecredito'] == '0000-00-00' ? \"0\" : Dias_Transcurridos($co[0]['fechavencecredito'],date(\"Y-m-d\")));\n\t\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 25);\n $this->Cell(20, 5, 'STATUS COMPRA', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 25);\n \n\tif($co[0]['fechavencecredito']== '0000-00-00') { \n\t$this->Cell(20, 5,utf8_decode($co[0]['statuscompra']), 0 , 0);\n\t} elseif($co[0]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode($co[0]['statuscompra']), 0 , 0);\n\t} elseif($co[0]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(\"VENCIDA\"), 0 , 0);\n\t}\n\n\n\t\n\t\n################################################# BLOQUE N° 2 ###################################################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 32, 190, 18, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 32);\n $this->Cell(20, 5, 'DATOS DE LA EMPRESA ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 36);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(40, 36);\n $this->Cell(20, 5,utf8_decode($con[0]['nomempresa']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(147, 36);\n $this->Cell(90, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 36);\n $this->Cell(90, 5,utf8_decode($con[0]['rifempresa']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 40);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(32, 40);\n $this->Cell(20, 5,utf8_decode($con[0]['direcempresa']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(140, 40);\n $this->Cell(20, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 40);\n $this->Cell(20, 5,utf8_decode($con[0]['tlfempresa']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 44);\n $this->Cell(20, 5, 'GERENTE :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(30, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['nomresponsable']), 0 , 0);\n\t//Linea de membrete Nro 7\n\t$this->SetFont('courier','B',7);\n $this->SetXY(94, 44);\n $this->Cell(20, 5, 'CÉDULA :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['cedresponsable']), 0 , 0);\n\t//Linea de membrete Nro 8\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 44);\n $this->Cell(20, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(142, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['correoresponsable']), 0 , 0);\n\t\n################################################# BLOQUE N° 3 ###################################################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 52, 190, 14, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 52);\n $this->Cell(20, 5, 'DATOS DEL PROVEEDOR ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 56);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(36, 56);\n $this->Cell(20, 5,utf8_decode($co[0]['nomproveedor']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(100, 56);\n $this->Cell(70, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 56);\n $this->Cell(75, 5,utf8_decode($co[0]['ritproveedor']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 56);\n $this->Cell(90, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(142, 56);\n $this->Cell(90, 5,utf8_decode($co[0]['emailproveedor']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 60);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(33, 60);\n $this->Cell(20, 5,utf8_decode($co[0]['direcproveedor']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(90, 60);\n $this->Cell(20, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 60);\n $this->Cell(20, 5,utf8_decode($co[0]['tlfproveedor']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 60);\n $this->Cell(20, 5, 'CONTACTO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(150, 60);\n $this->Cell(20, 5,utf8_decode($co[0]['contactoproveedor']), 0 , 0);\n\t\n\t$this->Ln(8);\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(3, 3, 3); // Establece el color del texto (en este caso es Negro)\n $this->SetFillColor(229, 229, 229); // establece el color del fondo de la celda (en este caso es GRIS)\n\t$this->Cell(6,8,'N°',1,0,'C', True);\n\t$this->Cell(15,8,'CÓDIGO',1,0,'C', True);\n\t$this->Cell(50,8,'DESCRIPCIÓN DE PRODUCTO',1,0,'C', True);\n\t$this->Cell(22,8,'CATEGORIA',1,0,'C', True);\n\t$this->Cell(20,8,'PRECIO',1,0,'C', True);\n\t$this->Cell(15,8,'CANT',1,0,'C', True);\n\t$this->Cell(18,8,'LOTE',1,0,'C', True);\n\t$this->Cell(20,8,'VENCE',1,0,'C', True);\n\t$this->Cell(25,8,'IMPORTE',1,1,'C', True);\n\t\n\t################################################# BLOQUE N° 4 DE DETALLES DE PRODUCTOS ###################################################\t\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 78, 190, 170, '1.5', '');\n\t\n\t$this->Ln(3);\n $tra = new Login();\n $reg = $tra->VerDetallesCompras();\n\t$cantidad=0;\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$cantidad+=$reg[$i]['cantcompra'];\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(6,4,$a++,0,0,'C');\n\t$this->CellFitSpace(15,4,utf8_decode($reg[$i][\"codproducto\"]),0,0,'C');\n $this->CellFitSpace(50,4,utf8_decode($reg[$i][\"producto\"]),0,0,'C');\n $this->CellFitSpace(22,4,utf8_decode($reg[$i][\"nomcategoria\"]),0,0,'C');\n\t$this->CellFitSpace(20,4,utf8_decode(number_format($reg[$i][\"precio1\"], 2, '.', ',')),0,0,'C');\n\t$this->CellFitSpace(15,4,utf8_decode($reg[$i][\"cantcompra\"]),0,0,'C');\n\t$this->CellFitSpace(18,4,utf8_decode($reg[$i][\"lote\"]),0,0,'C');\n\t$this->CellFitSpace(20,4,utf8_decode($reg[$i][\"vence\"]),0,0,'C');\n\t$this->CellFitSpace(24,4,utf8_decode(number_format($reg[$i][\"importecompra\"], 2, '.', ',')),0,0,'C');\n $this->Ln();\n }\n \n################################################# BLOQUE N° 5 DE TOTALES ###################################################\t\n\t//Bloque de Informacion adicional\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 250, 110, 28, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',10);\n $this->SetXY(44, 250);\n $this->Cell(20, 5, 'INFORMACIÓN ADICIONAL', 0 , 0);\n\t\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 254);\n $this->Cell(20, 5, 'CANTIDAD DE PRODUCTOS :', 0 , 0);\n $this->SetXY(60, 254);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode($cantidad), 0 , 0);\n\t\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 257.2);\n $this->Cell(20, 5, 'TIPO DE DOCUMENTO :', 0 , 0);\n $this->SetXY(60, 257.2);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode(\"FACTURA\"), 0 , 0);\n\t\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 260.5);\n $this->Cell(20, 5, 'TIPO DE PAGO :', 0 , 0);\n $this->SetXY(60, 260.5);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode($co[0]['tipocompra'].\" - \".$co[0]['formacompra']), 0 , 0);\n\t\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 263.5);\n $this->Cell(20, 5, 'FECHA DE VENCIMIENTO :', 0 , 0);\n $this->SetXY(60, 263.5);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode($vence = ( $co[0]['fechavencecredito'] == '0000-00-00' ? \"0\" : date(\"d-m-Y\",strtotime($co[0]['fechavencecredito'])))), 0 , 0);\n\t\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 266.5);\n $this->Cell(20, 5, 'DIAS VENCIDOS :', 0 , 0);\n $this->SetXY(60, 266.5);\n\t$this->SetFont('courier','',8);\n\t\n if($co[0]['fechavencecredito']== '0000-00-00') { \n\t$this->Cell(20, 5,utf8_decode(\"0\"), 0 , 0);\n\t} elseif($co[0]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(\"0\"), 0 , 0);\n\t} elseif($co[0]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(Dias_Transcurridos(date(\"Y-m-d\"),$co[0]['fechavencecredito'])), 0 , 0);\n\t}\n\t//$this->Cell(20, 5,$dias = ( $co[0]['fechavencecredito'] == '0000-00-00' ? \"0\" : Dias_Transcurridos($co[0]['fechavencecredito'],date(\"Y-m-d\"))), 0 , 0);\n\t\n\t//Linea de membrete Nro 7\n\t$this->SetXY(52, 33);\n\t$this->Codabar(13,271,utf8_decode(\"133923786899444489448576556789\"));\n\t//Linea de membrete Nro 2\n $this->SetFont('courier','B',6.5); \n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->SetXY(48, 271);\n $this->Cell(20, 5, 'Este documento no constituye un comprobante de pago', 0 , 0);\n\t\n\t//Bloque de Totales de factura\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(122, 250, 78, 28, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 252);\n $this->Cell(20, 5, 'SUBTOTAL IVA '.$co[0][\"ivac\"].'% :', 0 , 0);\n $this->SetXY(167, 252);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($co[0][\"subtotalivasic\"], 2, '.', ',')), 0 , 0);\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 256);\n $this->Cell(20, 5, 'SUBTOTAL IVA 0% :', 0 , 0);\n $this->SetXY(167, 256);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($co[0][\"subtotalivanoc\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 260);\n $this->Cell(20, 5, 'IVA '.$co[0][\"ivac\"].'% :', 0 , 0);\n $this->SetXY(167, 260);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($co[0][\"totalivac\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 264);\n $this->Cell(20, 5, 'DESC '.$co[0][\"descuentoc\"].'% :', 0 , 0);\n $this->SetXY(167, 264);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($co[0][\"totaldescuentoc\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 268);\n $this->Cell(20, 5, 'TOTAL PAGO :', 0 , 0);\n $this->SetXY(167, 268);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($co[0][\"totalc\"], 2, '.', ',')), 0 , 0);\n \n}", "public function table()\n\t{\n\t\t$this->datatables->select('testcat.test_id AS test_id, testcat_id, gender, age, score, percentile, percentile.id AS id');\n\t\t$this->datatables->from('percentile');\n\t\t$this->datatables->join('testcat', 'testcat.id = percentile.testcat_id');\n\n\t\t$this->datatables->edit_column('test_id', '$1', 'test_get_link_by_id(test_id)');\n\t\t$this->datatables->edit_column('testcat_id', '$1', 'testcat_get_link_by_id(testcat_id)');\n\t\t$this->datatables->edit_column('gender', '$1', 'gender(gender)');\n\t\t$this->datatables->edit_column('id', '$1', 'percentile_actions(id)');\n\n\t\techo $this->datatables->generate();\n\t}", "function TablaVentasGeneral()\n {\t\n\t //Logo\n $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n $this->Cell(130);\n //Título\n $this->Cell(180,25,'LISTADO GENERAL DE VENTAS',0,0,'C');\n //Salto de línea\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'CAJA',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(17,8,'STATUS',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'TOT DESC',1,0,'C', True);\n\t$this->CellFitSpace(27,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarVentas();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n\t$this->CellFitSpace(60,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\t\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode(\"VENCIDA\"),1,0,'C');\n\t}\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(20,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(27,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(52,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(27,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n\t\n }", "public function bernafas()\n \t{\n \t\techo 'Bernafas menggunakan hidung, '.PHP_EOL;\n \t}", "function FancyTable($header,$data)\n\t\t{\n\t\t\t$this->SetFillColor(255,0,0);\n\t\t\t$this->SetTextColor(255);\n\t\t\t$this->SetDrawColor(128,0,0);\n\t\t\t$this->SetLineWidth(.1);\n\t\t\t//$this->SetFont('arial','','B');\n\t\t\t$this->SetFontSize(8);\n\t\t\t//$this->SetLeftMargin(20);\n\t\t\t//Header\n\t\t\tif ($_SESSION['klik']=='Vkupno'){\n\t\t\t\t$w=array(25,36,25,25,25,25); //tuka se kazuva kolku i kolkavi koloni imame\n\t\t\t\t$this->SetLeftMargin(22);\n\t\t\t}\n\t\t\telseif ($_SESSION['klik']==\"Vkupno_saldo\"){\n\t\t\t\t$w=array(17,34,23,25,23,23,23,23);\n\t\t\t}\n\t\t\telseif($_SESSION['klik']=='Analitika'){\n\t\t\t\tif ($_SESSION['totfin']==1){\n\t\t\t\t\t$w=array(40,30,30,30,30);\n\t\t\t\t\t$this->SetLeftMargin(24);\n\t\t\t\t}else{\n\t\t\t\t\t$w=array(25,25,40,25,25,25,25);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor($i=0;$i<count($header);$i++)\n\t\t\t\t$this->Cell($w[$i],6,$header[$i],1,0,'C',true);\n\t\t\t$this->Ln();\n\t\t\t//Color and font restoration\n\t\t\t$this->SetFillColor(224,235,255);\n\t\t\t$this->SetTextColor(0);\n\t\t\t//$this->SetFont('Arial');\n\t\t\t$this->SetFontSize(8);\n\t\t\t//Data\n\t\t\t$fill=false;\n\t\t\t\n\t\t\tif ($_SESSION['klik']=='Vkupno'){\n\t\t\tforeach($data as $row)\n\t\t\t\t{ //tuka gi pravime kolonite\n\t\t\t\t$this->Cell($w[0],6,$row[1],'LR',0,'C',$fill);\n\t\t\t\t$this->Cell($w[1],6,$row[0],'LR',0,'C',$fill);\n\t\t\t\t$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill);\n\t\t\t\t$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);\n\t\t\t\t$this->Cell($w[4],6,number_format($row[4]),'LR',0,'R',$fill);\n\t\t\t\t$this->Cell($w[5],6,number_format($row[5]),'LR',0,'R',$fill);\n\t\t\t\t$this->Ln();\n\t\t\t\t$fill=!$fill;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($_SESSION['klik']==\"Vkupno_saldo\"){\n\t\t\t\tforeach($data as $row)\n\t\t\t\t{ //tuka gi pravime kolonite\n\t\t\t\t$this->Cell($w[0],6,$row[1],'LR',0,'C',$fill);\n\t\t\t\t$this->Cell($w[1],6,$row[0],'LR',0,'C',$fill);\n\t\t\t\t$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill);\n\t\t\t\t$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);\n\t\t\t\t$this->Cell($w[4],6,number_format($row[4]),'LR',0,'R',$fill);\n\t\t\t\t$this->Cell($w[5],6,number_format($row[5]),'LR',0,'R',$fill);\n\t\t\t\t$this->Cell($w[6],6,number_format($row[6]),'LR',0,'R',$fill);\n\t\t\t\t$this->Cell($w[7],6,number_format($row[7]),'LR',0,'R',$fill);\n\t\t\t\t$this->Ln();\n\t\t\t\t$fill=!$fill;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($_SESSION['klik']=='Analitika'){\n\t\t\t\tif ($_SESSION['totfin']==1){\n\t\t\t\t\tforeach($data as $row)\n\t\t\t\t\t{ //tuka gi pravime kolonite\n\t\t\t\t\t$this->Cell($w[0],6,$row[4],'LR',0,'C',$fill);\n\t\t\t\t\t$this->Cell($w[1],6,number_format($row[7]),'LR',0,'R',$fill);\n\t\t\t\t\t$this->Cell($w[2],6,number_format($row[8]),'LR',0,'R',$fill);\n\t\t\t\t\t$this->Cell($w[3],6,number_format($row[9]),'LR',0,'R',$fill);\n\t\t\t\t\t$this->Cell($w[4],6,number_format($row[10]),'LR',0,'R',$fill);\n\t\t\t\t\t$this->Ln();\n\t\t\t\t\t$fill=!$fill;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tforeach($data as $row)\n\t\t\t\t\t{ //tuka gi pravime kolonite\n\t\t\t\t\t$this->Cell($w[0],6,$row[3],'LR',0,'C',$fill);\n\t\t\t\t\t$this->Cell($w[1],6,$row[2],'LR',0,'C',$fill);\n\t\t\t\t\t$this->Cell($w[2],6,$row[4],'LR',0,'C',$fill);\n\t\t\t\t\t$this->Cell($w[3],6,number_format($row[7]),'LR',0,'R',$fill);\n\t\t\t\t\t$this->Cell($w[4],6,number_format($row[8]),'LR',0,'R',$fill);\n\t\t\t\t\t$this->Cell($w[5],6,number_format($row[9]),'LR',0,'R',$fill);\n\t\t\t\t\t$this->Cell($w[6],6,number_format($row[10]),'LR',0,'R',$fill);\n\t\t\t\t\t$this->Ln();\n\t\t\t\t\t$fill=!$fill;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t$this->Cell(array_sum($w),0,'','T');\n\t\t}", "function torrenttable($res,$data='',$type='',$addParam='') {\n\n\t// Normalize all to array\n\tif ($res != '') {\n\t\t$data = array();\n\t\twhile ($row=@mysql_fetch_assoc($res)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t}\n\n\tglobal $pic_base_url, $CURUSER, $lang;\n if (!count($data)) {\n \techo __('Ne pare rău, nici un torrent n-a putut fi găsit');\n \treturn;\n }\n?>\n<style>td.colhead a {color: #ffffff;text-decoration: underline;}\n.tableTorrents a {\n font-weight: bold;\n}\n</style>\n <table border=\"1\" cellspacing=0 cellpadding=5 width=\"990\" class=\"tableTorrents\">\n\n <colgroup>\n \t<col width=\"42\"></col>\n\t\t\t<col></col>\n\t\t\t<col></col>\n\t\t\t<col></col>\n\t\t\t<col></col>\n\t\t\t<col></col>\n\t\t\t<col></col>\n <col></col>\n\t\t\t<col></col>\n </colgroup>\n\n <tr>\n <td class=\"colhead\" align=\"center\"><?=__('Tip')?></td>\n <td class=\"colhead\" align=\"left\"><?=__('Nume')?></td>\n <td class=\"colhead\" align=\"right\"><?=__('Fiş.')?></td>\n <td class=\"colhead\" align=\"right\"><?=__('Com.')?></td>\n <?php if ($type == \"search\"): ?>\n <td class=\"colhead\" align=\"center\"><a href=\"search.php?<?php echo $addParam?>sort=date\" class=\"ablank\"><?=__('Adăugat')?></a></td>\n <?php else: ?>\n <td class=\"colhead\" align=\"center\"><?=__('Adăugat')?></td>\n <?php endif; ?>\n <td class=\"colhead\" align=\"center\"><?=__('Mărime')?></td>\n <?php if ($type == \"search\"): ?>\n <td class=\"colhead nowrap\" align=\"right\" style=\"white-space: nowrap;\"><a href=\"search.php?<?php echo $addParam?>sort=peers\">DHT&nbsp;Seed.&nbsp;<img src=\"/pic/arrowdownup2.gif\"></a></td>\n <?php else: ?>\n <td class=\"colhead\" align=\"right\" title=\"DHT Peers\" style=\"white-space: nowrap;\">DHT <img src=\"/pic/arrowdownup2.gif\"/></td>\n <?php endif; ?>\n\n <td class=\"colhead\" align=\"right\">Mulț.</td>\n <td class=\"colhead\" align=\"center\" style=\"white-space: nowrap;\"><?=__('Încărcat de')?></td>\n </tr>\n<?php\n\n if (isset($GLOBALS['browse_show_lastest'])) {\n \tglobal $top_3;\n \t$top_3_i = 0;\n \t$in_top = array(); //To prevent double show\n }\n\n while ( (isset($top_3) && $top_3_i < 5 && isset($top_3[$top_3_i]) && $row = $top_3[$top_3_i]) || list(,$row) = each($data)) {\n $id = $row[\"id\"];\n\n if (isset($in_top) && in_array($id,$in_top)) continue; //prevent double show of tor from top\n\n $is_row_top3 = false;\n\n //Highlight top 3\n if (isset($top_3) && isset($top_3[$top_3_i]) && $top_3_i < 5) {\n \techo '<tr style=\"background-color: #F2DCDC;\">',\"\\n\";\n \t$top_3_i++;\n \t$in_top[] = $id;\n $is_row_top3 = true;\n } else {\n \tif ( isset($CURUSER) && (strtotime($row[\"added\"]) - $CURUSER['last_browse_see']) > 0 && !isset($_GET['unseen']) && $type != \"top\" )\n echo '<tr style=\"background-color: #DBF2E7;\">',\"\\n\";\n \telse print(\"<tr>\\n\");\n }\n\n if (!array_key_exists('moder_status',$row) || !array_key_exists('torrent_opt',$row) || !array_key_exists('teamName',$row)) {\n // @TODO, show an error and log the error, temporary quick hack\n sql_error_handler(\"functions_additional::torrenttable(). moder_status || torrent_opt || teamName are not set.\" . var_export($row,true) ,\"\",\"1\");\n die();\n }\n\n // Don't show nr of leechers and seeders on the copyrighted torrents\n if ($row['moder_status'] == 'copyright') {\n $row[\"dht_peers\"] = 0;\n }\n print('<td class=\"torrentCategImg\">');\n if (isset($row[\"cat_name\"])) {\n print(\"<a href=\\\"browse.php?cat=\" . $row[\"category\"] . \"\\\">\");\n if (isset($row[\"cat_pic\"]) && $row[\"cat_pic\"] != \"\")\n printf('<img src=\"%s\" height=\"%s\" alt=\"%s\"/>', $pic_base_url . \"categs/\" . $row[\"cat_pic\"], getImgCategHeight($row[\"cat_pic\"]), $row[\"cat_name\"] );\n else\n print($row[\"cat_name\"]);\n print(\"</a>\");\n }\n else\n print(\"-\");\n print(\"</td>\\n\");\n\n $dispname = $row[\"name\"];\n $moder_status = getTorrentStatusHtml($row,true) . ' ';\n if (strstr($moder_status,'Neverifica') !== false || strstr($moder_status,'Не проверено') !== false)\n $moder_status = '';\n\n $url = \"/details.php?id=$id\";\n if ($is_row_top3 && $row[\"imdb_tt\"]) {\n $url = \"browse.php?imdb=\" . $row[\"imdb_tt\"];\n }\n\n if ($row['imdb_rating']) {\n $dispname .= sprintf(\" [%.1f/10]\", $row['imdb_rating'] / 10);\n }\n\n if ($row['catetags']) {\n $row['catetags'] = explode(',', $row['catetags']);\n if (in_array(27, $row['catetags'])) {\n $dispname .= \" [RO]\";\n }\n\n if (in_array(180, $row['catetags'])) {\n $dispname .= \" [EN]\";\n }\n\n }\n\n echo '<td align=left>'.$moder_status.'<a href=\"',$url,'\"',\">$dispname</a>\\n\";\n\n //For Wait&Added colone\n $elapsed = floor((time() - strtotime($row[\"added\"])) / 3600);\n\n print(\"</td>\\n\");\n if ($row[\"numfiles\"] == 1) print(\"<td align=\\\"right\\\">\" . $row[\"numfiles\"] . \"</td>\\n\");\n else {\n \techo '<td align=\"right\"><a href=\"details.php?id=',$id,'&amp;filelist=1\">', $row[\"numfiles\"], '</a></td>', \"\\n\";\n }\n\n if (!$row[\"comments\"])\n echo '<td align=\"right\">', $row[\"comments\"], \"</td>\\n\";\n else {\n echo '<td align=\"right\"><a href=\"details.php?id=',$id,'&amp;page=0#startcomments\">', $row[\"comments\"], '</a></td>', \"\\n\";\n }\n\n //For ADDED colone\n if ($elapsed == \"0\")\n $added = floor((time() - strtotime($row[\"added\"])) / 60) . \" \" . $lang['browse_added_mins_ago'];\n elseif ($elapsed < 24) {\n \t$added = $elapsed . \" \" . $lang['hours'];\n } else {\n if ( date(\"y\",strtotime( $row[\"added\"])) != date(\"y\")) {\n \t $added = date(\"m-d Y\",strtotime( $row[\"added\"]));\n } else {\n \t $added = date(\"m-d\", strtotime( $row[\"added\"]));\n }\n }\n\n print(\"<td align=center width=20><nobr>\" . $added . \"</nobr></td>\\n\");\n\n //Size colone\n print(\"<td align=center><nobr>\" . mksize($row[\"size\"]) . \"</nobr></td>\\n\");\n\n $_s = \"\";\n if ($row[\"times_completed\"] != 1) $_s = \"s\";\n\n $dhtPeersUrl = $url . '#dht_peers';\n\n $dht_peers_formatted = sprintf('<a href=\"%s\"><font color=\"%s\">%s</font></a>',\n $dhtPeersUrl, get_dht_peers_color($row[\"dht_peers\"]), $row[\"dht_peers\"]);\n\n print(\"<td align=center>\" . ($row[\"dht_peers\"] == -1 ? '<span title=\"Refresh in progress\">...</span>' : $dht_peers_formatted) . \"</td>\\n\");\n\n printf('<td align=\"right\">%s</td>', $row['thanks']);\n\n // Team name\n $uploaded_by_str = '';\n\n $torrent_opt = $row[\"torrent_opt\"];\n if (!isset($row[\"torrent_opt\"]))\n $torrent_opt = q_singleval('SELECT torrent_opt FROM torrents WHERE id=:id',array('id'=>$id));\n\n\t\tif ( torrent_have_flag('anonim_unverified', $torrent_opt) || torrent_have_flag('anonim', $torrent_opt) )\n\t\t\t$uploaded_by_str = __('Anonim');\n\t\telse\n\t\t\t$uploaded_by_str = (isset($row[\"username\"]) ? (\"<a href=userdetails.php?id=\" . $row[\"owner\"] . \">\" . esc_html($row[\"username\"]) . \"</a>\") : \"<i>unknown</i>\");\n\n\t\tif ($row['teamName'])\n \t$uploaded_by_str = '<a href=\"./team.php?name='.str_replace(' ','_',$row['teamName']).'\">'.$row['teamInitials'].'</a> / ' . $uploaded_by_str;\n\n echo '<td align=center nowrap>',$uploaded_by_str,\"</td>\\n\",\n '</tr>',\"\\n\";\n }\n print(\"</table>\\n\");\n unset($records); //Cleaning\n}", "function tabla_filas_proyecto($filas,$moneda,$cant,$tip,$barc,$artc,$desc,$prev,$mon,$mons,$monc,$tfdsc,$fdsc,$tdsc,$dsc,$IVA){\n\t\t$monchunk = explode(\"/\",$moneda); \n\t\t$Vmond = trim($monchunk[0]); // Nombre de Moneda\n\t\t$Vmons = trim($monchunk[1]); // Simbolo de Moneda\n\t\t$Vmonc = trim($monchunk[2]); // Tipo de Cambio\n\t\t$Vmonc = str_replace(\"(\",\"\",$Vmonc); //le quita el primer parentesis que rodea el tipo de cambio\n\t\t$Vmonc = str_replace(\" x 1)\",\"\",$Vmonc); //le quita el 2do. parentesis y el x 1\n\t\t\t$salida = '<br>';\n\t\t\t$salida.= '<table class = \"tablegrid\">';\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"30px\" height = \"30px\">No.</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">Cant.</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"300px\">Descipción</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">P. Unitario</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">Descuento</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">P. Total</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"30px\"></td>';\n\t\t\t$salida.= '</tr>';\n\t$STotal = 0;\n\t$Total = 0;\n\t$Rtotal = 0;\n\t$DescU = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//No.\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">'.$i.'.</td>';\n\t\t\t//Cantidad\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spancant'.$i.'\">'.$cant[$i].'</span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"cant'.$i.'\" id = \"cant'.$i.'\" value = \"'.$cant[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"tip'.$i.'\" id = \"tip'.$i.'\" value = \"'.$tip[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//Descripcion o Articulo\n\t\t\t$desc[$i] = utf8_decode($desc[$i]);\n\t\t\t$desc[$i] = trim($desc[$i]);\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"left\">'.$desc[$i];\n\t\t\t$salida.= '<input type = \"hidden\" name = \"barc'.$i.'\" id = \"barc'.$i.'\" value = \"'.$barc[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"artc'.$i.'\" id = \"artc'.$i.'\" value = \"'.$artc[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"desc'.$i.'\" id = \"desc'.$i.'\" value = \"'.$desc[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//Precio U.\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">'.trim($mons[$i]).' '.$prev[$i];\n\t\t\t$salida.= '<input type = \"hidden\" name = \"prev'.$i.'\" id = \"prev'.$i.'\" value = \"'.$prev[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"mon'.$i.'\" id = \"mon'.$i.'\" value = \"'.trim($mon[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"mons'.$i.'\" id = \"mons'.$i.'\" value = \"'.trim($mons[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"monc'.$i.'\" id = \"monc'.$i.'\" value = \"'.trim($monc[$i]).'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//Descuento\n\t\t\t$dsign = ($tdsc[$i] == \"P\")?\"%\":trim($mons[$i]);\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spandsc'.$i.'\">'.$dsign.' '.$dsc[$i].'</span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"tdsc'.$i.'\" id = \"tdsc'.$i.'\" value = \"'.$tdsc[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"dsc'.$i.'\" id = \"dsc'.$i.'\" value = \"'.$dsc[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//sub Total\n\t\t\t$rtot = ($prev[$i] * $cant[$i]);\n\t\t\tif($tdsc[$i] == \"P\"){\n\t\t\t\t$descuento = ($rtot *($dsc[$i])/100);\n\t\t\t}else if($tdsc[$i] == \"M\"){\n\t\t\t $descuento = $dsc[$i];\n\t\t\t}\n\t\t\t$Dcambiar = Cambio_Moneda($monc[$i],$Vmonc,$descuento);\n\t\t\t$DescU += $Dcambiar;\n\t\t\t$stot = $rtot - $descuento;\n\t\t\t$Dcambiar = Cambio_Moneda($monc[$i],$Vmonc,$stot);\n\t\t\t$STotal+= $Dcambiar;\n\t\t\t$Rcambiar = Cambio_Moneda($monc[$i],$Vmonc,$rtot);\n\t\t\t$Rtotal+= $Rcambiar;\n\t\t\t$stot = round($stot, 2);\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanstot'.$i.'\">'.trim($mons[$i]).' '.$stot.'</span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"stot'.$i.'\" id = \"stot'.$i.'\" value = \"'.$stot.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"rtot'.$i.'\" id = \"rtot'.$i.'\" value = \"'.$rtot.'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//---\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">';\n\t\t\t$salida.= '<a href = \"javascript:void(0);\" onclick = \"QuitarFilaVenta('.$i.')\" title = \"Quitar Fila\" style = \"border:none;\" ><img src = \"../../CONFIG/images/icons/delete.png\" style = \"vertical-align:middle;border:none;\"></a>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '</tr>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\tif($tfdsc == \"P\"){\n\t\t\t\t$descuento = ($STotal *($fdsc)/100);\n\t\t\t}else if($tfdsc == \"M\"){\n\t\t\t $descuento = $fdsc;\n\t\t\t}\n\t\t\t$Total = $STotal - $descuento;\n\t\t\t$STotal = round($STotal, 2); //total sin iva\n\t\t\t$Total = round($Total, 2); //total sin iva\n\t\t\t$DescU = round($DescU, 2); //promedio de descuento\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"3\" rowspan = \"4\">';\n\t\t\t$salida.= '<span id = \"spannota\">';\n\t\t\t$salida.= '<b>NOTA:</b> MONEDA PARA COTIZACI&Oacute;N: <b>'.$Vmond.'</b>. TIPO DE CAMBIO '.$Vmonc.' x 1';\n\t\t\t$salida.= '</span></td>';\n\t\t\t$salida.= '<td class = \"thgrid\">Desc/Unitarios</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanpromdesc\"><b>'.$Vmons.' '.$DescU.'</b></span>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"promdesc\" id = \"promdesc\" value = \"'.$DescU.'\" /></td>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"thgrid\">Subtotal</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanstotal\"><b>'.$Vmons.' '.$STotal.'</b></span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"stotal\" id = \"stotal\" value = \"'.$STotal.'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"2\"></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"thgrid\">Desc/General</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spandscgeneral\"><b>'.$Vmons.' '.$descuento.'</b></span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"ttotal\" id = \"tdescuento\" value = \"'.$descuento.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"ttotal\" id = \"ttdescuento\" value = \"'.$tfdsc.'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"2\"></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"thgrid\">TOTAL</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanttotal\"><b>'.$Vmons.' '.$Total.'</b></span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"ttotal\" id = \"ttotal\" value = \"'.$Total.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Rtotal\" id = \"Rtotal\" value = \"'.$Rtotal.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"filas\" id = \"filas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"2\"></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\t\t$salida.= '</form>';\n\t\t\t$salida.= '<br>';\n\t\n\treturn $salida;\n}", "function ligne_texte_valeur($texte, $valeur, $css, $lignes='', $table='') {\r\n\tglobal $couleur_claire;\r\n\tif(is_array($table)) {\r\n\t\tif(!in_array($texte,$table)) { $aff=\"style='background-color:$couleur_claire;'\"; }\r\n\t}\r\n\t$retour = \"<tr class='$css' $aff ><td>$texte</td>\";\r\n\tif($lignes) {\r\n\t\t$retour.=\"<td class='center'><i>$lignes</i></td>\";\r\n\t}\r\n\t$retour .= \"<td class='right'>$valeur</td></tr>\";\r\n\t\r\n\treturn $retour;\r\n}", "function ImprovedTable($header, $data)\n\t{\n\t\t//$this ->Ln(20);\n\t\t\n\t\t$contador = 0;\n\t\t$w = array(40, 40, 30, 30);\n\t\t// Cabeceras\n\t\tfor($i=0;$i<count($header);$i++)\n\t\t\t$this->Cell($w[$i],7,$header[$i],1,0,'C');\n\t\t\n\t\t$this->Ln();\n\t\t// Datos\n\t\t$this->SetFont('Arial','',12);\n\t\tforeach($data as $row)\n\t\t{\n\t\t\t$this->Cell($w[0],6,$row[0],'LR');\n\t\t\t$this->Cell($w[1],6,$row[1],'LR');\n\t\t\t$this->Cell($w[2],6,$row[2],'LR',0,'L');\n\t\t\t$this->Cell($w[3],6,$row[3],'LR',0,'R');\n\t\t\t$this->Ln();\n\t\t\t$contador++;\n\t\t\tif($contador == 46){\n\t\t\t\t$this-> AddPage();\n\t\t\t\t$contador = 0;\n\t\t\t}\n\t\t}\n\t\t// Línea de cierre\n\t\t$this->Cell(array_sum($w),0,'','T');\n\t}", "function CelluUni($valeur,$colonne,$large,$style)\n{\n $balise = '<td';\n if ($colonne != '') $balise.= ' colspan=\"'.$colonne.'\"';\n if ($large != '') $balise.= ' width=\"'.$large.'\"';\n if ($style != '') $balise.= ' class=\"'.$style.'\"';\n html($balise.'>'.$valeur.'</td>'); \n}", "function immobili_visionati($id_cli=\"\"){\n\t\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$str=\"\";\n\n\n\t$q=\"select * from immobile i JOIN immobile_visite v ON v.id_imm=i.id_imm where v.id_cli = $id_cli ORDER BY v.data asc\";\n\n\t$r=$db->query($q);\n\tif (!$r) {\n \t\n\t\t$str.=\"<tr><td colspan=\\\"4\\\">Nessun immobile proposto <a href=\\\"index.php\\\" >PROPONI</A></td></tr>\";\n\t}\t\n\n\tif ($r) {\n\t\t$str.=\"<div class=\\\"clienti\\\">\";\n\t\t$str.=\"\t<TABLE id=\\\"immobili_index\\\">\";\n\t $str.=\"<THEAD class=\\\"thead\\\">\";\n\t\t$str.=\"<TR class=\\\"clienti_header\\\">\";\n\t\t$str.=\"<TD>\";\n\t\t$str.=\"Rif.Imm\";\n\t\t$str.=\" </TD>\";\n\t\t$str.=\"<TD>\";\n\t\t$str.=\"Citt&agrave;\";\n\t\t$str.=\"</TD>\";\n\t\t$str.=\"<TD>\";\n\t\t$str.=\"Mq/Prezzo\";\n\t\t$str.=\"</TD>\";\n $str.=\"<TD>\";\n\t\t$str.=\"Data\";\n\t\t$str.=\"</TD>\";\n\t\t $str.=\"<TD>\";\n\t\t$str.=\"Opzioni\";\n\t\t$str.=\"</TD>\";\n\t\t\n\t\t\n\t\t$str.=\"<td>\";\n\t\t\t$str.=\"Proprietario\";\n\t\t\t$str.=\"</td>\";\n\t\t$str.=\"</TR>\";\n\t\n\t\t\n\t\t$str.=\"</THEAD>\";\n\t $str.=\"<TBODY>\";\n \t\twhile ($ro=mysql_fetch_array($r)) {\n \t\t\t$str.= \"<TR>\\n\";\n\t\t\t$str.= \"<TD class=\\\"clienti_rif\\\">\\n\";\n\t\t\t$str.= $ro['id_imm'].\"\\n</TD>\\n\";\n\t\t $str.= \"<TD class=\\\"clienti\\\">\\n\";\n\t\t\t$str.= citta_stampa($ro['id_comune']).\"\\n</TD>\\n\";\n\t\t\t$str.= \"<TD class=\\\"clienti\\\">\\n\";\n\t\t\t$str.= mq_stampa($ro['id_imm']);\n\t\t\t$str.=\" -- \";\n\t\t\t$str.= prezzo_stampa($ro['id_imm']);\n\t\t\t$str.=\"\\n</TD\\n>\";\n\t\t\t$str.='<td>';\n $str .=$ro['data'];\n $str.='</td>';\n\t\t\t$str.= \"<TD class=\\\"clienti\\\">\\n\";\n\t\t\t\n\t\t\t$str.= opzioni_immobile($ro['id_tipo_locazione'],$ro['id_imm']).\"\\n</TD>\\n\";\n\t\t\t\n\t\t \n\t\t $str.= \"<TD class=\\\"clienti\\\">\\n\";\n\t\t $str.= nominativo_stampa(id_imm_to_id_cli($ro['id_imm']));\n\t\t $str.= \"</TD>\\n\";\n\t\t $str.= \"</TR>\\n\\n\\n\";\n\t\t}\n\t\t$str.=\"</TBODY>\";\n\t\t$str.=\"</TABLE>\";\n\t\t$str.=\"<script type=\\\"text/javascript\\\">\";\n\t\t$str.=\"addTableRolloverEffect('immobili_index','tableRollOverEffect1','tableRowClickEffect1');\";\n\t\t$str.=\"</script>\";\n\t\t$str.=\"<script type=\\\"text/javascript\\\">\";\n\t\t$str.=\"initSortTable('immobili_index',Array('S','S','S','N',\";\n\t\t\n\t\t$str.=\"));\";\n\t\t$str.=\"</script>\";\n\n\t}\t\n\t\n\treturn $str;\n\t\n}", "public function comparativo_partidas($dep_id,$aper_id,$tp_tab){ \n $tabla ='';\n $partidas_asig=$this->model_ptto_sigep->partidas_accion_region($dep_id,$aper_id,1); // Presupuesto Asignado\n $partidas_prog=$this->model_ptto_sigep->partidas_accion_region($dep_id,$aper_id,2); // Presupuesto Programado\n $nro=0;\n $monto_asig=0;\n $monto_prog=0;\n $monto_asig_final=0;\n if($tp_tab==1){\n $tab='id=\"table\" class=\"table table-bordered\"';\n }\n else{\n $tab='cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" border=0.2 style=\"width:100%;\" align=center';\n }\n\n $tabla .='<table '.$tab.'>\n <thead>\n <tr style=\"font-size: 7px;\" align=center>\n <th bgcolor=\"#1c7368\" style=\"width:2%;color:#FFF;height:15px;\">NRO.</th>\n <th bgcolor=\"#1c7368\" style=\"width:3%;color:#FFF;\" title=\"CODIGO PARTIDA\">C&Oacute;DIGO</th>\n <th bgcolor=\"#1c7368\" style=\"width:30%;color:#FFF;\" title=\"DESCRIPCI&Oacute;N PARTIDA\">DETALLE PARTIDA</th>\n <th bgcolor=\"#1c7368\" style=\"width:12%;color:#FFF;\" title=\"MONTO PRESUPUESTO ASIGNADO INICIAL\">PPTO. ASIGNADO INICIAL (AI)</th>\n <th bgcolor=\"#1c7368\" style=\"width:12%;color:#FFF;\" title=\"MONTO PRESUPUESTO ASIGNADO APROBADO\">PPTO. PROGRAMADO POA (PP)</th>\n <th bgcolor=\"#1c7368\" style=\"width:12%;color:#FFF;\" title=\"MONTO DIFERENCIA (INICIAL - PROGRAMADO)\">MONTO DIFERENCIA (PP-AI)</th>\n <th bgcolor=\"#1c7368\" style=\"width:12%;color:#FFF;\" title=\"MONTO PRESUPUESTO INICIAL APROBADO\">PPTO. ASIGNADO APROBADO (AF)</th>\n <th bgcolor=\"#1c7368\" style=\"width:12%;color:#FFF;\" title=\"MONTO DIFERENCIA (INICIAL - FINAL)\">MONTO DIFERENCIA (AF-AI)</th>\n </tr>\n\n </thead>\n <tbody>';\n if(count($partidas_asig)>count($partidas_prog)){\n foreach($partidas_asig as $row){\n $part=$this->model_ptto_sigep->get_partida_accion_regional($dep_id,$aper_id,$row['par_id']); //// Presupuesto Programado\n $m_aprob=$this->model_ptto_sigep->get_ptto_aprobado($aper_id,$row['par_id']);\n\n /*------ Asignado-programado -----*/\n $prog=0;\n if(count($part)!=0){\n $prog=$part[0]['monto'];\n }\n $dif=($row['monto']-$prog);\n $color='#f1f1f1';\n if($dif<0){\n $color='#f9cdcd';\n }\n /*-------------------------------*/\n\n $monto_final=0; $color2='#cbf9f3';\n if(count($m_aprob)!=0){\n $monto_final=$m_aprob[0]['monto'];\n if($row['monto']!=$m_aprob[0]['monto']){\n $color2='#f9cdcd';\n }\n }\n\n $nro++;\n $tabla .='<tr title=\"aper : '.$aper_id.'-- par : '.$row['par_id'].'\">\n <td align=center bgcolor='.$color.' style=\"width:2%;height:12px;\">'.$nro.'</td>\n <td align=center bgcolor='.$color.' style=\"width:3%;\"><b>'.$row['codigo'].'</b></td>\n <td align=left bgcolor='.$color.' style=\"width:30%;\">'.$row['nombre'].'</td>\n <td align=right bgcolor='.$color.' style=\"width:12%;\">'.number_format($row['monto'], 2, ',', '.').'</td>\n <td align=right bgcolor='.$color.' style=\"width:12%;\">'.number_format($prog, 2, ',', '.').'</td>\n <td align=right bgcolor='.$color.' style=\"width:12%;\">'.number_format($dif, 2, ',', '.').'</td>\n <td align=right bgcolor='.$color2.' style=\"width:12%;\">'.number_format(($monto_final), 2, ',', '.').'</td>\n <td align=right bgcolor='.$color2.' style=\"width:12%;\">'.number_format(($monto_final-$row['monto']), 2, ',', '.').'</td>\n \n </tr>';\n $monto_asig=$monto_asig+$row['monto'];\n $monto_prog=$monto_prog+$prog;\n\n $monto_asig_final=$monto_asig_final+$monto_final;\n }\n\n }\n else{\n foreach($partidas_prog as $row){\n $part=$this->model_ptto_sigep->get_partida_asig_accion($dep_id,$aper_id,$row['par_id']);\n $m_aprob=$this->model_ptto_sigep->get_ptto_aprobado($aper_id,$row['par_id']);\n\n /*------ Asignado-programado -----*/\n $asig=0;\n if(count($part)!=0){\n $asig=$part[0]['monto'];\n }\n $dif=($asig-$row['monto']);\n $color='#f1f1f1';\n if($dif<0){\n $color='#f9cdcd';\n }\n /*-------------------------------*/\n\n $monto_final=0; $color2='#cbf9f3';\n if(count($m_aprob)!=0){\n $monto_final=$m_aprob[0]['monto'];\n if($asig!=$m_aprob[0]['monto']){\n $color2='#f9cdcd';\n }\n }\n\n $nro++;\n $tabla .='<tr title=\"aper : '.$aper_id.'-- par : '.$row['par_id'].'\"> \n <td align=center bgcolor='.$color.' style=\"width:1%;height:12px;\">'.$nro.'</td>\n <td align=center bgcolor='.$color.' style=\"width:5%;\"><b>'.$row['codigo'].'</b></td>\n <td align=left bgcolor='.$color.' style=\"width:30%;\">'.$row['nombre'].'</td>\n <td align=right bgcolor='.$color.' style=\"width:12%;\">'.number_format($asig, 2, ',', '.').'</td>\n <td align=right bgcolor='.$color.' style=\"width:12%;\">'.number_format($row['monto'], 2, ',', '.').'</td>\n <td align=right bgcolor='.$color.' style=\"width:12%;\">'.number_format($dif, 2, ',', '.').'</td>\n <td align=right bgcolor='.$color2.' style=\"width:12%;\">'.number_format(($monto_final), 2, ',', '.').'</td>\n <td align=right bgcolor='.$color2.' style=\"width:12%;\">'.number_format(($monto_final-$asig), 2, ',', '.').'</td>\n \n </tr>';\n $monto_asig=$monto_asig+$row['monto'];\n $monto_prog=$monto_prog+$asig;\n\n $monto_asig_final=$monto_asig_final+$monto_final;\n }\n\n }\n\n $tabla .='</tbody>\n <tr>\n <td colspan=3 style=\"height:12px;\"><strong>TOTAL</strong></td>\n <td align=right>'.number_format($monto_asig, 2, ',', '.').'</td>\n <td align=right>'.number_format($monto_prog, 2, ',', '.').'</td>\n <td align=right>'.number_format(($monto_asig-$monto_prog), 2, ',', '.').'</td>\n <td align=right>'.number_format($monto_asig_final, 2, ',', '.').'</td>\n <td align=right></td>\n </tr>\n </table>';\n\n return $tabla;\n }", "function show_worse($a,$b,$c)\n{\n$sql = \"SELECT datum, views FROM stats_site WHERE pageid='\".$a.\"' AND modus='\".$b.\"' ORDER BY 'views' ASC LIMIT 0,$c\";\n$result = mysql_db_query(\"portal\",$sql);\necho \"<table>\";\nwhile ($zeile=mysql_fetch_array($result))\n{\nextract($zeile);\necho '<tr><td>';\nwochentag($datum);\necho '</td><td width=\"100\">'.substr($datum,8,2).'.'.substr($datum,5,2).'.'.substr($datum,0,4).'</td><td><b>'. $views .'</b></td></tr>';\n}\necho \"</table>\";\n}", "function Dibujar_Tabla_Comp_Cur($VectorIdioma,$row,$Mensajes,$esAdmin = 1, $esAnulado=0)\n{\n //lo que cambia es que los administradores podrán ver tanto archivos pdf como arb. Los Usuarios no, solo los pdf.\n\n echo '<table width=\"90%\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"'.Devolver_Color($row[4]).'\" ';\n if ($esAnulado)\t{\n\t echo ' border=\"1\" ';\n\t echo \" bordercolor='#33CCFF' \";\n\t}\n\telse\n\t\t{echo ' border=\"0\"> ';}\n echo ' <tr bgcolor=\"#ECECEC\"><td colspan=\"2\" align=\"center\" valign=\"middle\">\n\t<table width=\"97%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\" >\n\t<tr valign=\"bottom\"> <!-- tipo y Id -->\n\t <td colspan=\"1\" align=left>\n\t <span class=\"style49\">\n\t\t <strong class=\"style29 style40\">'.$Mensajes[\"ec-5\"].\":\".'</strong> ';\n echo Devolver_Tipo_Solicitud($VectorIdioma,$row[0],0);\n echo ' </span></td> \n <td align=right colspan=\"3\"><span class=\"style52\">'.$Mensajes[\"et-2\"].'</span>';\n\n if ($esAdmin==1)\n {\n echo '<span class=\"style49\"> <a href=\"manpedadmc.php?Codigo='.$row[1].'\">'.$row[1].'</a></span>&nbsp;';\n }\n else\n {\n\t echo '<span class=\"style49\"> '.$row[1].'</span>&nbsp;';\n\t } \n if ($esAdmin==1)\n {\n \n $valor=devolverFormaDePago($row[50]);\n\n echo '</td>\n </tr>';\n // aca iria con una funcion que le devulva el valor de de la forma de pago\n switch ($valor)\n {\n case 0:\n {\n echo '<tr valign=\"top\"> <!-- ahora el usuario -->\n <td colspan=\"3\" align=left><span class=\"style49\">\n <span class=\"style29\"><strong>'.$Mensajes[\"et-3\"].' </strong>\n </span>\n '.$row[2].\", \".$row[3].'<br><br></td></tr>';\n break;\n }\t \n case 4: \n {\n echo '<tr valign=\"top\"> <!-- ahora el usuario -->\n <td colspan=\"3\" align=left><span class=\"style49\">\n <span class=\"style29\"><strong>'.$Mensajes[\"et-3\"].' </strong>\n </span>\n '.$row[2].\", \".$row[3].'<img src=\"../images/admin.gif\">'.$row[53].'<br><br></td>\n </tr>';\n break;\n}\n case 1:\n {\n echo '<tr valign=\"top\"> <!-- ahora el usuario -->\n <td colspan=\"4\" align=left><span class=\"style49\">\n <span class=\"style29\"><strong>'.$Mensajes[\"et-3\"].' </strong>\n </span>\n '.$row[2].\", \".$row[3].'&nbsp;&nbsp;<img src=\"../images/admin02.gif\">'.$row[53].'<br><br></td>\n </tr>';\nbreak;\n}\n case 2:\n {\n echo '<tr valign=\"top\"> <!-- ahora el usuario -->\n <td colspan=\"3\" align=left><span class=\"style49\">\n <span class=\"style29\"><strong>'.$Mensajes[\"et-3\"].' </strong>\n </span>\n '.$row[2].\", \".$row[3].'<img src=\"../images/admin03.gif\">'.$row[53].'<br><br></td>\n </tr>';\n break;\n }\n }// de switch\n}\nelse\n{\n echo '<tr valign=\"top\"> <!-- ahora el usuario -->\n <td colspan=\"3\" align=left><span class=\"style49\">\n <span class=\"style29\"><strong>'.$Mensajes[\"et-3\"].'</strong>\n </span>\n '.$row[2].\", \".$row[3].'&nbsp;&nbsp;&nbsp;'.$row[53].'<br><br></td>\n </tr>';\n\n}\n echo'<tr valign=\"bottom\"> <!-- datos-->\n <td colspan=\"4\" width=\"612\" align=left ><span class=\"style49\">\n <span class=\"style29\"><strong>'.$Mensajes[\"et-4\"].'</strong>\t</span>';\n echo Devolver_Descriptivo_Material($row[4],$row,0,0).'</span> \n </td>'; //Titulo revista, vol, anio,...\n echo '</tr>\n<tr valign=\"bottom\"> <!-- Fecha de solicitud-->\n <td align=left colspan=\"3\" width=\"612\"><span class=\"style49\"><span class=\"style52\">'.$Mensajes[\"et-5\"].'</span> '.$row[35].'</span></td>\n \n</tr> <tr valign=top>';\n\necho '<td align=left width=\"240\"><span class=\"style52\">'.$Mensajes[\"et-7\"].'</span> <span class=\"style49\">'.Devolver_Estado($VectorIdioma,$row[36],0).'</span></td>';\n\nif ($row[44]==1)\n { echo \"<td align=left width=39> <img border=0 alt='Observaciones' src='../images/obs.gif'> </td>\"; }\n else\n echo \"<td align=left width=39> &nbsp; </td>\"; \n\necho ' <td colspan=\"2\" width=\"446\"align=right> <span class=\"style49\"> <span class=\"style52\">'.$Mensajes[\"et-6\"].'</span> ';\n if (strlen($row[37])>0)\n { echo $row[37].\", \".$row[38].\"</span></td>\"; } //operador\n\n\n\n\n//$Mensajes[et-2] dice Id Pedido.\n//Por lo tanto, $row[1] contiene el id del pedido.\n//Con éste id puedo buscar los archivos que necesito\n//Buscar archivo(s) para el pedido\n\n$unArchivo = array();\n$list = array();\nglobal $Id_usuario;\nglobal $Rol;\n\n$list=devolverArchivosDePedido($row[1],$esAdmin);\n\nif ($list) {\n echo \"<td colspan='3' align=center><span align='center' class='style49 style50'>\";\n for ($i=0;$i<count($list);$i++) {\n $unArchivo = $list[$i];\n\n if ($esAdmin==1) //los administradores siempre pueden bajarse archivos\n //farchivos/download.php?Id_Usuario=\".$Id_Usuario.\"&Id_Archivo=\".$row[0].\n\n\t if ($Rol==2) //es bibliotecario. No puede bajarse los archivos, solo puede verlos\n \n\t\t echo \" <img alt='No tiene permisos para bajarse el archivo' border=0 src='../images/pdf.gif' width='20'> \";\n else\n echo \" <a href='farchivos/download.php?adm=1&Id_Pedido=\".$row[1].\"&Id_Usuario=\".$Id_usuario.\"&Id_Archivo=\".$unArchivo['Codigo'].\"'>\n <img alt='Archivo disponible para bajar' border=0 src='../images/pdf.gif' width='20'> </a> \";\n else //si es usuario comun, hay que ver bajo que condiciones puede bajarse el archivo\n {\n\t \n\t if ($esAdmin==2)\n\t {\n\t\t $autorizado = puedeBajarseElArchivo($unArchivo,$row[1]);\n switch ($autorizado)\n\t\t\t{\n\t\t\t\tcase 1: //puede bajarse sin problemas\n\t\t\t\t echo \" <a href='farchivos/download.php?Id_Pedido=\".$row[1].\"&Id_Usuario=\".$Id_usuario.\"&Id_Archivo=\".$unArchivo['Codigo'].\"'>\n <img src='../images/pdf.gif' alt='Archivo disponible para bajar' border=0 width='20' height='20'> </a> \";\n\t\t\t\t break;\n\t\t\t\tcase 0: //el archivo no está disponible\n\t\t\t\t echo \" <img alt='Archivo ya bajado' border=0 src='../images/pdf-cacelled.gif' width='20'> \";\n\t\t\t\t break;\n\t\t\t\tcase -1: //el archivo está disponible, pero el usuario posee problemas (ej. cta. cte. en rojo)\n\t\t\t\t echo \" <img alt='Archivo no disponible para bajar' border=0 src='../images/pdf.gif' width='20'> \";\n\t\t\t\t break;\n\t\t\t} //switch\n }//del id\n else\n {\t\t\t echo \" <img alt='Archivo no disponible para bajar' border=0 src='../images/pdf.gif' width='20'> \";}\n } //else\n } //for\n echo \"</span> </td> </tr> </table>\";\n } //if\n else\n { echo \"</tr> </table>\"; //no hago nada, no había archivos para ese pedido\n }\n//Fin buscar archivo(s) para el pedido\n\n}", "function tailleTab($valeur){\r\n $taille = 0;\r\n foreach($valeur as $element){\r\n $taille++;\r\n }\r\n return $taille;\r\n }", "function exibeLab($lab, $qtdLinha, $qtdColuna){\n echo '<table border=\"0\" cellspacing=\"1\" cellpadding=\"20\" align=\"center\" style=\"margin-top:20px;\" >';\n for ($l=0; $l<$qtdLinha; $l++){\n echo '<tr>';\n for ($c=0; $c<$qtdColuna; $c++){\n if ($lab[$l][$c] == 0){\n echo '<td style=\"background-color:white\"></td>';\n }elseif ($lab[$l][$c] == 1){\n echo '<td style=\"background-color:black\"></td>';\n }elseif ($lab[$l][$c] == 3){\n echo '<td style=\"background-color:red\"></td>';\n }elseif ($lab[$l][$c] == 4){\n echo '<td style=\"background-color:black\"></td>';\n }elseif ($lab[$l][$c] == 5){\n echo '<td style=\"background-color:#5F9EA0;\"></td>';\n }\n }\n echo '</tr>';\n }\n echo \"</table>\";\n }", "function\ttableHead() {\n\t\t//\n\t\t//\t\tfpdf_set_active_font( $this->myfpdf, $this->fontId, mmToPt(3), false, false );\n\t\t//\t\tfpdf_set_fill_color( $this->myfpdf, ul_color_from_rgb( 0.1, 0.1, 0.1 ) );\n\t\t$frm\t=\t$this->myDoc->currMasterPage->getFrameByFlowName( \"Auto\") ;\n\t\t$frm->currVerPos\t+=\t3.5 ;\t\t// now add some additional room for readability\n\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTHeaderPS) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\tif ( $actRow->isEnabled()) {\n\t\t\t\t$this->punchTableRow( $actRow) ;\n\t\t\t}\n\t\t}\n//\t\t$this->frmContent->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\t\tif ( $this->inTable) {\n\t\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTHeaderCF) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t\tif ( $actRow->isEnabled()) {\n\t\t\t\t\t$this->punchTableRow( $actRow) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\t\t}\n\t}", "function TablaComprasGeneral()\n {\t\n\t //Logo\n $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n $this->Cell(130);\n //Título\n $this->Cell(180,25,'LISTADO GENERAL DE COMPRAS',0,0,'C');\n //Salto de línea\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'CÓDIGO COMPRA',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'PROVEEDOR',1,0,'C', True);\n\t$this->CellFitSpace(17,8,'STATUS',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA COMPRA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTICULOS',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'TOTAL DESC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarCompras();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasic'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanoc'];\n\t$Totaliva+=$reg[$i]['totalivac']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentoc']; \n\t$Pagototal+=$reg[$i]['totalc']; \n\t\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(30,5,$reg[$i][\"codcompra\"],1,0,'C');\n\t$this->CellFitSpace(60,5,utf8_decode($reg[$i][\"nomproveedor\"]),1,0,'C');\n\t\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statuscompra']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statuscompra']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode(\"VENCIDA\"),1,0,'C');\n\t}\n\t\t\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechacompra']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivasic'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivanoc'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['ivac'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(25,5,utf8_decode(number_format($reg[$i]['totalivac'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['descuentoc'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(25,5,utf8_decode(number_format($reg[$i]['totaldescuentoc'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['totalc'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\n $this->Cell(60,5,'',0,0,'C');\t\n $this->Cell(15,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(35,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(25,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(25,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n\t\n }", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "public function print_table_description()\n {\n }", "public function comparativo_partidas_ppto_final($dep_id,$aper_id,$tp_tab){ \n // echo \"DEP : \".$dep_id.\" aper_id : \".$aper_id.\"<br>\";\n $tabla ='';\n $partidas_prog=$this->model_ptto_sigep->partidas_accion_region($dep_id,$aper_id,2); // Presupuesto Partidas Programado\n $partidas_aprobados=$this->model_ptto_sigep->list_ppto_final_aprobado($aper_id); // Presupuesto Partidas Aprobado\n if($tp_tab==1){\n $tab='id=\"table\" class=\"table table-bordered\"';\n }\n else{\n $tab='cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\" border=0.2 style=\"width:100%;\" align=center';\n }\n\n $tabla .='\n <table '.$tab.'>\n <thead>\n <tr style=\"font-size: 7px;\" align=center>\n <th bgcolor=\"#1c7368\" style=\"width:2%;color:#FFF;height:15px;\">NRO.</th>\n <th bgcolor=\"#1c7368\" style=\"width:5%;color:#FFF;\" title=\"CODIGO PARTIDA\">C&Oacute;DIGO</th>\n <th bgcolor=\"#1c7368\" style=\"width:40%;color:#FFF;\" title=\"DESCRIPCI&Oacute;N PARTIDA\">DETALLE PARTIDA</th>\n <th bgcolor=\"#1c7368\" style=\"width:12%;color:#FFF;\" title=\"MONTO PRESUPUESTO ASIGNADO APROBADO\">PPTO. PROGRAMADO POA (SIIPLAS)</th>\n <th bgcolor=\"#1c7368\" style=\"width:12%;color:#FFF;\" title=\"MONTO PRESUPUESTO INICIAL APROBADO\">PPTO. FINAL APROBADO (SIGEP)</th>\n <th bgcolor=\"#1c7368\" style=\"width:12%;color:#FFF;\" title=\"MONTO DIFERENCIA (INICIAL - FINAL)\">MONTO DIFERENCIA (SIGEP-SIIPLAS)</th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n $monto_poa=0;\n $monto_final=0;\n $monto_diferencia=0;\n foreach($partidas_prog as $row){\n $ppto=$this->model_ptto_sigep->get_ptto_aprobado($aper_id,$row['par_id']);\n $monto_final_partida=0;\n $dif_monto=0;\n if(count($ppto)!=0){\n $monto_final_partida=$ppto[0]['monto'];\n }\n $dif_monto=$monto_final_partida-$row['monto'];\n $color='';$sig='';\n if($dif_monto<0){\n $color='#f7b1b0';\n }\n elseif ($dif_monto>0) {\n $sig='+';\n $color='#dff0d8';\n }\n\n $nro++;\n $tabla.='\n <tr bgcolor='.$color.'>\n <td style=\"width:2%;height:12px;\" align=center>'.$nro.'</td>\n <td style=\"width:5%;\" align=center><b>'.$row['codigo'].'</b></td>\n <td style=\"width:40%;\">'.$row['nombre'].'</td>\n <td style=\"width:12%;\" align=right>'.number_format($row['monto'], 2, ',', '.').'</td>\n <td style=\"width:12%;\" align=right>'.number_format($monto_final_partida, 2, ',', '.').'</td>\n <td style=\"width:12%;\" align=right>'.$sig.''.number_format($dif_monto, 2, ',', '.').'</td>\n </tr>';\n $monto_poa=$monto_poa+$row['monto'];\n $monto_final=$monto_final+$monto_final_partida;\n }\n \n foreach($partidas_aprobados as $row){\n $ppto=$this->model_ptto_sigep->get_partida_accion($aper_id,$row['par_id']);\n if(count($ppto)==0){\n $dif_monto=$row['importe']-0;\n $nro++;\n $tabla.='\n <tr bgcolor=\"#f7b1b0\">\n <td style=\"width:2%;height:12px;\" align=center>'.$nro.'</td>\n <td style=\"width:5%;\" align=center><b>'.$row['partida'].'</b></td>\n <td style=\"width:40%;\">'.$row['par_nombre'].'</td>\n <td style=\"width:12%;\" align=right>'.number_format(0, 2, ',', '.').'</td>\n <td style=\"width:12%;\" align=right>'.number_format($row['importe'], 2, ',', '.').'</td>\n <td style=\"width:12%;\" align=right>'.number_format($dif_monto, 2, ',', '.').'</td>\n </tr>';\n $monto_final=$monto_final+$row['importe'];\n }\n }\n $tabla.='\n <tr>\n <td colspan=3>TOTAL</td>\n <td style=\"height:12px;\" align=right>'.number_format($monto_poa, 2, ',', '.').'</td>\n <td align=right>'.number_format($monto_final, 2, ',', '.').'</td>\n <td align=right>'.number_format(($monto_final-$monto_poa), 2, ',', '.').'</td>\n </tr>\n </tbody>\n </table>';\n\n return $tabla;\n }", "public function renderTable()\n {\n $get = new GetBag();\n\n $type = $get->fetchEscape('type', $this->db);\n\n /**\n * Column order.\n */\n $order = $get->fetch('order');\n $order = $order[0]['column'];\n switch ($order) {\n case 0:\n $order = 'id';\n break;\n case 1:\n $order = 'date';\n break;\n default:\n $order = 'id';\n }\n\n $direction = $get->fetch('order');\n $direction = $direction[0]['dir'];\n\n /**\n * Total.\n */\n $total = 0;\n $queryTotal = \"SELECT COUNT(*) as `count` FROM `film_review` WHERE `status` = '{$type}'\";\n $result = $this->db->query($queryTotal);\n if ($row = $result->fetch_assoc()) {\n $total = $row['count'];\n }\n\n /**\n * Page offset.\n */\n $length = $get->fetchInt('length');\n $offset = $get->fetchInt('start');\n\n $order = $this->db->real_escape_string($order);\n $direction = $this->db->real_escape_string($direction);\n\n $query = \"SELECT t1.`id`, t1.`status`, t1.`filmId`, t1.`userId`, t1.`name`, t1.`text`, t1.`date`, t2.`login` \n FROM `film_review` as `t1` LEFT JOIN `user` as `t2` ON t1.`userId` = t2.`id` WHERE t1.`status` = '{$type}'\";\n $query .= \" ORDER BY t1.`{$order}` {$direction} LIMIT {$offset}, {$length}\";\n\n $data = [];\n $result = $this->db->query($query);\n while ($row = $result->fetch_assoc()) {\n $login = $row['login'];\n if (empty($login)) {\n $login = $row['name'];\n }\n \n $item[0] = $row['id'];\n $item[1] = $this->formatDate($row['date'], true);\n $item[2] = $row['userId'];\n $item[3] = $row['text'];\n $item[4] = $row['filmId'];\n $item[5] = $login;\n\n $data[] = $item;\n }\n\n $data = [\n 'draw' => $get->fetchInt('draw'),\n 'recordsTotal' => $total,\n 'recordsFiltered' => $total,\n 'data' => $data\n ];\n\n return json_encode($data);\n }", "function generateVerticalTableFromQuery($tableid, $title, $description, $sql){\n\t\t global $database;\n\n $rec = $database->query($sql);\n \n if (!$rec || !$rec->num_rows){\n\t\t\t return $database->error;\n\t\t }\n\t\t \n\t\t $field_names = array();\n\t\t $fields = \"\";\n\t\t $body = \"\";\n\t\t\t\n\t\t\twhile ($fieldinfo=mysqli_fetch_field($rec)){\t\n\t\t\t\t$fieldname = $fieldinfo->name;\n\t\t\t\t$field_names[] = $fieldname;\n\t\t\t\t$fields .= \"<th>$fieldname</th>\";\n\t\t\t}\n\n\t\t\t$datatable = \"$('#$tableid').dataTable();\";\n\t\t\tif (!$tableid) $datatable = \"\";\n\t\t\t$data = \"\";\n\t\t\t\n\t\t\twhile ($row = $rec->fetch_array()){\n\t\t\t\t$data = \"\";\n\t\t\t\tforeach ($field_names as $fld){\n\t\t\t\t\t$val = $row[$fld];\n\t\t\t\t\tif (!$val) $val = 0;\n\t\t\t\t\t$data .= \"<td>$val</td>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t $body .= \"<tr>$data</tr>\";\t\t\n\t\t\t}\n\n\t\t\treturn \"<h5 style='font-weight:bold'>$title <small class='pull-right'>$description</small></h5>\n\t\t\t <div class='table-responsive' style='overflow-x:scroll;'>\n\t\t\t\t <table class='table table-hover table-bordered' id='$tableid'>\n\t\t\t <thead>\n\t\t\t\t <tr>$fields</tr>\n\t\t\t\t </thead>\n\t\t\t\t <tbody>\n\t\t\t\t\t\t$body\n\t\t\t\t </tbody>\n\t\t\t\t </table>\n\t\t\t\t </div>\n\t\t\t\t <script>\n\t\t\t\t \t$('document').ready(function(){\n\t\t\t\t \t\t$datatable\n\t\t\t\t \t});\n\t\t\t\t </script>\";\n }", "function Escenario($lista){\r\necho \"<table class='tg' border='1' style='margin:auto;'>\";\r\n echo \"<tr>\";\r\n echo \"<th colspan='6'>ESCENARIO</th>\";\r\n echo \"<tr>\";\r\n echo \"<th></th>\r\n <th>1</th>\r\n <th>2</th>\r\n <th>3</th>\r\n <th>4</th> \r\n <th>5</th>\r\n </tr>\";\r\n \r\n$i=1;\r\n// Imprimimos el contenido de la tabla\r\nforeach ($lista as $fila) {\r\n echo \"<tr>\";\r\n echo \"<th>\";\r\n echo $i;\r\n echo \"</th>\";\r\n foreach ($fila as $silla) {\r\n echo \"<td>\";\r\n echo $silla;\r\n echo \"</td>\";\r\n }\r\n echo \"</tr>\";\r\n $i++;\r\n }\r\necho \"</table>\";\r\n}", "public function print(): void\n {\n $values = $this->table->getValues();\n $size = $this->table->getSize();\n echo \"<table>\";\n foreach ($values as $index => $row) {\n if ($index === 1) {\n echo \"<tr><th>*</th>\";\n foreach ($row as $cell) {\n echo \"<th style='width:\" . (100 / ($size + 1)) . \"%'>\" . $cell . \"</th>\";\n }\n echo \"</tr>\";\n }\n echo \"<tr>\";\n echo \"<th style='width:\" . (100 / ($size + 1)) . \"%'>{$index}</th>\";\n foreach ($row as $cell) {\n echo \"<td style='width:\" . (100 / ($size + 1)) . \"%'>\" . $cell . \"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "function TablaVentasDiariasAdmin()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n $this->Cell(130);\n //Título\n $this->Cell(180,25,'LISTADO DE VENTAS GENERAL DEL DIA '.date(\"d-m-Y\"),0,0,'C');\n //Salto de línea\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'CAJA',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL DESC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarVentasDiarias();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$PagototalCompras=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago'];\n $PagototalCompras+=$reg[$i]['totalpago2']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n\t$this->CellFitSpace(60,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n\n $this->Cell(35,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n\t$UtilidadBruto= $Pagototal-$PagototalCompras;\n\t$MargenBruto = ( $UtilidadBruto == '' ? \"0.00\" : number_format($UtilidadBruto/$PagototalCompras, 2, '.', ','));\n\t\n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n\t$this->Cell(35,5,'',0,0,'C');\n\t$this->Cell(15,5,'',0,0,'C');\n $this->Cell(30,5,'',0,0,'C');\n $this->Cell(30,5,'',0,0,'C');\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(22,5,'',0,0,'C');\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(37,5,\"TOTAL GANANCIAS\",1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(30,5,utf8_decode(number_format($MargenBruto*100, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n }", "public function BonVoyage()\n {\n $tousLesVoyages = DB::table('voyage')\n ->join('categorie', 'voyage.categorie_id', '=', 'categorie.id')\n ->join('departement', 'voyage.departement_id', '=', 'departement.id')\n ->join('region', 'departement.region_id', '=', 'region.id')\n ->select('voyage.*', 'categorie.categorie', 'departement.nomDepartement', 'region.nomRegion')\n ->orderBy('nomVoyage', 'asc')\n ->get();\n return view('bonVoyage')->with('tousLesVoyages',$tousLesVoyages);\n }", "function\taddTable( $_par, $_table) {\n\t\t$frm\t=\t$this->myDoc->currMasterPage->getFrameByFlowName( \"Auto\") ;\n\t\t$this->myTablePar\t=\t$_par ;\n\t\t$this->myTable\t=\t$_table ;\n\t\t$this->inTable\t=\tFALSE ;\n\t\t$this->cellFrame\t=\tnew BFrame( $this->myDoc, \"CellFrame\", \"\", 0.0, 0.0, 0.0, 0.0) ;\n\t\t//\n\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTHeaderTS) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t$this->punchTableRow( $actRow) ;\n\t\t}\n\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\t\t$this->tableHead() ;\n\t\t$this->inTable\t=\tTRUE ;\n\t}", "public function TableDrawFacturas($idCotizacion,$idFactura)\r\n {\r\n \r\n\r\n//$Columnas=mysql_query(\"describe $tabla\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n//$Columnas=mysql_fetch_array($Columnas);\t\r\nsession_start();\r\n\r\n\r\n$Columnas1=mysql_query(\"select * from cotizaciones where NumCotizacion = '$idCotizacion'\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n$reg=mysql_fetch_array($Columnas1);\t\r\n$numCols=count($reg);\r\n\r\n//print_r($Columnas1);\r\n//print_r($Columnas);\r\n\r\nprint('\r\n\r\n\r\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" align=\"center\" style=\"width:100%;border-left: 1px solid #000000;\r\n\t\tborder-right: 1px solid #000000;\r\n\t\tborder-top: 1px solid #000000;\r\n\t\tborder-bottom: 1px solid #000000;\">\r\n \r\n\r\n <tr> \r\n <td width=\"200\" colspan=\"8\" align=\"center\" style= \"border: 1px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\">\r\n Seleccione un producto</td>\r\n </tr> <tr> ');\r\n\r\nfor ($i=0; $i<=$numCols; $i++){\r\n\t\r\n\t\t$NombreCol[$i]=mysql_field_name($Columnas1,$i);\t\r\n\t\tif ($NombreCol[$i]==\"\"){\r\n\t\t\tunset($NombreCol[$i]); \r\n\t\t\t$NombreCol = array_values($NombreCol);//quito el espacio que ha quedado despues de eliminarse \r\n\t\t}else{\r\n\t\t\tif($i<>1 and $i<7)\r\n\t\t\tprint('<td width=\"200\" align=\"center\" style= \"border: 0px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\"><h5>'.$NombreCol[$i].'</h5></td>');\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n}\r\n\r\n\r\nprint('<td width=\"200\" align=\"center\" style= \"border: 0px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\">Cantidad</td>');\r\n\r\n\r\n$this->ID=$NombreCol[0];\r\n\r\n$numCols=count($NombreCol);\r\n$this->NumCols=$numCols;\r\n\r\n\r\n\t\r\n\tprint('<tr>');\r\n\t\r\n\t$reg=mysql_query(\"select * from cotizaciones where NumCotizacion = '$idCotizacion' AND Devuelto=''\", $this->con) or die('no se pudo conectar a cotizaciones 2: ' . mysql_error());\r\n\t\t$i=0;\r\n\t\twhile($datos=mysql_fetch_array($reg)){\r\n\t\t$i++;\r\n\t\tif($i%2)\r\n\t\t\t\t\t\t$backgroundRow=$this->back1;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$backgroundRow=$this->back2;\r\n\t\t\t\t\t\t\r\n\t\t\tfor($z=0;$z<$this->NumCols;$z++){\r\n\t\t\t\t\t//$mod=\r\n\t\t\t\t\tif($z<>1 and $z<7)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tprint('<td width=\"200\" style= \"border: 0px solid #000000;color:'.$this->fontCeldas.';font: oblique 100% sans-serif bold;background-color:'.$backgroundRow.'\">'.$datos[$z].'</td>');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\tprint('<td width=\"200\" style= \"border: 0px solid #000000;color:'.$this->fontCeldas.';font: oblique 100% sans-serif bold;background-color:'.$backgroundRow.'\">\r\n\t\t\t\t<form name=\"formAgregaItems'.$datos[0].'\" id=\"formAgregaItems'.$datos[0].'\" method=\"POST\" action=\"VerFacturas.php\" target=\"_self\" >\r\n\t\t\t\t<input type=\"hidden\" name=\"TxtBuscarFactura\" value=\"'.$idFactura.'\">\r\n\t\t\t\t\t\t<textarea type=\"text\" name=\"TxtObservaciones\" value=\"\" placeholder=\"Observaciones\"></textarea>\r\n\t\t\t\t\t\t<input type=\"number\" name=\"TxtCantidadDev\" value=\"'.$datos[7].'\" min=\"0\" max=\"'.$datos[7].'\" step=\"any\" readonly style=\"font-size:1em; color:#333; font-family:Arial, sans-serif;\">\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"ItemVenta\" value=\"'.$datos[0].'\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<input type=\"submit\" name=\"BtnDevolver\" value=\"Devolver\"></form></td>');\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tprint(\"</tr><tr nobr=true >\");\r\n }\r\n \r\n\t\t\r\n\t\t\r\n\r\n$EspacioCol=$numCols+1;\t\r\nprint('</tr><tr>\r\n\r\n<td width=\"200\" colspan=\"8\" align=\"CENTER\" style= \"border: 1px solid #000099;color:'.$this->fontHeader.';font: oblique 100% sans-serif bold;background-color:'.$this->backHeader.'\">\r\nTechno Soluciones\r\n</td>\r\n');\r\n\r\nprint('</tr></table>');\r\n\r\n//print($this->NumCols);\r\n\r\n}", "function titulopersonal(){\n print (\"\\n<tr>\");\n if($this->titulo !=\"\")\n foreach ($this->titulo as $titulo){\n print (\"\\n<th>$titulo</th>\");\n }\n print (\"\\n<tr>\"); \n }", "function TablaVentasCajas()\n {\n $ca = new Login(); \n\t$ca = $ca->CajerosPorId();\t\n\t\n\t//Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\");\n\t$this->SetXY(10, 15);\n\t$this->SetFont('courier','B',18);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(120,8,'',0,0,'');\n\t$this->Cell(180,8,'LISTADO DE VENTAS DESDE '.$_GET[\"desde\"].' HASTA '.$_GET[\"hasta\"],0,1,'C');\n \n\t$this->Cell(150,8,'',0,0,'');\n $this->Cell(120,8,'Y CAJA N°.'.$ca[0]['nrocaja'],0,0,'C');\n //Salto de línea\n $this->Ln(15);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(70,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(17,8,'STATUS',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'TOT DESC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->BuscarVentasCajas();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(70,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode(\"VENCIDA\"),1,0,'C');\n\t}\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(20,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(70,5,'',0,0,'C');\t\t\n $this->Cell(17,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n\n $this->Cell(35,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n }", "public function Tabla( $header, $data, $config, $ta, $contigua = 0, $col_spe = 0 ) {\r\n\t\t$this->op_actual \t= 'tabla';\r\n\t\t$this->tw = $config;\r\n\t\t\r\n\t\tif ( $contigua == 0 || $this->getY() > ($this->pageHeight) ) {\r\n\t\t\t$this->AddPage();\r\n\t\t}\r\n\t\t$this->pagina_nueva = false;\r\n\t \r\n\t\t// Data\r\n\t $this->SetFillColor(250,250,250);\r\n\t $this->SetDrawColor(0,0,0);\r\n\t $this->SetTextColor(0);\r\n\t $this->SetFont('','',10);\r\n\t $fill = false;\r\n\t\t\r\n\t\tif ($col_spe == 0)\r\n\t\t\t$col = 4;\r\n\t\telse\r\n\t\t\t$col = $col_spe;\r\n\r\n\t\t$xw = 0;\r\n\t\t// sumar ancho de columnas anteriores\r\n\t\tfor ($c = 0; $c < $col; $c++)\r\n\t\t\tif (isset($this->tw[$c]))\r\n\t\t\t\t$xw += $this->tw[$c];\r\n\t\t\r\n\t\t$i = 0;\r\n\t\tforeach( $data as $row ) {\r\n\t\t\tif ( $this->getY() > ($this->pageHeight-20) ) {\r\n\t\t\t\t$this->Cell(array_sum($this->tw),0,'','T');\r\n\t\t\t\t$this->Ln();\r\n\t\t\t\t$this->AddPage();\r\n\t\t\t\t$y=$this->GetY();\r\n\t\t\t\t//$this->SetY($y+4);\r\n\t\t\t\t$this->TablaHeaderBM( $header, $config, true );\r\n\t\t\t\t$this->SetFont('','',10);\r\n\t\t\t\t$this->pagina_nueva = false;\r\n\t\t\t\t$fill = false;\r\n\t\t\t}\r\n\t\t\t$multi = 0;\r\n\r\n\t\t\t$y=$this->GetY();\r\n\t\t\t$x=$this->GetX();\r\n\t\t\t\r\n\t\t\t$x2 = $x + $xw;\r\n\t\t\t$this->SetX($x2);\r\n\t\t\t//$this->SetTextColor(255,0,0);\r\n\t\t\t$this->MultiCell( $this->tw[$col], 5, $this->capitalizar($row[$col]),1,$ta[$col]);\r\n\t\t\t$multi = $this->GetY();\r\n\t\t\t$multi_x = $this->GetX();\r\n\t\t\t$inter_y = $multi - $y;\r\n\t\t\t$this->SetY($y);\r\n\t\t\t$this->SetX($x);\r\n\r\n\t\t\t//$this->SetDrawColor( 200, 200, 200 );\r\n\t\t\t\r\n\t\t\tfor ( $j = 0; $j < count($row); $j++ ) {\t\r\n\t\t\t\tswitch ($j) {\r\n\t\t\t\tcase $col:\r\n\t\t\t\t\t$this->SetX($x2+$this->tw[$col]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$y=$this->GetY();\r\n\t\t\t\t\t$x=$this->GetX();\r\n\t\t\t\t\t$this->MultiCell( $this->tw[$j], $inter_y, $row[$j],1,$ta[$j]); // ,$fill)\r\n\t\t\t\t\t$this->SetY($y);\r\n\t\t\t\t\t$this->SetX($x+$this->tw[$j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ($multi>0)\r\n\t\t\t\t$this->SetY($multi);\r\n\t\t\telse\r\n\t\t\t\t$this->Ln();\r\n\t\t\t$fill=!$fill;\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t\r\n\t $this->Celda(array_sum($this->tw),0,'','T');\r\n\t\t$this->Ln();\r\n\t\t$this->op_actual = '';\r\n\t}", "function tablaConversiones() {\n \n $array = array();\n $contador = 0;\n $output = \"\";\n $output2 = \"\";\n $heading = array('Numero ','Contenido de $var ', 'isset($var) ', 'empty($var) ', '(bool) $var ', 'is_null($var)');\n $var = array(null, 0, true, false, \"0\", \"\", \"foo\", $array, 2);\n $funciones = array('llamarIsset', 'llamarEmpty', 'llamarBool', 'llamarIsnull');\n \n $output .= \"<table class='table table-bordered'>\";\n $output .= \"<tr>\";\n // imprimimos cabecera\n foreach ($heading as $value) {\n $output .= \"<th>\" . $value . \" </th>\";\n }\n $output .= \"</tr>\";\n foreach ($var as $valor) {\n \n $contador++;\n $output .= \"<th> {$contador} </th>\";\n \n if ($valor === null) {\n $output2 = \"null\";\n } elseif($valor === true) {\n $output2 = \"true\";\n } elseif($valor === 2) {\n $output2 = \"unset(\\$var)\";\n } elseif($valor === \"\") {\n $output2 = \"\\\"\\\"\";\n } elseif($valor === false) {\n $output2 = \"false\";\n }else {\n $output2 = $valor;\n }\n \n $output .= \"<th> \\$var= \". $output2 .\" </th>\";\n \n foreach ($funciones as $funcion) {\n \n if ($valor == 2) {\n unset($valor);\n }\n if ($funcion($valor)) {\n $output .= \"<td class='true'> True </td>\";\n } else {\n $output .= \"<td class='false'> False </td>\";\n }\n }\n $output .= \"<tr>\";\n }\n \n $output .= \"</table>\";\n\n echo $output;\n }", "public function show($id)\n {\n \n $config = $this->horarioconfig->find($id);\n $horarioinicio=Carbon::parse($config->horainicio);\n $horariofin=Carbon::parse($config->horafin);\n $duracion=$config->duracionclase;\n\n $finalizar=0;\n\n $horaActual =$horarioinicio;\n $array=array( );\n $array2 = array( );\n while ( $finalizar == 0 ) {\n if ($horaActual <= $horariofin) {\n array_push($array, date ('h:i a',strtotime($horaActual)));\n array_push($array2, date ('h:i a',strtotime($horaActual)));\n\n if ( $horalibre = $this->horaslibre->findwhere(['idconfig'=>$config->id,'horainicio'=>$horaActual ])->first()) {\n $horaActual->addMinutes($horalibre->duracion);\n\n }\n else{\n $horaActual->addMinutes($duracion);\n }\n\n } else {\n $finalizar=1;\n }\n }\n\n\n $tableRow='';$f=1;\n $contadorHora=1;\n\n\n for ($j=0; $j < count($array)-1 ; $j++) { \n\n $td='';\n $i=1;\n $contadorHoraLibre=0;\n foreach ($this->dias as $dia) {\n $hlibre= $this->horaslibre->findwhere(['idconfig'=>$config->id,'horainicio'=>date ('H:i:s',strtotime( $array[$j])) ])->first();\n if ($config[strtolower($dia)]=='true') {\n\n if ($hlibre) {\n $td='<td class=\"cursoseccion\" colspan=\"7\">\n \n <div class=\"center\">\n <h5 class=\"blue\">'.$hlibre->descripcion .'</h5>\n </div>\n </td>'; \n if ($j==$i) {\n $contadorHora--;\n } \n $contadorHoraLibre=1;\n\n } else {\n $td.='<td class=\"cursoseccion\"><div >\n <label>\n Hora '.( $contadorHora) .'\n\n </label>\n </div></td>';\n\n }\n\n } else {\n if ($contadorHoraLibre==0) {\n $td.='<td class=\"cursoseccion\"><div class=\"center\">\n <label>\n ---\n </label>\n </div></td>';\n }\n \n }\n\n\n }\n\n\n\n $contadorHora++;\n\n $tableRow.=\"<tr><td> $array[$j] - \n $array[$f]</td>\".$td.\"</tr>\";\n $f++;\n }\n\n $conf_h=\"<option value=''></option>\";\n foreach ($array2 as $opt_hora) {\n \n $conf_h .= '<option value=\"'.date(\"H:i:s\",strtotime($opt_hora)).'\" > '.date(\"h:i a\",strtotime($opt_hora)).'</option>'; \n \n \n }\n $conf_h= ' <select name=\"horainicio\" class=\"select2\" data-placeholder=\"Hora Inicio\" >'.$conf_h.'</select> '; \n\n return response()->json(['table'=>$tableRow,'horas'=>$conf_h]);\n\n \n \n\n }", "protected function constructPagination($int_nb_tr_total)\n {\n $int_nb_page=ceil($int_nb_tr_total/$this->int_nb_ligne_page);\n \n //- traitement de pages \n $int_max=0;\n for($i=0;$i<$int_nb_page-1;$i++)\n {\n $int_libelle_page=$i+1;\n $int_min=$i*$this->int_nb_ligne_page;\n $int_max=$int_min+$this->int_nb_ligne_page-1;\n $obj_font=new font($int_libelle_page);\n $obj_font->addData('min',$int_min);\n $obj_font->addData('max',$int_max);\n $obj_font->setOnclick(\"table_with_search.getInstance($(this)).paginate($(this));\");\n $obj_font->setStyle('cursor:pointer;');\n $obj_font->setClass('table_with_search__page');\n $arra_font[]=' '.$obj_font->htmlValue();\n }\n \n //- traitement de la dernière page\n $int_min=($int_nb_page-1)*$this->int_nb_ligne_page;\n $int_max=$int_nb_tr_total;\n $int_libelle_page=$int_nb_page;\n $obj_font=new font($int_libelle_page);\n $obj_font->addData('min',$int_min);\n $obj_font->addData('max',$int_max);\n $obj_font->setOnclick(\"table_with_search.getInstance($(this)).paginate($(this));\");\n $obj_font->setStyle('cursor:pointer;');\n $obj_font->setClass('table_with_search__page');\n $arra_font[]=' '.$obj_font->htmlValue();\n \n $obj_tr=new tr();\n $obj_td=$obj_tr->addTd($arra_font);\n $obj_td->setColspan(count($this->arra_column_name));\n $obj_td->setAlign('center');\n $obj_td->setClass('contenu table_with_search__constructPagination');\n \n return $obj_tr;\n }", "public function drawTable()\n {\n echo \"<table border='1'>\";\n for ($i = 0; $i < $this->m; $i++) {\n echo \"<tr>\";\n for ($j = 0; $j < $this->n; $j++) {\n if ($this->isInSolution($i, $j, $this->matrix)) {\n echo \"<td bgcolor='#9acd32'>\";\n } else {\n echo \"<td>\";\n }\n echo $this->matrix[$i][$j];\n echo \"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "function tabla_filas_compra_pago($filas,$tpago,$monto,$moneda,$tcambio,$opera,$boucher,$observ,$empresa,$caja,$banco,$cuenta,$tcambiodia){\n\t\t$tpago = explode(\"|\", $tpago);\n\t\t$monto = explode(\"|\", $monto);\n\t\t$moneda = explode(\"|\", $moneda);\n\t\t$tcambio = explode(\"|\", $tcambio);\n\t\t$opera = explode(\"|\", $opera);\n\t\t$boucher = explode(\"|\", $boucher);\n\t\t$observ = explode(\"|\", $observ);\n\t\t$empresa = explode(\"|\", $empresa);\n\t\t$caja = explode(\"|\", $caja);\n\t\t$banco = explode(\"|\", $banco);\n\t\t$cuenta = explode(\"|\", $cuenta);\n\t\t//----\n\t\t\t$salida.= '<table>';\n\t$i = 1;\t\n\t$total = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//acumulado\n\t\t\t$Dcambiar = 0;\n\t\t\t$Dcambiar = Cambio_Moneda($tcambio[$i],$tcambiodia,$monto[$i]);\n\t\t\t$total += $Dcambiar;\n\t\t\t//-\n\t\t\t$salida.= '<td>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttpag'.$i.'\" id = \"Ttpag'.$i.'\" value = \"'.$tpago[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmonto'.$i.'\" id = \"Tmonto'.$i.'\" value = \"'.$monto[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tmoneda'.$i.'\" id = \"Tmoneda'.$i.'\" value = \"'.$moneda[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Ttipcambio'.$i.'\" id = \"Ttipcambio'.$i.'\" value = \"'.$tcambio[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Toperador'.$i.'\" id = \"Toperador'.$i.'\" value = \"'.utf8_decode($opera[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tboucher'.$i.'\" id = \"Tboucher'.$i.'\" value = \"'.trim($boucher[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tobserva'.$i.'\" id = \"Tobserva'.$i.'\" value = \"'.utf8_decode($observ[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tsucur'.$i.'\" id = \"Tsucur'.$i.'\" value = \"'.$empresa[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tcaja'.$i.'\" id = \"Tcaja'.$i.'\" value = \"'.$caja[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tbanco'.$i.'\" id = \"Tbanco'.$i.'\" value = \"'.$banco[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Tcuenta'.$i.'\" id = \"Tcuenta'.$i.'\" value = \"'.$cuenta[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagFilas\" id = \"PagFilas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td><input type = \"hidden\" name = \"PagTotal\" id = \"PagTotal\" value = \"'.$total.'\"/></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\n\treturn $salida;\n}", "function tabla($result) {\n $tabla = \"\";\n while ($registro = mysqli_fetch_assoc($result)) {\n $tabla = $tabla .\n \"<div class='panel panel-default'>\n <div class='panel-heading'>\n <h4 class='panel-title'><a href='#'>\" . $registro[\"CurNom\"] . \"</a></h4>\n </div>\n <DIV class='panel-body' hidden>\n <div class='table-responsive'>\n <table class='table table-hover'>\n <tr> \n <Th>Criterio</Th>\n <Th>Nota</Th> \n </tr>\n <tr>\n <td>Evaluación Continua</td>\n <td>\" . $registro['NotaFinal1'] . \"</td>\n </tr>\n <tr>\n <td>Tareas y Practicas</td> \n <td>\" . $registro['NotaFinal2'] . \"</td> \n </tr>\n <tr>\n <td>Examen</td> \n <td>\" . $registro['NotaFinal3'] . \"</td> \n </tr> \n <tr>\n <th>Nota FINAL</th> \n <th>15</th> \n </tr>\n </table>\n </div>\n </DIV>\n </div>\\n\";\n }\n return $tabla;\n }", "public function Afficher_Panier($id_commande) {\n \n // requete sur la base de donnée\n $sql = \"SELECT tb_article.id_article,a_designation,a_pht,qte_cmde,url_image,t_taux, tb_ligne_commande.id_commande, a_pht*(1+tb_tva.t_taux) AS PRIX\n FROM tb_article,tb_commande,tb_ligne_commande, tb_tva \n WHERE tb_article.id_article = tb_ligne_commande.id_article \n AND tb_ligne_commande.id_commande = tb_commande.id_commande \n AND tb_article.id_tva = tb_tva.id_tva \n AND tb_commande.id_commande =$id_commande\";\n \n $req = $this->db->query($sql);\n\n $enteteTableau = '<table class=\"tableauPanier\">\n <caption>Contenu du panier</caption>\n <tr>\n <th>image</th>\n <th>Désignation</th>\n <th>Prix</th>\n <th>Quantité</th>\n <th></th>\n <th>modification</th>\n <th></th>\n </tr>';\n $contenuTableau =\"\"; \n while ($resultat =$req->fetch(PDO::FETCH_OBJ)) {\n\n $contenuTableau .= \"\n\n <tr>\n <td><img src= \\\"$resultat->url_image\\\"/> </td>\n <td>$resultat->a_designation</td>\n <td>$resultat->PRIX €</td>\n <td>$resultat->qte_cmde</td>\n <td><a href=\\\"?id_article=$resultat->id_article&action=add\\\"> Ajouter</a></td>\n// <td><a href=\\\"?id_article=$resultat->id_article&action=substract\\\">RETIRER</a> </td>\n <td><a href=\\\"?id_article=$resultat->id_article&action=del\\\"> Supprimer</a></td>\n </tr>\n \";\n }\n $finTableau = '</table>';\n \n $tableau = $enteteTableau\n .$contenuTableau\n .$finTableau;\n \n return $tableau;\n \n }", "function EdtDuJourHorizontal($tab_data, $jour, $flags) \r\n{\r\n $result = \"\";\r\n $entetes = ConstruireEnteteEDT();\r\n $creneaux = ConstruireCreneauxEDT();\r\n $hauteur_demicreneaux = 30;\r\n\t$hauteur_creneaux = $hauteur_demicreneaux * 2;\r\n\t$nb_creneaux = $creneaux['nb_creneaux'];\r\n if (($nb_creneaux == 0) OR ($nb_creneaux == 1)) {\r\n $width = \"94px\";\r\n }\r\n else {\r\n $width = $nb_creneaux*2*$hauteur_demicreneaux + $hauteur_creneaux+4;\r\n $width = $width.\"px;\";\r\n } \r\n while (!isset($entetes['entete'][$jour])) {\r\n $jour--;\r\n }\r\n $jour_sem = $entetes['entete'][$jour];\r\n\r\n $result .= \" <div class=\\\"fond_h\\\">\\n\";\r\n $result .= \"<div class=\\\"ligne\\\" style=\\\"width : \".$width.\"\\\">\\n\";\r\n $jour_sem = $entetes['entete'][$jour];\r\n $result .= \"<div class=\\\"entete_h\\\" style=\\\"width : \".$hauteur_creneaux.\"px;\\\"><div class=\\\"cadre\\\">\".$jour_sem.\"</div></div>\\n\";\r\n $index_box = 0;\r\n\t$AlreadyInContainer = false;\r\n while (isset($tab_data[$jour]['type'][$index_box]))\r\n {\r\n if ($tab_data[$jour]['type'][$index_box] == \"vide\") {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n $result .= \"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\";\r\n \r\n if (strpos($tab_data[$jour]['couleur'][$index_box], \"Repas\") !== FALSE) {\r\n $result .= \"<div class=\\\"cadreRepas\\\">\\n\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cadre\\\">\\n\";\r\n }\r\n if (isset($tab_data[$jour]['extras'][$index_box])) {\r\n $result .= \"Hello\".$tab_data[$jour]['extras'][$index_box];\r\n }\r\n $result .= \"</div></div>\\n\"; \r\n\r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"erreur\")\r\n {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule_h\\\" style = \\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n $result .= \"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\";\r\n $result .= \"<div class=\\\"cadreRouge\\\">\\n\";\r\n $result .= $tab_data[$jour]['contenu'][$index_box];\r\n $result .= \"</div></div>\\n\"; \r\n\r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"conteneur\")\r\n {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n\t\t\tif (!$AlreadyInContainer) {\r\n\t\t\t\t$result .= \"<div class=\\\"cellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n\t\t\t}\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule_h\\\" style =\\\"width : \".$hauteur.\";display:block;\\\">\";\r\n\t\t\t\tif (!$AlreadyInContainer) {\r\n\t\t\t\t\t$CountBeforeOutOfContainer = 2;\r\n\t\t\t\t}\r\n\t\t\t\t$AlreadyInContainer = true;\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule_h\\\" style = \\\"width : \".$hauteur.\";display:block;\\\">\";\r\n\t\t\t\tif (!$AlreadyInContainer) {\r\n\t\t\t\t\t$CountBeforeOutOfContainer = 3;\r\n\t\t\t\t}\r\n\t\t\t\t$AlreadyInContainer = true;\t\t\t\t\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n\t\t\t\tif (!$AlreadyInContainer) {\r\n\t\t\t\t\t$CountBeforeOutOfContainer = 1;\r\n\t\t\t\t}\r\n\t\t\t\t$AlreadyInContainer = true;\t\t\t\t\r\n }\r\n \r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"cours\")\r\n {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n $result .= \"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\";\r\n if (strpos($tab_data[$jour]['couleur'][$index_box], \"Couleur\") !== FALSE) {\r\n $result .= \"<div class=\\\"cadreCouleur\\\">\\n\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cadre\\\">\\n\";\r\n }\r\n if (isset($tab_data[$jour]['extras'][$index_box])) {\r\n $result .= \"Hello\".$tab_data[$jour]['extras'][$index_box];\r\n }\r\n if ($flags & INFOBULLE) {\r\n $lesson_content_1 = str_replace(\"<br />\", \" - \", $tab_data[$jour]['contenu'][$index_box]);\r\n $lesson_content_2 = str_replace(\"<i>\", \" \", $lesson_content_1);\r\n $lesson_content = str_replace(\"</i>\", \" \", $lesson_content_2);\r\n $result .=\"<div class=\\\"ButtonBar\\\"><div class=\\\"image\\\"><img src=\\\"../../templates/DefaultEDT/images/info.png\\\" title=\\\"\".$lesson_content.\"\\\" /></div></div>\";\r\n $result .= \"</div></div>\\n\";\r\n\r\n }\r\n else {\r\n $result .= $tab_data[$jour]['contenu'][$index_box];\r\n $result .= \"</div></div>\\n\";\r\n }\r\n\r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"fin_conteneur\")\r\n {\r\n $result .= \"</div>\\n\";\r\n\t\t\t$CountBeforeOutOfContainer--;\r\n\t\t\tif ($CountBeforeOutOfContainer == 0) {\r\n\t\t\t\t$result .= \"</div>\\n\";\r\n\t\t\t\t$AlreadyInContainer = false;\r\n\t\t\t}\r\n }\r\n else \r\n {\r\n // ========= type de box non implémentée\r\n\r\n }\r\n\r\n\r\n $index_box++;\r\n }\r\n\r\n $result .= \"</div><div style=\\\"clear:both\\\"></div>\\n\";\r\n\r\n\tif ($flags & CRENEAUX_INVISIBLES) {\r\n\t\t$result .= '</div>';\r\n\t\r\n\t}\r\n\telse {\r\n\t\t// ===== affichage de la colonne créneaux\r\n\r\n\t\t$result .= \"<div class=\\\"ligne_creneaux\\\" style=\\\"width : \".$width.\"\\\">\\n\";\r\n\t\t$result .= \"<div class=\\\"entete_creneaux_h\\\" style=\\\"width : \".$hauteur_creneaux.\"px;\\\"><div class=\\\"cadre\\\" style=\\\"width : \".$hauteur_creneaux.\"px;\\\">\";\r\n\t\tif (isset($tab_data['entete_creneaux'])) {\r\n\t\t\t$result .= $tab_data['entete_creneaux'];\r\n\t\t}\r\n\t\t$result .= \"</div></div>\\n\";\r\n\t\tfor ($i = 0; $i < $creneaux['nb_creneaux']; $i++)\r\n\t\t{\r\n\t\t\t$hauteur = 2 * $hauteur_demicreneaux;\r\n\t\t\t$hauteur = $hauteur.\"px;\";\r\n\t\t\t$result .= \"<div class=\\\"cellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n\t\t\t$result .= \"<div class=\\\"cellule_creneaux\\\"><div class=\\\"cadre\\\">\".$creneaux['creneaux'][$i].\"</div></div>\\n\";\r\n\t\t\t$result .= \"</div>\";\r\n\t\t}\r\n\r\n\t\t$result .= \"</div></div><div style=\\\"clear:both\\\"></div>\";\r\n\t}\r\n return $result;\r\n}" ]
[ "0.6603819", "0.65850854", "0.6517951", "0.63587177", "0.62696874", "0.6218792", "0.620142", "0.61464626", "0.6124109", "0.60717493", "0.6062409", "0.6062247", "0.6028889", "0.5940822", "0.5931928", "0.5919336", "0.5911208", "0.58981985", "0.5886651", "0.5881451", "0.588098", "0.58609027", "0.5845742", "0.5831383", "0.5830597", "0.5828518", "0.58197904", "0.5801393", "0.5798301", "0.57920015", "0.577962", "0.5764274", "0.57607037", "0.57500046", "0.5749634", "0.5742443", "0.57305574", "0.5727981", "0.5723257", "0.5723047", "0.57123625", "0.5710046", "0.570656", "0.57037425", "0.57037187", "0.5699637", "0.56966406", "0.5695852", "0.569477", "0.56838614", "0.56782573", "0.56767184", "0.5675296", "0.56683856", "0.5664382", "0.566274", "0.5662196", "0.5655116", "0.5649216", "0.5636653", "0.5632593", "0.5616626", "0.56130034", "0.56115234", "0.5610957", "0.56081617", "0.5604657", "0.56005806", "0.56002104", "0.5589974", "0.55869657", "0.5584824", "0.55828184", "0.5580826", "0.5578115", "0.5566589", "0.5565231", "0.5551864", "0.5550122", "0.5548818", "0.55425376", "0.5534197", "0.55290186", "0.5528731", "0.55253303", "0.5520985", "0.5515814", "0.5513296", "0.5506974", "0.55032307", "0.54995877", "0.54970217", "0.54831827", "0.5480824", "0.5479651", "0.54787016", "0.5477828", "0.5475867", "0.5475749", "0.5471563", "0.54698944" ]
0.0
-1
Ajoute un message d'erreur
function addMessage($texte) { $this->errorData[]["message"] = $texte; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function affichageErreur()\n\t{\n\t}", "public function limpiarError(){\n\t\t$this->mensaje_error = null;\n\t}", "public function addErrorMessage($message) {\n\t\t$message = '<i class=\"fa fa-times\"></i> ' . $message;\n\t\t$this->addMessage($message, 'error');\n\t}", "public function message()\n {\n return 'Errores en plantilla<li>'.join('</li><li>',$this->invalid);\n }", "function add_error($msg) {\n\t\t$this->errors[] = $msg;\n\t}", "public function Erreur_Message(){\n return $this->msg_error;\n }", "protected function addErrorFlashMessage() {}", "protected function getMessage(){\n\t\treturn 'No hay facturas en esta caja.';\n\t}", "private function error($msg)\n {\n\t\t$this->error = true;\n\t\t$this->error_message .= $msg;\n }", "function afficherErreurSynthaxe ($errorCode=null, $message){\n if($errorCode && $errorCode == 1146){ // problème de synthaxe avec une table de la bdd //\n echo \n \"<div class='alert alert-danger text-center'> Erreur de connexion avec la base de données. Merci de réessayer ultérieurement. </div>\";\n }\n}", "function setError ($msg) {\r\n $this->errors[]=$msg;\r\n }", "public function __construct( ){\n\t\t$this->message = \"Algo errado em sua consulta\";\n\t}", "public function add_error_message( $message ) {\n\t\t$this->messages[] = $message;\n\t\t$this->is_valid = false;\n\t}", "public function AddMessage( $message )\n {\n ART_Error::AddMessage( $message );\n\n echo \"<p id=\\\"error\\\">\" . $this->message . \"</p>\\n\";\n }", "function affiche_erreur($str) { echo '<p class=\"erreur\">'.$str.'</p>'; }", "public function callbackFail()\n {\n if (isset($this->exception)) {\n if (strpos($this->exception, CFormAddUser::SQLSTATE) !== false && strpos($this->exception, CFormAddUser::ERROR_DUPLICATE_KEY) !== false) {\n $errorMessage = \"<p><i>Fel har uppstått i databasen. Akronym är redan upptaget, försök att välja ny akronym eller kontakta administratör!</i></p>\";\n } else {\n $errorMessage = \"<p><i>Fel har uppstått i databasen, försök igen eller kontakta administratör!</i></p>\";\n }\n } else {\n if (isset($this->errorMessage)) {\n $errorMessage = $this->errorMessage;\n } else {\n $errorMessage = \"<p><i>Fel har uppstått i databasen, kunde ej spara information i databasen. Försök igen eller kontakta administratör!</i></p>\";\n }\n }\n\n $this->AddOutput($errorMessage);\n $this->redirectTo();\n }", "public function message()\n {\n return 'ИНН имеет некорректный формат.';\n }", "function add_error( $message ) {\n\t\t$this->is_error = true;\n\n\t\tif ( !is_wp_error( $this->form->errors ) ) {\n\t\t\t$this->form->errors = new WP_Error;\n\t\t}\n\n\t\t$this->form->errors->add( $this->get_attribute( 'id' ), $message );\n\t}", "function addMessage($txt = \"\"){\t$this->mMessages\t.= $txt;\t}", "public function posa_error($msg)\n {\n $this->error [] = $msg;\n }", "function errorMSGControll() {\n $this->errorMSG = $this->model->getErrorMSG();\n $this->view->errorMSGHandler($this->errorMSG);\n }", "public function addError($msg)\n\t{\n\t\t// Add to error array\n\t\t$this->errors[] = $msg;\n\t}", "public function __construct() {\n $this->message = \"Ocorreu um problema ao tentar organizar natureza alfabeticamente.\";\n }", "function error()\n {\n global $lang;\n $args = func_get_args();\n $errmsg = (implode('', $args));\n $this->errors[] = $errmsg;\n }", "private function\t\tgestionError($mess, $subject, $destinataires)\n {\n \tif (!isset($mess))\n\t\t error::ErrorMail(\"corps du mail\");\n \tif (!isset($subject))\n \t\terror::ErrorMail(\"sujet du mail\");\n \tif (!isset($destinataires))\n \t\terror::ErrorMail(\"destinataire\");\n }", "public function add_message($field, $message) {\n\t\tif(isset($this->_field_data[$field]) AND (!isset($this->_field_data[$field]['error']) OR !$this->_field_data[$field]['error']) )\n\t\t\t\n\t\t\t$this->_field_data[$field]['error'] = $message;\n\t}", "function error() {\n $this->escribirHeader(\"Error de Permisos\");\n }", "public function message()\n\t{\n\t\t$this->add('message', 'required', true, 'Message is required.');\n\t\t$this->add('message', 'regexp', '#^[a-zA-Z0-9\\s_\\- ,\\.!]*$#', 'Bad message format.');\n\t\t$this->add('message', 'max', 250, 'Bad message length, no more than 250 characters.');\n\n\t\t$this->setInformation('message', 'Message desciption, no specials characters, no accent, no more than 250 characters...');\n\t}", "public function message()\n {\n return 'O Titulo de eleitor digitado é invalido';\n }", "function err($msg, $field)\r\n\t\t{\r\n\t\t\t$this->msg->add($msg);\r\n\t\t\t$form_errors\t=\t$this->event->get('form_errors', array());\r\n\t\t\t$form_errors[]\t=\t$field;\r\n\t\t\t$this->event->set('form_errors', $form_errors);\r\n\t\t\t$this->error\t=\ttrue;\r\n\t\t}", "public function message () \n {\n return \"Mohon maaf data {$this->attributes_alias} yang di inputkan sudah tersedia. Mohon ganti dengan yang lain\";\n }", "function add_error($input, $message)\n {\n }", "public function pageconnexionerreur(){\n\t\t$vue = new Vue(\"ConnexionErreur\");\n\t\t$vue->generer(array());\n\t}", "protected function _addError($msg)\n {\n\tif ( $this->name )\n\t{\n\t $this->errors[]= sprintf('%s (%s): %s', $this->name, get_class($this), $msg);\n\t}\n\telse\n\t{\n\t $this->errors[]= '%s '. sprintf('(%s): %s',get_class($this), $msg);\n\t}\n }", "public function notice_error() {\n\t\t$class = 'notice notice-error';\n\t\t$message = __( 'An error occurred during synchronization.', 'elemarjr' );\n\t\treturn sprintf( '<div class=\"%1$s\"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );\n\t}", "public function message () \n {\n return \"Mohon maaf data untuk {$this->attributes} yang di inputkan sudah tersedia. Mohon ganti dengan yang lain\";\n }", "public function error($message) {}", "public function addError($message)\n {\n $this->_errors[] = $message;\n }", "public function __construct() {\n $this->message = \"Falha na leitura de naturezas da planilha serie historica!\";\n }", "public function mensajeError($name)\n {\n $cadena= \"\";\n if ($this->hasMessagesFor($name)) {\n foreach ($this->getMessagesFor($name) as $message) {\n //$this->flash->error($message);\n $cadena.= $message .\"<br>\";//para mostrar con tooltip\n }\n }\n return $cadena;\n }", "function informarError(){\n\t$para = 'hsteiner@latamclick.com, mmolinas@latamclick.com';\n\t$titulo = 'Owloo - Countries';\n\t$mensaje = 'Se ha detectado un error en la ejecución del script de captura de ranking de países. Favor verificar estado.';\n\t$cabeceras = 'From: owloo@owloo.com' . \"\\r\\n\";\n\tmail($para, $titulo, $mensaje, $cabeceras);\n\n\texit();\n}", "static function Erreur($TexteErreur)\n\t{\n\t\trequire(\"App/View/Frontend/Erreur.php\");\n\t}", "private function storeErrorMessage($message)\n\t{\n\t\t$this->_errorMessage .= $message;\n\t}", "function insertErrorList($msg){\n\t\t$this->_errorList[] = array(\"msg\" => $msg);\n\t}", "function afficherErreurBdd ($errorCode=null, $message){\n if($errorCode && $errorCode == 1049){ // erreur de synthaxe sur la bdd //\n echo \n \"<div class='alert alert-danger text-center'> Ce site est en maintenance. Merci de revenir ultérieurement. </div>\";\n }\n}", "abstract public function getMsgError();", "public function message(): string\n {\n return 'El número de seguro social es invalido.';\n }", "protected function error($message) { \n\t\t$this->error_found = true; \n\t\t$this->error_message = $message; \n\t}", "private function addError($rule,$msg=\"\") {\n\t\t$this->errors[] = (isset($rule['message'])) ? (string)$rule['message'] : $msg;\n\t}", "function gagal() {\n echo $_err = ErrorMsg(\"Login Gagal\", \"Kode Login dan Password salah!!!\n <hr size=1 color=#3b5998>\n Perhatikan Anda Login sebagai siapa dan pastikan Anda memasukan Kode Login dan password dengan benar.\n\t <hr size=1 color=#3b5998>\n Untuk informasi lebih lanjut hubungi Administrator.\n\t <hr size=1 color=#3b5998>\n Silahkan <a href='index.php'>Coba Lagi</a>\");\n}", "function error($type, $msg, $file, $line)\n{\n // on lit les principales variables d'environnement\n // pour ecrire leur contenu dans le log\n global $HTTP_HOST, $HTTP_USER_AGENT, $REMOTE_ADDR, $REQUEST_URI;\n // on donne un nom au fichier d'erreur\n $errorLog = URL_BASE .\"erreur.log\"; \n // construction du contenu du fichier d'erreur\n $errorString = \"Date: \" . date(\"d-m-Y H:i:s\") . \"\\n\";\n $errorString .= \"Type d'erreur: $type\\n\";\n $errorString .= \"Message d'erreur: $msg\\n\";\n $errorString .= \"Fichier: $file($line)\\n\";\n $errorString .= \"Host: $HTTP_HOST\\n\";\n $errorString .= \"Client: $HTTP_USER_AGENT\\n\";\n $errorString .= \"Client IP: $REMOTE_ADDR\\n\";\n $errorString .= \"Request URI: $REQUEST_URI\\n\\n\";\n // ecriture du log dans le fichier erreur.log\n $fp = fopen($errorLog, \"a+\");\n fwrite($fp, $errorString);\n fclose($fp);\n \n // n'affiche que \n if ($type == E_ERROR || $type == E_WARNING ){\n // display error message\n echo \"<h4>Erreur (<small>$msg</small>)</h4>\";\n echo \"Nous sommes désolés, mais cette page ne peut être affichée à cause d'une erreur interne.\n <br />\n Cette erreur a été enregistrée et sera corrigée dès que possible.\n <br /><br/>\n <a href=# onClick='history.go(-1)'>Cliquer ici pour revenir au menu précédent.</a>\";\n }\n}", "public function message()\n {\n return 'The validation error messagess.';\n }", "function error($message);", "protected function getErrorFlashMessage() {}", "function PushError($fctname, $msg, $desc = \\false)\n {\n }", "function gererErreurs ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n // Construire le message d'erreur\n $strMessage = \"Une erreur est survenue dans le script '$e_file' a la ligne $e_line: \\n<br />$e_number : $e_message\\n<br />\";\n // Ajouter la date et l'heure\n $strMessage .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n<br />\";\n // Ajouter $e_vars au $message.\n $strMessage .= \"<pre>\" . print_r ($e_vars, 1) . \"</pre>\\n<br />\";\n // On peut aussi créer un journal d'erreurs et/ou envoyer par courriel.\n //@todo ramener la gestion selon $blnLocal. C'est fait.\n if ($GLOBALS['blnLocal']) {\n echo '<p class=\"error\">' . $strMessage . '</p>';\n //error_log ($strMessage, 3, \"log-err.txt\");\n } else {\n // En production, on veut seulement un courriel.\n //error_log ($strMessage, 1, $GLOBALS['courrielContact']);\n }\n // \tpour l'instant, Afficher l'erreur\n echo '<p class=\"error\">' . $strMessage . '</p>';\n }", "public function message()\n {\n return \"Ошибочное значение\";\n }", "public function error($message)\n {\n $flash = $this->flashtype['error'];\n $flash['message'] = $message;\n $this->add($flash);\n }", "public function message()\n {\n return \"El nombre $this->nombre ya existe.\";\n }", "public function message()\n {\n return __(\"validation.{$this->error}\", ['attribute' => 'nomor sampel']);\n }", "public function addError($message) {\n $this->errors = array_merge($this->errors, (array) $message);\n }", "function osc_add_flash_error_message($msg, $section = 'pubMessages') {\n Session::newInstance()->_setMessage($section, $msg, 'error');\n }", "public static function setErrorMessage($msg){\n $_SESSION[UtilMessage::ERROR_REGISTER] = $msg;\n }", "public function actionError() {\n if (!empty(Yii::app()->session['_lang'])) {\n\n Yii::app()->language = Yii::app()->session['_lang'];\n } else {\n Yii::app()->session['_lang'] = 'en';\n Yii::app()->language = Yii::app()->session['_lang'];\n }\n if ($error = Yii::app()->errorHandler->error) {\n if (Yii::app()->request->isAjaxRequest)\n echo $error['message'];\n else\n $this->render('error', $error);\n }\n }", "function Error($message, $vars = array()) {\n $this->setMessage($message, $vars);\n }", "function crash($codeErreur, $message)\n{\n $currentDirectory = getcwd();\n $temps = date(DATE_RFC2822);\n\n // tableauAffiche($_SERVER);\n $myFile = fopen($currentDirectory.'\\log\\serveur.log', 'a+');\n fwrite($myFile, $_SERVER['REMOTE_ADDR'].'-'.$temps.'-'.$message.PHP_EOL);\n fclose($myFile);\n\n // envoit reponse HTTP\n http_response_code($codeErreur);\n\n //envoit mail ne fonctionne pas pour l'instant\n // mail('isabelstreich@gmail.com', 'Erreur dans le serveur'.COMPANY_NAME, $message);\n\n die($message);\n}", "public function errorMessage()\n {\n }", "function errorMsg($msg)\n{\n\treturn \"<div class=\\\"errorMsg\\\">$msg</div>\";\n}", "function refus($msg) {\n echo \"<b><font color=red>$msg</font></b><br>\";\n echo \"Action non commenc�e; rectifier les conditions initiales avant de reprendre<br>\";\n}", "public function obtenerError() {\n\t\treturn $this->mensaje_error;\n\t}", "public function addError($msg, $die = 0)\r\n\t{\r\n\t\t\r\n\t\t$this->errors[$this->number]= $msg;\r\n\t\t$this->number++;\r\n\t\tif ($die == 1)\r\n\t\t{\r\n\t\t\t$this->printErrors();\r\n\t\t\tdie(10);\r\n\t\t}\r\n\t\tif ($die == 2)\r\n\t\t{\r\n\t\t\tJSONHandler::sendResponse(0,$this->errors);\r\n\t\t\tdie(10);\r\n\t\t}\r\n\t}", "public function __construct( ){\n\t\t$this->message = \"Falha na leitura de crime da planilha serie historica!\";\n\t}", "public function error($message)\n {\n }", "public function error($message)\n {\n }", "protected function printErrorBoxMessage($message){\n ?>\n <div class=\"alert alert-danger\">\n <strong>Errore! </strong> <?php echo $message ?>\n </div>\n <?php \n }", "public function error($msg,$extra='') {\n\t print '<div class=\"alert alert-danger\">'.$msg.'</div>';\n\t\tif ($extra == '') {\n\t\t\tprint \"<br>The process has stopped. Please click on main menu to return to the dashboard.<br>\";\n\t\t\t$template = 'footer.tpl';\n\t\t\t$this->load_smarty(null,$template);\n\t\t}\n\t\tdie;\n\t}", "public function message()\n {\n return 'La moneda que intenta usar no es válida.';\n }", "public function setError($msg)\n {\n array_push($this->errors, $msg);\n }", "function ErrorMsg()\n\t{\n\t\t\treturn '';\n\t}", "function errorMailExiste(){\n\t\t$content='\n\t\t\t<div><h3>'.htmlspecialchars($this->pi_getLL(\"txt_error_mail\")).'<br/></h3><hr/></div>';\n\t\t$content .=$this->getFormulaireVide();\n\t\treturn $content;\n\t}", "public function message()\n {\n return \"L'heure de rendez vous est deja prise\";\n }", "public function message()\n {\n return \"The you cannot be add more than {$this->max} :attribute\";\n }", "public function error() {\n\t\tnonce_generate();\n\t\t$this->title = !empty($_SESSION['title']) ? $_SESSION['title'] : 'Error';\n\t\tif (!empty($_SESSION['data'])) {\n\t\t\t$data = $_SESSION['data'];\n\t\t} else {\n\t\t\t$data = array(\n\t\t\t\t'error' => 'An unknown error ocurred.',\n\t\t\t\t'link' => ''\n\t\t\t);\n\t\t}\n\t\t$this->content = $this->View->getHtml('content-error', $data, $this->title);\n\t}", "public function display_error($msg){\n \n }", "function NouveauMessage($de,$a,$msg,$heure){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$date = date('Y-m-d');\r\n\t\t$heure = date('H:i:s');\r\n\t\t$requete = \"INSERT INTO messages VALUES(NULL,'$de','$a','$msg','$date','$heure') \";\r\n\t\t$ligne= mysqli_query($conn, $requete);\r\n\t\tmysqli_close($conn);\r\n\t\t}", "function ufclas_matlab_admin_notice_error(){\n\t?>\n <div class=\"notice notice-error\">\n <p><?php _e( 'There was an error importing. Please try again.', 'ufclas-matlab' ); ?></p>\n </div>\n <?php\n}", "public function addMessage(string $message): void\n {\n $this->errorMessages[] = $message;\n }", "function fail()\n {\n $message = null;\n $message = \"Đăng ký tài khoản mới không thành công !. <br />\";\n $this->view->load('frontend/user/register_fail', [\n 'message' => $message\n ]);\n }", "public function setMsgError($error) {\r\n $this->msg_error = $error;\r\n }", "protected function creaFeedbackUtente(&$msg, $vd, $okMsg) {\n\n\n //se l'array dei messaggi non è voto quindi c'è qualche errore\n if (!empty($msg)) {\n\n $error = \"Si sono verificati i seguenti errori: <br>\";\n\n foreach ($msg as $m) {\n $error = $error . '- ' . $m . \"<br><br>\";\n }\n\n // imposta il messaggio di errore\n $vd->setMessaggioErrore($error);\n\n } \n // altrimenti non ci sono errori quindi mostro il messaggio \n // di conferma passato alla funzione\n else{\n \n $vd->setMessaggioConferma($okMsg);\n } \n }", "public function add_error($where, $msg){\r\n\r\n\t\t$this->log_error($where, $msg);\r\n\r\n\t\t$this->errors[] = $msg;\r\n\r\n\t\t$msg_array = array(\r\n\t\t\t\t'type' => 'error',\r\n\t\t\t\t'class' => $this::ERR_MSG_CLASS,\r\n\t\t\t\t'text' => $msg\r\n\t\t);\r\n\r\n\t\t$this->all_messages[] = $msg_array;\r\n\t}", "function error($string_erro=\"\") {\r\n\t\t//----- caso ocorra erro, envia mensagem\r\n\t\tif (@mysql_errno($this->connect_id)!=0) {\r\n\t\t\t@mail(SIS_EMAIL_RESPONSAVEL,\"Erro \" . date(\"d-m-Y\"), mysql_errno($this->connect_id) . \" - \" . mysql_error($this->connect_id) . \" - \" . $string_erro);\r\n\t\t}\r\n\t\treturn @mysql_errno($this->connect_id);\r\n\t}", "function my_error($e = '') {\t\t\n\t\t$msg = $this->error->get_error_message($e);\t\t\n\t\tif ($msg == null) {\n\t\t\treturn __(\"Unknown error occured, please contact the administrator.\", $this->plugin_domain);\n\t\t}\n\t\treturn $msg;\n\t}", "public static function customErrorMsg()\n {\n echo \"\\n<p>An error occured, The error has been reported.</p>\";\n exit();\n }", "function showError(){\n\t\techo json_encode(array(\n\t\t\t\"alert\" => \"error\",\n\t\t\t\"title\" => \"Failed to Create!\",\n\t\t\t\"message\" => \"Course Creation has been Failed\"\n\t\t));\n\t}", "public function message()\n {\n return trans('validation.unique_items');\n }", "public function addMessage($message='',$type=self::MSG_SUCCESS,$field=''){\n $type = strtolower($type);\n if(is_object($message)){\n if(is_subclass_of($message, 'CModel')){\n if($message->hasErrors()){\n $type = self::MSG_ERROR;\n if(!is_array($this->messages[$type])){\n $this->messages[$type] = array();\n }\n foreach($message->getErrors() as $key=>$error){\n $this->messages[$type][] = array('message'=>$error[0],'field'=>$key);\n }\n }\n }else if(is_subclass_of($message, 'Exception')){\n $type = self::MSG_ERROR;\n if(!is_array($this->messages[$type])){\n $this->messages[$type] = array();\n }\n $this->messages[$type][] = array('message'=>$message->getMessage(),'field'=>$key);\n }\n }else if($message != ''){\n if(!is_array($this->messages[$type])){\n $this->messages[$type] = array();\n }\n $this->messages[$type][] = array('message'=>$message,'field'=>$field);\n }\n }", "public function setErrorMessage($e){\n //checks if error message is cause due to invalid characters\n if($e -> getMessage() == EnumStatus::$InvalidCharactersError){\n //if so those are removed.\n $this -> saveDisplayName = strip_tags($this -> saveDisplayName);\n $this -> saveUserName = strip_tags($this -> saveUserName);\n }\n $this -> message = $e -> getMessage();\n }", "function enregistre_message($sujet, $message, $login_src, $login_dest, $date_visibilite=\"\", $in_reply_to=-1) {\n\tglobal $mysqli;\n\t$retour=\"\";\n\n\t$date_courante=strftime(\"%Y-%m-%d %H:%M:%S\");\n\tif(($date_visibilite==\"\")||($date_visibilite<$date_courante)) {\n\t\t$date_visibilite=$date_courante;\n\t}\n\n\t$sql=\"INSERT INTO messagerie SET sujet='\".$mysqli->real_escape_string($sujet).\"',\n\t\t\t\t\t\t\t\t\tmessage='\".$mysqli->real_escape_string($message).\"',\n\t\t\t\t\t\t\t\t\tlogin_src='\".$login_src.\"',\n\t\t\t\t\t\t\t\t\tlogin_dest='\".$login_dest.\"',\n\t\t\t\t\t\t\t\t\tin_reply_to='\".$in_reply_to.\"',\n\t\t\t\t\t\t\t\t\tdate_msg='\".$date_courante.\"',\n\t\t\t\t\t\t\t\t\tdate_visibilite='\".$date_visibilite.\"';\";\n\t//echo \"$sql<br />\";\n\t$res=mysqli_query($mysqli, $sql);\n\tif($res) {\n\t\t$retour = $mysqli->insert_id;\n\t}\n\treturn $retour;\n}", "public function addError($field_id, $message)\n {\n if ($field_id) {\n $this->errors[$field_id] = $message;\n } else {\n $this->errors[] = $message;\n }\n }" ]
[ "0.7830624", "0.69546914", "0.69157594", "0.6907746", "0.68699944", "0.68268734", "0.6799746", "0.6670398", "0.6580838", "0.6571912", "0.65323836", "0.6512883", "0.64839035", "0.6445379", "0.6390217", "0.6367465", "0.63530517", "0.6349271", "0.6340824", "0.63406456", "0.6339406", "0.63273495", "0.63251317", "0.6317835", "0.6279293", "0.62732464", "0.6273195", "0.6262541", "0.6258404", "0.62461376", "0.6245615", "0.62416035", "0.6234754", "0.6200134", "0.6197853", "0.61869234", "0.6177308", "0.61710316", "0.6158748", "0.6157744", "0.6153884", "0.61508703", "0.6149691", "0.61326206", "0.6131887", "0.61233026", "0.61145294", "0.61131406", "0.6112091", "0.61103517", "0.61089635", "0.61080074", "0.6102974", "0.61001617", "0.6097452", "0.60972047", "0.60940796", "0.609039", "0.60816824", "0.60613084", "0.60531217", "0.60439986", "0.603705", "0.60191494", "0.6010483", "0.6010014", "0.60089225", "0.60065013", "0.6000801", "0.59992397", "0.5998519", "0.5987736", "0.59834933", "0.59834933", "0.59807134", "0.59773254", "0.5969749", "0.59666723", "0.59548044", "0.595442", "0.5952677", "0.5935538", "0.59353906", "0.5932275", "0.59299165", "0.5924399", "0.591042", "0.5910046", "0.58983064", "0.58939", "0.5892901", "0.5890422", "0.5886668", "0.58843946", "0.58757955", "0.58730966", "0.5871935", "0.58661383", "0.5865879", "0.58623487" ]
0.75463283
1
Fonction retournant la liste des erreurs relevees lors de l'operation verifData.
function getErrorData($format = 0) { if ($format == 1) { // Formatage du tableau $res = array(); foreach ($this->errorData as $value) { $val = htmlentities($value["valeur"]); switch ($value["code"]) { case 1: // traduction : conserver les %1$s intacts $res[] = sprintf(_('le champ %1$s n\'est pas numerique. Valeur saisie : %2$s'), $value["colonne"], $val); break; case 2: // traduction : conserver les %1$s intacts $res[] = sprintf(_('Le champ %1$s est trop grand. Longueur maximale autorisée : %2$s. Valeur saisie : %3$s (%4$s caracteres)'), $value["colonne"], $value["demande"], $val, strlen($value["valeur"])); break; case 3: // traduction : conserver les %1$s intacts $res[] = sprintf(_('Le contenu du champ %1$s ne correspond pas au format attendu. Masque autorisé : %2$s. Valeur saisie : %3$s'), $value["colonne"], $value["demande"], $val); break; case 4: // traduction : conserver %s intact $res[] = sprintf(_('Le champ %s est obligatoire, mais n\'a pas été renseigné.'), $value["colonne"]); break; case 0: default: $res[] = $value["message"]; break; } } } else { $res = $this->errorData; /* * Reinitialisation des erreurs */ } $this->resetErrorData(); return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function liste() {\n\t\t$this->_ctrlLivre = new ControleurLivre();\n\n\t\t// modifie livre\n\t\tif(isset($_SESSION['error_livre_modifie'])) unset($_SESSION['error_livre_modifie']);\n\t\tif(isset($_POST['modifie_livre'])){\n\t\t\t\t$id = Utils::getPost('id_livre_m');\n\t\t\t\t$titre = Utils::getPost('nom_livre_m');\n\t\t\t\t$annee = Utils::getPost('annee_livre_m');\n\t\t\t\t$auteur = Utils::getPost('auteur_livre_m');\n\t\t\t\t$resume = Utils::getPost('resume_livre_m');\n\t\t\t\tif ($id && $titre && $annee && $auteur && $resume) {\n\t\t\t\t\t$id = Utils::filtreForte($id);\n\t\t\t\t\t$annee = Utils::filtreForte($annee);\n\t\t\t\t\t$annee = intval($annee);\n\t\t\t\t\t$titre = Utils::filtreForte($titre);\n\t\t\t\t\t$auteur = Utils::filtreForte($auteur);\n\t\t\t\t\t$resume = Utils::filtreForte($resume);\n\t\t\t\t\t\tif (strlen($annee) > 2 && strlen($titre) > 2 && strlen($resume) > 2) {\n\t\t\t\t\t\t\t$this->_ctrlLivre->modifieLivre($id, $annee, $titre, $auteur, $resume);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_livre_modifie'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=mlivre&id=\".$id);\n\t\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t\t}\n\t\t\t}\n\n\t\t// cree livre\n\t\tif(isset($_SESSION['error_livre_cree'])) unset($_SESSION['error_livre_cree']);\n\t\tif(isset($_POST['cree_livre'])){\n\t\t\t\t$titre = Utils::getPost('nom_livre');\n\t\t\t\t$annee = Utils::getPost('annee_livre');\n\t\t\t\t$auteur = Utils::getPost('auteur_livre');\n\t\t\t\t$resume = Utils::getPost('resume_livre');\n\t\t\t\tif ($titre && $annee && $auteur && $resume) {\n\t\t\t\t\t$annee = Utils::filtreForte($annee);\n\t\t\t\t\t$annee = intval($annee);\n\t\t\t\t\t$titre = Utils::filtreForte($titre);\n\t\t\t\t\t$auteur = Utils::filtreForte($auteur);\n\t\t\t\t\t$resume = Utils::filtreForte($resume);\n\t\t\t\t\t\tif (strlen($annee) > 2 && strlen($titre) > 2 && strlen($resume) > 2) {\n\t\t\t\t\t\t\t$this->_ctrlLivre->creeLivre($annee, $titre, $auteur, $resume);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_livre_cree'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=ajoutuser\");\n\t\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t$filtreArray = ['titre', 'annee', 'nom_auteur'];\n\t\t$ordreArray = ['ASC', 'DESC'];\n\t\t\tif(Utils::getGet('filtre')&& Utils::getGet('ordre')) {\n\t\t\t\t\t\t\t$filtre = Utils::getGet('filtre');\n\t\t\t\t\t\t\t$ordre = Utils::getGet('ordre');\n\t\t\t\t\t\t\tif (!$filtre || !in_array($filtre, $filtreArray)) { \n\t\t\t\t\t\t\t\tthrow new Exception('Tri invalide !!!'); }\n\t\t\t\t\t\t\t\telseif (!$ordre || !in_array($ordre, $ordreArray)) { \n\t\t\t\t\t\t\t\t\tthrow new Exception('Ordre invalide !!!'); } \n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t$this->_ctrlLivre->livreListe($filtre,$ordre); \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { $this->_ctrlLivre->livreListe(); }\n\t}", "function obtenerListaErrores()\n {\n return $this->_errores;\n }", "public function getErrosArray(){\n\t\treturn $this->erros;\n\t}", "function deleteDataInfo()\n {\n $formPost=array();\n $formPost[deleted]=1;\n \n foreach($this->piVars['selectionList'] as $idVal)\n {\n $GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->tableName,'uid='.$idVal,$formPost);\n }\n return $this->showListings();\n }", "public function listaDelitos(){\n\t $ofen=0;\n\t $indi=0;\n\t $arreglo = array();\n\n if (count($this->getOfeindis())>0){\n $ldelitos= Load::model('ofeindis')->find(\"ordenes_id = \".$this->id,\"order: indiciados_id,ofendidos_id,delitos_id\");\n }\n\n foreach ($ldelitos as $key) { // aqui se escoge a los imputados y victimas que no se repiten\n if($key->ofendidos_id !=$ofen || $key->indiciados_id !=$indi){\n array_push($arreglo,array('idel'=>$key->id,'ofendido'=>$key->getOfendidos(), 'indiciado'=>$key->getIndiciados()));\n }\n $ofen=$key->ofendidos_id;\n $indi=$key->indiciados_id;\n }\n\n for ($i=0; $i <count($arreglo) ; $i++) { // aqui voy metiendo un arreglo de delitos para cada uno\n $delitos=array();\n foreach ($ldelitos as $key) {\n if($key->ofendidos_id==$arreglo[$i]['ofendido']->id && $key->indiciados_id==$arreglo[$i]['indiciado']->id ){\n array_push($delitos,array('delito'=>$key->getDelitos(),'iddeli'=>$key->id,'principal'=>$key->esprincipal)); \n }\n } \n $arreglo[$i]['delitos']=$delitos; \n }\n return $arreglo;\n\n\t\n\t}", "function getListe( $num_commande=0, $liste_exclusion='', $tri='commande_erreur.date_creation', $ordre='ASC') {\n\t\t$commande = new commande();\n\t\t\n\t\tif ( $tri == \"\" ) $tri = \"commande.date_creation\";\n\t\tif ( $ordre == \"\" ) $ordre = \"ASC\";\n\t\t\n\t\t$requete = \"SELECT * FROM commande_erreur\";\n\t\t$requete .= \" INNER JOIN client ON client.num_commande = commande.num_commande\";\n\t\t$requete .= \" WHERE num_commande_erreur > 0\";\n\t\t\n\t\tif ( intval( $num_commande ) > 0 ) $requete .= \" AND commande.num_commande = '\" . $num_commande . \"'\";\n\t\tif ( $liste_exclusion != \"\" ) $requete .= \" AND commande.num_commande_erreur NOT IN (\" . $liste_exclusion . \")\";\n\t\tif ( $supprime != \"\" ) $requete .= \" AND supprime = \" . $supprime;\n\t\t$requete .= \" ORDER BY \" . $tri . \" \" . $ordre;\n\t\t//echo $requete . \"<br><br>\";\n\t\t$liste = mysql_query($requete);\n\t\t\n\t\t// Retourne un tableau\n\t\t$tableau_commande = array();\n\t\t\n\t\tif (mysql_num_rows($liste) != 0) {\n\t\t\t$i = 0;\n\t\t\twhile($data = mysql_fetch_assoc($liste)) {\n\t\t\t\t\n\t\t\t\t// Tentative de chargement\n\t\t\t\tif ( $commande->load( $data[\"num_commande_erreur\"] ) ) {\n\t\t\t\t\t//echo \"-->\" . $this->num_commande . \"<br>\";\n\t\t\t\t\t$tableau_commande[$i] = new commande();\n\t\t\t\t\t\n\t\t\t\t\t$tableau_commande[$i]->num_commande_erreur = $commande->num_commande_erreur;\n\t\t\t\t\t$tableau_commande[$i]->num_commande = $commande->num_commande;\n\t\t\t\t\t$tableau_commande[$i]->texte = $commande->texte;\n\t\t\t\t\t$tableau_commande[$i]->date_creation = $commande->date_creation;\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $tableau_commande;\n\t}", "private function listsDetails(){\n\t\t\t$idRemision = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\tif($idRemision!==''){\n\t\t\t\tif(($result = $this->model->listsDetails($idRemision))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function liste__() {\n\n // lecture des informations\n $this->db->select(\"rgl_id,rgl_reference,rgl_date,rgl_montant,rgl_type,vtr_type,rgl_cheque,rgl_banque,rgl_client,ctc_nom\",false);\n $this->db->join('v_types_reglements','vtr_id=rgl_type','left');\n $this->db->join('t_contacts','ctc_id=rgl_client','left');\n $this->db->where('rgl_inactif is null');\n $this->db->order_by(\"rgl_date desc\");\n $this->db->order_by(\"rgl_id desc\");\n $query = $this->db->get_compiled_select('t_reglements');\n //log_message('DEBUG', 'M_reglements '.$query);\n $q = $this->db->query($query);\n if ($q->num_rows() > 0) {\n $result = $q->result();\n foreach($result as $r) {\n $query = $this->db->where('ipu_reglement',$r->rgl_id)\n ->where('ipu_inactif is null')\n ->select('ipu_facture,fac_reference,ipu_avoir,avr_reference')\n ->join('t_factures','fac_id=ipu_facture','left')\n ->join('t_avoirs','avr_id=ipu_avoir','left')\n ->get_compiled_select('t_imputations');\n //log_message('DEBUG', 'M_reglements '.$query);\n $q = $this->db->query($query);\n $pieces = '';\n $sep = '';\n foreach ($q->result() as $p) {\n $pieces .= $sep;\n if ($p->fac_reference != '') {\n $pieces .= anchor_popup('factures/detail2/'.$p->ipu_facture,$p->fac_reference);\n }\n else if ($p->avr_reference != '') {\n $pieces .= anchor_popup('avoirs/detail2/'.$p->ipu_avoir,$p->avr_reference);\n }\n $sep = '<br />';\n }\n $r->pieces = $pieces;\n if ( $pieces!='' )\n log_message('DEBUG', 'M_reglements ipu_reglement:'.$r->rgl_id.' pieces:'.$pieces);\n }\n return $result;\n }\n else {\n return array();\n }\n }", "public function listeDesEmprunts()\n\t\t{\n\t\t$liste = '';\n\t\tforeach ($this->lesEmprunts as $unEmprunt)\n\t\t\t{\t$unSupport=$unEmprunt->getLeSupport();\n\t\t\t\t$leClient=$unEmprunt->getLeClient();\n\t\t\t $liste = $liste.'Emprunt N° : \"'.$unEmprunt->getIdEmprunt().' -> Support : '.$unSupport->getIdSupport().' - '.$unSupport->getTitreSupport().' -> Client : '.$leClient->getNomClient().' ->Date Emprunt : '.$unEmprunt->getDateEmprunt().'><br>';\n\t\t\t}\n\t\treturn $liste;\n\t\t}", "function afficherRendezvouss(){\n\t\t$sql=\"SElECT * From rendezvous\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function getChangedEntries();", "function retrait_par_lot ($DATA, $login, $id_gui, $data_virement) {\n /*\n IN : $DATA = array de données concernant chaque dépôt\n \"date\" => Date du dépôt\n \"id_cpte\" => ID compte du client (cfr ad_cpt)\n \"mnt\" => Montant du dépôt\n \"num_recu\" => Numéro de reçu\n \"traite\" => flag indiquant s'il faut ou non traiter la ligne\n $id_gui = ID dui guichet sur lequel s'est effectué le dépôt par lot (cfr ad_gui)\n $login = Login de l'utilisateur effectuant le dépôt par lot (cfr ad_log)\n OUT: Objet ErrorObj avec en paramètre un tableau reprenant toutes les opérations effectuées avec les id_his associés\n */\n\n global $dbHandler;\n\n $db = $dbHandler->openConnection();\n\n $retour = array(); // Le tableau contenant les infos sur les traitements effectués\n\n for ($i=1; $i <= $data_virement['nb_ope_count']; ++$i)\n if ($DATA[$i]['traite']) {\n $myErr = traite_retrait($DATA[$i], $id_gui, $login, $data_virement);\n if ($myErr->errCode != NO_ERR) {\n $dbHandler->closeConnection(false);\n return $myErr;\n } else {\n array_push($retour, $myErr->param);\n }\n }\n\n $dbHandler->closeConnection(true);\n return new ErrorObj(NO_ERR, $retour);\n}", "function rec_empresa_list(){\n\t\t}", "public function deletedRecruitersList() {\n\t\tif(Auth::user()->can('manage_recycle_bin_recruiters')) {\n\t\t\t$deletedRecruiters = Recruiter::onlyTrashed()->orderBy('email')->get();\n\t\t\treturn view('recruiters/deleted_recruiters_list', ['deletedRecruiters' => $deletedRecruiters]);\n\t\t}\n\t\telse {\n\t\t\treturn redirect()->route('dashboard')->with('warning', 'You do not have permission for this action!');\n\t\t}\n\t}", "private function getFailedList()\n\t{\n\t\treturn $this->failed_list;\n\t}", "private function getRemision(){\n\t\t\t$idRemision = $this->validateNumber(isset($_GET['idRemision'])?$_GET['idRemision']:NULL);\n\t\t\tif($idRemision!==''){\n\t\t\t\tif(($result = $this->model->lists(-1,$idRemision))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function GetAllNoneSeenHistorique() {\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n if (isset($_REQUEST['data'])) {\n $idSociete = $_REQUEST['data'][\"idSociete\"];\n // Input validations\n if (!empty($idSociete)) {\n try {\n $sql = $this->db->prepare(\"SELECT h.*,u.nom, u.prenom, u.login, u.photo FROM historique h INNER JOIN user u ON h.idUser = u.idUser AND h.idSociete = :idSociete AND h.vue = 0 order by h.dateAction DESC\");\n $sql->bindParam('idSociete', $idSociete, PDO::PARAM_INT);\n $sql->execute();\n\n if ($sql->rowCount() > 0) {\n $result = array();\n while ($rlt = $sql->fetchAll()) {\n $result[] = $rlt;\n }\n\n // If success everythig is good send header as \"OK\" and return list of users in JSON format\n $this->response($this->json($result[0]), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n } catch (Exception $ex) {\n $this->response('', $ex->getMessage());\n }\n }\n }\n }", "private function iniciarRecolectarData()\r\n\t\t{\r\n\t\t\tself::findPagoDetalleActividadEconomica();\r\n\t\t\tself::findPagoDetalleInmuebleUrbano();\r\n\t\t\tself::findPagoDetalleVehiculo();\r\n\t\t\tself::findPagoDetalleAseo();\r\n\t\t\tself::findPagoDetallePropaganda();\r\n\t\t\tself::findPagoDetalleEspectaculo();\r\n\t\t\tself::findPagoDetalleApuesta();\r\n\t\t\tself::findPagoDetalleVario();\r\n\t\t\tself::findPagoDetalleMontoNegativo();\r\n\t\t\tself::ajustarDataReporte();\r\n\t\t}", "public function iniciarReporteDetalle()\r\n\t\t{\r\n\t\t\t$rangoValido = New RangoFechaValido($this->_fecha_desde, $this->_fecha_hasta);\r\n\t\t\tif ( $rangoValido->rangoValido() ) {\r\n\t\t\t\tif ( self::iniciarRecolectarData() ) {\r\n\t\t\t\t\t// Realizo un select completo con la informacion de la recoleccion de los datos.\r\n\t\t\t\t\t//return $this->_data;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself::setError(Yii::t('backend', 'Error al intentar recolectar la data para el reporte'));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tself::setError(Yii::t('backend', 'Rango de fecha no validos'));\r\n\t\t\t}\r\n\t\t}", "public function VerDetallesVentas()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM detalleventas LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria WHERE detalleventas.codventa = ?\";\t\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET[\"codventa\"])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\n\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[]=$row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}", "public function getErors()\n {\n return $this->erors;\n }", "function spiplistes_listes_auteurs_elligibles ($id_liste, $statut_liste = '', $faire = '') {\n\t$nb_auteurs = 0;\n\t$auteurs_array = array();\n\tif($lister_moderateurs = ($faire == 'moderer')) {\n\t\t// recupere la liste des moderateurs\n\t\t$ids_already = spiplistes_mod_listes_get_id_auteur($id_liste);\n\t\t$ids_already = (isset($ids_already[$id_liste]) ? $ids_already[$id_liste] : array());\n\t\t$sql_where[] = 'statut='.sql_quote('0minirezo');\n\t}\n\telse {\n\t\t// recupere la liste des abonnes\n\t\t$ids_already = spiplistes_listes_liste_abo_ids($id_liste);\n\t\t// prepare la liste des non-abonnes elligibles\n\t\t$sql_where = array(\"email <> ''\"); // email obligatoire !\n\t\t// si liste privee, ne prend que l'equipe de redacs\n\t\tif($statut_liste == _SPIPLISTES_LIST_PRIVATE) {\n\t\t\t$sql_where[] = \"(statut=\".sql_quote('0minirezo').\" OR statut=\".sql_quote('1comite').\")\";\n\t\t}\n\t}\n\t$sql_from = array(\"spip_auteurs\");\n\t// demande la liste des elligibles\n\t$sql_result = sql_select(\"nom,id_auteur,statut\", $sql_from, $sql_where, '', array('statut','nom'));\n\tif(sql_count($sql_result)) {\n\t\twhile($row = sql_fetch($sql_result)) {\n\t\t\t// ne pas prendre ceux deja abonnes\n\t\t\tif(in_array($row['id_auteur'], $ids_already)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(!isset($auteurs_array[$row['statut']])) {\n\t\t\t\t$auteurs_array[$row['statut']] = array();\n\t\t\t}\n\t\t\t$auteurs_array[$row['statut']][$row['id_auteur']] = $row['nom'];\n\t\t\t$nb_auteurs++;\n\t\t}\n\t}\n\treturn(array($auteurs_array, $nb_auteurs));\n}", "public function getOldFileOffenders()\n\t{\n\t $this->load->model('cleanup','',FALSE);\n\t $this->load->model('configuration');\n\t $dbList = $this->configuration->getDBList();\n\t foreach($dbList->result() as $db) {\n\t \t//if($db == \"som\") {\n\t \techo \"Starting Old File Detection For: \".$db->friendlyName;\n\t \techo \"<br />\";\n\t \t$this->cleanup->getOldFiles($db->dbGroup,$db->fullpath,$db->fsInodeNumber,$db->friendlyName);\n\t \techo \"<hr /><br />\";\n\t //}\n\t }\n\t //$this->cleanup->sendNotices(\"oldfile\");\n\t}", "public function afficherAll()\n {\n }", "public function listidAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d=new AlbumTable($this->dbAdapter);\n\n $d->modGeneral(\"delete from a_empleados_rete_d where idEret=\".$id); \n $d->modGeneral(\"delete from a_empleados_rete where id=\".$id); \n //$u=new Retefuente($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n //$u->delRegistro($id);\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n } \n }", "function desList(){\n\t$sql = 'SELECT * FROM votos';\n\t$resultado = mysql_query($sql);\n\t\n\twhile($row = mysql_fetch_array($resultado)){\n\t\toculta( $row['cancion'] );\n \t}\n}", "private function listsDetails(){\n\t\t\t$idRecepcion = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\tif($idRecepcion!==''){\n\t\t\t\tif(($result = $this->model->listsDetails($idRecepcion))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('recepcionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "protected function rechercherUnVelo()\n\t{\n\t\t$lesVelos = null;\n\n\t\t\t/** si valeur, on lance la recherche */\n\t\tif(isset($_GET['valeur']) and $_GET['valeur'] !== '')\n\t\t\t$lesVelos = $this->odbVelo->searchVelos($_GET['valeur']);\n\t\telse\n\t\t\t$lesVelos = $this->odbVelo->getNouveauxVelos();\n\n\t\t$_SESSION['tampon']['html']['title'] = 'Rechercher Un v&eacute;lo';\n\t\t$_SESSION['tampon']['menu'][1]['current'] = 'Rechercher v&eacute;lo';\n\n\t\t\t// si pas de velo, erreur\n\t\tif (empty($lesVelos))\n\t\t\t$_SESSION['tampon']['error'][] = 'Pas de v&eacute;lo...';\n\n\t\t\t/**\n\t\t\t * Load des vues\n\t\t\t */\n\t\tview('htmlHeader');\n\t\tview('contentMenu');\n\t\tview('contentSearchVelo');\n\t\tview('contentAllVelo', array('lesVelos'=>$lesVelos));\n\t\tview('htmlFooter');\n\t}", "public function rifaiVetrine()\n\t\t{\n\t\t\tif( ($listaVetrine = array_keys($this->vetrine)) )\n\t\t\t\tforeach ($listaVetrine as $nomeVetrina)\n\t\t\t\t\tunset($this->vetrine[$nomeVetrina]['lastMod']);\n\t\t\t\n\t\t\t$this->salvaStatoInsiemeVetrine();\n\t\t}", "public function UpdateAllHistoriqueToViewed() {\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n if (isset($_REQUEST['data'])) {\n $idSociete = $_REQUEST['data'][\"idSociete\"];\n // Input validations\n if (!empty($idSociete)) {\n try {\n $sql = $this->db->prepare(\"UPDATE historique SET vue = 1 WHERE idSociete = :idSociete\");\n $sql->bindParam('idSociete', $idSociete, PDO::PARAM_INT);\n $sql->execute();\n\n if ($sql) {\n $success = array('status' => \"Success\", \"msg\" => \"Successfully updated\");\n $this->response($this->json($success), 200);\n }\n \n } catch (Exception $ex) {\n $this->response('', $ex->getMessage());\n }\n }\n }\n }", "public function getRemovedObjects() {}", "public function liste() {\n if(isset($this->post->liste)){\n $entity = new Abonnement();\n foreach ($this->post->liste as $id) {\n $entity->setId($id);\n $this->em->delete($entity);\n }\n $this->handleStatus('Abonnement(s) ' . implode(',', $this->post->liste) . ' supprimé(s)');\n }\n // Charger la vue liste\n $this->loadView('liste', 'content');\n // Lire les données à partir de la bd et formater\n $arr = $this->em->selectAll('client');\n $arrClient = $this->em->getRefined($arr);\n $arr = $this->em->selectAll('compteur');\n $arrCompteur = $this->em->getRefined($arr);\n $liste = $this->em->selectAll('abonnement');\n $html = '';\n foreach ($liste as $key => $entity) {\n $client = $arrClient[$entity->getIdClient()];\n $compteur = $arrCompteur[$entity->getIdCompteur()];\n $id = $entity->getId();\n $html .= '<tr>';\n $html .= '<td>' . $id . '</td>';\n //$html .= '<td> <a href=\"abonnements/detail/' . $id . '\" title=\"Détails\">' . $entity->getNumero() . '</a> </td>';\n $html .= '<td>' . $entity->getNumero() . '</td>';\n $html .= '<td><a href=\"clients/detail/' . $client->id . '\">' . $client->nomFamille . '</a></td>';\n $html .= '<td><a href=\"compteurs/detail/' . $compteur->id . '\">' . $compteur->numero . '</a></td>';\n $html .= '<td><a href=\"abonnements/modifier/' . $id . '\"> Modifier </a></td>';\n $html .= '<td><input type=\"checkbox\" name=\"liste[]\" value=\"' . $id . '\"></td>';\n //$html .= '<td><form type=\"POST\" action=\"compteurs/liste\"><button type=\"submit\" name=\"id\" value=\"' . $id . '\">Supprimer</button></form></td>';\n $html .= '</tr>';\n }\n // Ajouter les compteurs à la vue\n $this->loadHtml($html, 'list');\n }", "public function findPagoDetalleVehiculo()\r\n\t\t{\r\n\t\t\t$codigoPresupuestario = self::getCodigoPresupuestarioVehiculo();\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos mayores a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoMayorCero($codigoPresupuestario, [3]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Vehiculo periodo mayores a cero'));\r\n\t\t\t}\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos iguales a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoIgualCero($codigoPresupuestario, [3]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Vehiculo periodo iguales a cero'));\r\n\t\t\t}\r\n\t\t}", "public function getAllRubrics() {\n $result = DatabaseConnector::executeQuery(\"SELECT * FROM rubriek WHERE verwijderd = 0\");\n return $result;\n }", "function nbErreurs()\r\n{\r\n if (!isset($_REQUEST['erreurs'])) {\r\n return 0;\r\n } else {\r\n return count($_REQUEST['erreurs']);\r\n }\r\n/**\r\n * \\brief Ajoute le libellé d'une information au tableau des informations\r\n *\r\n * \\param String $msg Libellé de l'information\r\n *\r\n * \\return null\r\n */\r\n}", "public function liste() {\n // Charger la vue liste compteur\n $this->loadView('liste', 'content');\n // Lire les compteurs à partir de la bd et formater\n //$reglements = $this->em->selectAll('reglement');\n //$reglements = $this->em->getRefined($reglements);\n $liste = $this->em->selectAll('facture');\n $html = '';\n foreach ($liste as $key => $entity) {\n $state = 'impayée';\n if ($entity->getPaye()) {\n $state = 'payée';\n }\n $consommation = $this->em->selectById('consommation', $entity->getId());\n $compteur = $this->em->selectById('compteur', $consommation->getIdCompteur());\n $html .= '<tr>';\n $html .= '<td>' . $entity->getId() . '</td>';\n $html .= '<td><a href=\"reglements/facture/' . $entity->getNumero() . '\">' . $entity->getNumero() . '</a></td>';\n $html .= '<td>' . $compteur->getNumero() . '</td>';\n $html .= '<td>' . $consommation->getQuantiteChiffre() . ' litres</td>';\n $html .= '<td>' . $entity->getMontant() . ' FCFA</td>';\n $html .= '<td>' . $state . '</td>';\n $html .= '</tr>';\n }\n // Ajouter les compteurs à la vue\n $this->loadHtml($html, 'list');\n }", "function fct_liste_fleurs ($mescriteres) {\nglobal $connexion, $poids_criteres, $gamme;\n\t$sql = \"SELECT * FROM fiche_\".$gamme.\" WHERE visible_index = 1 \";\n $result = mysql_query($sql, $connexion);\n\tif (!$result) {\n\t\t$liste_fleurs = \"<p><strong>La liste des fleurs n'est pas disponible pour le moment ; veuillez rÚessayer ultÚrieurement.</strong></p>\";\n\t} else {\n\t\t$nbTrouve = mysql_num_rows($result);\n\t\tif ($nbTrouve <= 0) {\n\t\t\t$liste_fleurs = \"<p><strong>La liste des fleurs n'est pas disponible pour le moment ; veuillez rÚessayer ultÚrieurement.</strong></p>\";\n\t\t} else {\n\t\t\t$poids_toutes_fleurs = array();\n\t\t\t$infos_toutes_fleurs = array();\n\t\t\twhile ($unefleur = mysql_fetch_assoc($result)) {\n\t\t\t\t$poids_fleur = 0;\n\t\t\t\t$unefleur['debbug_poids'] = \"\";\n\t\t\t\t// calcul poids de chaque critere\n\t\t\t\tforeach ($poids_criteres as $libelle => $poids) {\n\t\t\t\t\t$refcritere = substr($libelle, 0, 3);\n\t\t\t\t\t$codecritere = $mescriteres[$refcritere]['code'];\n\t\t\t\t\tif ($codecritere >= 0) {\n\t\t\t\t\t\tswitch ($libelle) {\n\t\t\t\t\t\t\tcase \"fleur\":\n\t\t\t\t\t\t\t\t$valcritere = ($poids[$codecritere][$unefleur['kod_coul_fleurs']]) * 1.3;\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] = \"fle=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"feuille\":\n\t\t\t\t\t\t\t\t$valcritere = $poids[$codecritere][$unefleur['kod_feuille']];\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] .= \", feu=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"milieu\":\n\t\t\t\t\t\t\t\t$valcritere = $poids[$codecritere][$unefleur['kod_milieu']];\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] .= \", mil=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"altitude\":\n\t\t\t\t\t\t\t\t$valcritere = $poids[$codecritere][$unefleur['kod_alt']];\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] .= \", alt=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"port\":\n\t\t\t\t\t\t\t\t$valcritere = $poids[$codecritere][$unefleur['kod_port']];\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] .= \", por=\".$valcritere;\n\t\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\t// poids critere taille\n\t\t\t\t$codecritere = $mescriteres['tai']['code'];\n\t\t\t\t$poids_taille = fct_calcul_proximite_taille($unefleur['taillemin'], $unefleur['taillelmax'], $codecritere );\n\t\t\t\t$poids_fleur = $poids_fleur + $poids_taille;\n\t\t\t\t$unefleur['debbug_poids'] .= \", tai=\".floor($poids_taille);\n\t\t\t\t// poids critere invisible mois floraison\n\t\t\t\t$mois_observation = date(\"n\");\n\t\t\t\t$intervalle = $unefleur['kod_mois_flore2'] - $unefleur['kod_moisfolre1'];\n\t\t\t\t$poids_mois = 0;\n\t\t\t\tif ($intervalle > 0) {\n\t\t\t\t\t// mois observation comprise entre debut et fin de floraison\n\t\t\t\t\tif (($mois_observation >= $unefleur['kod_moisfolre1']) && ($mois_observation <= $unefleur['kod_mois_flore2'])) {\n\t\t\t\t\t\t$poids_mois = 3;\n\t\t\t\t\t} else { // mois observation = 1 mois precedent ou 1 mois suivant pÚriode de floraison\n\t\t\t\t\t\t$mois_suivant = fmod(($unefleur['kod_mois_flore2']+1), 12);\n\t\t\t\t\t\t$mois_precedent = fmod((12+$unefleur['kod_moisfolre1']-1), 12);\n\t\t\t\t\t\tif ($mois_precedent == 0) $mois_precedent = 12;\n\t\t\t\t\t\tif (($mois_observation == $mois_precedent) || ($mois_observation == $mois_suivant)) {\n\t\t\t\t\t\t\t$poids_mois = 2;\n\t\t\t\t\t\t} else { // mois observation = 2 mois precedent ou 2 mois suivant pÚriode de floraison\n\t\t\t\t\t\t\t$mois_suivant = fmod(($unefleur['kod_mois_flore2']+2), 12);\n\t\t\t\t\t\t\t$mois_precedent = fmod((12+$unefleur['kod_moisfolre1']-2), 12);\n\t\t\t\t\t\t\tif ($mois_precedent == 0) $mois_precedent = 12;\n\t\t\t\t\t\t\tif (($mois_observation == $mois_precedent) || ($mois_observation == $mois_suivant)) $poids_mois = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$poids_fleur = $poids_fleur + $poids_mois;\n\t\t\t\t$unefleur['debbug_poids'] .= \", mois=\".floor($poids_mois);\n\t\t\t\t// enregistre\n\t\t\t\t$poids_toutes_fleurs[$unefleur['numId']] = $poids_fleur;\n\t\t\t\t$infos_toutes_fleurs[$unefleur['numId']] = $unefleur;\n\t\t\t} // fin while\n\t\t\t// trie selon le poids le plus lourd\n\t\t\tarsort($poids_toutes_fleurs);\n\t\t\tif (count($poids_toutes_fleurs) > 30) $nbaffichage = 30;\n\t\t\telse $nbaffichage = count($poids_toutes_fleurs);\n\t\t\t$liste_fleurs = \"\";\n\t\t\t$liste_encours = \"\";\n\t\t\t$cpt = 0;\n\t\t\tforeach ($poids_toutes_fleurs as $ref => $poids) {\nif($poids==0)break;//on affiche pas les arbres sans rapport\n\t\t\t\t$infos_fleur_encours = $infos_toutes_fleurs[$ref];\n\t\t\t\t// recupere photo\n\t\t\t\t$sqlphoto = 'SELECT * FROM diapo_'.$gamme.' WHERE nomFic LIKE \"'.$infos_fleur_encours['racinenomfic'].'%\" and auteur ='.\"'feuille'\";\n\t\t\t\t$result = mysql_query($sqlphoto, $connexion);\n\t\t\t\t$photofleur = mysql_fetch_assoc($result);\n\t\t\t\t$lien_fiche = '<a href=\"fiche_'.$infos_fleur_encours['racinenomfic'].'.html\">';\n\t\t\t\t$liste_encours .= '<div class=\"unefleur\">'.\"\\n\";\n\t\t\t\t$liste_encours .= '<a href=\"fiche_'.$infos_fleur_encours['racinenomfic'].'.html\">';\n\t\t\t\t$liste_encours .= '<img src=\"phototheque/vignette_'.$gamme.'/'.$photofleur['nomFic'].'.jpg\" border=\"0\"><br />'.\"\\n\";\n\t\t\t\t$liste_encours .= $infos_fleur_encours['nc'].\"<br /> (\".$infos_fleur_encours['ns'].\")\".\"\\n\";\n\t\t\t\t$liste_encours .= '</a>';\n\t\t\t\t// pour activer le systeme de debbug des poids des criteres\n\t\t\t\t// if ($infos_fleur_encours['debbug_poids'] != \"\") $liste_encours .= '<br />----------<br />'.$infos_fleur_encours['debbug_poids'];\n\t\t\t\t$liste_encours .= '</div>'.\"\\n\";\n\t\t\t\t$cpt ++;\n\t\t\t\tif (fmod($cpt, 3) == 0) {\n\t\t\t\t\t$liste_fleurs .= '<div class=\"lignefleurs\">'.\"\\n\";\n\t\t\t\t\t$liste_fleurs .= $liste_encours;\n\t\t\t\t\t$liste_fleurs .= '</div>'.\"\\n\";\n\t\t\t\t\t$liste_encours = \"\";\n\t\t\t\t}\n\t\t\t\tif ($cpt >= $nbaffichage) break;\n\t\t\t}\n\t\t}\n\t}\nif( $liste_fleurs==\"\") $liste_fleurs = \"<div class='lignefleurs'> $liste_encours </div> \";\n \treturn $liste_fleurs;\n}", "function resetErrorList(){\n\t\t$this->_errorList = array();\n\t}", "protected function loeschen()\n\t{\n\t\t$db = new Datenbank();\n\t\treturn $db->loeschen(\" DELETE FROM rezepte_zutaten WHERE rezepte_nr = '$this->rezepte_nr'\");\n\t}", "function revisaNuevo($data2, $compra, $inve){\n foreach ($data2 as $min1) {\n $art=$min1->CVE_ART;\n $mov=$min1->NUM_MOV;\n $this->query=\"SELECT count(num_mov) as movimientos FROM MINVE06 WHERE CVE_ART = '$art' and num_mov < $mov \";\n $res=$this->EjecutaQuerySimple();\n $rowM=ibase_fetch_object($res);\n $movs=$rowM->MOVIMIENTOS;\n if($movs == 0){\n $this->query=\"UPDATE MINVE06 SET COSTO_PROM_INI = 0, COSTO_PROM_fin = 0 WHERE NUM_MOV = $mov\";\n $this->queryActualiza();\n }\n\n $this->query=\"SELECT first 1 * FROM MINVE06 WHERE REFER = '$compra' \n AND CVE_ART = '$inve' \n and costeado_ff is null \n ORDER BY NUM_MOV ASC \";\n $res=$this->EjecutaQuerySimple();\n while ($tsarray=ibase_fetch_object($res)){\n $data3[]=$tsarray;\n }\n }\n return $data3;\n }", "function getErrorList(){\n\t\treturn $this->_errorList;\n\t}", "public function loadReceptions($filtre_statut = -1)\n {\n $this->receptions = array();\n\n $sql = 'SELECT cd.rowid, cd.fk_product,';\n $sql.= ' sum(cfd.qty) as qty';\n $sql.= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch as cfd,';\n if ($filtre_statut >= 0) $sql.= ' '.MAIN_DB_PREFIX.'reception as e,';\n $sql.= ' '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd';\n $sql.= ' WHERE';\n if ($filtre_statut >= 0) $sql.= ' cfd.fk_reception = e.rowid AND';\n $sql.= ' cfd.fk_commandefourndet = cd.rowid';\n $sql.= ' AND cd.fk_commande =' .$this->id;\n if ($this->fk_product > 0) $sql.= ' AND cd.fk_product = '.$this->fk_product;\n if ($filtre_statut >= 0) $sql.=' AND e.fk_statut >= '.$filtre_statut;\n $sql.= ' GROUP BY cd.rowid, cd.fk_product';\n\n\n dol_syslog(get_class($this).\"::loadReceptions\", LOG_DEBUG);\n $result = $this->db->query($sql);\n if ($result)\n {\n $num = $this->db->num_rows($result);\n $i = 0;\n while ($i < $num)\n {\n $obj = $this->db->fetch_object($result);\n empty($this->receptions[$obj->rowid])?$this->receptions[$obj->rowid] = $obj->qty:$this->receptions[$obj->rowid] += $obj->qty;\n $i++;\n }\n $this->db->free();\n\n return $num;\n }\n else\n {\n $this->error=$this->db->lasterror();\n return -1;\n }\n }", "function traite_lot ($DATA, $login, $id_gui, $data_virement) {\n /*\n IN : $DATA = array de données concernant chaque dépôt\n \"date\" => Date du dépôt\n \"id_cpte\" => ID compte du client (cfr ad_cpt)\n \"mnt\" => Montant du dépôt\n \"num_recu\" => Numéro de reçu\n \"traite\" => flag indiquant s'il faut ou non traiter la ligne\n $id_gui = ID dui guichet sur lequel s'est effectué le dépôt par lot (cfr ad_gui)\n $login = Login de l'utilisateur effectuant le dépôt par lot (cfr ad_log)\n OUT: Objet ErrorObj avec en paramètre un tableau reprenant toutes les opérations effectuées avec les id_his associés\n */\n\n global $dbHandler;\n\n $db = $dbHandler->openConnection();\n\n $retour = array(); // Le tableau contenant les infos sur les traitements effectués\n\n for ($i=1; $i <= 40; ++$i)\n if ($DATA[$i]['traite']) {\n $myErr = traite_depot($DATA[$i], $id_gui, $login, $data_virement);\n if ($myErr->errCode != NO_ERR) {\n $dbHandler->closeConnection(false);\n return $myErr;\n } else {\n// array_push($retour, $myErr->param);\n $retour[\"transaction_data\"][$myErr->param[\"id_client\"]] = $myErr->param;\n $retour[\"comptable\"][$myErr->param[\"id_client\"]] = $myErr->datas[\"comptable\"];\n }\n }\n\n $dbHandler->closeConnection(true);\n return new ErrorObj(NO_ERR, $retour);\n}", "public function listdataSDMAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('SDM');\n }", "public function VerDetallesCreditos()\n{\n\tself::SetNames();\n\t$sql = \" select * FROM abonoscreditos INNER JOIN ventas ON abonoscreditos.codventa = ventas.codventa WHERE abonoscreditos.codventa = ?\";\t\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET[\"codventa\"])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN ABONOS PARA CR&Eacute;DITOS ACTUALMENTE</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function ver_item_historial_reclamo(){\n $data = compobarSesion();\n //datos del prospecto\n $data['segmento_prospecto'] = $this->uri->segment(3);\n //datos del proceso\n $data['segmento_prceso'] = $this->uri->segment(4);\n if (!$data['segmento_prospecto']) {\n //redirect('prospectos/prospectosList', 'refresh');\n } else {\n //alertas y notificaciones\n $data['notificaciones'] = $this->Notificaciones_model->listar_notificaciones($data['user_id']);\n $data['notificaciones_supervisor'] = $this->Notificaciones_model->listar_notificaciones_supervisor($data['rol']);\n $data['alertas'] = $this->Notificaciones_model->listar_alertas($data['user_id']);\n $data['alertas_supervisor'] = $this->Notificaciones_model->listar_alertas_supervisor($data['rol']);\n\n //datos a pasar a vista\n //pospecto\n $data['prospecto'] = $this->Prospecto_model->ListarProspecto($data['segmento_prospecto']);\n //proceso\n $data['proceso'] = $this->Proceso_model->ListarProceso($data['segmento_prceso']);\n\n }\n $data['title'] = 'Item Historial reclamo';\n echo $this->templates->render('item_historial_reclamos', $data);\n }", "public static function liste(){\n\t\t\t$sql=\"SELECT * from Genre\";\n\t\t\t$res=DB::get_instance()->prepare($sql);\n\t\t\t$res->execute();\n\t\t\t// gérer les erreurs éventuelles\n\t\t\tif($res->rowCount()==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$p= $res->fetchAll();\n\t\t\treturn $p;\n\t\t\t\n\t\t}", "public function recus($id=0,$liste=0) {\n $id = $this->session->id;\n\n // commandes globales\n $cmd_globales = array(\n );\n\n // toolbar\n $toolbar = '';\n\n // descripteur\n $descripteur = array(\n 'datasource' => 'messages/recus',\n 'detail' => array('messages/detail_recu','msg_id','msg_envoi'),\n 'champs' => array(\n array('msg_id','id',\"Identifiant\"),\n array('msg_envoi','datetime',\"Date d'envoi\"),\n array('msg_lecture','datetime',\"Date de lecture\"),\n array('utl_login','ref',\"Émetteur\",'utilisateurs','msg_emetteur','utl_login'),\n array('msg_amorce','text',\"Début du message\"),\n array('RowID','text',\"__DT_Row_ID\")\n ),\n 'en_avant' => array(\n array(\"msg_lecture == '0000-00-00 00:00:00'\",'font-weight:bold')\n ),\n 'filterable_columns' => $this->m_messages->liste_recus_filterable_columns()\n );\n\n $this->session->set_userdata('_url_retour',current_url());\n $scripts = array();\n $scripts[] = $this->load->view(\"templates/datatables-js\",\n array(\n 'id'=>$id,\n 'descripteur'=>$descripteur,\n 'toolbar'=>$toolbar,\n 'controleur' => 'messages',\n 'methode' => __FUNCTION__,\n ),true);\n\n // listes personnelles\n $vues = $this->m_vues->vues_ctrl('messages',$this->session->id);\n $data = array(\n 'title' => \"Liste des messages recus\",\n 'page' => \"templates/datatables\",\n 'menu' => \"Personnel|Messages reçus\",\n 'scripts' => $scripts,\n 'barre_action' => $this->barre_action[\"Liste_r\"],\n 'controleur' => 'messages',\n 'methode' => __FUNCTION__,\n 'values' => array(\n 'id' => $id,\n 'vues' => $vues,\n 'cmd_globales' => $cmd_globales,\n 'toolbar'=>$toolbar,\n 'descripteur' => $descripteur\n )\n );\n $layout=\"layouts/datatables\";\n $this->load->view($layout,$data);\n }", "function listarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_sel';\n\t\t$this->transaccion='VF_REFACOR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_venta', 'id_venta', 'int4');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_reenvio_factura','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_venta','int4');\n\t\t$this->captura('correo','varchar');\n\t\t$this->captura('correo_copia','varchar');\n\t\t$this->captura('observacion','text');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('estado_envio_correo','int4');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function findPagoDetalleEspectaculo()\r\n\t\t{\r\n\t\t\t$codigoPresupuestario = self::getCodigoPresupuestarioEspectaculoPublico();\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos iguales a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoIgualCero($codigoPresupuestario, [6]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Espectaculo Publico'));\r\n\t\t\t}\r\n\t\t}", "public function listaVentas(){\n\n $respuesta = Datos::mdlListaVentas(\"salidas\");\n $cont =0;\n\n foreach ($respuesta as $row => $item){\n \t$cont ++;\n echo '<tr>\n <td>'.$cont.'</td>\n <td>'.$item[\"noOperacion\"].'</td>\n <td>'.$item[\"cliente\"].'</td>\n <td>'.$item[\"codProducto\"].'</td>\n <td>'.$item[\"kg\"].'</td>\n <td>'.$item[\"origen\"].'</td>\n <td>'.$item[\"destino\"].'</td>\n <td>'.$item[\"precioVenta\"].'</td>\n <td>'.$item[\"costo\"].'</td>\n <td>'.$item[\"total\"].'</td>\n <td>'.$item[\"fecha\"].'</td>\n <td><a href=\"listaVentas.php?idBorrar='.$item[\"cons\"].'\"><button class=\"btn btn-danger\">Borrar</button></a></td>\n </tr>';\n //Boton Borrar\n //Boton Editar <td><a href=\"updtCompra.php?idEditar='.$item[\"cons\"].'\"><button class=\"btn btn-warning\">Editar</button></a></td>\n }\n\n }", "function AtividadesRecentesGeral($logs_descricao = \"\", $logs_id_referencia = 0,$usuarios_nome = \"\", $logs_data = \"\"){\n\n $conexao = new classeConexao();\n\n if($logs_descricao=='atualizou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-edit';\n $label = 'label-warning';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='completou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-check';\n $label = 'label-success';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='reativou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-arrow-up';\n $label = 'label-danger';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='pausou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-pause';\n $label = 'label-primary';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='aprovou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-check';\n $label = 'label-success';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='reprovou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-times';\n $label = 'label-danger';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='enviou para aprovação a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-mail-forward';\n $label = 'label-info';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='cancelou a aprovação da tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-times';\n $label = 'label-warning';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='criou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-star';\n $label = 'label-info';\n $url = 'editar/tarefa/';\n }\n\n //$exibeHTML = '<li><div class=\"col1\" style=\"width:98%;\"><div class=\"cont\"><div class=\"cont-col1\"><div class=\"label label-sm '.$label.'\"><i class=\"fa '.$imagem.'\"></i></div></div><div class=\"cont-col2\">';\n //$exibeHTML .= '<div class=\"desc\">O usuário <a href=\"\">'.$usuarios_nome.'</a> '.$logs_descricao.' <a href=\"'.$url.$logs_id_referencia.'\">'.$item.'</a></div></div></div></div><div class=\"col2\">'.'<div class=\"date\">'.DataBrasilSemHoras($logs_data).'</div></div></li>';\n\n //return $exibeHTML;\n\n echo '<li>';\n echo '<div class=\"col1\" style=\"width:98%;\">';\n echo '<div class=\"cont\">';\n echo '<div class=\"cont-col1\">';\n echo '<div class=\"label label-sm '.$label.'\">';\n echo '<i class=\"fa '.$img.'\"></i>';\n echo '</div>';\n echo '</div>';\n echo '<div class=\"cont-col2\">';\n\n\n\n echo '<div class=\"desc\">O usuário <a href=\"\">'.$usuarios_nome.'</a> '.$logs_descricao.' <a href=\"'.$url.$logs_id_referencia.'\">'.$item.'</a>';\n echo '</div>';\n echo '</div>';\n echo '</div>';\n echo '</div>';\n echo '<div class=\"col2\">';\n echo '<div class=\"date\">'.DataBrasilSemHoras($logs_data).'</div>';\n echo '</div>';\n echo '</li>';\n \n}", "private function verrouPoser(){\n\t\t$verrou['etat'] = '';\n\t\tself::verrouSupprimer();\n\t\tif($this->formulaire['cle'] != ''){\n\t\t\t$verrou = self::verrouRechercher();\n\t\t\tif(empty($verrou)){\n\t\t\t\t$verrou = self::verrouInserer();\n\t\t\t\t$verrou['etat'] = 'ok';\n\t\t\t}else{\n\t\t\t\t$verrou['etat'] = 'nok';\n\t\t\t\t$verrou['message'] = \"L'enregistrement \".$verrou['ad_ve_cle'].\" est actuellement verrouillé par \".$verrou['ad_ve_nom'].\" depuis le \".$verrou['ad_ve_date'].\".\\nLes modifications, enregistrement et suppression sont donc impossibles sur cet enregistrement.\";\n\t\t\t}//end if\n\t\t}//end if\n\t\treturn $verrou;\n\t}", "private function lists(){\n\t\t\t$constrain = '';\n\t\t\t$offset = $this->validateNumber(isset($_GET['offset'])?$_GET['offset']:NULL);\n\t\t\t$idRemision = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\t$constrains = isset($_POST['constrains'])?$_POST['constrains']:'1 = 1';\n\t\t\t\n\t\t\tif($constrains === '1 = 1'){\n\t\t\t\t$constrain = $constrains;\n\t\t\t}else{\n\t\t\t\t$tam = count($constrains);\n\t\t\t\tforeach ($constrains as $campo => $valor) {\n\t\t\t\t\tif(--$tam){\n\t\t\t\t\t\tif(is_numeric($valor)){\n\t\t\t\t\t\t\t$constrain.=$campo.' = '.$valor.' AND ';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$constrain.=$campo.' LIKE \"%'.$valor.'%\" AND ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(is_numeric($valor)){\n\t\t\t\t\t\t\t$constrain.=$campo.' = '.$valor;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$constrain.=$campo.' LIKE \"%'.$valor.'%\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($offset!==''){ \n\t\t\t\tif ($idRemision!=='') {\n\t\t\t\t\tif(($result = $this->model->listsDetails($idRemision))){\n\t\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html');\n\t\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->session['action']='list';\n\t\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionForm.html');\n\t\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if(($result = $this->model->lists($offset,-1,$constrain))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function empListWithMisNotifyEnale()\n\t{\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->condition = \"mis_notify = 1\";\n\t\t$criteria->select = \"id, name, ip_address, mac_address, hostname \";\n\t\t$Devices = Devices::model()->findAll($criteria);\t\t\n\t\treturn $Devices;\n\t}", "public function rechercher() \n {\n //sécurité\n $action = 'listAllFolder';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n $search = $this->request->getPostAttribute('search');\n $dossier = DossierManager::rechercherIdOrName($search);\n $prez = DossierHtml::toHtml($dossier);\n } else{ //pas ok\n $prez = HomeHtml::toHtml($error);\n }\n $this->response->setPart('contenu', $prez);\n }", "public function etatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Etat\");//type array\n\t}", "public function readAllInfo()\n {\n //recupération des données en post\n $data = $this->request->data;\n try\n {\n //selection d'une UE en foction de l'identifiant\n if (!empty($data['id_matiere'])) {\n $results = $this->model->read_all_info_id((int)$data['id_matiere']);\n\n if (empty($results)) {\n $this->_return('la matière demandée n\\'existe pas dans la base de donnée', false);\n }\n $this->_return('Informations sur la matière '.$results->nom_matiere.' ', true, $results);\n }\n //selection de toutes les UE d'enseignement\n $results = $this->model->read_all_info_matiere();\n if (empty($results)) {\n $this->_return('Vous n\\'avez pas encore de matière en base de données', false);\n }\n $this->_return('liste des matières disponibles dans la base de données', true, $results);\n }\n catch(Exception $e)\n {\n $this->_exception($e);\n }\n }", "public function listar()\n\t{\t\n\n\t\t//Se consiguen los valores desde POST y se Sanitizan\n\t\t$vin = SanitizadorDatos::validaNumero($_POST['vin']);\n\t\t\n\t\t$result = $this->modelo->listar($vin);\n\n\t\t//Revisa si se puede listar la ubicacion\n\t\tif(isset($result))\n\t\t{\t\n\t\t\t$diccionario = array('{vin}'=>$this->modelo->datos['vin'],\n\t\t\t '{ubicacion}'=>$this->modelo->datos['ubicacion'],\n\t\t\t '{subUbicacion}'=>$this->modelo->datos['subUbicacion'],\n\t\t\t '{nombre_sesion}'=>$_SESSION['usuario']);\n\t\t\t$vista = file_get_contents('Vista/UbicacionEncontrada.html');\n\t\t\tforeach ($diccionario as $dato => $significado) {\n\t\t\t\t$vista =str_replace( $dato, $significado , $vista);\n\t\t\t}\n\t\t\techo $vista;\n\t\t}\n\t\telse\n\t\t{\n\t\t\trequire('Vista/UbicacionInexistente.html');\n\t\t}\n\t}", "function index() \n\t{\n\t\t/* TODO: This logic can be optimized more */\n\t\t\n\t\t$datevalue2 = $this->_date;\n\t\t\t\t\n\t\tif($_GET['log_file'])\n\t\t\tdefine(\"log_file\", $_GET['log_file']);\n\t\t\n\t\tif($_GET['DEBUG'])\n\t\t\tdefine(\"DEBUG\", $_GET['DEBUG']);\n\t\t\n\t\t$this->log_info(log_file, \"CA [delist live index] process started\");\n\n\t\t$final_array = array ();\n\n\t\t/* Fetch the list of indexes with delist security request pending for today */\n\t\t$indxxs = $this->db->getResult ( \"select id,indxx_id from tbl_replace_runnindex_req where startdate='\" . $datevalue2 . \"' and adminapprove='1' and dbapprove='1'\", true );\n\t\t\n\t\tif (! empty ( $indxxs )) \n\t\t{\n\t\t\tforeach ( $indxxs as $indxx ) \n\t\t\t{\t\t\t\t\n\t\t\t\t$indxx_data = $this->db->getResult ( \"select * from tbl_indxx where id='\" . $indxx ['indxx_id'] . \"'\" );\n\t\t\t\tif (! empty ( $indxx_data ))\n\t\t\t\t\t$final_array [$indxx ['indxx_id']]['details'] = $indxx_data;\n\t\t\t\t\n\t\t\t\t$indxx_value = $this->db->getResult ( \"select * from tbl_indxx_value where indxx_id='\" . $indxx ['indxx_id'] . \"' order by date desc \", false, 1 );\n\t\t\t\tif (! empty ( $indxx_value )) \n\t\t\t\t{\n\t\t\t\t\t$final_array [$indxx ['indxx_id']]['index_value'] = $indxx_value;\n\t\t\t\t\t$datevalue = $indxx_value ['date'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->log_error(log_file, \"datevalue not defined, next MYSQL query will fail\");\n\t\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$query = \"Select it.id, it.name, it.isin, it.ticker, it.curr, it.divcurr, it.sedol, it.cusip, it.countryname, \n\t\t\t\t\tfp.price as calcprice, fp.localprice, fp.currencyfactor, sh.share as calcshare from\n\t\t\t\t\ttbl_indxx_ticker it left join tbl_final_price fp on fp.isin=it.isin\n\t\t\t\t\tleft join tbl_share sh on sh.isin=it.isin where\n\t\t\t\t\tfp.date='\" .$datevalue. \"' and fp.indxx_id='\" .$indxx ['indxx_id'].\n\t\t\t\t\t\t\t\t\t\" and sh.indxx_id='\" .$indxx ['indxx_id']. \"and it.indxx_id='\" . $indxx ['indxx_id'];\n\t\t\t\t$indxxprices = $this->db->getResult ( $query, true );\t\t\t\t\n\t\t\t\t$final_array [$indxx ['indxx_id']]['olddata'] = $indxxprices;\n\t\t\t\t\n\t\t\t\t$oldsecurity = $this->db->getResult ( \"select security_id from tbl_replace_runnsecurity where req_id='\" . $indxx ['id'] . \"' and indxx_id='\" . $indxx ['indxx_id'] . \"' \", true );\t\t\t\t\n\t\t\t\t$final_array [$indxx ['indxx_id']]['replacesecurity'] = $oldsecurity;\n\n\t\t\t\t$newsecurities = $this->db->getResult ( \"select name, \tisin,ticker,curr,divcurr,sedol,cusip,countryname from tbl_runnsecurities_replaced where req_id='\" . $indxx ['id'] . \"' and indxx_id='\" . $indxx ['indxx_id'] . \"' \", true );\n\t\t\t\t\n\t\t\t\tif (! empty ( $newsecurities )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newsecurities as $key => $security ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$prices = $this->getSecurtyPrices ( $security ['isin'], $security ['curr'], $indxx_data ['curr'], $datevalue );\n\t\t\t\t\t\t$newsecurities [$key] ['calcprice'] = $prices ['calcprice'];\n\t\t\t\t\t\t$newsecurities [$key] ['localprice'] = $prices ['localprice'];\n\t\t\t\t\t\t$newsecurities [$key] ['currencyfactor'] = $prices ['currencyfactor'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$final_array [$indxx ['indxx_id']]['newsecurity'] = $newsecurities;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (! empty ( $final_array )) \n\t\t{\n\t\t\tforeach ( $final_array as $id => $indxx_array ) \n\t\t\t{\n\t\t\t\t$countnewSeurities = count ( $indxx_array ['newsecurity'] );\n\n\t\t\t\tif ($countnewSeurities) \n\t\t\t\t{\n\t\t\t\t\tif (! empty ( $indxx_array ['replacesecurity'] )) \n\t\t\t\t\t{\n\t\t\t\t\t\t$tempmarketcap = 0;\n\t\t\t\t\t\t$TempWeight = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t/* Replace securties */\n\t\t\t\t\t\tforeach ( $indxx_array ['replacesecurity'] as $replaceSecurity ) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ( $indxx_array ['olddata'] as $oldsecuritykey => $oldsecurity ) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($oldsecurity ['id'] == $replaceSecurity ['security_id']) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$tempmarketcap += $oldsecurity ['calcshare'] * $oldsecurity ['calcprice'];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$deleteSecurityQuery = 'Delete from tbl_indxx_ticker where id=\"' . $oldsecurity ['id'] . '\"';\n\t\t\t\t\t\t\t\t\t$this->db->query ( $deleteSecurityQuery );\n\n\t\t\t\t\t\t\t\t\t$deletepriceQuery = 'Delete from tbl_final_price where indxx_id=\"' . $id . '\" and isin =\"' . $oldsecurity ['isin'] . '\" and date =\"' . $indxx_array ['index_value'] ['date'] . '\" ';\n\t\t\t\t\t\t\t\t\t$this->db->query ( $deletepriceQuery );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$deleteshareQuery = 'Delete from tbl_share where indxx_id=\"' . $id . '\" and isin =\"' . $oldsecurity ['isin'] . '\" ';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$this->db->query ( $deleteshareQuery );\n\t\t\t\t\t\t\t\t\tunset ( $final_array [$id] ['olddata'] [$oldsecuritykey] );\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/* Calculate new index parameters with replaced securities */\n\t\t\t\t\t\tif ($tempmarketcap)\n\t\t\t\t\t\t\t$TempWeight = $tempmarketcap / $countnewSeurities;\n\t\t\t\n\t\t\t\t\t\tif (! empty ( $indxx_array ['newsecurity'] )) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ( $indxx_array ['newsecurity'] as $newsecuritykey => $newsecurity ) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$share = $TempWeight / $newsecurity ['calcprice'];\n\t\t\t\t\t\t\t\t$final_array [$id] ['newsecurity'] [$newsecuritykey] ['calcshare'] = $share;\n\t\t\t\t\t\t\t\t$newsecurity ['calcshare'] = $share;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$final_array [$id] ['olddata'] [] = $newsecurity;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$insertTicker = 'Insert into tbl_indxx_ticker set name=\"' . $newsecurity ['name'] . '\", isin=\"' . $newsecurity ['isin'] . '\", ticker=\"' . $newsecurity ['ticker'] . '\", curr=\"' . $newsecurity ['curr'] . '\", divcurr=\"' . $newsecurity ['divcurr'] . '\",countryname=\"' . $newsecurity ['countryname'] . '\",cusip=\"' . $newsecurity ['cusip'] . '\",sedol=\"' . $newsecurity ['sedol'] . '\",indxx_id=\"' . $id . '\", status=\"1\",weight=\"0\"';\t\n\t\t\t\t\t\t\t\t$this->db->query ( $insertTicker );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$insertPrice = 'Insert into tbl_final_price set date=\"' . $indxx_array ['index_value'] ['date'] . '\", isin=\"' . $newsecurity ['isin'] . '\", localprice=\"' . $newsecurity ['localprice'] . '\", price=\"' . $newsecurity ['calcprice'] . '\", currencyfactor=\"' . $newsecurity ['currencyfactor'] . '\",indxx_id=\"' . $id . '\"';\n\t\t\t\t\t\t\t\t$this->db->query ( $insertPrice );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$insertshare = 'Insert into tbl_share set date=\"' . $indxx_array ['index_value'] ['date'] . '\", isin=\"' . $newsecurity ['isin'] . '\", share=\"' . $newsecurity ['calcshare'] . '\",indxx_id=\"' . $id . '\"';\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->query ( $insertshare );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t$this->log_info(log_file, \"CA [replace live index] process finished\");\n\t\t\n\t\t//$this->saveProcess ( 1 );\n\t\t$this->Redirect(\"index.php?module=calccapub&DEBUG=\" .DEBUG. \"&date=\" .$datevalue2. \"&log_file=\" . basename(log_file), \"\", \"\" );\n\t}", "public function EliminarDetallesVentas()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\n\t\t$sql = \" select * from detalleventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql2);\n\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t$num = $stmt->rowCount();\n\n\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t$sql = \" update productos set \"\n\t.\" existencia = ? \"\n\t.\" where \"\n\t.\" codproducto = ?;\n\t\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1, $existencia);\n\t$stmt->bindParam(2, $codproducto);\n\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t$existencia = $existenciadb + $cantventa;\n\t$stmt->execute();\n\n\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1,$coddetalleventa);\n\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1,$codventa);\n\t$stmt->bindParam(2,$codproducto);\n\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t$stmt->execute();\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\n if($num>0) {\n\n$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t$array=array();\n\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t$this->p[] = $row;\n\n\t\t$codproducto = $row['codproducto'];\n\t\t$codingrediente = $row['codingrediente'];\n\t\t$cantracion = $row['cantracion'];\n\t\t$cantingrediente = $row['cantingrediente'];\n\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\t\t$update = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($update);\n\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t$stmt->execute();\n\n\t\t }\n}\n############ FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS REGISTRADOS ##############\n\n\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$paea[] = $row;\n\t\t}\n\t\t$subtotalivasive = $paea[0][\"subtotalivasive\"];\n\t\t$subtotalivanove = $paea[0][\"subtotalivanove\"];\n\t\t$iva = $paea[0][\"ivave\"]/100;\n\t\t$descuento = $paea[0][\"descuentove\"]/100;\n\t\t$totalivave = $paea[0][\"totalivave\"];\n\t\t$totaldescuentove = $paea[0][\"totaldescuentove\"];\n\t\t$totaldb = $paea[0][\"totalpago\"];\n\t\t$montopagado = $paea[0][\"montopagado\"];\n\t\t\t\n\t\t\n$sql3 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'SI'\";\n\t\t$stmt = $this->dbh->prepare($sql3);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$pae[] = $row;\n\t\t\t}\n\t\t$preciocompraiva = ($pae[0][\"preciocompra\"]== \"\" ? \"0\" : $pae[0][\"preciocompra\"]);\n\t\t$importeivasi = ($pae[0][\"importe\"]== \"\" ? \"0\" : $pae[0][\"importe\"]);\n\t\t$importe2si = ($pae[0][\"importe2\"]== \"\" ? \"0\" : $pae[0][\"importe2\"]);\n\t\n$sql5 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'NO'\";\n\t\t$stmt = $this->dbh->prepare($sql5);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($roww = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $roww;\n\t\t\t}\n\t\t$preciocompra = ($roww[\"preciocompra\"]== \"\" ? \"0\" : $roww[\"preciocompra\"]);\n\t\t$importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\t\t$importe2 = ($roww[\"importe2\"]== \"\" ? \"0\" : $roww[\"importe2\"]);\n\t\t\nif(base64_decode($_GET[\"ivaproducto\"])==\"SI\"){\t\n\n\t\t$sql = \" update ventas set \"\n\t\t\t .\" subtotalivasive = ?, \"\n\t\t\t .\" totalivave = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" montodevuelto= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentove);\n\t\t$stmt->bindParam(4, $totalpago);\n\t\t$stmt->bindParam(5, $devuelto);\n\t\t$stmt->bindParam(6, $codventa);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanove+$totaliva,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$totalpago= rount($tot-$totaldescuentove,2);\n\t\t$devuelto= ($montopagado== \"0.00\" ? \"0\" : rount($montopagado-$totalpago,2));\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\nif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = ($row['ingresos']== \"\" ? \"0.00\" : $row['ingresos']);\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$calculo=rount($totaldb-$totalpago,2);\n\t\t$txtTotal = rount($ingreso-$calculo,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t\t\n\t\t } else {\n\n $sql = \" update ventas set \"\n\t\t\t .\" subtotalivanove = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" montodevuelto= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentove);\n\t\t$stmt->bindParam(3, $totalpago);\n\t\t$stmt->bindParam(4, $devuelto);\n\t\t$stmt->bindParam(5, $codventa);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasive+$totalivave,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$totalpago= rount($tot-$totaldescuentove,2);\n\t\t$devuelto= ($montopagado== \"0.00\" ? \"0\" : rount($montopagado-$totalpago,2));\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\nif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = ($row['ingresos']== \"\" ? \"0.00\" : $row['ingresos']);\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$calculo=rount($totaldb-$totalpago,2);\n\t\t$txtTotal = rount($ingreso-$calculo,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t\t\n\t } \n\necho \"<div class='alert alert-info'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-check-square-o'></span> EL DETALLE DE VENTA DE PRODUCTO FUE ELIMINADO EXITOSAMENTE </center>\";\necho \"</div>\";\nexit;\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $row;\n\t\t\t}\n\t\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" existencia = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $existencia);\n\t\t\t$stmt->bindParam(2, $codproducto);\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$existencia = $existenciadb + $cantventa;\n\t\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codventa);\n\t\t\t$stmt->bindParam(2,$codproducto);\n\t\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$stmt->execute();\n\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #######################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\nif($num>0) {\n\n\n\t$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t$array=array();\n\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\n\t\t$codproducto = $row['codproducto'];\n\t\t$codingrediente = $row['codingrediente'];\n\t\t$cantracion = $row['cantracion'];\n\t\t$cantingrediente = $row['cantingrediente'];\n\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\n\t\t$update = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($update);\n\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t$stmt->execute();\n\n\n\t\t }\n\n}\n################### FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS ###################\n\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\tif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n\t\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($roww = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $roww;\n\t\t\t}\n\t\t$totaldb = $roww[\"totalpago\"];\n\n\t\t$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\tif (isset($row['ingresos'])) { $ingreso = $row['ingresos']; } else { $ingreso ='0.00'; }\n\t\t//$ingreso = $row['ingresos'];\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$txtTotal = rount($ingreso-$totaldb,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\t\t$sql = \" update mesas set \"\n\t\t.\" statusmesa = ? \"\n\t\t.\" where \"\n\t\t.\" codmesa = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $statusmesa);\n\t\t$stmt->bindParam(2, $codmesa);\n\n\t\t$statusmesa = strip_tags('0');\n\t\t$codmesa = base64_decode($_GET[\"codmesa\"]);\n\t\t$stmt->execute();\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\n\t\t$sql = \" delete from ventas where codventa = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetalleventa);\n\t\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t\t$stmt->execute();\n\n\techo \"<div class='alert alert-info'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-check-square-o'></span> EL DETALLE DE VENTA DE PRODUCTO FUE ELIMINADO EXITOSAMENTE </center>\";\n\techo \"</div>\";\n\texit;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\techo \"<div class='alert alert-info'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-check-square-o'></span> USTED NO PUEDE ELIMINAR DETALLES EN VENTAS, NO ERES EL ADMINISTRADOR DEL SISTEMA</center>\";\n\techo \"</div>\";\n\texit;\n\t\t}\n\t}", "public function errors()\n {\n // return new \\ArrayList($this->errorList.values());\n }", "public function get_list_errors()\n\t{\n\t\treturn $this->errors;\n\t}", "function restablecer()\n {\n $this->_datos = null;\n $this->_errores = array();\n }", "private function requete_deja_choisi()\r\n\t{\r\n\t\t$liste_eleves = array();\r\n\t\t$req = mysql_query(\"SELECT * FROM binome WHERE nom2 = '\" . $this->login . \"'\");\r\n\t\twhile($data = mysql_fetch_array($req)) {\r\n\t\t\tarray_push($liste_eleves, $data['nom1']);\r\n\t\t}\r\n\t\treturn $liste_eleves;\r\n\t}", "public static function liste(){\r\n\t\t\t$sql = \"SELECT idEvenement, nomEvenement, description, dateHeure FROM evenement ORDER BY idEvenement DESC\";\r\n\t\t\t$stmt =\tDB::get_instance()->prepare($sql);\r\n\t\t\t$stmt->execute();\r\n\t\t\t$resul = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\treturn $resul;\r\n\r\n\t\t\t}", "function spiplistes_listes_boite_elligibles ($id_liste, $statut_liste, $tri, $debut) {\n\t\n\t$result = '';\n\t\n\t// proposer les elligibles si id_liste (liste_gerer)\n\tif($id_liste > 0) {\n\t\tlist($elligibles, $nb_elligibles) = spiplistes_listes_auteurs_elligibles($id_liste, $statut_liste);\n\t\tif($nb_elligibles > 0) {\n\t\t\t$result = spiplistes_listes_selectionner_elligibles(\n\t\t\t\t$elligibles\n\t\t\t\t, $nb_elligibles\n\t\t\t\t, $id_liste\n\t\t\t\t, $tri\n\t\t\t\t, _SPIPLISTES_ACTION_ABONNER_AUTEUR\n\t\t\t\t, _SPIPLISTES_EXEC_LISTE_GERER\n\t\t\t\t, _SPIPLISTES_ID_GROSSE_BOITE\n\t\t\t);\n\t\t}\n\t}\n\treturn($result);\n}", "public function CambiaEstatus()\n {\n \t$consulta = $this->Modelo_direccion->getAllEntradas($this->session->userdata('id_direccion'));\n \t\n \tforeach ($consulta as $key) {\n \t\t$idoficio = $key->id_recepcion;\n\n \t\tif($this->db->query(\"CALL comparar_fechas('\".$idoficio.\"')\"))\n \t\t{\n \t\t\techo 'Ejecutando Cambios';\n \t\t}else{\n \t\t\tshow_error('Error! al ejecutar');\n \t\t}\n \t}\n\n redirect(base_url() . 'Direcciones/Externos/RecepcionDir/');\n }", "public function findPagoDetalleMontoNegativo()\r\n\t\t{\r\n\t\t\t$registers = self::findPagoDetalleMontoNegativoModel();\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Montos Negativos'));\r\n\t\t\t}\r\n\t\t}", "public function imprimir_listado($sender, $param)\r\n {\r\n $arreglo_mes=array('01'=>'Enero','02'=>'Febrero','03'=>'Marzo','04'=>'Abril','05'=>'Mayo','06'=>'Junio','07'=>'Julio','08'=>'Agosto','09'=>'Septiembre','10'=>'Octubre','11'=>'Noviembre','12'=>'Diciembre');\r\n\r\n //Busqueda de Registros\r\n $cod_organizacion = usuario_actual('cod_organizacion');\r\n $ano = $this->drop_ano->SelectedValue;\r\n $mes = $this->drop_mes->SelectedValue;\r\n $fecha_inicio=\"$ano/$mes/01\";\r\n $fecha_fin=\"$ano/$mes/31\";\r\n $codigo_sin_descomponer=$this->drop_retenciones->SelectedValue;\r\n $codigo = descomponer_codigo_gasto(rellena_derecha($codigo_sin_descomponer,'24','0'));\r\n \r\n \r\n //obtenemos nombre de la retencion\r\n $sql = \"select descripcion from presupuesto.retencion\r\n where ((cod_organizacion = '$cod_organizacion') and (codigo ='$codigo_sin_descomponer')and(ano = '$ano') )\";\r\n $resultado_desc = cargar_data($sql,$this);\r\n $retencion=$resultado_desc[0]['descripcion'].\" (\".codigo_resumido($this->drop_retenciones->Text,$sender).\")\";\r\n\r\n\r\n $sql = \"(select dp.id,m.fecha_cheque as fecha,dp.monto,\r\n CONCAT(dp.tipo_documento_causado,'-',dp.numero_documento_causado) as documento,\r\n CONCAT(p.nombre,' (',p.rif,')') as proveedor\r\n FROM presupuesto.detalle_pagado as dp\r\n INNER JOIN presupuesto.maestro_pagado as m ON (m.numero=dp.numero_documento_pagado AND m.ano=dp.ano)\r\n INNER JOIN presupuesto.proveedores as p ON (p.cod_proveedor = m.cod_proveedor)\r\n where ((dp.es_retencion='1') and (m.cod_organizacion = '$cod_organizacion') and\r\n (dp.ano = '$ano') and\r\n (dp.partida='$codigo[partida]' and dp.generica='$codigo[generica]' and especifica='$codigo[especifica]'\r\n and dp.subespecifica='$codigo[subespecifica]' and dp.ordinal='$codigo[ordinal]')and (m.estatus_actual='NORMAL')\r\n and m.fecha_cheque BETWEEN '$fecha_inicio' AND '$fecha_fin' ))\r\n\r\n UNION\r\n ( SELECT rp.id,m.fecha,rp.monto,\r\n CONCAT(m.tipo,'-',m.referencia) as documento,\r\n CONCAT(p.nombre,' (',p.rif,')') as proveedor\r\n FROM presupuesto.retencion_pagado as rp\r\n INNER JOIN presupuesto.cheques as c ON (c.cod_movimiento=rp.cod_movimiento AND c.ano=rp.ano AND c.estatus_actual='NORMAL')\r\n INNER JOIN presupuesto.bancos_cuentas_movimientos as m ON (m.cod_movimiento=rp.cod_movimiento AND m.ano=rp.ano)\r\n INNER JOIN presupuesto.proveedores as p ON (p.cod_proveedor = c.cod_proveedor)\r\n WHERE (rp.codigo_retencion='$codigo_sin_descomponer' AND m.fecha BETWEEN '$fecha_inicio' AND '$fecha_fin' )\r\n)\r\n ORDER BY fecha ASC \" ;\r\n $resultado_rpt=cargar_data($sql,$this);\r\n\r\n if (!empty ($resultado_rpt))\r\n { // si la consulta trae resultados, entonces si se imprime\r\n require('../tcpdf/tcpdf.php');\r\n \r\n\r\n $pdf=new TCPDF('l', 'mm', 'legal', true, 'utf-8', false);\r\n $pdf->SetFillColor(205, 205, 205);//color de relleno gris\r\n\r\n $info_adicional= \"Listado de Movimientos Retencion Año: $ano Mes: $arreglo_mes[$mes]\\n\".\r\n $retencion;\r\n $pdf->SetHeaderData(\"LogoCENE.gif\", 15, \"Sistema de Información Automatizado - \".usuario_actual('nombre_organizacion'), $info_adicional);\r\n\r\n // set header and footer fonts\r\n $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\r\n $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\r\n\r\n // set default monospaced font\r\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\r\n\r\n //set margins\r\n $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT, 2);\r\n $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\r\n $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\r\n\r\n //set auto page breaks\r\n $pdf->SetAutoPageBreak(TRUE, 15);//$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\r\n\r\n //set image scale factor\r\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\r\n\r\n $pdf->SetAuthor('Proyecto SIMON');\r\n $pdf->SetTitle('Reporte de Movimientos Retencion');\r\n $pdf->SetSubject('Reporte de Movimientos Retencion Año:$ano Mes:$arreglo_mes[$mes] ');\r\n\r\n $pdf->AddPage();\r\n\r\n $listado_header = array('Fecha','Documento', 'Proveedor', 'Debe','Haber','Saldo');\r\n\r\n $pdf->SetFont('helvetica', 'B', 12);\r\n $pdf->SetFillColor(255, 255, 255);\r\n $pdf->Cell(0, 6, \"Listado de Movimientos de \".$retencion, 0, 1, 'C', 1);\r\n $pdf->Ln(1);\r\n $pdf->SetFont('helvetica', '', 10);\r\n $pdf->Cell(0, 6, \"Año: $ano Mes: $arreglo_mes[$mes] \", 0, 1, '', 1);\r\n\r\n\r\n\r\n $saldo_inicial= saldo_mes_retencion($ano,$mes,$cod_organizacion,$codigo_sin_descomponer,$this);\r\n\r\n\r\n\r\n $pdf->Cell(0, 6, \"Saldo Inicial del Mes: Bs. \".number_format($saldo_inicial, 2, ',', '.'), 0, 1, '', 1);\r\n $pdf->SetFont('helvetica', '', 10);\r\n // se realiza el listado de asistentes en el PDF\r\n $pdf->SetFillColor(210,210,210);\r\n $pdf->SetTextColor(0);\r\n $pdf->SetDrawColor(41, 22, 11);\r\n $pdf->SetLineWidth(0.3);\r\n $pdf->SetFont('', 'B');\r\n // Header\r\n $w = array(20, 30, 180, 33, 33,33);\r\n for($i = 0; $i < count($listado_header); $i++)\r\n $pdf->Cell($w[$i], 5, $listado_header[$i], 1, 0, 'C', 1);\r\n $pdf->Ln();\r\n // Color and font restoration\r\n $pdf->SetFillColor(224, 235, 255);\r\n $pdf->SetTextColor(0);\r\n $pdf->SetFont('','',10);\r\n // Data\r\n $fill = 0;\r\n $borde=\"LR\";\r\n $ultimo_elemento = end($resultado_rpt);\r\n foreach($resultado_rpt as $row) {\r\n if ($row == $ultimo_elemento) {$borde=\"LRB\";}\r\n $pdf->Cell($w[0], 6, cambiaf_a_normal($row['fecha']), $borde, 0, 'L', $fill);\r\n $pdf->Cell($w[1], 6, strtoupper($row['documento']), $borde, 0, 'C', $fill);\r\n $pdf->Cell($w[2], 6, $row['proveedor'], $borde, 0, 'L', $fill);\r\n \r\n if($row['monto']<0){\r\n $monto=\"Bs. \".number_format(abs($row['monto']), 2, ',', '.');\r\n $pdf->Cell($w[3], 6,$monto , $borde, 0, 'R', $fill);\r\n $total_debe+= abs($row['monto']);\r\n }else{$pdf->Cell($w[3], 6,\"Bs. \".number_format('0', 2, ',', '.') , $borde, 0, 'R', $fill);}\r\n\r\n if($row['monto']>0){\r\n $monto=\"Bs. \".number_format($row['monto'], 2, ',', '.');\r\n $pdf->Cell($w[4], 6, $monto, $borde, 0, 'R', $fill);\r\n $total_haber += ($row['monto']);\r\n }else{$pdf->Cell($w[4], 6,\"Bs. \".number_format('0', 2, ',', '.') , $borde, 0, 'R', $fill);}\r\n \r\n $pdf->Cell($w[5], 6, \"Bs. \".number_format($row['saldo'], 2, ',', '.'), $borde, 0, 'R', $fill);\r\n \r\n \r\n $total_saldo = $row['saldo'];\r\n $pdf->SetTextColor(0); // iniciamos con el color negro\r\n\r\n $pdf->Ln();\r\n $fill=!$fill;\r\n }\r\n $pdf->SetFillColor(255, 255, 255);\r\n $pdf->SetFont('', 'B');\r\n $pdf->Cell($w[0], 6, \"\", '', 0, 'R', 0);\r\n $pdf->Cell($w[1], 6, \"\", '', 0, 'R', 0);\r\n $pdf->Cell($w[2], 6, \"TOTAL:\", '', 0, 'R', 0);\r\n $pdf->Cell($w[3], 6, \"Bs. \".number_format($total_debe, 2, ',', '.'), 1, 0, 'R', 0);\r\n $pdf->Cell($w[4], 6, \"Bs. \".number_format($total_haber, 2, ',', '.'), 1, 0, 'R', 0);\r\n $pdf->Cell($w[5], 6, \"Bs. \".number_format(($total_debe-$total_haber)+$saldo_inicial, 2, ',', '.'), 1, 0, 'R', 0);\r\n $pdf->Output(\"listado_movimientos_retencion_$ano_$mes.pdf\",'D');\r\n }\r\n }", "private function f_ListarValidado(){\n $lobj_AccesoZona = new cls_AccesoZona;\n //creo la peticion\n $pet = array(\n 'operacion' => 'buscarZonas',\n 'codigo_usuario' => $_SESSION['Con']['Nombre']\n );\n //guardo los datos en el objeto y gestiono para obtener una respuesta\n $lobj_AccesoZona->setPeticion($pet);\n $zona = $lobj_AccesoZona->gestionar();\n $cadenaBusqueda = ' where codigo_zona in(';\n if($zona['success'] == 1){\n for($x = 0;$x < count($zona['registros']) - 1; $x++){\n $cadenaBusqueda .= $zona['registros'][$x].',';\n }\n $cadenaBusqueda .= $zona['registros'][count($zona['registros']) - 1].' ';\n }\n $cadenaBusqueda .= \") \";\n $cadenaBusqueda .= ($this->aa_Atributos['valor']=='')?'':\"and nombre_finca like '%\".$this->aa_Atributos['valor'].\"%'\";\n $ls_SqlBase=\"SELECT * FROM agronomia.vfinca $cadenaBusqueda\";\n $orden = ' order by codigo_productor,letra';\n $ls_Sql = $this->f_ArmarPaginacion($ls_SqlBase,$orden);\n $x=0;\n $la_respuesta=array();\n $this->f_Con();\n $lr_tabla=$this->f_Filtro($ls_Sql);\n while($la_registros=$this->f_Arreglo($lr_tabla)){\n $la_respuesta[$x]['codigo']=$la_registros['codigo_productor'];\n $la_respuesta[$x]['nombre']=$la_registros['codigo_productor'].'-'.$la_registros['letra'];\n $la_respuesta[$x]['id_finca']=$la_registros['id_finca'];\n $x++;\n }\n $this->f_Cierra($lr_tabla);\n $this->f_Des();\n $this->aa_Atributos['registros'] = $la_respuesta;\n $lb_Enc=($x == 0)?false:true;\n return $lb_Enc;\n }", "function getListOfErrors() {\n\t\treturn $this->errorList;\n\t}", "public function getAll(){\n $query = $this->fpdo->from('view_history_attend')->orderBy('id_demand DESC')->execute();\n $result = null;\n /* 2. encriptar IDs */\n if($query->rowCount()!=0){\n $result = $query->fetchAll(PDO::FETCH_OBJ);\n $status = true;\n $msg = \"Lista atenciones realizadas\";\n }\n else{\n $result = array();\n $status = false;\n $msg = \"No existen registros\";\n }\n /* 3. retornar valores en un array Response */\n return $this->response->send(\n $result,\n $status,\n $msg,\n []\n );\n }", "private function listauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t// cree un auteur\n\t\tif(isset($_SESSION['error_auteur_cree'])) {unset($_SESSION['error_auteur_cree']); }\n\t\tif(isset($_POST['cree_auteur'])) {\n\t\t\t$nom = Utils::getPost('nom_auteur');\n\t\t\tif ($nom ) {\n\t\t\t\t$nom = Utils::filtreForte($nom);\n\t\t\t\tif (strlen($nom) > 2) { \n\t\t\t\t\t$this->_ctrlAuteur->creeAuteur($nom);\n\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_auteur_cree'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=ajoutauteur\");\n\t\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t}\n\t\t} \n\n\t\t// modifie un auteur\n\t\tif(isset($_SESSION['error_auteur_modifie'])) unset($_SESSION['error_auteur_modifie']);\n\t\tif(isset($_POST['modifie_auteur'])){\n\t\t\t$nom = Utils::getPost('nom_auteur_m');\n\t\t\t$id = Utils::getPost('id_auteur_m');\n\t\t\tif ($nom && $id) {\n\t\t\t\t\t$id = Utils::filtreForte($id);\n\t\t\t\t\t$nom = Utils::filtreForte($nom);\n\t\t\t\t\t\tif (strlen($nom) > 2) {\n\t\t\t\t\t\t\t$this->_ctrlAuteur->auteurModifieBD($id, $nom);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_auteur_modifie'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=mauteur&id=\".$id);\n\t\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t\t}\n\n\t\t}\n\n\t\t$this->_ctrlAuteur->auteurListe();\n\t}", "function affichageErreur()\n\t{\n\t}", "public function buscarMotivosDetalhado() {\r\n\r\n $retorno = array();\r\n\r\n $sql = \"\r\n SELECT\r\n mdroid,\r\n mdrdescricao\r\n FROM\r\n motivo_detalhado_reclamacao\r\n WHERE\r\n mdrdt_exclusao IS NULL\r\n ORDER BY\r\n mdrdescricao\";\r\n\r\n if (!$rs = pg_query($this->conn, $sql)) {\r\n throw new ErrorException(self::MENSAGEM_ERRO_PROCESSAMENTO);\r\n }\r\n\r\n while ($row = pg_fetch_object($rs)) {\r\n $retorno[] = $row;\r\n }\r\n\r\n return $retorno;\r\n }", "public function actionBasedataverifylist_error()\n {\n $result = [];\n $management_area = Farms::getManagementArea()['id'];\n $plantings = Plantingstructurecheck::find()->where(['management_area'=>$management_area,'year'=>User::getYear()])->all();\n $i = 0;\n foreach ($plantings as $k => $value) {\n $i++;\n $farm = Farms::findOne($value['farms_id']);\n $contractarea = $farm['contractarea'];\n $leasename = $farm['farmername'];\n $area = $farm['contractarea'];\n $cardid = $farm['cardid'];\n $telephone = $farm['telephone'];\n $plantsum = 0;\n $ddarea = 0;\n $ddzongdi = '';\n $ddbtfarmer = '';\n $ddbtlease = '';\n $ymarea = 0;\n $ymzongdi = '';\n $ymbtfarmer = '';\n $ymbtlease = '';\n $xm = 0;\n $mls = 0;\n $zd = 0;\n $by = 0;\n $lm = 0;\n $other = 0;\n $verifydate = '';\n $content = '';\n $isFarmer = false;\n if($value['lease_id'] == 0) {\n $isFarmer = true;\n $plantsum+=$value['area'];\n $verifydate = $value['verifydate'];\n $content = $value['content'];\n switch ($value['plant_id']) {\n case 6:\n $ddarea = $value['area'];\n $ddzongdi = $value['zongdi'];\n $ddbtfarmer = '100%';\n $ddbtlease = '0%';\n break;\n case 3:\n $ymarea = $value['area'];\n $ymzongdi = $value['zongdi'];\n $ymbtfarmer = '100%';\n $ymbtlease = '0%';\n break;\n case 2:\n if($value['area'])\n $xm = $value['area'];\n else {\n $xm = 0;\n }\n break;\n case 4:\n if($value['area'])\n $mls = $value['area'];\n else\n $mls = 0;\n break;\n case 14:\n if($value['area'])\n $zd = $value['area'];\n else {\n $zd = 0;\n }\n break;\n case 8:\n if($value['area'])\n $by = $value['area'];\n else\n $by = 0;\n break;\n case 17:\n if($value['area'])\n $lm = $value['area'];\n else\n $lm = 0;\n break;\n case 16:\n if($value['area'])\n $other = $value['area'];\n else\n $other = 0;\n break;\n }\n } else {\n if(Plantingstructurecheck::find()->where(['farms_id'=>$farm['id'],'year'=>User::getYear()])->count() > 2)\n $contractarea = 0;\n $lease = Lease::findOne($value['lease_id']);\n $leasename = $lease->lessee;\n $cardid = $lease->lessee_cardid;\n $area = $plantsum;\n $telephone = $lease->lessee_telephone;\n }\n $result[] = [\n 'row' => $i,\n 'management_area' => ManagementArea::getAreanameOne($farm['management_area']),\n 'farmname' => $farm['farmname'],\n 'farmername' => $farm['farmername'],\n 'contractnumber' => $farm['contractnumber'],\n 'lease' => $leasename,\n 'cardid' => $cardid,\n 'telephone' => $telephone,\n 'contractarea' => $contractarea,\n 'area' => $area,\n 'ddarea' => $ddarea,\n 'ddzongdi' => $ddzongdi,\n 'ddbtfarmer' => $ddbtfarmer,\n 'ddbtlease' => $ddbtlease,\n 'ymarea' => $ymarea,\n 'ymzongdi' => $ymzongdi,\n 'ymbtfarmer' => $ymbtfarmer,\n 'ymbtlease' => $ymbtlease,\n 'xm' => $xm,\n 'mls' => $mls,\n 'zd' => $zd,\n 'by' => $by,\n 'lm' => $lm,\n 'other' => $other,\n 'verifydate' => $verifydate,\n 'content' => $content,\n ];\n }\n return $this->render('basedataverifylist', [\n 'result' => $result,\n 'areaname' => Farms::getManagementArea()['areaname'],\n ]);\n }", "public function getListAction(){\n\t\t$reponse = new Reponse();\n\t\t$mylocationid= $this->getParam('locationid');\n\t\t$myservingid= $this->getParam('servingid');\n\t\t$calendar= $this->getParam('calendar');\n\t\t$guestid= $this->getParam('guestid');\n\t\t$cancelled= $this->getParam('cancelled');\n\t\t$arrived= $this->getParam('arrived');\n\t\t$mylocation=Object\\Location::getById( $mylocationid, 1 );\n\t\t$myserving=Object\\Serving::getById( $myservingid, 1 );\n\t\t$myguest=Object\\Guest::getById( $guestid, 1 );\n\t\tif( ($mylocation instanceof Object\\Location) || ($myserving instanceof Object\\Serving) || ($guest instanceof Object\\Guest) ){\n\t\t\t//we check if we are in the Editor\n\t\t\tif( $_POST['action'] ){\n\t\t\t\t//if REMOVE\n\t\t\t\tif($_POST['action'] ==\"remove\"){\n\t\t\t\t\tforeach( $_POST['id'] as $id){\n\t\t\t\t\t\t$myreservation=Object\\Reservation::getById( $id, 1);\n\t\t\t\t\t\tif( $myreservation instanceof Object\\Reservation){\n\t\t\t\t\t\t\t$myreservation->SetStatus('Cancelled');\n\t\t\t\t\t\t\t$myreservation->save();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$reponse->message='TXT_RESERVATION_LIST';\n\t\t\t\t\t$reponse->success=true;\n\t\t\t\t\t$reponse->data ='';\n\t\t\t\t}\n\t\t\t\t//if EDIT\n\t\t\t\tif($_POST['action'] ==\"edit\"){\n\t\t\t\t\t$myreservation=Object_Reservation::getById( $_POST['data']['id'], 1 );\n\t\t\t\t\tif( $_POST['data']['guestid'] ){\n\t\t\t\t\t\t$guest=Object_Guest::getById( $_POST['data']['guestid'], 1);\n\t\t\t\t\t\tif($guest instanceof Object_Guest){\n\t\t\t\t\t\t\t$guest->setLastname($_POST['data']['guestname']);\n\t\t\t\t\t\t\t$guest->setTel($_POST['data']['guesttel']);\n\t\t\t\t\t\t\t$guest->setBookingnotes($_POST['data']['bookingnotes']);\n\t\t\t\t\t\t\t$guest->setPreferredlanguage($_POST['data']['preferredlanguage']);\n\t\t\t\t\t\t\t$guest->setNewsLetter($_POST['data']['newsLetter']);\n\t\t\t\t\t\t\t$guest->save();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//date update needs to be reworked\n\t\t\t\t\t$daystart = $myreservation->getStart()->get('dd-MM-YYYY');\n\t\t\t\t\t$newdatestart=new Zend_Date( $daystart.' '.$_POST['data']['start'].':00', 'dd-MM-YYYY HH:mm:ss');\n\t\t\t\t\t$myreservation->setBookingref($_POST['data']['bookingref']);\n\t\t\t\t\t$myreservation->setBookingnotes($_POST['data']['bookingnotes']);\n\t\t\t\t\tif( $_POST['data']['status'] == 'Annulé' ){$_POST['data']['status'] = \"Cancelled\"; }\n\t\t\t\t\t$myreservation->setStatus($_POST['data']['status']);\n\t\t\t\t\tif( $_POST['data']['arrived'] == '1' ){ $arrived = 1; }else{ $arrived = 0; }\n\t\t\t\t\tif( $arrived == 1 ){\n\t\t\t\t\t\t$myreservation->setActualpartysize( $_POST['data']['partysize'] );\n\t\t\t\t\t\t$myreservation->setPartysize( $myreservation->getPartysize() );\n\t\t\t\t\t\t$myreservation->setActualstart( $newdatestart );\n\t\t\t\t\t\t$myreservation->setStart( $myreservation->getStart() );\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$myreservation->setPartysize($_POST['data']['partysize']);\n\t\t\t\t\t\t$myreservation->setStart( $newdatestart );\n\t\t\t\t\t}\n\t\t\t\t\t//Prework Table input\n\t\t\t\t\t$tableids=explode(',', $_POST['data']['table']);\n\t\t\t\t\t$tablearray=array();\n\t\t\t\t\tforeach($tableids as $tableid){\n\t\t\t\t\t\t$variable=explode('-', $tableid);\n\t\t\t\t\t\t$table = $this->selectedLocation->getResource()->getTable($variable[0], $variable[1]);\n\t\t\t\t\t\tif( $table instanceof Object\\Table){\n\t\t\t\t\t\t\tarray_push($tablearray,$table);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$myreservation->setTable($tablearray);\n\t\t\t\t\t$myreservation->setArrived($arrived);\n\t\t\t\t\t$myreservation->save();\n\t\t\t\t\t$data=$_POST['data'];\n\t\t\t\t\tif( $myreservation->getLocation() instanceof Object_Location ){\n\t\t\t\t\t\t$data['locationid']=$myreservation->getLocation()->getId();\n\t\t\t\t\t\t$data['locationname']=$myreservation->getLocation()->getName();\n\t\t\t\t\t}\n\t\t\t\t\t$data['DT_RowId']=\"row_\".$_POST['data']['id'];\n\t\t\t\t\t$reponse->message='TXT_RESERVATION_LIST';\n\t\t\t\t\t$reponse->success=true;\n\t\t\t\t\t$reponse->row =$data;\n\t\t\t\t\t$reponse->debug= $tablearray;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif( !$calendar ){ $date=new Zend_Date(); $calendar=$date->get('dd-MM-YYYY'); }\n\t\t\t\t$calendarstart=$calendar.' '.'00:00:00';\n\t\t\t\t$calendarend=$calendar.' '.'23:59:59';\n\t\t\t\t$calendarstart=new Zend_Date( $calendarstart, 'dd-MM-YYYY HH:mm:ss');\n\t\t\t\t$calendarend=new Zend_Date( $calendarend, 'dd-MM-YYYY HH:mm:ss');\n\t\t\t\tif( $guestid==''){\n\t\t\t\t\tif( $myservingid=='' ){\n\t\t\t\t\t\t$reservations=$mylocation->getResource()->getReservationsByDate( $calendarstart->getTimestamp(), $calendarend->getTimestamp() );\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( $myserving instanceof Object\\Serving ){\n\t\t\t\t\t\t\t$reservations=$myserving->getReservationsByDate( $calendarstart->getTimestamp(), $calendarend->getTimestamp() );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif( $myguest instanceof Object\\Guest ){\n\t\t\t\t\t\t$reservations=$myguest->getReservationsByGuest( $calendarstart->getTimestamp() );\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$data=array();\n\t\t\t\t$i=0;\n\t\t\t\tforeach( $reservations as $key=>$reservation ){\n\t\t\t\t\t$i++;\n\t\t\t\t\t$resa=$this->formatReservation( $reservation );\n\t\t\t\t\tarray_push($data, $resa);\n\t\t\t\t}\n\t\t\t\t$reponse->message='TXT_RESERVATION_LIST';\n\t\t\t\t$reponse->success=true;\n\t\t\t\t$reponse->data =$data;\n\t\t\t}\n\t\t} else {\n\t\t\t$data=array();\n\t\t\t$reponse->message='TXT_NOT_RESERVATION_LIST';\n\t\t\t$reponse->success=false;\n\t\t\t$reponse->data =$data;\n\t\t\t$reponse->debug = 'debug:'.$this->getParam('q');;\n\t\t}\n\t\t$this->render($reponse);\n\t}", "public function deleted_exam_list()\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->load->model('tutor/exams');\n\t\t$tutor_id = $CI->session->userdata('user_id');\n\t\t$exam_data = $CI->exams->deleted_exam_list($tutor_id);\n\t\t$data = array(\n\t\t\t\t'title' => 'Deleted Exam List',\n\t\t\t\t'exam_list' => $exam_data\n\t\t\t);\n\t\t$examList = $CI->parser->parse('tutor_view/exam/deleted_exam',$data,true);\n\t\treturn $examList;\n\t}", "public function demandeListeTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Demande\");//type array\n\t}", "protected function envelheceErros() {\n\t\t\t$sSQL = \"INSERT INTO aged_rdtb_accounting SELECT * FROM rdtb_accounting WHERE login < date_trunc('day',now() - interval '2 days') AND session_id like 'E:%'\";\n\t\t\t$this->bd->consulta($sSQL,false);\n\t\t\t$sSQL = \"DELETE FROM rdtb_accounting WHERE login < date_trunc('day',now() - interval '2 days') AND session_id like 'E:%'\";\n\t\t\t$this->bd->consulta($sSQL);\n\n\t\t\t$this->vacuum(\"rdtb_accounting\");\n\t\t}", "public function getListeFilmsAccueil() {\n try {\n $lesFilms = DB::table('FILM')\n ->Select('NOMIMAGE')\n ->get();\n return $lesFilms;\n } catch (QueryException $e) {\n throw new MonException($e->getMessage());\n }\n }", "public function excluir()\n {\n //Recupera os dados do formulário\n $empresa = $this->input->post();\n $id = $empresa['id_empresa'];\n\n //Executa a exclusão e obtem o status da operação\n $status = $this->EmpresasModel->excluir($id); \n \n //Checa o status da operação\n //Se bem sucedida, informa ao usuário e carrega a tela da lista de empresas\n //Caso contrário, também informa e carrega a tela de excluir empresa\n\t\tif($status){ \n $resultado = $this->EmpresasModel->getAll();\n $dados['empresas'] = $resultado;\n $dados['success'] = 'Empresa excluída com sucesso.';\n $this->load->view(\"Empresas/lista\", $dados);\n\t\t}else{ \n $this->session->set_flashdata('error', 'Não foi possível excluir a empresa.');\n $dados['empresaid'] = $this->EmpresasModel->getById($id);\n $this->load->view(\"Empresas/deleta\", $dados); \n }\n\t}", "public function listaVisitantes(){\n \n }", "function VerificarRegistrosNuevos(){\n $obCon = new Backups($_SESSION['idUser']);\n $sql=\"SHOW FULL TABLES WHERE Table_type='BASE TABLE'\";\n $consulta=$obCon->Query($sql);\n $i=0;\n $RegistrosXCopiar=0;\n $TablasLocales=[];\n \n while ($DatosTablas=$obCon->FetchArray($consulta)){\n $Tabla=$DatosTablas[0];\n if($Tabla<>'precotizacion' and $Tabla<>'preventa'){\n $sql=\"SELECT COUNT(*) as TotalRegistros FROM $Tabla WHERE Sync = '0000-00-00 00:00:00' OR Sync<>Updated\";\n $ConsultaConteo=$obCon->Query($sql);\n $Registros=$obCon->FetchAssoc($ConsultaConteo);\n $TotalRegistros=$Registros[\"TotalRegistros\"];\n if($TotalRegistros>0){ \n $RegistrosXCopiar=$RegistrosXCopiar+$TotalRegistros;\n $TablasLocales[$i][\"Nombre\"]=$Tabla;\n $TablasLocales[$i][\"Registros\"]=$TotalRegistros;\n $i++; \n }\n }\n }\n\n print(\"OK;$RegistrosXCopiar;\".json_encode($TablasLocales, JSON_FORCE_OBJECT));\n }", "function get_oers_list_clean(){\n $oer_category_id=$GLOBALS['glbstg_crs_category'];\n $DB=$GLOBALS['GLBMDL_DB'];\n\n $oers=get_oers_list($DB, $oer_category_id);\n $oersclean=new stdClass();\n foreach ($oers as $key => $value) {\n $oersclean->$key = cleanresponse_course_infos( $value );\n }\n if( count( (array)$oersclean) == 0 ){\n $oersclean->response_notice=\"No permitted informations to be rendered. Check with admin.\";\n }\n return $oersclean;\n\n }", "function listarDetallePeriodoAgencia(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_PERDETAG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setCount(false);\n\n $this->setParametro('id_periodo_venta','id_periodo_venta','int4');\n $this->setParametro('id_agencia','id_agencia','int4');\n $this->setParametro('tipo','tipo','varchar');\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_periodo_venta','int4');\n $this->captura('tipo','varchar');\n $this->captura('fecha','text');\n $this->captura('pnr','varchar');\n $this->captura('apellido','varchar');\n $this->captura('moneda','varchar');\n $this->captura('monto_boleto','numeric');\n $this->captura('comision','numeric');\n $this->captura('monto_credito_debito','numeric');\n $this->captura('ajuste','varchar');\n $this->captura('garantia','varchar');\n $this->captura('autorizacion_deposito','varchar');\n $this->captura('monto_credito_debito_mb','numeric');\n $this->captura('tipo_cambio','numeric');\n $this->captura('cierre_periodo','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function equipementListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Equipement\");//type array\n\t}", "public function onRefreshList()\n {\n $this->prepareComponent();\n\n return $this->refreshList();\n }", "function agendas_evts($id_evenement, $evt_confirme)\r\n{\r\n\t////\tListe des agendas ou est affecté l'événement\r\n\tglobal $AGENDAS_AFFECTATIONS;\r\n\t$tab_agenda = array();\r\n\tforeach(db_colonne(\"SELECT id_agenda FROM gt_agenda_jointure_evenement WHERE id_evenement=\".$id_evenement.\" AND confirme='\".$evt_confirme.\"'\") as $id_agenda){\r\n\t\tif(isset($AGENDAS_AFFECTATIONS[$id_agenda])) $tab_agenda[] = $id_agenda;\r\n\t}\r\n\treturn $tab_agenda;\r\n}", "public function listarParaUnir() {\n\t\t//de sesion, falta cambiar\n\t\t$_SESSION[\"nomCon\"] = $_GET[\"NombreCon\"];\n\t\t$juradoL = $this -> JuradoMapper -> findAllPro();\n\n\t\t$this -> view -> setVariable(\"jurado\", $juradoL);\n\t\t//falta agregar la vista, no se continuar\n\t\t$this -> view -> render(\"jurado\", \"listarUnir\");\n\t\t//falta cambiar\n\t}", "function listeEpreuvesClasse(){\n $tableClasses=new Zoraux_Modeles_Classe();\n $id=$_GET['id'];\n $classe=$tableClasses->get($id);\n $this->vue->classe=$classe;\n $epreuves=$this->where('classe_id=?',array($id));\n $this->vue->epreuves=$epreuves;\n }", "static public function ctrMensajeSinRevisar(){\n\n\t\t\t$tabla = \"mensajes\";\n\n\t\t\t$respuesta = ModeloMensajes::mdlMensajeSinRevisar($tabla);\n\n\t\t\t$sumaRevision = 0;\n\n\t\t\tforeach ($respuesta as $key => $value) {\n\n\t\t\t\tif($value[\"revision\"] == 0){\n\n\t\t\t\t\t++$sumaRevision;\n\n\t\t\t\t\techo '<span class=\"badge badge-danger navbar-badge\">'.$sumaRevision.'</span>';\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}", "function notifictionList(){\n $this->check_admin_user_session();\n $userId = $_SESSION[ADMIN_USER_SESS_KEY]['userId'];\n $where = array('notificationFor'=>$userId,'webNotify'=>'0');\n $count = $this->common_model->get_total_count(NOTIFICATIONS, array('notificationFor'=>$userId,'isRead'=>'0'));\n $notifiList = $this->common_model->getsingle(NOTIFICATIONS, $where);\n if(!empty($notifiList)){\n $userdata = $this->common_model->getsingle(USERS, array('id'=>$notifiList->notificationBy));\n }\n if(!empty($userdata)){\n $userName= $userdata->fullName;\n }\n if($notifiList){\n $updateData = array('webNotify'=>'1');\n $whereUpdate = array('id'=>$notifiList->id);\n $this->common_model->updateFields(NOTIFICATIONS,$updateData,$whereUpdate);\n $uid = encoding($notifiList->referenceId);\n\n if($notifiList->notificationType=='delete_article'){\n $url= base_url().'admin/article/deleteAticle/'.$uid;\n }elseif($notifiList->notificationType=='delete_training_video'){\n $url= base_url().'admin/video/deleteTrVideoByAdmin/'.$uid;\n }\n else{\n $url= base_url().'admin/video/deleteVideoByAdmin/'.$uid;\n }\n\n $msg = json_decode($notifiList->notificationMessage);\n $msgSend = str_replace(\"[UNAME]\",$userName,$msg->body);\n $title = $msg->title; //set title for show \n echo json_encode(array('status'=>1,'html'=>$msgSend,'title'=>$title,'url'=>$url,'count'=>$count));die;\n }\n echo json_encode(array('status'=>0,'count'=>$count));die;\n }", "public function EliminarDetallesCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" select * from detallecompras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t$sql4 = \"select * from compras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $row;\n\t\t\t}\n\t\t$subtotalivasic = $paea[0][\"subtotalivasic\"];\n\t\t$subtotalivanoc = $paea[0][\"subtotalivanoc\"];\n\t\t$iva = $paea[0][\"ivac\"]/100;\n\t\t$descuento = $paea[0][\"descuentoc\"]/100;\n\t\t$totalivac = $paea[0][\"totalivac\"];\n\t\t$totaldescuentoc = $paea[0][\"totaldescuentoc\"];\n\n\t$sql3 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'SI'\";\n $stmt = $this->dbh->prepare($sql3);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($rowp = $stmt->fetch())\n {\n $p[] = $rowp;\n }\n $importeivasi = ($rowp[\"importe\"]== \"\" ? \"0\" : $rowp[\"importe\"]);\n\n$sql5 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'NO'\";\n $stmt = $this->dbh->prepare($sql5);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($roww = $stmt->fetch())\n {\n $pw[] = $roww;\n }\n $importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\n if(base64_decode($_GET[\"ivaproductoc\"])==\"SI\"){\t\n\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivasic = ?, \"\n\t\t\t .\" totalivac = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentoc);\n\t\t$stmt->bindParam(4, $total);\n\t\t$stmt->bindParam(5, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanoc+$totaliva,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\n\t\t\n\t\t } else {\n\t\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivanoc = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentoc);\n\t\t$stmt->bindParam(3, $total);\n\t\t$stmt->bindParam(4, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasic+$totalivac,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\t\t\n\t\t }\t\t\t\t\t\n\n\t\theader(\"Location: detallescompras?mesage=2\");\n\t\texit;\n\n\t\t}\n\t\telse\n\t\t{\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from compras where codcompra = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$codcompra = base64_decode($_GET[\"codcompra\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t\theader(\"Location: detallescompras?mesage=2\");\n\t\t\texit;\n\t\t}\n\t}\n\telse\n\t{\n\t\theader(\"Location: detallescompras?mesage=3\");\n\t\texit;\n\t}\n}", "function verificar_estructura($d,$e){\n $ret = [];\n foreach($e as $v){\n if(!array_key_exists($v, $d)) $ret[] = $v;\n }\n if($ret != []){ // si no esta vacio\n response(400, 'faltan los elementos listados en data', \n ['faltantes' => $ret,'enviados' => $d]);\n return false;\n } else return true;\n}", "public function getAllVisiteurs(){\r\n\t\t$req =\"select * from visiteur where comptable=0\";\r\n\t\t\r\n\t\t$res = PdoGsb::$monPdo->query($req);\r\n\t\t$lesVisiteurs =array();\r\n\t\t$laLigne = $res->fetch();\r\n\t\twhile($laLigne != null)\t{\r\n\t\t\t$selection = $laLigne['id'];\r\n $nom=$laLigne['nom'];\r\n $prenom=$laLigne['prenom'];\r\n\t\t\t$lesVisiteurs[\"$selection\"]=array(\r\n \"id\"=>\"$selection\",\r\n \"nom\"=>\"$nom\",\r\n \"prenom\"=>\"$prenom\"\r\n );\r\n\t\t\t$laLigne = $res->fetch(); \t\t\r\n\t\t}\r\n\t\treturn $lesVisiteurs;\r\n\t}", "public function listerDemandes() {\n $q = $this->db->prepare('SELECT * FROM DemandeMain WHERE proj_id = :id AND datetime < NOW() - INTERVAL 30 SECOND LIMIT 1');\n $q->bindValue(':id', $this->id, PDO::PARAM_INT);\n $q->execute();\n $row = $q->fetch();\n if(!empty($row)) {\n $this->donnerMain($row['ut_id']);\n $this->deleteDemande($row['ut_id']);\n }\n \n // Then, removing old requests\n $q = $this->db->prepare('DELETE FROM DemandeMain WHERE proj_id = :id AND datetime < NOW() - INTERVAL 30 SECOND');\n $q->bindValue(':id', $this->id, PDO::PARAM_INT);\n $q->execute();\n \n // Now listing current requests\n $q = $this->db->prepare('SELECT * FROM DemandeMain WHERE proj_id = :id');\n $q->bindValue(':id', $this->id, PDO::PARAM_INT);\n $q->execute();\n \n $demandes = array();\n foreach ($q->fetchAll() as $qdemande) {\n $membre = Utilisateur::getM($this->db, intval($qdemande['ut_id']));\n $demande = array($membre,$qdemande['datetime']);\n $demandes[] = $membre;\n }\n return $demandes;\n }", "function evt__efs_lista__modificacion($registros)\n\t{\n\t\t/*\n\t\t\tComo en el mismo request es posible dar una efs de alta y seleccionarla,\n\t\t\ttengo que guardar el ID intermedio que el ML asigna en las efss NUEVAS,\n\t\t\tporque ese es el que se pasa como parametro en la seleccion\n\t\t\t*/\n\t\t$orden = 1;\n\t\tforeach(array_keys($registros) as $id)\n\t\t{\n\t\t\t//Creo el campo orden basado en el orden real de las filas\n\t\t\t$registros[$id]['orden'] = $orden;\n\t\t\t$orden++;\n\t\t\t$accion = $registros[$id][apex_ei_analisis_fila];\n\t\t\tunset($registros[$id][apex_ei_analisis_fila]);\n\t\t\tswitch($accion){\n\t\t\t\tcase 'A':\n\t\t\t\t\t//Por defecto el campo 'columnas' es igual a $this->campo_clave\n\t\t\t\t\t$registros[$id]['columnas'] = $registros[$id][$this->campo_clave];\n\t\t\t\t\t$this->id_intermedio_efs[$id] = $this->get_tabla()->nueva_fila($registros[$id]);\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'B':\n\t\t\t\t\t$this->get_tabla()->eliminar_fila($id);\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'M':\n\t\t\t\t\t//---Si se cambia un identificador que estaba ligado con us columna se cambia tambien el valor de la columna\n\t\t\t\t\t$anterior_id = $this->get_tabla()->get_fila_columna($id, $this->campo_clave);\n\t\t\t\t\t$anterior_col = $this->get_tabla()->get_fila_columna($id, 'columnas');\n\t\t\t\t\tif ($anterior_id != $registros[$id][$this->campo_clave]) {\n\t\t\t\t\t\tif ($anterior_id == $anterior_col) {\n\t\t\t\t\t\t\t$registros[$id]['columnas'] = $registros[$id][$this->campo_clave];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->get_tabla()->modificar_fila($id, $registros[$id]);\n\t\t\t\t\tbreak;\t\n\t\t\t}\n\t\t}\n\t}", "public function getListeVisiteurs(){\n\t\t$req = \"select * from visiteur order by VIS_MATRICULE\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}", "function liste_relais($id){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT nom_domain, ip FROM relais_mail WHERE utilisateur_id_utilisateur = :id AND status_relais != '2'\");\n\t\t$req->execute(array(\"id\"=>$id));\n\t\t$result = $req->fetchAll();\n\n\t\t$req->closeCursor();\n\t\treturn $result;\n\t}" ]
[ "0.58614516", "0.5831233", "0.5785712", "0.5780942", "0.56108457", "0.5588253", "0.5521751", "0.54648286", "0.5455088", "0.5434943", "0.54063445", "0.5402168", "0.5401315", "0.5396333", "0.53839445", "0.5380923", "0.53788465", "0.53787416", "0.53249377", "0.5316983", "0.53026253", "0.52962387", "0.52664506", "0.5246572", "0.5238256", "0.5236991", "0.5235464", "0.5233967", "0.5229454", "0.52087224", "0.52082837", "0.52065873", "0.51938975", "0.51935333", "0.51924986", "0.5181891", "0.51778984", "0.51768684", "0.5176466", "0.51684874", "0.5168306", "0.51676655", "0.51610965", "0.5158369", "0.5129276", "0.5123262", "0.51186204", "0.50985277", "0.50972176", "0.5089002", "0.5087381", "0.5081825", "0.50767964", "0.5072511", "0.5070997", "0.5066386", "0.50654936", "0.50653297", "0.5063481", "0.50626624", "0.5059395", "0.5055454", "0.5055299", "0.5054366", "0.5050164", "0.50431687", "0.5042719", "0.5040465", "0.5040172", "0.5038441", "0.50279737", "0.5026907", "0.50266814", "0.5026248", "0.5021393", "0.5021337", "0.50199103", "0.5017325", "0.50167143", "0.5014513", "0.5012359", "0.50063956", "0.5005868", "0.5004543", "0.50016284", "0.5001547", "0.50000614", "0.49975845", "0.49959308", "0.49942133", "0.49933115", "0.4983325", "0.49829608", "0.49800673", "0.4979462", "0.49718428", "0.49539146", "0.49522954", "0.49508294", "0.49406916", "0.4939585" ]
0.0
-1